From c12c0b7c19c532fad3d3ef7c3695a56a34fb8eb4 Mon Sep 17 00:00:00 2001 From: Walt Jones Date: Fri, 29 Oct 2021 07:36:54 -0700 Subject: [PATCH 01/81] CI use ubuntu-18.04 (#972) --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c964db2bc..5386bf0b2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ on: jobs: build: - runs-on: ubuntu-16.04 + runs-on: ubuntu-18.04 strategy: matrix: node-version: [8, 10, 12, 14, 16] From 10bad442137aa45d788485391c8a8079f9af75a1 Mon Sep 17 00:00:00 2001 From: Walt Jones Date: Thu, 4 Nov 2021 08:28:58 -0700 Subject: [PATCH 02/81] deps: remove unused mootools, bump webpack (#973) --- package-lock.json | 590 ++++++++++++++++++++++++++-------------------- package.json | 3 +- 2 files changed, 330 insertions(+), 263 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5cbd15e03..32073f478 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,21 +5,21 @@ "requires": true, "dependencies": { "@babel/code-frame": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz", - "integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==", + "version": "7.15.8", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.15.8.tgz", + "integrity": "sha512-2IAnmn8zbvC/jKYhq5Ki9I+DwjlrtMPUCH/CpHvqI4dNnlwHwsxoIhlc8WcYY5LSYknXQtAlFYuHfqAFCvQ4Wg==", "dev": true, "requires": { - "@babel/highlight": "^7.12.13" + "@babel/highlight": "^7.14.5" } }, "@babel/generator": { - "version": "7.14.3", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.14.3.tgz", - "integrity": "sha512-bn0S6flG/j0xtQdz3hsjJ624h3W0r3llttBMfyHX3YrZ/KtLYr15bjA0FXkgW7FpvrDuTuElXeVjiKlYRpnOFA==", + "version": "7.15.8", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.15.8.tgz", + "integrity": "sha512-ECmAKstXbp1cvpTTZciZCgfOt6iN64lR0d+euv3UZisU5awfRawOvg07Utn/qBGuH4bRIEZKrA/4LzZyXhZr8g==", "dev": true, "requires": { - "@babel/types": "^7.14.2", + "@babel/types": "^7.15.6", "jsesc": "^2.5.1", "source-map": "^0.5.0" }, @@ -33,47 +33,56 @@ } }, "@babel/helper-function-name": { - "version": "7.14.2", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.14.2.tgz", - "integrity": "sha512-NYZlkZRydxw+YT56IlhIcS8PAhb+FEUiOzuhFTfqDyPmzAhRge6ua0dQYT/Uh0t/EDHq05/i+e5M2d4XvjgarQ==", + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.15.4.tgz", + "integrity": "sha512-Z91cOMM4DseLIGOnog+Z8OI6YseR9bua+HpvLAQ2XayUGU+neTtX+97caALaLdyu53I/fjhbeCnWnRH1O3jFOw==", "dev": true, "requires": { - "@babel/helper-get-function-arity": "^7.12.13", - "@babel/template": "^7.12.13", - "@babel/types": "^7.14.2" + "@babel/helper-get-function-arity": "^7.15.4", + "@babel/template": "^7.15.4", + "@babel/types": "^7.15.4" } }, "@babel/helper-get-function-arity": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.13.tgz", - "integrity": "sha512-DjEVzQNz5LICkzN0REdpD5prGoidvbdYk1BVgRUOINaWJP2t6avB27X1guXK1kXNrX0WMfsrm1A/ZBthYuIMQg==", + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.15.4.tgz", + "integrity": "sha512-1/AlxSF92CmGZzHnC515hm4SirTxtpDnLEJ0UyEMgTMZN+6bxXKg04dKhiRx5Enel+SUA1G1t5Ed/yQia0efrA==", "dev": true, "requires": { - "@babel/types": "^7.12.13" + "@babel/types": "^7.15.4" + } + }, + "@babel/helper-hoist-variables": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.15.4.tgz", + "integrity": "sha512-VTy085egb3jUGVK9ycIxQiPbquesq0HUQ+tPO0uv5mPEBZipk+5FkRKiWq5apuyTE9FUrjENB0rCf8y+n+UuhA==", + "dev": true, + "requires": { + "@babel/types": "^7.15.4" } }, "@babel/helper-split-export-declaration": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.12.13.tgz", - "integrity": "sha512-tCJDltF83htUtXx5NLcaDqRmknv652ZWCHyoTETf1CXYJdPC7nohZohjUgieXhv0hTJdRf2FjDueFehdNucpzg==", + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.15.4.tgz", + "integrity": "sha512-HsFqhLDZ08DxCpBdEVtKmywj6PQbwnF6HHybur0MAnkAKnlS6uHkwnmRIkElB2Owpfb4xL4NwDmDLFubueDXsw==", "dev": true, "requires": { - "@babel/types": "^7.12.13" + "@babel/types": "^7.15.4" } }, "@babel/helper-validator-identifier": { - "version": "7.14.0", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.0.tgz", - "integrity": "sha512-V3ts7zMSu5lfiwWDVWzRDGIN+lnCEUdaXgtVHJgLb1rGaA6jMrtB9EmE7L18foXJIE8Un/A/h6NJfGQp/e1J4A==", + "version": "7.15.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.15.7.tgz", + "integrity": "sha512-K4JvCtQqad9OY2+yTU8w+E82ywk/fe+ELNlt1G8z3bVGlZfn/hOcQQsUhGhW/N+tb3fxK800wLtKOE/aM0m72w==", "dev": true }, "@babel/highlight": { - "version": "7.14.0", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.0.tgz", - "integrity": "sha512-YSCOwxvTYEIMSGaBQb5kDDsCopDdiUGsqpatp3fOlI4+2HQSkTmEVWnVuySdAC5EWCqSWWTv0ib63RjR7dTBdg==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.5.tgz", + "integrity": "sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.14.0", + "@babel/helper-validator-identifier": "^7.14.5", "chalk": "^2.0.0", "js-tokens": "^4.0.0" }, @@ -116,42 +125,43 @@ } }, "@babel/parser": { - "version": "7.14.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.14.4.tgz", - "integrity": "sha512-ArliyUsWDUqEGfWcmzpGUzNfLxTdTp6WU4IuP6QFSp9gGfWS6boxFCkJSJ/L4+RG8z/FnIU3WxCk6hPL9SSWeA==", + "version": "7.15.8", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.15.8.tgz", + "integrity": "sha512-BRYa3wcQnjS/nqI8Ac94pYYpJfojHVvVXJ97+IDCImX4Jc8W8Xv1+47enbruk+q1etOpsQNwnfFcNGw+gtPGxA==", "dev": true }, "@babel/template": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.12.13.tgz", - "integrity": "sha512-/7xxiGA57xMo/P2GVvdEumr8ONhFOhfgq2ihK3h1e6THqzTAkHbkXgB0xI9yeTfIUoH3+oAeHhqm/I43OTbbjA==", + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.15.4.tgz", + "integrity": "sha512-UgBAfEa1oGuYgDIPM2G+aHa4Nlo9Lh6mGD2bDBGMTbYnc38vulXPuC1MGjYILIEmlwl6Rd+BPR9ee3gm20CBtg==", "dev": true, "requires": { - "@babel/code-frame": "^7.12.13", - "@babel/parser": "^7.12.13", - "@babel/types": "^7.12.13" + "@babel/code-frame": "^7.14.5", + "@babel/parser": "^7.15.4", + "@babel/types": "^7.15.4" } }, "@babel/traverse": { - "version": "7.14.2", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.14.2.tgz", - "integrity": "sha512-TsdRgvBFHMyHOOzcP9S6QU0QQtjxlRpEYOy3mcCO5RgmC305ki42aSAmfZEMSSYBla2oZ9BMqYlncBaKmD/7iA==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.12.13", - "@babel/generator": "^7.14.2", - "@babel/helper-function-name": "^7.14.2", - "@babel/helper-split-export-declaration": "^7.12.13", - "@babel/parser": "^7.14.2", - "@babel/types": "^7.14.2", + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.15.4.tgz", + "integrity": "sha512-W6lQD8l4rUbQR/vYgSuCAE75ADyyQvOpFVsvPPdkhf6lATXAsQIG9YdtOcu8BB1dZ0LKu+Zo3c1wEcbKeuhdlA==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.14.5", + "@babel/generator": "^7.15.4", + "@babel/helper-function-name": "^7.15.4", + "@babel/helper-hoist-variables": "^7.15.4", + "@babel/helper-split-export-declaration": "^7.15.4", + "@babel/parser": "^7.15.4", + "@babel/types": "^7.15.4", "debug": "^4.1.0", "globals": "^11.1.0" }, "dependencies": { "debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", + "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", "dev": true, "requires": { "ms": "2.1.2" @@ -172,12 +182,12 @@ } }, "@babel/types": { - "version": "7.14.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.14.4.tgz", - "integrity": "sha512-lCj4aIs0xUefJFQnwwQv2Bxg7Omd6bgquZ6LGC+gGMh6/s5qDVfjuCMlDmYQ15SLsWHd9n+X3E75lKIhl5Lkiw==", + "version": "7.15.6", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.15.6.tgz", + "integrity": "sha512-BPU+7QhqNjmWyDO0/vitH/CuhpV8ZmK1wpKva8nuyNF5MJfuRNWMc+hc14+u9xT93kvykMdncrJT19h74uB1Ig==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.14.0", + "@babel/helper-validator-identifier": "^7.14.9", "to-fast-properties": "^2.0.0" }, "dependencies": { @@ -226,9 +236,9 @@ "dev": true }, "@types/json-schema": { - "version": "7.0.7", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.7.tgz", - "integrity": "sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA==", + "version": "7.0.9", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", + "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==", "dev": true }, "@webassemblyjs/ast": { @@ -447,9 +457,9 @@ "dev": true }, "acorn-jsx": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz", - "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true }, "after": { @@ -782,9 +792,9 @@ } }, "babel-loader": { - "version": "8.2.2", - "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.2.2.tgz", - "integrity": "sha512-JvTd0/D889PQBtUXJ2PXaKU/pjZDMtHA9V2ecm+eNRmmBCMR09a+fmpGTNwnJtFmFl5Ei7Vy47LjBb+L0wQ99g==", + "version": "8.2.3", + "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.2.3.tgz", + "integrity": "sha512-n4Zeta8NC3QAsuyiizu0GkmRcQ6clkV9WFUnUf1iXP//IeSKbWjofW3UHyZVwlOB4y039YQKefawyTn64Zwbuw==", "dev": true, "requires": { "find-cache-dir": "^3.3.1", @@ -1237,9 +1247,9 @@ "dev": true }, "debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", + "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", "dev": true, "requires": { "ms": "2.1.2" @@ -1275,9 +1285,9 @@ } }, "buffer-from": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", "dev": true }, "buffer-xor": { @@ -1322,9 +1332,9 @@ }, "dependencies": { "glob": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", - "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", "dev": true, "requires": { "fs.realpath": "^1.0.0", @@ -1431,19 +1441,19 @@ "dev": true }, "chokidar": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.1.tgz", - "integrity": "sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==", + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz", + "integrity": "sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==", "dev": true, "requires": { - "anymatch": "~3.1.1", + "anymatch": "~3.1.2", "braces": "~3.0.2", - "fsevents": "~2.3.1", - "glob-parent": "~5.1.0", + "fsevents": "~2.3.2", + "glob-parent": "~5.1.2", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", "normalize-path": "~3.0.0", - "readdirp": "~3.5.0" + "readdirp": "~3.6.0" } }, "chownr": { @@ -1502,9 +1512,9 @@ }, "dependencies": { "glob": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", - "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", "dev": true, "requires": { "fs.realpath": "^1.0.0", @@ -1544,18 +1554,18 @@ }, "dependencies": { "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true }, "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "requires": { - "ansi-regex": "^5.0.0" + "ansi-regex": "^5.0.1" } } } @@ -1731,9 +1741,9 @@ "dev": true }, "convert-source-map": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", - "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", + "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", "dev": true, "requires": { "safe-buffer": "~5.1.1" @@ -2001,9 +2011,9 @@ } }, "deep-is": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, "define-properties": { @@ -2451,22 +2461,26 @@ } }, "es-abstract": { - "version": "1.18.3", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.3.tgz", - "integrity": "sha512-nQIr12dxV7SSxE6r6f1l3DtAeEYdsGpps13dR0TwJg1S8gyp4ZPgy3FZcHBgbiQqnoqSTb+oC+kO4UQ0C/J8vw==", + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.19.1.tgz", + "integrity": "sha512-2vJ6tjA/UfqLm2MPs7jxVybLoB8i1t1Jd9R3kISld20sIxPcTbLuggQOUxeWeAvIUkduv/CfMjuh4WmiXr2v9w==", "dev": true, "requires": { "call-bind": "^1.0.2", "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", "get-intrinsic": "^1.1.1", + "get-symbol-description": "^1.0.0", "has": "^1.0.3", "has-symbols": "^1.0.2", - "is-callable": "^1.2.3", + "internal-slot": "^1.0.3", + "is-callable": "^1.2.4", "is-negative-zero": "^2.0.1", - "is-regex": "^1.1.3", - "is-string": "^1.0.6", - "object-inspect": "^1.10.3", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.1", + "is-string": "^1.0.7", + "is-weakref": "^1.0.1", + "object-inspect": "^1.11.0", "object-keys": "^1.1.1", "object.assign": "^4.1.2", "string.prototype.trimend": "^1.0.4", @@ -2598,9 +2612,9 @@ } }, "debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", + "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", "dev": true, "requires": { "ms": "2.1.2" @@ -2706,9 +2720,9 @@ }, "dependencies": { "estraverse": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true } } @@ -2723,9 +2737,9 @@ }, "dependencies": { "estraverse": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true } } @@ -3093,9 +3107,9 @@ } }, "find-cache-dir": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", - "integrity": "sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", + "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", "dev": true, "requires": { "commondir": "^1.0.1", @@ -3178,9 +3192,9 @@ } }, "follow-redirects": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.1.tgz", - "integrity": "sha512-HWqDgT7ZEkqRzBvc2s64vSZ/hfOceEol3ac/7tKwzuvEyWx3/4UegXh5oBOIotkGsObyk3xznnSRVADBgWSQVg==", + "version": "1.14.4", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.4.tgz", + "integrity": "sha512-zwGkiSXC1MUJG/qmeIFH2HBJx9u0V46QGUe3YR1fXG8bXQxq7fLj0RjLZQ5nubr9qNJUZrH+xUcwXEoXNpfS+g==", "dev": true }, "for-in": { @@ -3341,6 +3355,16 @@ "has-symbols": "^1.0.1" } }, + "get-symbol-description": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", + "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + } + }, "get-value": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", @@ -3348,9 +3372,9 @@ "dev": true }, "getobject": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/getobject/-/getobject-1.0.1.tgz", - "integrity": "sha512-tj18lLe+917AACr6BdVoUuHnBPTVd9BEJp1vxnMZ58ztNvuxz9Ufa+wf3g37tlGITH35jggwZ2d9lcgHJJgXfQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/getobject/-/getobject-1.0.2.tgz", + "integrity": "sha512-2zblDBaFcb3rB4rF77XVnuINOE2h2k/OnqXAiy0IrTxUfV1iFp3la33oAQVY9pCpWU268WFYVt2t71hlMuLsOg==", "dev": true }, "getpass": { @@ -3415,9 +3439,9 @@ "dev": true }, "globule": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/globule/-/globule-1.3.2.tgz", - "integrity": "sha512-7IDTQTIu2xzXkT+6mlluidnWo+BypnbSoEVVQCGfzqnl5Ik8d3e1d4wycb8Rj9tWW+Z39uPWsdlquqiqPCd/pA==", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/globule/-/globule-1.3.3.tgz", + "integrity": "sha512-mb1aYtDbIjTu4ShMB85m3UzjX9BVKe9WCzsnfMSZk+K5GpIbBOexgg4PPCt5eHDEG5/ZQAUX2Kct02zfiPLsKg==", "dev": true, "requires": { "glob": "~7.1.1", @@ -3442,9 +3466,9 @@ } }, "graceful-fs": { - "version": "4.2.6", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", - "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==", + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", + "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==", "dev": true }, "growl": { @@ -3745,9 +3769,9 @@ } }, "chalk": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", - "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "requires": { "ansi-styles": "^4.1.0", @@ -3802,9 +3826,9 @@ }, "dependencies": { "async": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/async/-/async-3.2.0.tgz", - "integrity": "sha512-TR2mEZFVOj2pLStYxLht7TyfuRzaydfpxr3k9RpHIzMgw7A64dzsdqCxH1WJyQdoe8T10nDXd9wnEigmiuHIZw==", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.2.tgz", + "integrity": "sha512-H0E+qZaDEfx/FY4t7iLRv1W2fFI6+pyCeTw1uN20AQPiwqwM6ojPxHxdLv4z8hi2DtnW9BOckSspLucW7pIE5g==", "dev": true }, "which": { @@ -3942,6 +3966,15 @@ "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", "dev": true }, + "has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "dev": true, + "requires": { + "has-symbols": "^1.0.2" + } + }, "has-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", @@ -4312,9 +4345,9 @@ }, "dependencies": { "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true }, "ansi-styles": { @@ -4327,9 +4360,9 @@ } }, "chalk": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", - "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "requires": { "ansi-styles": "^4.1.0", @@ -4358,12 +4391,12 @@ "dev": true }, "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "requires": { - "ansi-regex": "^5.0.0" + "ansi-regex": "^5.0.1" } }, "supports-color": { @@ -4377,6 +4410,17 @@ } } }, + "internal-slot": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", + "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==", + "dev": true, + "requires": { + "get-intrinsic": "^1.1.0", + "has": "^1.0.3", + "side-channel": "^1.0.4" + } + }, "interpret": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz", @@ -4435,10 +4479,13 @@ } }, "is-bigint": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.2.tgz", - "integrity": "sha512-0JV5+SOCQkIdzjBK9buARcV804Ddu7A0Qet6sHi3FimE9ne6m4BGQZfRn+NZiXbBk4F4XmHfDZIipLj9pX8dSA==", - "dev": true + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dev": true, + "requires": { + "has-bigints": "^1.0.1" + } }, "is-binary-path": { "version": "2.1.0", @@ -4450,12 +4497,13 @@ } }, "is-boolean-object": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.1.tgz", - "integrity": "sha512-bXdQWkECBUIAcCkeH1unwJLIpZYaa5VvuygSyS/c2lf719mTKZDU5UdDRlpd01UjADgmW8RfqaP+mRaVPdr/Ng==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", "dev": true, "requires": { - "call-bind": "^1.0.2" + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" } }, "is-buffer": { @@ -4465,15 +4513,15 @@ "dev": true }, "is-callable": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.3.tgz", - "integrity": "sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", + "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==", "dev": true }, "is-core-module": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.4.0.tgz", - "integrity": "sha512-6A2fkfq1rfeQZjxrZJGerpLCTHRNEBiSgnu0+obeJpEPZRUooHgsizvzv0ZjJwOz3iWIHdJtVWJ/tmPr3D21/A==", + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.0.tgz", + "integrity": "sha512-vd15qHsaqrRL7dtH6QNuy0ndJmRDrS9HAM1CAiSifNUFv4x1a0CCVsj18hJ1mShxIG6T2i1sO78MkP56r0nYRw==", "dev": true, "requires": { "has": "^1.0.3" @@ -4506,10 +4554,13 @@ } }, "is-date-object": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.4.tgz", - "integrity": "sha512-/b4ZVsG7Z5XVtIxs/h9W8nvfLgSAyKYdtGWQLbqy6jA1icmgjf8WCoTKgeS4wy5tYaPePouzFMANbnj94c2Z+A==", - "dev": true + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "dev": true, + "requires": { + "has-tostringtag": "^1.0.0" + } }, "is-descriptor": { "version": "0.1.6", @@ -4555,9 +4606,9 @@ "dev": true }, "is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, "requires": { "is-extglob": "^2.1.1" @@ -4585,10 +4636,13 @@ } }, "is-number-object": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.5.tgz", - "integrity": "sha512-RU0lI/n95pMoUKu9v1BZP5MBcZuNSVJkMkAG2dJqC4z2GlkGUNeH68SuHuBKBD/XFe+LHZ+f9BKkLET60Niedw==", - "dev": true + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.6.tgz", + "integrity": "sha512-bEVOqiRcvo3zO1+G2lVMy+gkkEm9Yh7cDMRusKKu5ZJKPUYSJwICTKZrNKHA2EbSP0Tu0+6B/emsYNHZyn6K8g==", + "dev": true, + "requires": { + "has-tostringtag": "^1.0.0" + } }, "is-plain-object": { "version": "2.0.4", @@ -4600,13 +4654,13 @@ } }, "is-regex": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.3.tgz", - "integrity": "sha512-qSVXFz28HM7y+IWX6vLCsexdlvzT1PJNFSBuaQLQ5o0IEw8UDYW6/2+eCMVyIsbM8CNLX2a/QWmSpyxYEHY7CQ==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", "dev": true, "requires": { "call-bind": "^1.0.2", - "has-symbols": "^1.0.2" + "has-tostringtag": "^1.0.0" } }, "is-relative": { @@ -4624,12 +4678,21 @@ "integrity": "sha1-MKc/9cw4VOT8JUkICen1q/jeCeA=", "dev": true }, - "is-string": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.6.tgz", - "integrity": "sha512-2gdzbKUuqtQ3lYNrUTQYoClPhm7oQu4UdpSZMp1/DGgkHBT8E2Z1l0yMdb6D4zNAxwDiMv8MdulKROJGNl0Q0w==", + "is-shared-array-buffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.1.tgz", + "integrity": "sha512-IU0NmyknYZN0rChcKhRO1X8LYz5Isj/Fsqh8NJOSf+N/hCOTwy29F32Ik7a+QszE63IdvmwdTPDd6cZ5pg4cwA==", "dev": true }, + "is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dev": true, + "requires": { + "has-tostringtag": "^1.0.0" + } + }, "is-symbol": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", @@ -4654,6 +4717,15 @@ "unc-path-regex": "^0.1.2" } }, + "is-weakref": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.1.tgz", + "integrity": "sha512-b2jKc2pQZjaeFYWEf7ScFj+Be1I+PXmlu572Q8coTXZ+LD/QQZ7ShPMst8h16riVgyXTQwUsFEl74mDvc/3MHQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.0" + } + }, "is-windows": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", @@ -4969,9 +5041,9 @@ "dev": true }, "glob": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", - "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", "dev": true, "requires": { "fs.realpath": "^1.0.0", @@ -5412,9 +5484,9 @@ }, "dependencies": { "debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", + "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", "dev": true, "requires": { "ms": "2.1.2" @@ -5594,18 +5666,18 @@ "dev": true }, "mime-db": { - "version": "1.48.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.48.0.tgz", - "integrity": "sha512-FM3QwxV+TnZYQ2aRqhlKBMHxk10lTbMt3bBkMAp54ddrNeVSfcQYOOKuGuy3Ddrm38I04If834fOUSq1yzslJQ==", + "version": "1.50.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.50.0.tgz", + "integrity": "sha512-9tMZCDlYHqeERXEHO9f/hKfNXhre5dK2eE/krIvUjZbS2KPcqGDfNShIWS1uW9XOTKQKqK6qbeOci18rbfW77A==", "dev": true }, "mime-types": { - "version": "2.1.31", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.31.tgz", - "integrity": "sha512-XGZnNzm3QvgKxa8dpzyhFTHmpP3l5YNusmne07VUOXxou9CqUqYa/HBy124RqtVh/O2pECas/MOcsDgpilPOPg==", + "version": "2.1.33", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.33.tgz", + "integrity": "sha512-plLElXp7pRDd0bNZHw+nMd52vRYjLwQjygaNg7ddJ2uJtTlmnTCjWuPKxVu6//AdaRuME84SvLW91sIkBqGT0g==", "dev": true, "requires": { - "mime-db": "1.48.0" + "mime-db": "1.50.0" } }, "mimic-fn": { @@ -5983,12 +6055,6 @@ "integrity": "sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ==", "dev": true }, - "mootools": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/mootools/-/mootools-1.5.2.tgz", - "integrity": "sha1-H93xtOCp5l0g1IO5tLCOHoexFho=", - "dev": true - }, "morgan": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.10.0.tgz", @@ -6130,9 +6196,9 @@ }, "dependencies": { "debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", + "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", "dev": true, "requires": { "ms": "2.1.2" @@ -6369,9 +6435,9 @@ "dev": true }, "object-inspect": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.10.3.tgz", - "integrity": "sha512-e5mCJlSH7poANfC8z8S9s9S2IN5/4Zb3aZ33f5s8YqoazCFzNLloLU8r5VCG+G7WoqLvAAZoVMcy3tp/3X0Plw==", + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz", + "integrity": "sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg==", "dev": true }, "object-keys": { @@ -6414,14 +6480,14 @@ } }, "object.getownpropertydescriptors": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.2.tgz", - "integrity": "sha512-WtxeKSzfBjlzL+F9b7M7hewDzMwy+C8NRssHd1YrNlzHzIDrXcXiNOMrezdAEM4UXixgV+vvnyBeN7Rygl2ttQ==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.3.tgz", + "integrity": "sha512-VdDoCwvJI4QdC6ndjpqFmoL3/+HxffFBbcJzKi5hwLLqqx3mdbedRpfZDdK0SrOSauj8X4GzBvnDZl4vTN7dOw==", "dev": true, "requires": { "call-bind": "^1.0.2", "define-properties": "^1.1.3", - "es-abstract": "^1.18.0-next.2" + "es-abstract": "^1.19.1" } }, "object.map": { @@ -7069,18 +7135,18 @@ } }, "readdirp": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", - "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dev": true, "requires": { "picomatch": "^2.2.1" } }, "rechoir": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.0.tgz", - "integrity": "sha512-ADsDEH2bvbjltXEP+hTIAmeFekTFK0V2BTxMkok6qILyAJEXV0AFfoWcAq4yfll5VdIMd/RVXq0lR+wQi5ZU3Q==", + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.1.tgz", + "integrity": "sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==", "dev": true, "requires": { "resolve": "^1.9.0" @@ -7268,9 +7334,9 @@ }, "dependencies": { "glob": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", - "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", "dev": true, "requires": { "fs.realpath": "^1.0.0", @@ -7534,10 +7600,21 @@ "integrity": "sha1-NZbmMHp4FUT1kfN9phg2DzHbV7E=", "dev": true }, + "side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + } + }, "signal-exit": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", - "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.5.tgz", + "integrity": "sha512-KWcOiKeQj6ZyXx7zq4YxSMgHRlod4czeBQZrPb8OKcohcqAXShm7E20kEMle9WBt26hFcAf0qLOcp5zmY7kOqQ==", "dev": true }, "sinon": { @@ -8037,9 +8114,9 @@ "dev": true }, "debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", + "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", "dev": true, "requires": { "ms": "2.1.2" @@ -8079,29 +8156,29 @@ "dev": true }, "string-width": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", - "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "requires": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" + "strip-ansi": "^6.0.1" }, "dependencies": { "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true }, "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "requires": { - "ansi-regex": "^5.0.0" + "ansi-regex": "^5.0.1" } } } @@ -8224,9 +8301,9 @@ }, "dependencies": { "glob": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", - "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", "dev": true, "requires": { "fs.realpath": "^1.0.0", @@ -8272,9 +8349,9 @@ "dev": true }, "source-map-support": { - "version": "0.5.19", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", - "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", + "version": "0.5.20", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.20.tgz", + "integrity": "sha512-n1lZZ8Ve4ksRqizaBQgxXDgKwttHDhyfQjA6YZZn8+AroHbsIz+JjwxQDxbp+7y5OYCI8t1Yk7etjD9CRd2hIw==", "dev": true, "requires": { "buffer-from": "^1.0.0", @@ -8657,9 +8734,9 @@ "dev": true }, "uglify-js": { - "version": "3.13.9", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.13.9.tgz", - "integrity": "sha512-wZbyTQ1w6Y7fHdt8sJnHfSIuWeDgk6B5rCb4E/AM6QNNPbOMIZph21PW5dRB3h7Df0GszN+t7RuUH6sWK5bF0g==", + "version": "3.14.2", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.14.2.tgz", + "integrity": "sha512-rtPMlmcO4agTUfz10CbgJ1k6UAoXM2gWb3GoMPPZB/+/Ackf8lNWk11K4rYi2D0apgoFRLtQOZhb+/iGNJq26A==", "dev": true }, "ultron": { @@ -8929,9 +9006,9 @@ "dev": true }, "glob": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", - "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", "dev": true, "requires": { "fs.realpath": "^1.0.0", @@ -9001,7 +9078,6 @@ "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", "dev": true, - "optional": true, "requires": { "arr-flatten": "^1.1.0", "array-unique": "^0.3.2", @@ -9020,7 +9096,6 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, - "optional": true, "requires": { "is-extendable": "^0.1.0" } @@ -9053,7 +9128,6 @@ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", "dev": true, - "optional": true, "requires": { "extend-shallow": "^2.0.1", "is-number": "^3.0.0", @@ -9066,7 +9140,6 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, - "optional": true, "requires": { "is-extendable": "^0.1.0" } @@ -9117,15 +9190,13 @@ "version": "1.1.6", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true, - "optional": true + "dev": true }, "is-number": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", "dev": true, - "optional": true, "requires": { "kind-of": "^3.0.2" }, @@ -9135,7 +9206,6 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, - "optional": true, "requires": { "is-buffer": "^1.1.5" } @@ -9147,7 +9217,6 @@ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", "dev": true, - "optional": true, "requires": { "arr-diff": "^4.0.0", "array-unique": "^0.3.2", @@ -9181,7 +9250,6 @@ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", "dev": true, - "optional": true, "requires": { "is-number": "^3.0.0", "repeat-string": "^1.6.1" @@ -9693,9 +9761,9 @@ }, "dependencies": { "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true }, "ansi-styles": { @@ -9723,12 +9791,12 @@ "dev": true }, "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "requires": { - "ansi-regex": "^5.0.0" + "ansi-regex": "^5.0.1" } } } diff --git a/package.json b/package.json index 4fa43aba1..01c053283 100644 --- a/package.json +++ b/package.json @@ -66,7 +66,6 @@ "karma-sourcemap-loader": "^0.3.5", "karma-webpack": "^4.0.2", "mocha": "^7.1.2", - "mootools": "^1.5.1", "natives": "^1.1.6", "nock": "^11.9.1", "node-libs-browser": "^0.5.2", @@ -78,7 +77,7 @@ "strict-loader": "^1.2.0", "time-grunt": "^1.0.0", "vows": "^0.8.3", - "webpack": "^4.41.5" + "webpack": "^4.46.0" }, "optionalDependencies": { "decache": "^3.0.5" From d9b0ea814bbe4ddbb74330f682f620d96a1f6a8f Mon Sep 17 00:00:00 2001 From: Bart Skowron Date: Mon, 29 Nov 2021 21:31:58 +0100 Subject: [PATCH 03/81] Update PR template --- .github/pull_request_template.md | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index daa61fb2a..5ee65dde0 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,14 +1,23 @@ ## Description of the change -> Description here +> Please include a summary of the change and which issues are fixed. +> Please also include relevant motivation and context. + ## Type of change + - [ ] Bug fix (non-breaking change that fixes an issue) - [ ] New feature (non-breaking change that adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) +- [ ] Maintenance +- [ ] New release ## Related issues -> Fix [#1]() +> Shortcut stories and GitHub issues (delete irrelevant) + +- Fix [SC-] +- Fix #1 + ## Checklists ### Development @@ -17,9 +26,9 @@ - [ ] The code changed/added as part of this pull request has been covered with tests - [ ] All tests related to the changed code pass in development -### Code review +### Code review -- [ ] This pull request has a descriptive title and information useful to a reviewer. There may be a screenshot or screencast attached -- [ ] "Ready for review" label attached to the PR and reviewers mentioned in a comment +- [ ] This pull request has a descriptive title and information useful to a reviewer. There may be a screenshot or screencast attached +- [ ] "Ready for review" label attached to the PR and reviewers assigned +- [ ] Issue from task tracker has a link to this pull request - [ ] Changes have been reviewed by at least one other engineer -- [ ] Issue from task tracker has a link to this pull request From 0aab52dd19ed55413be1b81d0f474a06916d8ed9 Mon Sep 17 00:00:00 2001 From: axelmorvan Date: Tue, 11 Jan 2022 18:33:42 +0100 Subject: [PATCH 04/81] Fix transform declaration (#981) --- index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index f117b78ce..7f87d33e3 100644 --- a/index.d.ts +++ b/index.d.ts @@ -89,7 +89,7 @@ declare namespace Rollbar { stackTraceLimit?: number; telemetryScrubber?: TelemetryScrubber; timeout?: number; - transform?: (data: object) => void; + transform?: (data: object, item: object) => void; transmit?: boolean; uncaughtErrorLevel?: Level; verbose?: boolean; From b81488ff32e0be5dbfd39e5c7fcb883313a2166a Mon Sep 17 00:00:00 2001 From: Walt Jones Date: Fri, 25 Feb 2022 11:20:32 -0800 Subject: [PATCH 05/81] Handle circular references in custom data (#990) * fix: handle circular references in custom data * test: use deepStrictEqual to compare objects for equality --- src/utility.js | 41 ++++++++++++++++++++++++++--- test/browser.core.test.js | 52 +++++++++++++++++++++++++++++++++++++ test/server.rollbar.test.js | 12 ++++----- 3 files changed, 95 insertions(+), 10 deletions(-) diff --git a/src/utility.js b/src/utility.js index b871d6834..f1e2acbad 100644 --- a/src/utility.js +++ b/src/utility.js @@ -398,6 +398,37 @@ function wrapCallback(logger, f) { }; } +function nonCircularClone(obj) { + var seen = [obj]; + + function clone(obj, seen) { + var value, name, newSeen, result = {}; + + try { + for (name in obj) { + value = obj[name]; + + if (value && (isType(value, 'object') || isType(value, 'array'))) { + if (seen.includes(value)) { + result[name] = 'Removed circular reference: ' + typeName(value); + } else { + newSeen = seen.slice(); + newSeen.push(value); + result[name] = clone(value, newSeen); + } + continue; + } + + result[name] = value; + } + } catch (e) { + result = 'Failed cloning custom data: ' + e.message; + } + return result; + } + return clone(obj, seen); +} + function createItem(args, logger, notifier, requestKeys, lambdaContext) { var message, err, custom, callback, request; var arg; @@ -455,10 +486,12 @@ function createItem(args, logger, notifier, requestKeys, lambdaContext) { } } + // if custom is an array this turns it into an object with integer keys + if (custom) custom = nonCircularClone(custom); + if (extraArgs.length > 0) { - // if custom is an array this turns it into an object with integer keys - custom = merge(custom); - custom.extraArgs = extraArgs; + if (!custom) custom = nonCircularClone({}); + custom.extraArgs = nonCircularClone(extraArgs); } var item = { @@ -503,7 +536,7 @@ function addErrorContext(item, errors) { try { for (var i = 0; i < errors.length; ++i) { if (errors[i].hasOwnProperty('rollbarContext')) { - custom = merge(custom, errors[i].rollbarContext); + custom = merge(custom, nonCircularClone(errors[i].rollbarContext)); contextAdded = true; } } diff --git a/test/browser.core.test.js b/test/browser.core.test.js index af4deb34c..7b27b1bde 100644 --- a/test/browser.core.test.js +++ b/test/browser.core.test.js @@ -503,6 +503,58 @@ describe('log', function() { done(); }) + it('should remove circular references in custom data', function(done) { + var server = window.server; + stubResponse(server); + server.requests.length = 0; + + var options = { + accessToken: 'POST_CLIENT_ITEM_TOKEN', + addErrorContext: true + }; + var rollbar = window.rollbar = new Rollbar(options); + + var err = new Error('test error'); + var contextData = { extra: 'baz' } + contextData.data = contextData; + var context = { err: 'test', contextData: contextData }; + err.rollbarContext = context; + + var array = ['one', 'two']; + array.push(array); + var custom = { foo: 'bar', array: array }; + var notCircular = { key: 'value' }; + custom.notCircular1 = notCircular; + custom.notCircular2 = notCircular; + custom.self = custom; + rollbar.error(err, custom); + + server.respond(); + + var body = JSON.parse(server.requests[0].requestBody); + + expect(body.data.body.trace.exception.message).to.eql('test error'); + expect(body.data.custom.foo).to.eql('bar'); + expect(body.data.custom.err).to.eql('test'); + + // Duplicate objects are allowed when there is no circular reference. + expect(body.data.custom.notCircular1).to.eql(notCircular); + expect(body.data.custom.notCircular2).to.eql(notCircular); + + expect(body.data.custom.self).to.eql( + 'Removed circular reference: object' + ); + expect(body.data.custom.array).to.eql([ + 'one', 'two', 'Removed circular reference: array' + ]); + expect(body.data.custom.contextData).to.eql({ + extra: 'baz', + data: 'Removed circular reference: object' + }); + + done(); + }) + it('should send message when called with only null arguments', function(done) { var server = window.server; stubResponse(server); diff --git a/test/server.rollbar.test.js b/test/server.rollbar.test.js index a84cbe1d1..21683be03 100644 --- a/test/server.rollbar.test.js +++ b/test/server.rollbar.test.js @@ -278,7 +278,7 @@ vows.describe('rollbar') var item = r.client.logCalls[r.client.logCalls.length - 1].item; assert.equal(item.message, message); assert.equal(item.request, request); - assert.equal(item.custom, custom); + assert.deepStrictEqual(item.custom, custom); item.callback(); assert.isTrue(callbackCalled); } @@ -332,7 +332,7 @@ vows.describe('rollbar') var item = r.client.logCalls[r.client.logCalls.length - 1].item assert.equal(item.message, message) assert.equal(item.request, request) - assert.equal(item.custom, custom) + assert.deepStrictEqual(item.custom, custom) }, 'should work with request and custom and callback': function(r) { var message = 'hello' @@ -346,7 +346,7 @@ vows.describe('rollbar') var item = r.client.logCalls[r.client.logCalls.length - 1].item assert.equal(item.message, message) assert.equal(item.request, request) - assert.equal(item.custom, custom) + assert.deepStrictEqual(item.custom, custom) item.callback(); assert.isTrue(callbackCalled); } @@ -399,7 +399,7 @@ vows.describe('rollbar') var item = r.client.logCalls[r.client.logCalls.length - 1].item assert.equal(item.err, err) assert.equal(item.request, request) - assert.equal(item.custom, custom) + assert.deepStrictEqual(item.custom, custom) item.callback(); assert.isTrue(callbackCalled); } @@ -453,7 +453,7 @@ vows.describe('rollbar') var item = r.client.logCalls[r.client.logCalls.length - 1].item assert.equal(item.err, err) assert.equal(item.request, request) - assert.equal(item.custom, custom) + assert.deepStrictEqual(item.custom, custom) }, 'should work with request and custom and callback': function(r) { var err = new Error('hello!') @@ -467,7 +467,7 @@ vows.describe('rollbar') var item = r.client.logCalls[r.client.logCalls.length - 1].item assert.equal(item.err, err) assert.equal(item.request, request) - assert.equal(item.custom, custom) + assert.deepStrictEqual(item.custom, custom) item.callback(); assert.isTrue(callbackCalled); } From c4eb37ab07637a9c94339cf90133fcf7d3c7a723 Mon Sep 17 00:00:00 2001 From: Walt Jones Date: Thu, 3 Mar 2022 11:15:14 -0800 Subject: [PATCH 06/81] Release v2.24.1 (#993) --- dist/rollbar.js | 43 ++++++++++++++++++++++--- dist/rollbar.js.map | 2 +- dist/rollbar.min.js | 2 +- dist/rollbar.min.js.map | 2 +- dist/rollbar.named-amd.js | 43 ++++++++++++++++++++++--- dist/rollbar.named-amd.js.map | 2 +- dist/rollbar.named-amd.min.js | 2 +- dist/rollbar.named-amd.min.js.map | 2 +- dist/rollbar.noconflict.umd.js | 43 ++++++++++++++++++++++--- dist/rollbar.noconflict.umd.js.map | 2 +- dist/rollbar.noconflict.umd.min.js | 2 +- dist/rollbar.noconflict.umd.min.js.map | 2 +- dist/rollbar.snippet.js | 2 +- dist/rollbar.umd.js | 43 ++++++++++++++++++++++--- dist/rollbar.umd.js.map | 2 +- dist/rollbar.umd.min.js | 2 +- dist/rollbar.umd.min.js.map | 2 +- examples/chrome_extension/background.js | 2 +- examples/itemsPerMinute.html | 2 +- examples/no-conflict/test.html | 2 +- examples/snippet.html | 2 +- examples/test.html | 2 +- examples/universal-browser/test.html | 2 +- package-lock.json | 2 +- package.json | 2 +- src/defaults.js | 2 +- 26 files changed, 174 insertions(+), 42 deletions(-) diff --git a/dist/rollbar.js b/dist/rollbar.js index 676715f82..8fc767444 100644 --- a/dist/rollbar.js +++ b/dist/rollbar.js @@ -491,6 +491,37 @@ function wrapCallback(logger, f) { }; } +function nonCircularClone(obj) { + var seen = [obj]; + + function clone(obj, seen) { + var value, name, newSeen, result = {}; + + try { + for (name in obj) { + value = obj[name]; + + if (value && (isType(value, 'object') || isType(value, 'array'))) { + if (seen.includes(value)) { + result[name] = 'Removed circular reference: ' + typeName(value); + } else { + newSeen = seen.slice(); + newSeen.push(value); + result[name] = clone(value, newSeen); + } + continue; + } + + result[name] = value; + } + } catch (e) { + result = 'Failed cloning custom data: ' + e.message; + } + return result; + } + return clone(obj, seen); +} + function createItem(args, logger, notifier, requestKeys, lambdaContext) { var message, err, custom, callback, request; var arg; @@ -548,10 +579,12 @@ function createItem(args, logger, notifier, requestKeys, lambdaContext) { } } + // if custom is an array this turns it into an object with integer keys + if (custom) custom = nonCircularClone(custom); + if (extraArgs.length > 0) { - // if custom is an array this turns it into an object with integer keys - custom = merge(custom); - custom.extraArgs = extraArgs; + if (!custom) custom = nonCircularClone({}); + custom.extraArgs = nonCircularClone(extraArgs); } var item = { @@ -596,7 +629,7 @@ function addErrorContext(item, errors) { try { for (var i = 0; i < errors.length; ++i) { if (errors[i].hasOwnProperty('rollbarContext')) { - custom = merge(custom, errors[i].rollbarContext); + custom = merge(custom, nonCircularClone(errors[i].rollbarContext)); contextAdded = true; } } @@ -4546,7 +4579,7 @@ module.exports = { module.exports = { - version: '2.24.0', + version: '2.24.1', endpoint: 'api.rollbar.com/api/1/item/', logLevel: 'debug', reportLevel: 'debug', diff --git a/dist/rollbar.js.map b/dist/rollbar.js.map index b468a8ead..f1be306d6 100644 --- a/dist/rollbar.js.map +++ b/dist/rollbar.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/utility.js","webpack:///./src/browser/logger.js","webpack:///./src/browser/url.js","webpack:///./src/errorParser.js","webpack:///./src/scrub.js","webpack:///./src/utility/traverse.js","webpack:///./src/browser/bundles/rollbar.js","webpack:///./src/browser/rollbar.js","webpack:///./src/browser/core.js","webpack:///./src/rollbar.js","webpack:///./src/rateLimiter.js","webpack:///./src/merge.js","webpack:///./src/queue.js","webpack:///./src/notifier.js","webpack:///./src/api.js","webpack:///./src/apiUtility.js","webpack:///./node_modules/console-polyfill/index.js","webpack:///./src/browser/detection.js","webpack:///./src/browser/globalSetup.js","webpack:///./src/browser/transport.js","webpack:///./src/browser/transforms.js","webpack:///./node_modules/error-stack-parser/error-stack-parser.js","webpack:///./node_modules/error-stack-parser/node_modules/stackframe/stackframe.js","webpack:///./src/transforms.js","webpack:///./src/browser/predicates.js","webpack:///./src/predicates.js","webpack:///./src/defaults.js","webpack:///./src/browser/defaults/scrubFields.js","webpack:///./src/telemetry.js","webpack:///./src/browser/telemetry.js","webpack:///./src/browser/domUtility.js","webpack:///./src/utility/polyfillJSON.js","webpack:///./vendor/JSON-js/json3.js","webpack:///./src/browser/wrapGlobals.js","webpack:///./src/truncation.js"],"names":[],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;AClFa;;AAEb,YAAY,mBAAO,CAAC,EAAS;;AAE7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,OAAO;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,EAAE;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,mCAAmC,OAAO;AAC1C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,iBAAiB,YAAY;AAC7B;AACA,qBAAqB;AACrB;AACA,KAAK,wBAAwB;AAC7B;AACA,KAAK,yBAAyB;AAC9B;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kCAAkC,OAAO;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,SAAS;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,kCAAkC,OAAO;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,SAAS,UAAU,YAAY,GAAG;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,aAAa;AAChC;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3uBa;;AAEb;AACA,mBAAO,CAAC,EAAkB;AAC1B,gBAAgB,mBAAO,CAAC,EAAa;AACrC,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;AC3Ca;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;AChFa;;AAEb,uBAAuB,mBAAO,CAAC,EAAoB;;AAEnD;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;;AAEA,sBAAsB,wBAAwB;AAC9C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,eAAe;AACf;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7Ha;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,eAAe,mBAAO,CAAC,CAAoB;;AAE3C;AACA;;AAEA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,WAAW;AAC9B;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC9Fa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,kBAAkB;;AAElB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA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ACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,0BAA0B,sBAAsB;AAChD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,oCAAoC,SAAS;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,eAAe,mBAAO,CAAC,EAAa;AACpC,kBAAkB,mBAAO,CAAC,EAAwB;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACpjBa;;AAEb,kBAAkB,mBAAO,CAAC,EAAe;AACzC,YAAY,mBAAO,CAAC,EAAS;AAC7B,eAAe,mBAAO,CAAC,EAAY;AACnC,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,6EAA6E,UAAU;AACvF,yFAAyF,UAAU;;AAEnG;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,6BAA6B;AAC7B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACnRa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AChJa;;AAEb;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA,WAAW,YAAY;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACvDa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wDAAwD,WAAW;AACnE;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,QAAQ;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,aAAa,8BAA8B;AAC3C;AACA;AACA;AACA;AACA,+CAA+C,SAAS;AACxD;AACA;AACA,cAAc;AACd;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,SAAS;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,+BAA+B;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC7Qa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACxHa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,cAAc,mBAAO,CAAC,EAAc;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;ACvGa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC7FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;AClBY;;AAEb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;AC/Ba;;AAEb;AACA,gBAAgB,QAAQ;AACxB;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;;AAEA;AACA,gBAAgB,QAAQ;;AAExB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;;;;;;;AClGa;;AAEb;;AAEA,QAAQ,mBAAO,CAAC,CAAY;AAC5B,aAAa,mBAAO,CAAC,CAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACvQa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,kBAAkB,mBAAO,CAAC,CAAgB;AAC1C,aAAa,mBAAO,CAAC,CAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,OAAO;AAC7C;AACA,oBAAoB,6CAA6C;AACjE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,4BAA4B,gBAAgB;AAC5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,sBAAsB;AACvC;AACA;AACA;;AAEA,4BAA4B,oBAAoB;AAChD;AACA;;AAEA;AACA;;AAEA;AACA;AACA,8BAA8B,aAAa;AAC3C;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,kBAAkB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC9UA;AACA;AACA;;AAEA;AACA,QAAQ,IAA0C;AAClD,QAAQ,iCAA6B,CAAC,uBAAY,CAAC,oCAAE,OAAO;AAAA;AAAA;AAAA,oGAAC;AAC7D,KAAK,MAAM,EAIN;AACL,CAAC;AACD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,MAAM;AACzB,oBAAoB,MAAM;AAC1B;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA,CAAC;;;;;;;ACzMD;AACA;AACA;;AAEA;AACA,QAAQ,IAA0C;AAClD,QAAQ,iCAAqB,EAAE,oCAAE,OAAO;AAAA;AAAA;AAAA,oGAAC;AACzC,KAAK,MAAM,EAIN;AACL,CAAC;AACD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,wBAAwB;AAC3C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA,CAAC;;;;;;;;AC9IY;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,sBAAsB;AAC1D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,8BAA8B;AAC9B;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrJa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;ACba;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe;;AAEf;;AAEA,uCAAuC,eAAe;;AAEtD;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA;;AAEA,wCAAwC,eAAe;;AAEvD,mBAAmB,gBAAgB;AACnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,SAAS;AAC1B;;AAEA,mBAAmB,qBAAqB;AACxC;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClMa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACVa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5Da;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qCAAqC,mBAAmB;AACxD;;AAEA;AACA,qCAAqC,4BAA4B;AACjE;AACA;AACA,8BAA8B,4BAA4B;AAC1D;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD;AACA;AACA,8BAA8B,gBAAgB;AAC9C;AACA;;AAEA;AACA,8BAA8B,aAAa;AAC3C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AClLa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,YAAY,mBAAO,CAAC,CAAU;AAC9B,gBAAgB,mBAAO,CAAC,CAAO;AAC/B,cAAc,mBAAO,CAAC,EAAc;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gDAAgD,aAAa;AAC7D;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B,mBAAmB,qBAAqB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,6BAA6B,0BAA0B;AACvD;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,eAAe,0BAA0B;AACzC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB;;AAEjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,SAAS;AAC9C;AACA;AACA,GAAG;AACH,yCAAyC;AACzC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,8CAA8C,QAAQ;;AAEtD;AACA;;AAEA;AACA,8CAA8C,QAAQ;;AAEtD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC/vBa;;AAEb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,6BAA6B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,4BAA4B,QAAQ;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,4BAA4B;AAC7C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,uBAAuB;AACpC;AACA;AACA;AACA,2BAA2B,sBAAsB;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnIa;;AAEb,mBAAmB,mBAAO,CAAC,EAA4B;;AAEvD;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB;AACpB;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,yCAAyC,iBAAiB;AAC1D,8BAA8B,kBAAkB;;AAEhD,yCAAyC,iBAAiB;AAC1D,sCAAsC,6BAA6B;;AAEnE;AACA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,wBAAwB;AACxB,+CAA+C,EAAE;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;;AAGA;;AAEA;;AAEA,UAAU;AACV,UAAU;AACV,UAAU;AACV;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA,qBAAqB,YAAY;AACjC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,qBAAqB,YAAY;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,eAAe;AACf;AACA,cAAc,wDAAwD;AACtE,cAAc,0BAA0B;AACxC;AACA;AACA;AACA;;AAEA;;AAEA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,mBAAmB,WAAW;AAC9B;AACA;;AAEA;;AAEA,OAAO;AACP;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,sBAAsB,UAAU;AAChC;AACA;;;AAGA;;AAEA;AACA;;AAEA;AACA;;AAEA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB,oBAAoB;AACpB,cAAc;AACd,gBAAgB;AAChB,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,UAAU;AACV;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,WAAW;AACX;AACA,wBAAwB,gDAAgD;AACxE;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,SAAS;AACT,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,WAAW;AACX;AACA,wBAAwB,gDAAgD;AACxE;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,sCAAsC,EAAE;AACxC;AACA;AACA;AACA,SAAS;AACT;;AAEA;;AAEA;AACA;;AAEA;AACA,+CAA+C,yGAAyG,EAAE;;AAE1J;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,SAAS;AACT;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE,UAAU;AACvB;AACA;AACA,KAAK;AACL;AACA;;AAEA;;;;;;;;AC1vBa;;AAEb;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,aAAa,oBAAoB;AACjC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC1Ca;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,eAAe,mBAAO,CAAC,CAAoB;;AAE3C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA","file":"rollbar.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n","'use strict';\n\nvar merge = require('./merge');\n\nvar RollbarJSON = {};\nfunction setupJSON(polyfillJSON) {\n if (isFunction(RollbarJSON.stringify) && isFunction(RollbarJSON.parse)) {\n return;\n }\n\n if (isDefined(JSON)) {\n // If polyfill is provided, prefer it over existing non-native shims.\n if(polyfillJSON) {\n if (isNativeFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isNativeFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n } else { // else accept any interface that is present.\n if (isFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n }\n }\n if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {\n polyfillJSON && polyfillJSON(RollbarJSON);\n }\n}\n\n/*\n * isType - Given a Javascript value and a string, returns true if the type of the value matches the\n * given string.\n *\n * @param x - any value\n * @param t - a lowercase string containing one of the following type names:\n * - undefined\n * - null\n * - error\n * - number\n * - boolean\n * - string\n * - symbol\n * - function\n * - object\n * - array\n * @returns true if x is of type t, otherwise false\n */\nfunction isType(x, t) {\n return t === typeName(x);\n}\n\n/*\n * typeName - Given a Javascript value, returns the type of the object as a string\n */\nfunction typeName(x) {\n var name = typeof x;\n if (name !== 'object') {\n return name;\n }\n if (!x) {\n return 'null';\n }\n if (x instanceof Error) {\n return 'error';\n }\n return ({}).toString.call(x).match(/\\s([a-zA-Z]+)/)[1].toLowerCase();\n}\n\n/* isFunction - a convenience function for checking if a value is a function\n *\n * @param f - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isFunction(f) {\n return isType(f, 'function');\n}\n\n/* isNativeFunction - a convenience function for checking if a value is a native JS function\n *\n * @param f - any value\n * @returns true if f is a native JS function, otherwise false\n */\nfunction isNativeFunction(f) {\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n var funcMatchString = Function.prototype.toString.call(Object.prototype.hasOwnProperty)\n .replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?');\n var reIsNative = RegExp('^' + funcMatchString + '$');\n return isObject(f) && reIsNative.test(f);\n}\n\n/* isObject - Checks if the argument is an object\n *\n * @param value - any value\n * @returns true is value is an object function is an object)\n*/\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/* isString - Checks if the argument is a string\n *\n * @param value - any value\n * @returns true if value is a string\n*/\nfunction isString(value) {\n return typeof value === 'string' || value instanceof String\n}\n\n/**\n * isFiniteNumber - determines whether the passed value is a finite number\n *\n * @param {*} n - any value\n * @returns true if value is a finite number\n */\n function isFiniteNumber(n) {\n return Number.isFinite(n);\n}\n\n/*\n * isDefined - a convenience function for checking if a value is not equal to undefined\n *\n * @param u - any value\n * @returns true if u is anything other than undefined\n */\nfunction isDefined(u) {\n return !isType(u, 'undefined');\n}\n\n/*\n * isIterable - convenience function for checking if a value can be iterated, essentially\n * whether it is an object or an array.\n *\n * @param i - any value\n * @returns true if i is an object or an array as determined by `typeName`\n */\nfunction isIterable(i) {\n var type = typeName(i);\n return (type === 'object' || type === 'array');\n}\n\n/*\n * isError - convenience function for checking if a value is of an error type\n *\n * @param e - any value\n * @returns true if e is an error\n */\nfunction isError(e) {\n // Detect both Error and Firefox Exception type\n return isType(e, 'error') || isType(e, 'exception');\n}\n\n/* isPromise - a convenience function for checking if a value is a promise\n *\n * @param p - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isPromise(p) {\n return isObject(p) && isType(p.then, 'function');\n}\n\nfunction redact() {\n return '********';\n}\n\n// from http://stackoverflow.com/a/8809472/1138191\nfunction uuid4() {\n var d = now();\n var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n var r = (d + Math.random() * 16) % 16 | 0;\n d = Math.floor(d / 16);\n return (c === 'x' ? r : (r & 0x7 | 0x8)).toString(16);\n });\n return uuid;\n}\n\nvar LEVELS = {\n debug: 0,\n info: 1,\n warning: 2,\n error: 3,\n critical: 4\n};\n\nfunction sanitizeUrl(url) {\n var baseUrlParts = parseUri(url);\n if (!baseUrlParts) {\n return '(unknown)';\n }\n\n // remove a trailing # if there is no anchor\n if (baseUrlParts.anchor === '') {\n baseUrlParts.source = baseUrlParts.source.replace('#', '');\n }\n\n url = baseUrlParts.source.replace('?' + baseUrlParts.query, '');\n return url;\n}\n\nvar parseUriOptions = {\n strictMode: false,\n key: [\n 'source',\n 'protocol',\n 'authority',\n 'userInfo',\n 'user',\n 'password',\n 'host',\n 'port',\n 'relative',\n 'path',\n 'directory',\n 'file',\n 'query',\n 'anchor'\n ],\n q: {\n name: 'queryKey',\n parser: /(?:^|&)([^&=]*)=?([^&]*)/g\n },\n parser: {\n strict: /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n loose: /^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/\n }\n};\n\nfunction parseUri(str) {\n if (!isType(str, 'string')) {\n return undefined;\n }\n\n var o = parseUriOptions;\n var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);\n var uri = {};\n\n for (var i = 0, l = o.key.length; i < l; ++i) {\n uri[o.key[i]] = m[i] || '';\n }\n\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) {\n uri[o.q.name][$1] = $2;\n }\n });\n\n return uri;\n}\n\nfunction addParamsAndAccessTokenToPath(accessToken, options, params) {\n params = params || {};\n params.access_token = accessToken;\n var paramsArray = [];\n var k;\n for (k in params) {\n if (Object.prototype.hasOwnProperty.call(params, k)) {\n paramsArray.push([k, params[k]].join('='));\n }\n }\n var query = '?' + paramsArray.sort().join('&');\n\n options = options || {};\n options.path = options.path || '';\n var qs = options.path.indexOf('?');\n var h = options.path.indexOf('#');\n var p;\n if (qs !== -1 && (h === -1 || h > qs)) {\n p = options.path;\n options.path = p.substring(0,qs) + query + '&' + p.substring(qs+1);\n } else {\n if (h !== -1) {\n p = options.path;\n options.path = p.substring(0,h) + query + p.substring(h);\n } else {\n options.path = options.path + query;\n }\n }\n}\n\nfunction formatUrl(u, protocol) {\n protocol = protocol || u.protocol;\n if (!protocol && u.port) {\n if (u.port === 80) {\n protocol = 'http:';\n } else if (u.port === 443) {\n protocol = 'https:';\n }\n }\n protocol = protocol || 'https:';\n\n if (!u.hostname) {\n return null;\n }\n var result = protocol + '//' + u.hostname;\n if (u.port) {\n result = result + ':' + u.port;\n }\n if (u.path) {\n result = result + u.path;\n }\n return result;\n}\n\nfunction stringify(obj, backup) {\n var value, error;\n try {\n value = RollbarJSON.stringify(obj);\n } catch (jsonError) {\n if (backup && isFunction(backup)) {\n try {\n value = backup(obj);\n } catch (backupError) {\n error = backupError;\n }\n } else {\n error = jsonError;\n }\n }\n return {error: error, value: value};\n}\n\nfunction maxByteSize(string) {\n // The transport will use utf-8, so assume utf-8 encoding.\n //\n // This minimal implementation will accurately count bytes for all UCS-2 and\n // single code point UTF-16. If presented with multi code point UTF-16,\n // which should be rare, it will safely overcount, not undercount.\n //\n // While robust utf-8 encoders exist, this is far smaller and far more performant.\n // For quickly counting payload size for truncation, smaller is better.\n\n var count = 0;\n var length = string.length;\n\n for (var i = 0; i < length; i++) {\n var code = string.charCodeAt(i);\n if (code < 128) { // up to 7 bits\n count = count + 1;\n } else if (code < 2048) { // up to 11 bits\n count = count + 2;\n } else if (code < 65536) { // up to 16 bits\n count = count + 3;\n }\n }\n\n return count;\n}\n\nfunction jsonParse(s) {\n var value, error;\n try {\n value = RollbarJSON.parse(s);\n } catch (e) {\n error = e;\n }\n return {error: error, value: value};\n}\n\nfunction makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n mode,\n backupMessage,\n errorParser\n) {\n var location = {\n url: url || '',\n line: lineno,\n column: colno\n };\n location.func = errorParser.guessFunctionName(location.url, location.line);\n location.context = errorParser.gatherContext(location.url, location.line);\n var href = typeof document !== 'undefined' && document && document.location && document.location.href;\n var useragent = typeof window !== 'undefined' && window && window.navigator && window.navigator.userAgent;\n return {\n 'mode': mode,\n 'message': error ? String(error) : (message || backupMessage),\n 'url': href,\n 'stack': [location],\n 'useragent': useragent\n };\n}\n\nfunction wrapCallback(logger, f) {\n return function(err, resp) {\n try {\n f(err, resp);\n } catch (e) {\n logger.error(e);\n }\n };\n}\n\nfunction createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\n var diagnostic = {};\n var argTypes = [];\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n argTypes.push(typ);\n switch (typ) {\n case 'undefined':\n break;\n case 'string':\n message ? extraArgs.push(arg) : message = arg;\n break;\n case 'function':\n callback = wrapCallback(logger, arg);\n break;\n case 'date':\n extraArgs.push(arg);\n break;\n case 'error':\n case 'domexception':\n case 'exception': // Firefox Exception type\n err ? extraArgs.push(arg) : err = arg;\n break;\n case 'object':\n case 'array':\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n if (requestKeys && typ === 'object' && !request) {\n for (var j = 0, len = requestKeys.length; j < len; ++j) {\n if (arg[requestKeys[j]] !== undefined) {\n request = arg;\n break;\n }\n }\n if (request) {\n break;\n }\n }\n custom ? extraArgs.push(arg) : custom = arg;\n break;\n default:\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n extraArgs.push(arg);\n }\n }\n\n if (extraArgs.length > 0) {\n // if custom is an array this turns it into an object with integer keys\n custom = merge(custom);\n custom.extraArgs = extraArgs;\n }\n\n var item = {\n message: message,\n err: err,\n custom: custom,\n timestamp: now(),\n callback: callback,\n notifier: notifier,\n diagnostic: diagnostic,\n uuid: uuid4()\n };\n\n setCustomItemKeys(item, custom);\n\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n item.diagnostic.original_arg_types = argTypes;\n return item;\n}\n\nfunction setCustomItemKeys(item, custom) {\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (custom && custom.skipFrames !== undefined) {\n item.skipFrames = custom.skipFrames;\n delete custom.skipFrames;\n }\n}\n\nfunction addErrorContext(item, errors) {\n var custom = item.data.custom || {};\n var contextAdded = false;\n\n try {\n for (var i = 0; i < errors.length; ++i) {\n if (errors[i].hasOwnProperty('rollbarContext')) {\n custom = merge(custom, errors[i].rollbarContext);\n contextAdded = true;\n }\n }\n\n // Avoid adding an empty object to the data.\n if (contextAdded) {\n item.data.custom = custom;\n }\n } catch (e) {\n item.diagnostic.error_context = 'Failed: ' + e.message;\n }\n}\n\nvar TELEMETRY_TYPES = ['log', 'network', 'dom', 'navigation', 'error', 'manual'];\nvar TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];\n\nfunction arrayIncludes(arr, val) {\n for (var k = 0; k < arr.length; ++k) {\n if (arr[k] === val) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction createTelemetryEvent(args) {\n var type, metadata, level;\n var arg;\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n switch (typ) {\n case 'string':\n if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {\n type = arg;\n } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {\n level = arg;\n }\n break;\n case 'object':\n metadata = arg;\n break;\n default:\n break;\n }\n }\n var event = {\n type: type || 'manual',\n metadata: metadata || {},\n level: level\n };\n\n return event;\n}\n\n/*\n * get - given an obj/array and a keypath, return the value at that keypath or\n * undefined if not possible.\n *\n * @param obj - an object or array\n * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'\n * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`\n */\nfunction get(obj, path) {\n if (!obj) {\n return undefined;\n }\n var keys = path.split('.');\n var result = obj;\n try {\n for (var i = 0, len = keys.length; i < len; ++i) {\n result = result[keys[i]];\n }\n } catch (e) {\n result = undefined;\n }\n return result;\n}\n\nfunction set(obj, path, value) {\n if (!obj) {\n return;\n }\n var keys = path.split('.');\n var len = keys.length;\n if (len < 1) {\n return;\n }\n if (len === 1) {\n obj[keys[0]] = value;\n return;\n }\n try {\n var temp = obj[keys[0]] || {};\n var replacement = temp;\n for (var i = 1; i < len - 1; ++i) {\n temp[keys[i]] = temp[keys[i]] || {};\n temp = temp[keys[i]];\n }\n temp[keys[len-1]] = value;\n obj[keys[0]] = replacement;\n } catch (e) {\n return;\n }\n}\n\nfunction formatArgsAsString(args) {\n var i, len, arg;\n var result = [];\n for (i = 0, len = args.length; i < len; ++i) {\n arg = args[i];\n switch (typeName(arg)) {\n case 'object':\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500) {\n arg = arg.substr(0, 497) + '...';\n }\n break;\n case 'null':\n arg = 'null';\n break;\n case 'undefined':\n arg = 'undefined';\n break;\n case 'symbol':\n arg = arg.toString();\n break;\n }\n result.push(arg);\n }\n return result.join(' ');\n}\n\nfunction now() {\n if (Date.now) {\n return +Date.now();\n }\n return +new Date();\n}\n\nfunction filterIp(requestData, captureIp) {\n if (!requestData || !requestData['user_ip'] || captureIp === true) {\n return;\n }\n var newIp = requestData['user_ip'];\n if (!captureIp) {\n newIp = null;\n } else {\n try {\n var parts;\n if (newIp.indexOf('.') !== -1) {\n parts = newIp.split('.');\n parts.pop();\n parts.push('0');\n newIp = parts.join('.');\n } else if (newIp.indexOf(':') !== -1) {\n parts = newIp.split(':');\n if (parts.length > 2) {\n var beginning = parts.slice(0, 3);\n var slashIdx = beginning[2].indexOf('/');\n if (slashIdx !== -1) {\n beginning[2] = beginning[2].substring(0, slashIdx);\n }\n var terminal = '0000:0000:0000:0000:0000';\n newIp = beginning.concat(terminal).join(':');\n }\n } else {\n newIp = null;\n }\n } catch (e) {\n newIp = null;\n }\n }\n requestData['user_ip'] = newIp;\n}\n\nfunction handleOptions(current, input, payload, logger) {\n var result = merge(current, input, payload);\n result = updateDeprecatedOptions(result, logger);\n if (!input || input.overwriteScrubFields) {\n return result;\n }\n if (input.scrubFields) {\n result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);\n }\n return result;\n}\n\nfunction updateDeprecatedOptions(options, logger) {\n if(options.hostWhiteList && !options.hostSafeList) {\n options.hostSafeList = options.hostWhiteList;\n options.hostWhiteList = undefined;\n logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');\n }\n if(options.hostBlackList && !options.hostBlockList) {\n options.hostBlockList = options.hostBlackList;\n options.hostBlackList = undefined;\n logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');\n }\n return options;\n}\n\nmodule.exports = {\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n createItem: createItem,\n addErrorContext: addErrorContext,\n createTelemetryEvent: createTelemetryEvent,\n filterIp: filterIp,\n formatArgsAsString: formatArgsAsString,\n formatUrl: formatUrl,\n get: get,\n handleOptions: handleOptions,\n isError: isError,\n isFiniteNumber: isFiniteNumber,\n isFunction: isFunction,\n isIterable: isIterable,\n isNativeFunction: isNativeFunction,\n isObject: isObject,\n isString: isString,\n isType: isType,\n isPromise: isPromise,\n jsonParse: jsonParse,\n LEVELS: LEVELS,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n merge: merge,\n now: now,\n redact: redact,\n RollbarJSON: RollbarJSON,\n sanitizeUrl: sanitizeUrl,\n set: set,\n setupJSON: setupJSON,\n stringify: stringify,\n maxByteSize: maxByteSize,\n typeName: typeName,\n uuid4: uuid4\n};\n","'use strict';\n\n/* eslint-disable no-console */\nrequire('console-polyfill');\nvar detection = require('./detection');\nvar _ = require('../utility');\n\nfunction error() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.error(_.formatArgsAsString(args));\n } else {\n console.error.apply(console, args);\n }\n}\n\nfunction info() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.info(_.formatArgsAsString(args));\n } else {\n console.info.apply(console, args);\n }\n}\n\nfunction log() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.log(_.formatArgsAsString(args));\n } else {\n console.log.apply(console, args);\n }\n}\n\n/* eslint-enable no-console */\n\nmodule.exports = {\n error: error,\n info: info,\n log: log\n};\n","'use strict';\n\n// See https://nodejs.org/docs/latest/api/url.html\nfunction parse(url) {\n var result = {\n protocol: null, auth: null, host: null, path: null,\n hash: null, href: url, hostname: null, port: null,\n pathname: null, search: null, query: null\n };\n\n var i, last;\n i = url.indexOf('//');\n if (i !== -1) {\n result.protocol = url.substring(0,i);\n last = i+2;\n } else {\n last = 0;\n }\n \n i = url.indexOf('@', last);\n if (i !== -1) {\n result.auth = url.substring(last, i);\n last = i+1;\n }\n\n i = url.indexOf('/', last);\n if (i === -1) {\n i = url.indexOf('?', last);\n if (i === -1) {\n i = url.indexOf('#', last);\n if (i === -1) {\n result.host = url.substring(last);\n } else {\n result.host = url.substring(last, i);\n result.hash = url.substring(i);\n }\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n return result;\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n\n i = url.indexOf('#', last);\n if (i === -1) {\n result.path = url.substring(last);\n } else {\n result.path = url.substring(last, i);\n result.hash = url.substring(i);\n }\n\n if (result.path) {\n var pathParts = result.path.split('?');\n result.pathname = pathParts[0];\n result.query = pathParts[1];\n result.search = result.query ? '?' + result.query : null;\n }\n return result;\n}\n\nmodule.exports = {\n parse: parse\n};\n","'use strict';\n\nvar ErrorStackParser = require('error-stack-parser');\n\nvar UNKNOWN_FUNCTION = '?';\nvar ERR_CLASS_REGEXP = new RegExp('^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ');\n\nfunction guessFunctionName() {\n return UNKNOWN_FUNCTION;\n}\n\n\nfunction gatherContext() {\n return null;\n}\n\n\nfunction Frame(stackFrame) {\n var data = {};\n\n data._stackFrame = stackFrame;\n\n data.url = stackFrame.fileName;\n data.line = stackFrame.lineNumber;\n data.func = stackFrame.functionName;\n data.column = stackFrame.columnNumber;\n data.args = stackFrame.args;\n\n data.context = gatherContext();\n\n return data;\n}\n\n\nfunction Stack(exception, skip) {\n function getStack() {\n var parserStack = [];\n\n skip = skip || 0;\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch(e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = skip; i < parserStack.length; i++) {\n stack.push(new Frame(parserStack[i]));\n }\n\n return stack;\n }\n\n return {\n stack: getStack(),\n message: exception.message,\n name: _mostSpecificErrorName(exception),\n rawStack: exception.stack,\n rawException: exception\n };\n}\n\n\nfunction parse(e, skip) {\n var err = e;\n\n if (err.nested) {\n var traceChain = [];\n while (err) {\n traceChain.push(new Stack(err, skip));\n err = err.nested;\n\n skip = 0; // Only apply skip value to primary error\n }\n\n // Return primary error with full trace chain attached.\n traceChain[0].traceChain = traceChain;\n return traceChain[0];\n } else {\n return new Stack(err, skip);\n }\n}\n\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg || !errMsg.match) {\n return ['Unknown error. There was no error message to display.', ''];\n }\n var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);\n var errClass = '(unknown)';\n\n if (errClassMatch) {\n errClass = errClassMatch[errClassMatch.length - 1];\n errMsg = errMsg.replace((errClassMatch[errClassMatch.length - 2] || '') + errClass + ':', '');\n errMsg = errMsg.replace(/(^[\\s]+|[\\s]+$)/g, '');\n }\n return [errClass, errMsg];\n}\n\n// * Prefers any value over an empty string\n// * Prefers any value over 'Error' where possible\n// * Prefers name over constructor.name when both are more specific than 'Error'\nfunction _mostSpecificErrorName(error) {\n var name = error.name && error.name.length && error.name;\n var constructorName = error.constructor.name && error.constructor.name.length && error.constructor.name;\n\n if (!name || !constructorName) {\n return name || constructorName;\n }\n\n if (name === 'Error') {\n return constructorName;\n }\n return name;\n}\n\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame\n};\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction scrub(data, scrubFields, scrubPaths) {\n scrubFields = scrubFields || [];\n\n if (scrubPaths) {\n for (var i = 0; i < scrubPaths.length; ++i) {\n scrubPath(data, scrubPaths[i]);\n }\n }\n\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart) {\n return paramPart + _.redact();\n }\n\n function paramScrubber(v) {\n var i;\n if (_.isType(v, 'string')) {\n for (i = 0; i < queryRes.length; ++i) {\n v = v.replace(queryRes[i], redactQueryParam);\n }\n }\n return v;\n }\n\n function valScrubber(k, v) {\n var i;\n for (i = 0; i < paramRes.length; ++i) {\n if (paramRes[i].test(k)) {\n v = _.redact();\n break;\n }\n }\n return v;\n }\n\n function scrubber(k, v, seen) {\n var tmpV = valScrubber(k, v);\n if (tmpV === v) {\n if (_.isType(v, 'object') || _.isType(v, 'array')) {\n return traverse(v, scrubber, seen);\n }\n return paramScrubber(tmpV);\n } else {\n return tmpV;\n }\n }\n\n return traverse(data, scrubber);\n}\n\nfunction scrubPath(obj, path) {\n var keys = path.split('.');\n var last = keys.length - 1;\n try {\n for (var i = 0; i <= last; ++i) {\n if (i < last) {\n obj = obj[keys[i]];\n } else {\n obj[keys[i]] = _.redact();\n }\n }\n } catch (e) {\n // Missing key is OK;\n }\n}\n\nfunction _getScrubFieldRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '^\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?$';\n ret.push(new RegExp(pat, 'i'));\n }\n return ret;\n}\n\n\nfunction _getScrubQueryParamRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?';\n ret.push(new RegExp('(' + pat + '=)([^&\\\\n]+)', 'igm'));\n }\n return ret;\n}\n\nmodule.exports = scrub;\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction traverse(obj, func, seen) {\n var k, v, i;\n var isObj = _.isType(obj, 'object');\n var isArray = _.isType(obj, 'array');\n var keys = [];\n var seenIndex;\n\n // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.\n seen = seen || { obj: [], mapped: []};\n\n if (isObj) {\n seenIndex = seen.obj.indexOf(obj);\n\n if (isObj && seenIndex !== -1) {\n // Prefer the mapped object if there is one.\n return seen.mapped[seenIndex] || seen.obj[seenIndex];\n }\n\n seen.obj.push(obj);\n seenIndex = seen.obj.length - 1;\n }\n\n if (isObj) {\n for (k in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, k)) {\n keys.push(k);\n }\n }\n } else if (isArray) {\n for (i = 0; i < obj.length; ++i) {\n keys.push(i);\n }\n }\n\n var result = isObj ? {} : [];\n var same = true;\n for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n result[k] = func(k, v, seen);\n same = same && result[k] === obj[k];\n }\n\n if (isObj && !same) {\n seen.mapped[seenIndex] = result;\n }\n\n return !same ? result : obj;\n}\n\nmodule.exports = traverse;\n","'use strict';\n\nvar rollbar = require('../rollbar');\n\nvar options = (typeof window !== 'undefined') && window._rollbarConfig;\nvar alias = options && options.globalAlias || 'Rollbar';\nvar shimRunning = (typeof window !== 'undefined') && window[alias] && typeof window[alias].shimId === 'function' && window[alias].shimId() !== undefined;\n\nif ((typeof window !== 'undefined') && !window._rollbarStartTime) {\n window._rollbarStartTime = (new Date()).getTime();\n}\n\nif (!shimRunning && options) {\n var Rollbar = new rollbar(options);\n window[alias] = Rollbar;\n} else if (typeof window !== 'undefined') {\n window.rollbar = rollbar;\n window._rollbarDidLoad = true;\n} else if (typeof self !== 'undefined') {\n self.rollbar = rollbar;\n self._rollbarDidLoad = true;\n}\n\nmodule.exports = rollbar;\n","'use strict';\n\nvar Rollbar = require('./core');\nvar telemeter = require('../telemetry');\nvar instrumenter = require('./telemetry');\nvar polyfillJSON = require('../utility/polyfillJSON');\nvar wrapGlobals = require('./wrapGlobals');\nvar scrub = require('../scrub');\nvar truncation = require('../truncation');\n\nRollbar.setComponents({\n telemeter: telemeter,\n instrumenter: instrumenter,\n polyfillJSON: polyfillJSON,\n wrapGlobals: wrapGlobals,\n scrub: scrub,\n truncation: truncation\n});\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar Client = require('../rollbar');\nvar _ = require('../utility');\nvar API = require('../api');\nvar logger = require('./logger');\nvar globals = require('./globalSetup');\n\nvar Transport = require('./transport');\nvar urllib = require('./url');\n\nvar transforms = require('./transforms');\nvar sharedTransforms = require('../transforms');\nvar predicates = require('./predicates');\nvar sharedPredicates = require('../predicates');\nvar errorParser = require('../errorParser');\n\nfunction Rollbar(options, client) {\n this.options = _.handleOptions(defaultOptions, options, null, logger);\n this.options._configuredOptions = options;\n var Telemeter = this.components.telemeter;\n var Instrumenter = this.components.instrumenter;\n var polyfillJSON = this.components.polyfillJSON;\n this.wrapGlobals = this.components.wrapGlobals;\n this.scrub = this.components.scrub;\n var truncation = this.components.truncation;\n\n var transport = new Transport(truncation);\n var api = new API(this.options, transport, urllib, truncation);\n if (Telemeter) {\n this.telemeter = new Telemeter(this.options);\n }\n this.client = client || new Client(this.options, api, logger, this.telemeter, 'browser');\n var gWindow = _gWindow();\n var gDocument = (typeof document != 'undefined') && document;\n this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers\n this.anonymousErrorsPending = 0;\n addTransformsToNotifier(this.client.notifier, this, gWindow);\n addPredicatesToQueue(this.client.queue);\n this.setupUnhandledCapture();\n if (Instrumenter) {\n this.instrumenter = new Instrumenter(this.options, this.client.telemeter, this, gWindow, gDocument);\n this.instrumenter.instrument();\n }\n _.setupJSON(polyfillJSON);\n}\n\nvar _instance = null;\nRollbar.init = function(options, client) {\n if (_instance) {\n return _instance.global(options).configure(options);\n }\n _instance = new Rollbar(options, client);\n return _instance;\n};\n\nRollbar.prototype.components = {};\n\nRollbar.setComponents = function(components) {\n Rollbar.prototype.components = components;\n}\n\nfunction handleUninitialized(maybeCallback) {\n var message = 'Rollbar is not initialized';\n logger.error(message);\n if (maybeCallback) {\n maybeCallback(new Error(message));\n }\n}\n\nRollbar.prototype.global = function(options) {\n this.client.global(options);\n return this;\n};\nRollbar.global = function(options) {\n if (_instance) {\n return _instance.global(options);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.configure = function(options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = {payload: payloadData};\n }\n this.options = _.handleOptions(oldOptions, options, payload, logger);\n this.options._configuredOptions = _.handleOptions(oldOptions._configuredOptions, options, payload);\n this.client.configure(this.options, payloadData);\n this.instrumenter && this.instrumenter.configure(this.options);\n this.setupUnhandledCapture();\n return this;\n};\nRollbar.configure = function(options, payloadData) {\n if (_instance) {\n return _instance.configure(options, payloadData);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.lastError = function() {\n return this.client.lastError;\n};\nRollbar.lastError = function() {\n if (_instance) {\n return _instance.lastError();\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.log = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.log(item);\n return {uuid: uuid};\n};\nRollbar.log = function() {\n if (_instance) {\n return _instance.log.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.debug = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.debug(item);\n return {uuid: uuid};\n};\nRollbar.debug = function() {\n if (_instance) {\n return _instance.debug.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.info = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.info(item);\n return {uuid: uuid};\n};\nRollbar.info = function() {\n if (_instance) {\n return _instance.info.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warn = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warn(item);\n return {uuid: uuid};\n};\nRollbar.warn = function() {\n if (_instance) {\n return _instance.warn.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warning = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warning(item);\n return {uuid: uuid};\n};\nRollbar.warning = function() {\n if (_instance) {\n return _instance.warning.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.error = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.error(item);\n return {uuid: uuid};\n};\nRollbar.error = function() {\n if (_instance) {\n return _instance.error.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.critical = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.critical(item);\n return {uuid: uuid};\n};\nRollbar.critical = function() {\n if (_instance) {\n return _instance.critical.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.buildJsonPayload = function(item) {\n return this.client.buildJsonPayload(item);\n};\nRollbar.buildJsonPayload = function() {\n if (_instance) {\n return _instance.buildJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.sendJsonPayload = function(jsonPayload) {\n return this.client.sendJsonPayload(jsonPayload);\n};\nRollbar.sendJsonPayload = function() {\n if (_instance) {\n return _instance.sendJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.setupUnhandledCapture = function() {\n var gWindow = _gWindow();\n\n if (!this.unhandledExceptionsInitialized) {\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(gWindow, this);\n if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {\n this.wrapGlobals(gWindow, this);\n }\n this.unhandledExceptionsInitialized = true;\n }\n }\n if (!this.unhandledRejectionsInitialized) {\n if (this.options.captureUnhandledRejections || this.options.handleUnhandledRejections) {\n globals.captureUnhandledRejections(gWindow, this);\n this.unhandledRejectionsInitialized = true;\n }\n }\n};\n\nRollbar.prototype.handleUncaughtException = function(message, url, lineno, colno, error, context) {\n if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {\n return;\n }\n\n // Chrome will always send 5+ arguments and error will be valid or null, not undefined.\n // If error is undefined, we have a different caller.\n // Chrome also sends errors from web workers with null error, but does not invoke\n // prepareStackTrace() for these. Test for empty url to skip them.\n if (this.options.inspectAnonymousErrors && this.isChrome && error === null && url === '') {\n return 'anonymous';\n }\n\n var item;\n var stackInfo = _.makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n 'onerror',\n 'uncaught exception',\n errorParser\n );\n if (_.isError(error)) {\n item = this._createItem([message, error, context]);\n item._unhandledStackInfo = stackInfo;\n } else if (_.isError(url)) {\n item = this._createItem([message, url, context]);\n item._unhandledStackInfo = stackInfo;\n } else {\n item = this._createItem([message, context]);\n item.stackInfo = stackInfo;\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n this.client.log(item);\n};\n\n/**\n * Chrome only. Other browsers will ignore.\n *\n * Use Error.prepareStackTrace to extract information about errors that\n * do not have a valid error object in onerror().\n *\n * In tested version of Chrome, onerror is called first but has no way\n * to communicate with prepareStackTrace. Use a counter to let this\n * handler know which errors to send to Rollbar.\n *\n * In config options, set inspectAnonymousErrors to enable.\n */\nRollbar.prototype.handleAnonymousErrors = function() {\n if (!this.options.inspectAnonymousErrors || !this.isChrome) {\n return;\n }\n\n var r = this;\n function prepareStackTrace(error, _stack) { // eslint-disable-line no-unused-vars\n if (r.options.inspectAnonymousErrors) {\n if (r.anonymousErrorsPending) {\n // This is the only known way to detect that onerror saw an anonymous error.\n // It depends on onerror reliably being called before Error.prepareStackTrace,\n // which so far holds true on tested versions of Chrome. If versions of Chrome\n // are tested that behave differently, this logic will need to be updated\n // accordingly.\n r.anonymousErrorsPending -= 1;\n\n if (!error) {\n // Not likely to get here, but calling handleUncaughtException from here\n // without an error object would throw off the anonymousErrorsPending counter,\n // so return now.\n return;\n }\n\n // Allow this to be tracked later.\n error._isAnonymous = true;\n\n // url, lineno, colno shouldn't be needed for these errors.\n // If that changes, update this accordingly, using the unused\n // _stack param as needed (rather than parse error.toString()).\n r.handleUncaughtException(error.message, null, null, null, error);\n }\n }\n\n // Workaround to ensure stack is preserved for normal errors.\n return error.stack;\n }\n\n // https://v8.dev/docs/stack-trace-api\n try {\n Error.prepareStackTrace = prepareStackTrace;\n } catch (e) {\n this.options.inspectAnonymousErrors = false;\n this.error('anonymous error handler failed', e);\n }\n}\n\nRollbar.prototype.handleUnhandledRejection = function(reason, promise) {\n if (!this.options.captureUnhandledRejections && !this.options.handleUnhandledRejections) {\n return;\n }\n\n var message = 'unhandled rejection was null or undefined!';\n if (reason) {\n if (reason.message) {\n message = reason.message;\n } else {\n var reasonResult = _.stringify(reason);\n if (reasonResult.value) {\n message = reasonResult.value;\n }\n }\n }\n var context = (reason && reason._rollbarContext) || (promise && promise._rollbarContext);\n\n var item;\n if (_.isError(reason)) {\n item = this._createItem([message, reason, context]);\n } else {\n item = this._createItem([message, reason, context]);\n item.stackInfo = _.makeUnhandledStackInfo(\n message,\n '',\n 0,\n 0,\n null,\n 'unhandledrejection',\n '',\n errorParser\n );\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n item._originalArgs = item._originalArgs || [];\n item._originalArgs.push(promise);\n this.client.log(item);\n};\n\nRollbar.prototype.wrap = function(f, context, _before) {\n try {\n var ctxFn;\n if(_.isFunction(context)) {\n ctxFn = context;\n } else {\n ctxFn = function() { return context || {}; };\n }\n\n if (!_.isFunction(f)) {\n return f;\n }\n\n if (f._isWrap) {\n return f;\n }\n\n if (!f._rollbar_wrapped) {\n f._rollbar_wrapped = function () {\n if (_before && _.isFunction(_before)) {\n _before.apply(this, arguments);\n }\n try {\n return f.apply(this, arguments);\n } catch(exc) {\n var e = exc;\n if (e && window._rollbarWrappedError !== e) {\n if (_.isType(e, 'string')) {\n e = new String(e);\n }\n e._rollbarContext = ctxFn() || {};\n e._rollbarContext._wrappedSource = f.toString();\n\n window._rollbarWrappedError = e;\n }\n throw e;\n }\n };\n\n f._rollbar_wrapped._isWrap = true;\n\n if (f.hasOwnProperty) {\n for (var prop in f) {\n if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {\n f._rollbar_wrapped[prop] = f[prop];\n }\n }\n }\n }\n\n return f._rollbar_wrapped;\n } catch (e) {\n // Return the original function if the wrap fails.\n return f;\n }\n};\nRollbar.wrap = function(f, context) {\n if (_instance) {\n return _instance.wrap(f, context);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.captureEvent = function() {\n var event = _.createTelemetryEvent(arguments);\n return this.client.captureEvent(event.type, event.metadata, event.level);\n};\nRollbar.captureEvent = function() {\n if (_instance) {\n return _instance.captureEvent.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\n// The following two methods are used internally and are not meant for public use\nRollbar.prototype.captureDomContentLoaded = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureLoad(ts);\n};\n\n/* Internal */\n\nfunction addTransformsToNotifier(notifier, rollbar, gWindow) {\n notifier\n .addTransform(transforms.handleDomException)\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(gWindow))\n .addTransform(transforms.addClientInfo(gWindow))\n .addTransform(transforms.addPluginInfo(gWindow))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(sharedTransforms.addConfigToPayload)\n .addTransform(transforms.addScrubber(rollbar.scrub))\n .addTransform(sharedTransforms.userTransform(logger))\n .addTransform(sharedTransforms.addConfiguredOptions)\n .addTransform(sharedTransforms.addDiagnosticKeys)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(sharedPredicates.checkLevel)\n .addPredicate(predicates.checkIgnore)\n .addPredicate(sharedPredicates.userCheckIgnore(logger))\n .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))\n .addPredicate(sharedPredicates.urlIsSafeListed(logger))\n .addPredicate(sharedPredicates.messageIsIgnored(logger));\n}\n\nRollbar.prototype.loadFull = function() {\n logger.info('Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.');\n};\n\nRollbar.prototype._createItem = function(args) {\n return _.createItem(args, logger, this);\n};\n\nfunction _getFirstFunction(args) {\n for (var i = 0, len = args.length; i < len; ++i) {\n if (_.isFunction(args[i])) {\n return args[i];\n }\n }\n return undefined;\n}\n\nfunction _gWindow() {\n return ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n}\n\nvar defaults = require('../defaults');\nvar scrubFields = require('./defaults/scrubFields');\n\nvar defaultOptions = {\n version: defaults.version,\n scrubFields: scrubFields.scrubFields,\n logLevel: defaults.logLevel,\n reportLevel: defaults.reportLevel,\n uncaughtErrorLevel: defaults.uncaughtErrorLevel,\n endpoint: defaults.endpoint,\n verbose: false,\n enabled: true,\n transmit: true,\n sendConfig: false,\n includeItemsInTelemetry: true,\n captureIp: true,\n inspectAnonymousErrors: true,\n ignoreDuplicateErrors: true,\n wrapGlobalEventHandlers: false\n};\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar _ = require('./utility');\n\n/*\n * Rollbar - the interface to Rollbar\n *\n * @param options\n * @param api\n * @param logger\n */\nfunction Rollbar(options, api, logger, telemeter, platform) {\n this.options = _.merge(options);\n this.logger = logger;\n Rollbar.rateLimiter.configureGlobal(this.options);\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.api = api;\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n\n // This must happen before the Notifier is created\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = telemeter;\n setStackTraceLimit(options);\n this.lastError = null;\n this.lastErrorHash = 'none';\n}\n\nvar defaultOptions = {\n maxItems: 0,\n itemsPerMinute: 60\n};\n\nRollbar.rateLimiter = new RateLimiter(defaultOptions);\n\nRollbar.prototype.global = function (options) {\n Rollbar.rateLimiter.configureGlobal(options);\n return this;\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n\n this.options = _.merge(oldOptions, options, payload);\n\n // This must happen before the Notifier is configured\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier && this.notifier.configure(this.options);\n this.telemeter && this.telemeter.configure(this.options);\n setStackTraceLimit(options);\n this.global(this.options);\n\n if (validateTracer(options.tracer)) {\n this.tracer = options.tracer\n }\n\n return this;\n};\n\nRollbar.prototype.log = function (item) {\n var level = this._defaultLogLevel();\n return this._log(level, item);\n};\n\nRollbar.prototype.debug = function (item) {\n this._log('debug', item);\n};\n\nRollbar.prototype.info = function (item) {\n this._log('info', item);\n};\n\nRollbar.prototype.warn = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.warning = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.error = function (item) {\n this._log('error', item);\n};\n\nRollbar.prototype.critical = function (item) {\n this._log('critical', item);\n};\n\nRollbar.prototype.wait = function (callback) {\n this.queue.wait(callback);\n};\n\nRollbar.prototype.captureEvent = function (type, metadata, level) {\n return this.telemeter && this.telemeter.captureEvent(type, metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function (ts) {\n return this.telemeter && this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (ts) {\n return this.telemeter && this.telemeter.captureLoad(ts);\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.api.buildJsonPayload(item);\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n this.api.postJsonPayload(jsonPayload);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function (defaultLevel, item) {\n var callback;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {\n if (callback) {\n var error = new Error('ignored identical item');\n error.item = item;\n callback(error);\n }\n return;\n }\n try {\n this._addTracingInfo(item);\n item.level = item.level || defaultLevel;\n this.telemeter && this.telemeter._captureRollbarItem(item);\n item.telemetryEvents = (this.telemeter && this.telemeter.copyEvents()) || [];\n this.notifier.log(item, callback);\n } catch (e) {\n if (callback) {\n callback(e);\n }\n this.logger.error(e);\n }\n};\n\nRollbar.prototype._defaultLogLevel = function () {\n return this.options.logLevel || 'debug';\n};\n\nRollbar.prototype._sameAsLastError = function (item) {\n if (!item._isUncaught) {\n return false;\n }\n var itemHash = generateItemHash(item);\n if (this.lastErrorHash === itemHash) {\n return true;\n }\n this.lastError = item.err;\n this.lastErrorHash = itemHash;\n return false;\n};\n\nRollbar.prototype._addTracingInfo = function (item) {\n // Tracer validation occurs in the constructor\n // or in the Rollbar.prototype.configure methods\n if (this.tracer) {\n // add rollbar occurrence uuid to span\n var span = this.tracer.scope().active();\n\n if (validateSpan(span)) {\n span.setTag('rollbar.error_uuid', item.uuid);\n span.setTag('rollbar.has_error', true);\n span.setTag('error', true);\n span.setTag('rollbar.item_url', `https://rollbar.com/item/uuid/?uuid=${item.uuid}`);\n span.setTag('rollbar.occurrence_url', `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`);\n\n // add span ID & trace ID to occurrence\n var opentracingSpanId = span.context().toSpanId();\n var opentracingTraceId = span.context().toTraceId();\n\n if (item.custom) {\n item.custom.opentracing_span_id = opentracingSpanId;\n item.custom.opentracing_trace_id = opentracingTraceId;\n } else {\n item.custom = {\n opentracing_span_id: opentracingSpanId,\n opentracing_trace_id: opentracingTraceId\n };\n }\n }\n }\n}\n\nfunction generateItemHash(item) {\n var message = item.message || '';\n var stack = (item.err || {}).stack || String(item.err);\n return message + '::' + stack;\n}\n\n// Node.js, Chrome, Safari, and some other browsers support this property\n// which globally sets the number of stack frames returned in an Error object.\n// If a browser can't use it, no harm done.\nfunction setStackTraceLimit(options) {\n if (options.stackTraceLimit) {\n Error.stackTraceLimit = options.stackTraceLimit;\n }\n}\n\n/**\n * Validate the Tracer object provided to the Client\n * is valid for our Opentracing use case.\n * @param {opentracer.Tracer} tracer\n */\nfunction validateTracer(tracer) {\n if (!tracer) {\n return false;\n }\n\n if (!tracer.scope || typeof tracer.scope !== 'function') {\n return false;\n }\n\n var scope = tracer.scope();\n\n if (!scope || !scope.active || typeof scope.active !== 'function') {\n return false;\n }\n\n return true;\n}\n\n/**\n * Validate the Span object provided\n * @param {opentracer.Span} span\n */\nfunction validateSpan(span) {\n if (!span || !span.context || typeof span.context !== 'function') {\n return false;\n }\n\n var spanContext = span.context();\n\n if (!spanContext\n || !spanContext.toSpanId\n || !spanContext.toTraceId\n || typeof spanContext.toSpanId !== 'function'\n || typeof spanContext.toTraceId !== 'function') {\n return false\n }\n\n return true;\n}\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar\n *\n * @param options - the same options that are accepted by configureGlobal offered as a convenience\n */\nfunction RateLimiter(options) {\n this.startTime = _.now();\n this.counter = 0;\n this.perMinCounter = 0;\n this.platform = null;\n this.platformOptions = {};\n this.configureGlobal(options);\n}\n\nRateLimiter.globalSettings = {\n startTime: _.now(),\n maxItems: undefined,\n itemsPerMinute: undefined\n};\n\n/*\n * configureGlobal - set the global rate limiter options\n *\n * @param options - Only the following values are recognized:\n * startTime: a timestamp of the form returned by (new Date()).getTime()\n * maxItems: the maximum items\n * itemsPerMinute: the max number of items to send in a given minute\n */\nRateLimiter.prototype.configureGlobal = function(options) {\n if (options.startTime !== undefined) {\n RateLimiter.globalSettings.startTime = options.startTime;\n }\n if (options.maxItems !== undefined) {\n RateLimiter.globalSettings.maxItems = options.maxItems;\n }\n if (options.itemsPerMinute !== undefined) {\n RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;\n }\n};\n\n/*\n * shouldSend - determine if we should send a given item based on rate limit settings\n *\n * @param item - the item we are about to send\n * @returns An object with the following structure:\n * error: (Error|null)\n * shouldSend: bool\n * payload: (Object|null)\n * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and\n * exactly one of error or payload will be non-null. If error is non-null, the returned Error will\n * describe the situation, but it means that we were already over a rate limit (either globally or\n * per minute) when this item was checked. If error is null, and therefore payload is non-null, it\n * means this item put us over the global rate limit and the payload should be sent to Rollbar in\n * place of the passed in item.\n */\nRateLimiter.prototype.shouldSend = function(item, now) {\n now = now || _.now();\n var elapsedTime = now - this.startTime;\n if (elapsedTime < 0 || elapsedTime >= 60000) {\n this.startTime = now;\n this.perMinCounter = 0;\n }\n\n var globalRateLimit = RateLimiter.globalSettings.maxItems;\n var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;\n\n if (checkRate(item, globalRateLimit, this.counter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimit + ' max items reached', false);\n } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimitPerMin + ' items per minute reached', false);\n }\n this.counter++;\n this.perMinCounter++;\n\n var shouldSend = !checkRate(item, globalRateLimit, this.counter);\n var perMinute = shouldSend;\n shouldSend = shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);\n return shouldSendValue(this.platform, this.platformOptions, null, shouldSend, globalRateLimit, globalRateLimitPerMin, perMinute);\n};\n\nRateLimiter.prototype.setPlatformOptions = function(platform, options) {\n this.platform = platform;\n this.platformOptions = options;\n};\n\n/* Helpers */\n\nfunction checkRate(item, limit, counter) {\n return !item.ignoreRateLimit && limit >= 1 && counter > limit;\n}\n\nfunction shouldSendValue(platform, options, error, shouldSend, globalRateLimit, limitPerMin, perMinute) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute);\n }\n return {error: error, shouldSend: shouldSend, payload: payload};\n}\n\nfunction rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute) {\n var environment = options.environment || (options.payload && options.payload.environment);\n var msg;\n if (perMinute) {\n msg = 'item per minute limit reached, ignoring errors until timeout';\n } else {\n msg = 'maxItems has been hit, ignoring errors until reset.';\n }\n var item = {\n body: {\n message: {\n body: msg,\n extra: {\n maxItems: globalRateLimit,\n itemsPerMinute: limitPerMin\n }\n }\n },\n language: 'javascript',\n environment: environment,\n notifier: {\n version: (options.notifier && options.notifier.version) || options.version\n }\n };\n if (platform === 'browser') {\n item.platform = 'browser';\n item.framework = 'browser-js';\n item.notifier.name = 'rollbar-browser-js';\n } else if (platform === 'server') {\n item.framework = options.framework || 'node-js';\n item.notifier.name = options.notifier.name;\n } else if (platform === 'react-native') {\n item.framework = options.framework || 'react-native';\n item.notifier.name = options.notifier.name;\n }\n return item;\n}\n\nmodule.exports = RateLimiter;\n","'use strict';\n\n'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isPlainObject = function isPlainObject(obj) {\n\tif (!obj || toStr.call(obj) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tvar hasOwnConstructor = hasOwn.call(obj, 'constructor');\n\tvar hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n\t// Not own constructor property must be Object\n\tif (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n\t\treturn false;\n\t}\n\n\t// Own properties are enumerated firstly, so to speed up,\n\t// if last one is own, then all properties are own.\n\tvar key;\n\tfor (key in obj) {/**/}\n\n\treturn typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\nfunction merge() {\n var i, src, copy, clone, name,\n result = {},\n current = null,\n length = arguments.length;\n\n for (i=0; i < length; i++) {\n current = arguments[i];\n if (current == null) {\n continue;\n }\n\n for (name in current) {\n src = result[name];\n copy = current[name];\n if (result !== copy) {\n if (copy && isPlainObject(copy)) {\n clone = src && isPlainObject(src) ? src : {};\n result[name] = merge(clone, copy);\n } else if (typeof copy !== 'undefined') {\n result[name] = copy;\n }\n }\n }\n }\n return result;\n}\n\nmodule.exports = merge;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Queue - an object which handles which handles a queue of items to be sent to Rollbar.\n * This object handles rate limiting via a passed in rate limiter, retries based on connection\n * errors, and filtering of items based on a set of configurable predicates. The communication to\n * the backend is performed via a given API object.\n *\n * @param rateLimiter - An object which conforms to the interface\n * rateLimiter.shouldSend(item) -> bool\n * @param api - An object which conforms to the interface\n * api.postItem(payload, function(err, response))\n * @param logger - An object used to log verbose messages if desired\n * @param options - see Queue.prototype.configure\n */\nfunction Queue(rateLimiter, api, logger, options) {\n this.rateLimiter = rateLimiter;\n this.api = api;\n this.logger = logger;\n this.options = options;\n this.predicates = [];\n this.pendingItems = [];\n this.pendingRequests = [];\n this.retryQueue = [];\n this.retryHandle = null;\n this.waitCallback = null;\n this.waitIntervalID = null;\n}\n\n/*\n * configure - updates the options this queue uses\n *\n * @param options\n */\nQueue.prototype.configure = function(options) {\n this.api && this.api.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addPredicate - adds a predicate to the end of the list of predicates for this queue\n *\n * @param predicate - function(item, options) -> (bool|{err: Error})\n * Returning true means that this predicate passes and the item is okay to go on the queue\n * Returning false means do not add the item to the queue, but it is not an error\n * Returning {err: Error} means do not add the item to the queue, and the given error explains why\n * Returning {err: undefined} is equivalent to returning true but don't do that\n */\nQueue.prototype.addPredicate = function(predicate) {\n if (_.isFunction(predicate)) {\n this.predicates.push(predicate);\n }\n return this;\n};\n\nQueue.prototype.addPendingItem = function(item) {\n this.pendingItems.push(item);\n};\n\nQueue.prototype.removePendingItem = function(item) {\n var idx = this.pendingItems.indexOf(item);\n if (idx !== -1) {\n this.pendingItems.splice(idx, 1);\n }\n};\n\n/*\n * addItem - Send an item to the Rollbar API if all of the predicates are satisfied\n *\n * @param item - The payload to send to the backend\n * @param callback - function(error, repsonse) which will be called with the response from the API\n * in the case of a success, otherwise response will be null and error will have a value. If both\n * error and response are null then the item was stopped by a predicate which did not consider this\n * to be an error condition, but nonetheless did not send the item to the API.\n * @param originalError - The original error before any transformations that is to be logged if any\n */\nQueue.prototype.addItem = function(item, callback, originalError, originalItem) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() { return; };\n }\n var predicateResult = this._applyPredicates(item);\n if (predicateResult.stop) {\n this.removePendingItem(originalItem);\n callback(predicateResult.err);\n return;\n }\n this._maybeLog(item, originalError);\n this.removePendingItem(originalItem);\n if (!this.options.transmit) {\n callback(new Error('Transmit disabled'));\n return;\n }\n this.pendingRequests.push(item);\n try {\n this._makeApiRequest(item, function(err, resp) {\n this._dequeuePendingRequest(item);\n callback(err, resp);\n }.bind(this));\n } catch (e) {\n this._dequeuePendingRequest(item);\n callback(e);\n }\n};\n\n/*\n * wait - Stop any further errors from being added to the queue, and get called back when all items\n * currently processing have finished sending to the backend.\n *\n * @param callback - function() called when all pending items have been sent\n */\nQueue.prototype.wait = function(callback) {\n if (!_.isFunction(callback)) {\n return;\n }\n this.waitCallback = callback;\n if (this._maybeCallWait()) {\n return;\n }\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitIntervalID = setInterval(function() {\n this._maybeCallWait();\n }.bind(this), 500);\n};\n\n/* _applyPredicates - Sequentially applies the predicates that have been added to the queue to the\n * given item with the currently configured options.\n *\n * @param item - An item in the queue\n * @returns {stop: bool, err: (Error|null)} - stop being true means do not add item to the queue,\n * the error value should be passed up to a callbak if we are stopping.\n */\nQueue.prototype._applyPredicates = function(item) {\n var p = null;\n for (var i = 0, len = this.predicates.length; i < len; i++) {\n p = this.predicates[i](item, this.options);\n if (!p || p.err !== undefined) {\n return {stop: true, err: p.err};\n }\n }\n return {stop: false, err: null};\n};\n\n/*\n * _makeApiRequest - Send an item to Rollbar, callback when done, if there is an error make an\n * effort to retry if we are configured to do so.\n *\n * @param item - an item ready to send to the backend\n * @param callback - function(err, response)\n */\nQueue.prototype._makeApiRequest = function(item, callback) {\n var rateLimitResponse = this.rateLimiter.shouldSend(item);\n if (rateLimitResponse.shouldSend) {\n this.api.postItem(item, function(err, resp) {\n if (err) {\n this._maybeRetry(err, item, callback);\n } else {\n callback(err, resp);\n }\n }.bind(this));\n } else if (rateLimitResponse.error) {\n callback(rateLimitResponse.error);\n } else {\n this.api.postItem(rateLimitResponse.payload, callback);\n }\n};\n\n// These are errors basically mean there is no internet connection\nvar RETRIABLE_ERRORS = ['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED', 'EHOSTUNREACH', 'EPIPE', 'EAI_AGAIN'];\n\n/*\n * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback\n * with the error.\n *\n * @param err - an error returned by the API transport\n * @param item - the item that was trying to be sent when this error occured\n * @param callback - function(err, response)\n */\nQueue.prototype._maybeRetry = function(err, item, callback) {\n var shouldRetry = false;\n if (this.options.retryInterval) {\n for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {\n if (err.code === RETRIABLE_ERRORS[i]) {\n shouldRetry = true;\n break;\n }\n }\n if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {\n item.retries = item.retries ? item.retries + 1 : 1;\n if (item.retries > this.options.maxRetries) {\n shouldRetry = false;\n }\n }\n }\n if (shouldRetry) {\n this._retryApiRequest(item, callback);\n } else {\n callback(err);\n }\n};\n\n/*\n * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process\n * that queue based on the retryInterval in the options for this queue.\n *\n * @param item - an item that failed to send due to an error we deem retriable\n * @param callback - function(err, response)\n */\nQueue.prototype._retryApiRequest = function(item, callback) {\n this.retryQueue.push({item: item, callback: callback});\n\n if (!this.retryHandle) {\n this.retryHandle = setInterval(function() {\n while (this.retryQueue.length) {\n var retryObject = this.retryQueue.shift();\n this._makeApiRequest(retryObject.item, retryObject.callback);\n }\n }.bind(this), this.options.retryInterval);\n }\n};\n\n/*\n * _dequeuePendingRequest - Removes the item from the pending request queue, this queue is used to\n * enable to functionality of providing a callback that clients can pass to `wait` to be notified\n * when the pending request queue has been emptied. This must be called when the API finishes\n * processing this item. If a `wait` callback is configured, it is called by this function.\n *\n * @param item - the item previously added to the pending request queue\n */\nQueue.prototype._dequeuePendingRequest = function(item) {\n var idx = this.pendingRequests.indexOf(item);\n if (idx !== -1) {\n this.pendingRequests.splice(idx, 1);\n this._maybeCallWait();\n }\n};\n\nQueue.prototype._maybeLog = function(data, originalError) {\n if (this.logger && this.options.verbose) {\n var message = originalError;\n message = message || _.get(data, 'body.trace.exception.message');\n message = message || _.get(data, 'body.trace_chain.0.exception.message');\n if (message) {\n this.logger.error(message);\n return;\n }\n message = _.get(data, 'body.message.body');\n if (message) {\n this.logger.log(message);\n }\n }\n};\n\nQueue.prototype._maybeCallWait = function() {\n if (_.isFunction(this.waitCallback) && this.pendingItems.length === 0 && this.pendingRequests.length === 0) {\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitCallback();\n return true;\n }\n return false;\n};\n\nmodule.exports = Queue;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Notifier - the internal object responsible for delegating between the client exposed API, the\n * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the\n * queue which handles the communcation with the Rollbar API servers.\n *\n * @param queue - an object that conforms to the interface: addItem(item, callback)\n * @param options - an object representing the options to be set for this notifier, this should have\n * any defaults already set by the caller\n */\nfunction Notifier(queue, options) {\n this.queue = queue;\n this.options = options;\n this.transforms = [];\n this.diagnostic = {};\n}\n\n/*\n * configure - updates the options for this notifier with the passed in object\n *\n * @param options - an object which gets merged with the current options set on this notifier\n * @returns this\n */\nNotifier.prototype.configure = function(options) {\n this.queue && this.queue.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addTransform - adds a transform onto the end of the queue of transforms for this notifier\n *\n * @param transform - a function which takes three arguments:\n * * item: An Object representing the data to eventually be sent to Rollbar\n * * options: The current value of the options for this notifier\n * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this\n * callback with a null value for error if it wants the processing chain to continue, otherwise\n * with an error to terminate the processing. The item should be the updated item after this\n * transform is finished modifying it.\n */\nNotifier.prototype.addTransform = function(transform) {\n if (_.isFunction(transform)) {\n this.transforms.push(transform);\n }\n return this;\n};\n\n/*\n * log - the internal log function which applies the configured transforms and then pushes onto the\n * queue to be sent to the backend.\n *\n * @param item - An object with the following structure:\n * message [String] - An optional string to be sent to rollbar\n * error [Error] - An optional error\n *\n * @param callback - A function of type function(err, resp) which will be called with exactly one\n * null argument and one non-null argument. The callback will be called once, either during the\n * transform stage if an error occurs inside a transform, or in response to the communication with\n * the backend. The second argument will be the response from the backend in case of success.\n */\nNotifier.prototype.log = function(item, callback) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!this.options.enabled) {\n return callback(new Error('Rollbar is not enabled'));\n }\n\n this.queue.addPendingItem(item);\n var originalError = item.err;\n this._applyTransforms(item, function(err, i) {\n if (err) {\n this.queue.removePendingItem(item);\n return callback(err, null);\n }\n this.queue.addItem(i, callback, originalError, item);\n }.bind(this));\n};\n\n/* Internal */\n\n/*\n * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See\n * `addTransform` for more information.\n *\n * @param item - An item to be transformed\n * @param callback - A function of type function(err, item) which will be called with a non-null\n * error and a null item in the case of a transform failure, or a null error and non-null item after\n * all transforms have been applied.\n */\nNotifier.prototype._applyTransforms = function(item, callback) {\n var transformIndex = -1;\n var transformsLength = this.transforms.length;\n var transforms = this.transforms;\n var options = this.options;\n\n var cb = function(err, i) {\n if (err) {\n callback(err, null);\n return;\n }\n\n transformIndex++;\n\n if (transformIndex === transformsLength) {\n callback(null, i);\n return;\n }\n\n transforms[transformIndex](i, options, cb);\n };\n\n cb(null, item);\n};\n\nmodule.exports = Notifier;\n","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1/item/',\n search: null,\n version: '1',\n protocol: 'https:',\n port: 443\n};\n\n/**\n * Api is an object that encapsulates methods of communicating with\n * the Rollbar API. It is a standard interface with some parts implemented\n * differently for server or browser contexts. It is an object that should\n * be instantiated when used so it can contain non-global options that may\n * be different for another instance of RollbarApi.\n *\n * @param options {\n * accessToken: the accessToken to use for posting items to rollbar\n * endpoint: an alternative endpoint to send errors to\n * must be a valid, fully qualified URL.\n * The default is: https://api.rollbar.com/api/1/item\n * proxy: if you wish to proxy requests provide an object\n * with the following keys:\n * host or hostname (required): foo.example.com\n * port (optional): 123\n * protocol (optional): https\n * }\n */\nfunction Api(options, transport, urllib, truncation, jsonBackup) {\n this.options = options;\n this.transport = transport;\n this.url = urllib;\n this.truncation = truncation;\n this.jsonBackup = jsonBackup;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, urllib);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function(data, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n this.transport.post(this.accessToken, transportOptions, payload, callback);\n};\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.buildJsonPayload = function(data, callback) {\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n\n if (stringifyResult.error) {\n if (callback) {\n callback(stringifyResult.error);\n }\n return null;\n }\n\n return stringifyResult.value;\n};\n\n/**\n *\n * @param jsonPayload\n * @param callback\n */\nApi.prototype.postJsonPayload = function(jsonPayload, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n this.transport.postJsonPayload(this.accessToken, transportOptions, jsonPayload, callback);\n};\n\nApi.prototype.configure = function(options) {\n var oldOptions = this.oldOptions;\n this.options = _.merge(oldOptions, options);\n this.transportOptions = _getTransport(this.options, this.url);\n if (this.options.accessToken !== undefined) {\n this.accessToken = this.options.accessToken;\n }\n return this;\n};\n\nfunction _getTransport(options, url) {\n return helpers.getTransportFromOptions(options, defaultOptions, url);\n}\n\nmodule.exports = Api;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (!_.isType(data.context, 'string')) {\n var contextResult = _.stringify(data.context, jsonBackup);\n if (contextResult.error) {\n data.context = 'Error: could not serialize \\'context\\'';\n } else {\n data.context = contextResult.value || '';\n }\n if (data.context.length > 255) {\n data.context = data.context.substr(0, 255);\n }\n }\n return {\n access_token: accessToken,\n data: data\n };\n}\n\nfunction getTransportFromOptions(options, defaults, url) {\n var hostname = defaults.hostname;\n var protocol = defaults.protocol;\n var port = defaults.port;\n var path = defaults.path;\n var search = defaults.search;\n var timeout = options.timeout;\n\n var proxy = options.proxy;\n if (options.endpoint) {\n var opts = url.parse(options.endpoint);\n hostname = opts.hostname;\n protocol = opts.protocol;\n port = opts.port;\n path = opts.pathname;\n search = opts.search;\n }\n return {\n timeout: timeout,\n hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy\n };\n}\n\nfunction transportOptions(transport, method) {\n var protocol = transport.protocol || 'https:';\n var port = transport.port || (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);\n var hostname = transport.hostname;\n var path = transport.path;\n var timeout = transport.timeout;\n if (transport.search) {\n path = path + transport.search;\n }\n if (transport.proxy) {\n path = protocol + '//' + hostname + path;\n hostname = transport.proxy.host || transport.proxy.hostname;\n port = transport.proxy.port;\n protocol = transport.proxy.protocol || protocol;\n }\n return {\n timeout: timeout,\n protocol: protocol,\n hostname: hostname,\n path: path,\n port: port,\n method: method\n };\n}\n\nfunction appendPathToPath(base, path) {\n var baseTrailingSlash = /\\/$/.test(base);\n var pathBeginningSlash = /^\\//.test(path);\n\n if (baseTrailingSlash && pathBeginningSlash) {\n path = path.substring(1);\n } else if (!baseTrailingSlash && !pathBeginningSlash) {\n path = '/' + path;\n }\n\n return base + path;\n}\n\nmodule.exports = {\n buildPayload: buildPayload,\n getTransportFromOptions: getTransportFromOptions,\n transportOptions: transportOptions,\n appendPathToPath: appendPathToPath\n};\n","// Console-polyfill. MIT license.\n// https://github.com/paulmillr/console-polyfill\n// Make it safe to do console.log() always.\n(function(global) {\n 'use strict';\n if (!global.console) {\n global.console = {};\n }\n var con = global.console;\n var prop, method;\n var dummy = function() {};\n var properties = ['memory'];\n var methods = ('assert,clear,count,debug,dir,dirxml,error,exception,group,' +\n 'groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,' +\n 'show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn').split(',');\n while (prop = properties.pop()) if (!con[prop]) con[prop] = {};\n while (method = methods.pop()) if (!con[method]) con[method] = dummy;\n // Using `this` for web workers & supports Browserify / Webpack.\n})(typeof window === 'undefined' ? this : window);\n","'use strict';\n\n// This detection.js module is used to encapsulate any ugly browser/feature\n// detection we may need to do.\n\n// Figure out which version of IE we're using, if any.\n// This is gleaned from http://stackoverflow.com/questions/5574842/best-way-to-check-for-ie-less-than-9-in-javascript-without-library\n// Will return an integer on IE (i.e. 8)\n// Will return undefined otherwise\nfunction getIEVersion() {\n\tvar undef;\n\tif (typeof document === 'undefined') {\n\t\treturn undef;\n\t}\n\n var v = 3,\n div = document.createElement('div'),\n all = div.getElementsByTagName('i');\n\n while (\n div.innerHTML = '',\n all[0]\n );\n\n return v > 4 ? v : undef;\n}\n\nvar Detection = {\n ieVersion: getIEVersion\n};\n\nmodule.exports = Detection;\n","'use strict';\n\nfunction captureUncaughtExceptions(window, handler, shim) {\n if (!window) { return; }\n var oldOnError;\n\n if (typeof handler._rollbarOldOnError === 'function') {\n oldOnError = handler._rollbarOldOnError;\n } else if (window.onerror) {\n oldOnError = window.onerror;\n while (oldOnError._rollbarOldOnError) {\n oldOnError = oldOnError._rollbarOldOnError;\n }\n handler._rollbarOldOnError = oldOnError;\n }\n\n handler.handleAnonymousErrors();\n\n var fn = function() {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n if (shim) {\n fn._rollbarOldOnError = oldOnError;\n }\n window.onerror = fn;\n}\n\nfunction _rollbarWindowOnError(window, r, old, args) {\n if (window._rollbarWrappedError) {\n if (!args[4]) {\n args[4] = window._rollbarWrappedError;\n }\n if (!args[5]) {\n args[5] = window._rollbarWrappedError._rollbarContext;\n }\n window._rollbarWrappedError = null;\n }\n\n var ret = r.handleUncaughtException.apply(r, args);\n\n if (old) {\n old.apply(window, args);\n }\n\n // Let other chained onerror handlers above run before setting this.\n // If an error is thrown and caught within a chained onerror handler,\n // Error.prepareStackTrace() will see that one before the one we want.\n if (ret === 'anonymous') {\n r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()\n }\n}\n\nfunction captureUnhandledRejections(window, handler, shim) {\n if (!window) { return; }\n\n if (typeof window._rollbarURH === 'function' && window._rollbarURH.belongsToShim) {\n window.removeEventListener('unhandledrejection', window._rollbarURH);\n }\n\n var rejectionHandler = function (evt) {\n var reason, promise, detail;\n try {\n reason = evt.reason;\n } catch (e) {\n reason = undefined;\n }\n try {\n promise = evt.promise;\n } catch (e) {\n promise = '[unhandledrejection] error getting `promise` from event';\n }\n try {\n detail = evt.detail;\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\n }\n } catch (e) {\n // Ignore\n }\n if (!reason) {\n reason = '[unhandledrejection] error getting `reason` from event';\n }\n\n if (handler && handler.handleUnhandledRejection) {\n handler.handleUnhandledRejection(reason, promise);\n }\n };\n rejectionHandler.belongsToShim = shim;\n window._rollbarURH = rejectionHandler;\n window.addEventListener('unhandledrejection', rejectionHandler);\n}\n\n\nmodule.exports = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections\n};\n","'use strict';\n\n/*global XDomainRequest*/\n\nvar _ = require('../utility');\nvar logger = require('./logger');\n\n/*\n * accessToken may be embedded in payload but that should not\n * be assumed\n *\n * options: {\n * hostname\n * protocol\n * path\n * port\n * method\n * }\n *\n * params is an object containing key/value pairs. These\n * will be appended to the path as 'key=value&key=value'\n *\n * payload is an unserialized object\n */\nfunction Transport(truncation) {\n this.truncation = truncation;\n}\n\nTransport.prototype.get = function(accessToken, options, params, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n _.addParamsAndAccessTokenToPath(accessToken, options, params);\n\n var method = 'GET';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, null, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.post = function(accessToken, options, payload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!payload) {\n return callback(new Error('Cannot send empty request'));\n }\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n if (stringifyResult.error) {\n return callback(stringifyResult.error);\n }\n\n var writeData = stringifyResult.value;\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, writeData, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.postJsonPayload = function (accessToken, options, jsonPayload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, jsonPayload, callback, requestFactory, options.timeout);\n}\n\n\n// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope\n// so Angular change detection isn't triggered on each API call.\n// This is the equivalent of runOutsideAngular().\n//\nfunction _makeZoneRequest() {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;\n var args = Array.prototype.slice.call(arguments);\n\n if (currentZone && currentZone._name === 'angular') {\n var rootZone = currentZone._parent;\n rootZone.run(function () {\n _makeRequest.apply(undefined, args);\n });\n } else {\n _makeRequest.apply(undefined, args);\n }\n}\n\n/* global RollbarProxy */\nfunction _proxyRequest(json, callback) {\n var rollbarProxy = new RollbarProxy();\n rollbarProxy.sendJsonPayload(\n json,\n function(_msg) { /* do nothing */ }, // eslint-disable-line no-unused-vars\n function(err) {\n callback(new Error(err));\n }\n );\n}\n\nfunction _makeRequest(accessToken, url, method, data, callback, requestFactory, timeout) {\n if (typeof RollbarProxy !== 'undefined') {\n return _proxyRequest(data, callback);\n }\n\n var request;\n if (requestFactory) {\n request = requestFactory();\n } else {\n request = _createXMLHTTPObject();\n }\n if (!request) {\n // Give up, no way to send requests\n return callback(new Error('No way to send a request'));\n }\n try {\n try {\n var onreadystatechange = function() {\n try {\n if (onreadystatechange && request.readyState === 4) {\n onreadystatechange = undefined;\n\n var parseResponse = _.jsonParse(request.responseText);\n if (_isSuccess(request)) {\n callback(parseResponse.error, parseResponse.value);\n return;\n } else if (_isNormalFailure(request)) {\n if (request.status === 403) {\n // likely caused by using a server access token\n var message = parseResponse.value && parseResponse.value.message;\n logger.error(message);\n }\n // return valid http status codes\n callback(new Error(String(request.status)));\n } else {\n // IE will return a status 12000+ on some sort of connection failure,\n // so we return a blank error\n // http://msdn.microsoft.com/en-us/library/aa383770%28VS.85%29.aspx\n var msg = 'XHR response had no status code (likely connection failure)';\n callback(_newRetriableError(msg));\n }\n }\n } catch (ex) {\n //jquery source mentions firefox may error out while accessing the\n //request members if there is a network error\n //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111\n var exc;\n if (ex && ex.stack) {\n exc = ex;\n } else {\n exc = new Error(ex);\n }\n callback(exc);\n }\n };\n\n request.open(method, url, true);\n if (request.setRequestHeader) {\n request.setRequestHeader('Content-Type', 'application/json');\n request.setRequestHeader('X-Rollbar-Access-Token', accessToken);\n }\n\n if(_.isFiniteNumber(timeout)) {\n request.timeout = timeout;\n }\n\n request.onreadystatechange = onreadystatechange;\n request.send(data);\n } catch (e1) {\n // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest\n if (typeof XDomainRequest !== 'undefined') {\n\n // Assume we are in a really old browser which has a bunch of limitations:\n // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx\n\n // Extreme paranoia: if we have XDomainRequest then we have a window, but just in case\n if (!window || !window.location) {\n return callback(new Error('No window available during request, unknown environment'));\n }\n\n // If the current page is http, try and send over http\n if (window.location.href.substring(0, 5) === 'http:' && url.substring(0, 5) === 'https') {\n url = 'http' + url.substring(5);\n }\n\n var xdomainrequest = new XDomainRequest();\n xdomainrequest.onprogress = function() {};\n xdomainrequest.ontimeout = function() {\n var msg = 'Request timed out';\n var code = 'ETIMEDOUT';\n callback(_newRetriableError(msg, code));\n };\n xdomainrequest.onerror = function() {\n callback(new Error('Error during request'));\n };\n xdomainrequest.onload = function() {\n var parseResponse = _.jsonParse(xdomainrequest.responseText);\n callback(parseResponse.error, parseResponse.value);\n };\n xdomainrequest.open(method, url, true);\n xdomainrequest.send(data);\n } else {\n callback(new Error('Cannot find a method to transport a request'));\n }\n }\n } catch (e2) {\n callback(e2);\n }\n}\n\nfunction _createXMLHTTPObject() {\n /* global ActiveXObject:false */\n\n var factories = [\n function () {\n return new XMLHttpRequest();\n },\n function () {\n return new ActiveXObject('Msxml2.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Msxml3.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Microsoft.XMLHTTP');\n }\n ];\n var xmlhttp;\n var i;\n var numFactories = factories.length;\n for (i = 0; i < numFactories; i++) {\n /* eslint-disable no-empty */\n try {\n xmlhttp = factories[i]();\n break;\n } catch (e) {\n // pass\n }\n /* eslint-enable no-empty */\n }\n return xmlhttp;\n}\n\nfunction _isSuccess(r) {\n return r && r.status && r.status === 200;\n}\n\nfunction _isNormalFailure(r) {\n return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;\n}\n\nfunction _newRetriableError(message, code) {\n var err = new Error(message);\n err.code = code || 'ENOTFOUND';\n return err;\n}\n\nmodule.exports = Transport;\n","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('../errorParser');\nvar logger = require('./logger');\n\nfunction handleDomException(item, options, callback) {\n if(item.err && errorParser.Stack(item.err).name === 'DOMException') {\n var originalError = new Error();\n originalError.name = item.err.name;\n originalError.message = item.err.message;\n originalError.stack = item.err.stack;\n originalError.nested = item.err;\n item.err = originalError;\n }\n callback(null, item);\n}\n\nfunction handleItemWithError(item, options, callback) {\n item.data = item.data || {};\n if (item.err) {\n try {\n item.stackInfo = item.err._savedStackTrace || errorParser.parse(item.err, item.skipFrames);\n\n if (options.addErrorContext) {\n addErrorContext(item);\n }\n } catch (e) {\n logger.error('Error while parsing the error object.', e);\n try {\n item.message = item.err.message || item.err.description || item.message || String(item.err);\n } catch (e2) {\n item.message = String(item.err) || String(e2);\n }\n delete item.err;\n }\n }\n callback(null, item);\n}\n\nfunction addErrorContext(item) {\n var chain = [];\n var err = item.err;\n\n chain.push(err);\n\n while (err.nested) {\n err = err.nested;\n chain.push(err);\n }\n\n _.addErrorContext(item, chain);\n}\n\nfunction ensureItemHasSomethingToSay(item, options, callback) {\n if (!item.message && !item.stackInfo && !item.custom) {\n callback(new Error('No message, stack info, or custom data'), null);\n }\n callback(null, item);\n}\n\nfunction addBaseInfo(item, options, callback) {\n var environment = (options.payload && options.payload.environment) || options.environment;\n item.data = _.merge(item.data, {\n environment: environment,\n level: item.level,\n endpoint: options.endpoint,\n platform: 'browser',\n framework: 'browser-js',\n language: 'javascript',\n server: {},\n uuid: item.uuid,\n notifier: {\n name: 'rollbar-browser-js',\n version: options.version\n },\n custom: item.custom\n });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.location) {\n return callback(null, item);\n }\n var remoteString = '$remote_ip';\n if (!options.captureIp) {\n remoteString = null;\n } else if (options.captureIp !== true) {\n remoteString += '_anonymize';\n }\n _.set(item, 'data.request', {\n url: window.location.href,\n query_string: window.location.search,\n user_ip: remoteString\n });\n callback(null, item);\n };\n}\n\nfunction addClientInfo(window) {\n return function(item, options, callback) {\n if (!window) {\n return callback(null, item);\n }\n var nav = window.navigator || {};\n var scr = window.screen || {};\n _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: nav.userAgent,\n language: nav.language,\n cookie_enabled: nav.cookieEnabled,\n screen: {\n width: scr.width,\n height: scr.height\n }\n }\n });\n callback(null, item);\n };\n}\n\nfunction addPluginInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.navigator) {\n return callback(null, item);\n }\n var plugins = [];\n var navPlugins = window.navigator.plugins || [];\n var cur;\n for (var i=0, l=navPlugins.length; i < l; ++i) {\n cur = navPlugins[i];\n plugins.push({name: cur.name, description: cur.description});\n }\n _.set(item, 'data.client.javascript.plugins', plugins);\n callback(null, item);\n };\n}\n\nfunction addBody(item, options, callback) {\n if (item.stackInfo) {\n if (item.stackInfo.traceChain) {\n addBodyTraceChain(item, options, callback);\n } else {\n addBodyTrace(item, options, callback);\n }\n } else {\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction addBodyMessage(item, options, callback) {\n var message = item.message;\n var custom = item.custom;\n\n if (!message) {\n message = 'Item sent with null or missing arguments.';\n }\n var result = {\n body: message\n };\n\n if (custom) {\n result.extra = _.merge(custom);\n }\n\n _.set(item, 'data.body', {message: result});\n callback(null, item);\n}\n\nfunction stackFromItem(item) {\n // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = item.stackInfo.stack;\n if (stack && stack.length === 0 && item._unhandledStackInfo && item._unhandledStackInfo.stack) {\n stack = item._unhandledStackInfo.stack;\n }\n return stack;\n}\n\nfunction addBodyTraceChain(item, options, callback) {\n var traceChain = item.stackInfo.traceChain;\n var traces = [];\n\n var traceChainLength = traceChain.length;\n for (var i = 0; i < traceChainLength; i++) {\n var trace = buildTrace(item, traceChain[i], options);\n traces.push(trace);\n }\n\n _.set(item, 'data.body', {trace_chain: traces});\n callback(null, item);\n}\n\nfunction addBodyTrace(item, options, callback) {\n var stack = stackFromItem(item);\n\n if (stack) {\n var trace = buildTrace(item, item.stackInfo, options);\n _.set(item, 'data.body', {trace: trace});\n callback(null, item);\n } else {\n var stackInfo = item.stackInfo;\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction buildTrace(item, stackInfo, options) {\n var description = item && item.data.description;\n var custom = item && item.custom;\n var stack = stackFromItem(item);\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n var trace = {\n exception: {\n 'class': className,\n message: message\n }\n };\n\n if (description) {\n trace.exception.description = description;\n }\n\n if (stack) {\n if (stack.length === 0) {\n trace.exception.stack = stackInfo.rawStack;\n trace.exception.raw = String(stackInfo.rawException);\n }\n var stackFrame;\n var frame;\n var code;\n var pre;\n var post;\n var contextLength;\n var i, mid;\n\n trace.frames = [];\n for (i = 0; i < stack.length; ++i) {\n stackFrame = stack[i];\n frame = {\n filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',\n lineno: stackFrame.line || null,\n method: (!stackFrame.func || stackFrame.func === '?') ? '[anonymous]' : stackFrame.func,\n colno: stackFrame.column\n };\n if (options.sendFrameUrl) {\n frame.url = stackFrame.url;\n }\n if (frame.method && frame.method.endsWith && frame.method.endsWith('_rollbar_wrapped')) {\n continue;\n }\n\n code = pre = post = null;\n contextLength = stackFrame.context ? stackFrame.context.length : 0;\n if (contextLength) {\n mid = Math.floor(contextLength / 2);\n pre = stackFrame.context.slice(0, mid);\n code = stackFrame.context[mid];\n post = stackFrame.context.slice(mid);\n }\n\n if (code) {\n frame.code = code;\n }\n\n if (pre || post) {\n frame.context = {};\n if (pre && pre.length) {\n frame.context.pre = pre;\n }\n if (post && post.length) {\n frame.context.post = post;\n }\n }\n\n if (stackFrame.args) {\n frame.args = stackFrame.args;\n }\n\n trace.frames.push(frame);\n }\n\n // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last\n trace.frames.reverse();\n\n if (custom) {\n trace.extra = _.merge(custom);\n }\n }\n\n return trace;\n}\n\nfunction errorClass(stackInfo, guess, options) {\n if (stackInfo.name) {\n return stackInfo.name;\n } else if (options.guessErrorClass) {\n return guess;\n } else {\n return '(unknown)';\n }\n}\n\nfunction addScrubber(scrubFn) {\n return function (item, options, callback) {\n if (scrubFn) {\n var scrubFields = options.scrubFields || [];\n var scrubPaths = options.scrubPaths || [];\n item.data = scrubFn(item.data, scrubFields, scrubPaths);\n }\n callback(null, item);\n }\n}\n\nmodule.exports = {\n handleDomException: handleDomException,\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n addScrubber: addScrubber\n};\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('error-stack-parser', ['stackframe'], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory(require('stackframe'));\n } else {\n root.ErrorStackParser = factory(root.StackFrame);\n }\n}(this, function ErrorStackParser(StackFrame) {\n 'use strict';\n\n var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\\S+:\\d+/;\n var CHROME_IE_STACK_REGEXP = /^\\s*at .*(\\S+:\\d+|\\(native\\))/m;\n var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\\[native code])?$/;\n\n return {\n /**\n * Given an Error object, extract the most information from it.\n *\n * @param {Error} error object\n * @return {Array} of StackFrames\n */\n parse: function ErrorStackParser$$parse(error) {\n if (typeof error.stacktrace !== 'undefined' || typeof error['opera#sourceloc'] !== 'undefined') {\n return this.parseOpera(error);\n } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {\n return this.parseV8OrIE(error);\n } else if (error.stack) {\n return this.parseFFOrSafari(error);\n } else {\n throw new Error('Cannot parse given Error object');\n }\n },\n\n // Separate line and column numbers from a string of the form: (URI:Line:Column)\n extractLocation: function ErrorStackParser$$extractLocation(urlLike) {\n // Fail-fast but return locations like \"(native)\"\n if (urlLike.indexOf(':') === -1) {\n return [urlLike];\n }\n\n var regExp = /(.+?)(?::(\\d+))?(?::(\\d+))?$/;\n var parts = regExp.exec(urlLike.replace(/[()]/g, ''));\n return [parts[1], parts[2] || undefined, parts[3] || undefined];\n },\n\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(CHROME_IE_STACK_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n if (line.indexOf('(eval ') > -1) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n line = line.replace(/eval code/g, 'eval').replace(/(\\(eval at [^()]*)|(\\),.*$)/g, '');\n }\n var sanitizedLine = line.replace(/^\\s+/, '').replace(/\\(eval code/g, '(');\n\n // capture and preseve the parenthesized location \"(/foo/my bar.js:12:87)\" in\n // case it has spaces in it, as the string is split on \\s+ later on\n var location = sanitizedLine.match(/ (\\((.+):(\\d+):(\\d+)\\)$)/);\n\n // remove the parenthesized location from the line, if it was matched\n sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;\n\n var tokens = sanitizedLine.split(/\\s+/).slice(1);\n // if a location was matched, pass it to extractLocation() otherwise pop the last token\n var locationParts = this.extractLocation(location ? location[1] : tokens.pop());\n var functionName = tokens.join(' ') || undefined;\n var fileName = ['eval', ''].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];\n\n return new StackFrame({\n functionName: functionName,\n fileName: fileName,\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n },\n\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n if (line.indexOf(' > eval') > -1) {\n line = line.replace(/ line (\\d+)(?: > eval line \\d+)* > eval:\\d+:\\d+/g, ':$1');\n }\n\n if (line.indexOf('@') === -1 && line.indexOf(':') === -1) {\n // Safari eval frames only have function names and nothing else\n return new StackFrame({\n functionName: line\n });\n } else {\n var functionNameRegex = /((.*\".+\"[^@]*)?[^@]*)(?:@)/;\n var matches = line.match(functionNameRegex);\n var functionName = matches && matches[1] ? matches[1] : undefined;\n var locationParts = this.extractLocation(line.replace(functionNameRegex, ''));\n\n return new StackFrame({\n functionName: functionName,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }\n }, this);\n },\n\n parseOpera: function ErrorStackParser$$parseOpera(e) {\n if (!e.stacktrace || (e.message.indexOf('\\n') > -1 &&\n e.message.split('\\n').length > e.stacktrace.split('\\n').length)) {\n return this.parseOpera9(e);\n } else if (!e.stack) {\n return this.parseOpera10(e);\n } else {\n return this.parseOpera11(e);\n }\n },\n\n parseOpera9: function ErrorStackParser$$parseOpera9(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)/i;\n var lines = e.message.split('\\n');\n var result = [];\n\n for (var i = 2, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(new StackFrame({\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n }));\n }\n }\n\n return result;\n },\n\n parseOpera10: function ErrorStackParser$$parseOpera10(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)(?:: In function (\\S+))?$/i;\n var lines = e.stacktrace.split('\\n');\n var result = [];\n\n for (var i = 0, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(\n new StackFrame({\n functionName: match[3] || undefined,\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n })\n );\n }\n }\n\n return result;\n },\n\n // Opera 10.65+ Error.stack very similar to FF/Safari\n parseOpera11: function ErrorStackParser$$parseOpera11(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);\n }, this);\n\n return filtered.map(function(line) {\n var tokens = line.split('@');\n var locationParts = this.extractLocation(tokens.pop());\n var functionCall = (tokens.shift() || '');\n var functionName = functionCall\n .replace(//, '$2')\n .replace(/\\([^)]*\\)/g, '') || undefined;\n var argsRaw;\n if (functionCall.match(/\\(([^)]*)\\)/)) {\n argsRaw = functionCall.replace(/^[^(]+\\(([^)]*)\\)$/, '$1');\n }\n var args = (argsRaw === undefined || argsRaw === '[arguments not available]') ?\n undefined : argsRaw.split(',');\n\n return new StackFrame({\n functionName: functionName,\n args: args,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n }\n };\n}));\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('stackframe', [], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.StackFrame = factory();\n }\n}(this, function() {\n 'use strict';\n function _isNumber(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n }\n\n function _capitalize(str) {\n return str.charAt(0).toUpperCase() + str.substring(1);\n }\n\n function _getter(p) {\n return function() {\n return this[p];\n };\n }\n\n var booleanProps = ['isConstructor', 'isEval', 'isNative', 'isToplevel'];\n var numericProps = ['columnNumber', 'lineNumber'];\n var stringProps = ['fileName', 'functionName', 'source'];\n var arrayProps = ['args'];\n var objectProps = ['evalOrigin'];\n\n var props = booleanProps.concat(numericProps, stringProps, arrayProps, objectProps);\n\n function StackFrame(obj) {\n if (!obj) return;\n for (var i = 0; i < props.length; i++) {\n if (obj[props[i]] !== undefined) {\n this['set' + _capitalize(props[i])](obj[props[i]]);\n }\n }\n }\n\n StackFrame.prototype = {\n getArgs: function() {\n return this.args;\n },\n setArgs: function(v) {\n if (Object.prototype.toString.call(v) !== '[object Array]') {\n throw new TypeError('Args must be an Array');\n }\n this.args = v;\n },\n\n getEvalOrigin: function() {\n return this.evalOrigin;\n },\n setEvalOrigin: function(v) {\n if (v instanceof StackFrame) {\n this.evalOrigin = v;\n } else if (v instanceof Object) {\n this.evalOrigin = new StackFrame(v);\n } else {\n throw new TypeError('Eval Origin must be an Object or StackFrame');\n }\n },\n\n toString: function() {\n var fileName = this.getFileName() || '';\n var lineNumber = this.getLineNumber() || '';\n var columnNumber = this.getColumnNumber() || '';\n var functionName = this.getFunctionName() || '';\n if (this.getIsEval()) {\n if (fileName) {\n return '[eval] (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return '[eval]:' + lineNumber + ':' + columnNumber;\n }\n if (functionName) {\n return functionName + ' (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return fileName + ':' + lineNumber + ':' + columnNumber;\n }\n };\n\n StackFrame.fromString = function StackFrame$$fromString(str) {\n var argsStartIndex = str.indexOf('(');\n var argsEndIndex = str.lastIndexOf(')');\n\n var functionName = str.substring(0, argsStartIndex);\n var args = str.substring(argsStartIndex + 1, argsEndIndex).split(',');\n var locationString = str.substring(argsEndIndex + 1);\n\n if (locationString.indexOf('@') === 0) {\n var parts = /@(.+?)(?::(\\d+))?(?::(\\d+))?$/.exec(locationString, '');\n var fileName = parts[1];\n var lineNumber = parts[2];\n var columnNumber = parts[3];\n }\n\n return new StackFrame({\n functionName: functionName,\n args: args || undefined,\n fileName: fileName,\n lineNumber: lineNumber || undefined,\n columnNumber: columnNumber || undefined\n });\n };\n\n for (var i = 0; i < booleanProps.length; i++) {\n StackFrame.prototype['get' + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);\n StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function(p) {\n return function(v) {\n this[p] = Boolean(v);\n };\n })(booleanProps[i]);\n }\n\n for (var j = 0; j < numericProps.length; j++) {\n StackFrame.prototype['get' + _capitalize(numericProps[j])] = _getter(numericProps[j]);\n StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function(p) {\n return function(v) {\n if (!_isNumber(v)) {\n throw new TypeError(p + ' must be a Number');\n }\n this[p] = Number(v);\n };\n })(numericProps[j]);\n }\n\n for (var k = 0; k < stringProps.length; k++) {\n StackFrame.prototype['get' + _capitalize(stringProps[k])] = _getter(stringProps[k]);\n StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function(p) {\n return function(v) {\n this[p] = String(v);\n };\n })(stringProps[k]);\n }\n\n return StackFrame;\n}));\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction itemToPayload(item, options, callback) {\n var payloadOptions = options.payload || {};\n if (payloadOptions.body) {\n delete payloadOptions.body;\n }\n\n var data = _.merge(item.data, payloadOptions);\n if (item._isUncaught) {\n data._isUncaught = true;\n }\n if (item._originalArgs) {\n data._originalArgs = item._originalArgs;\n }\n callback(null, data);\n}\n\nfunction addTelemetryData(item, options, callback) {\n if (item.telemetryEvents) {\n _.set(item, 'data.body.telemetry', item.telemetryEvents);\n }\n callback(null, item);\n}\n\nfunction addMessageWithError(item, options, callback) {\n if (!item.message) {\n callback(null, item);\n return;\n }\n var tracePath = 'data.body.trace_chain.0';\n var trace = _.get(item, tracePath);\n if (!trace) {\n tracePath = 'data.body.trace';\n trace = _.get(item, tracePath);\n }\n if (trace) {\n if (!(trace.exception && trace.exception.description)) {\n _.set(item, tracePath+'.exception.description', item.message);\n callback(null, item);\n return;\n }\n var extra = _.get(item, tracePath+'.extra') || {};\n var newExtra = _.merge(extra, {message: item.message});\n _.set(item, tracePath+'.extra', newExtra);\n }\n callback(null, item);\n}\n\nfunction userTransform(logger) {\n return function(item, options, callback) {\n var newItem = _.merge(item);\n var response = null;\n try {\n if (_.isFunction(options.transform)) {\n response = options.transform(newItem.data, item);\n }\n } catch (e) {\n options.transform = null;\n logger.error('Error while calling custom transform() function. Removing custom transform().', e);\n callback(null, item);\n return;\n }\n if(_.isPromise(response)) {\n response.then(function (promisedItem) {\n if(promisedItem) {\n newItem.data = promisedItem;\n }\n callback(null, newItem);\n }, function (error) {\n callback(error, item);\n });\n } else {\n callback(null, newItem);\n }\n }\n}\n\nfunction addConfigToPayload(item, options, callback) {\n if (!options.sendConfig) {\n return callback(null, item);\n }\n var configKey = '_rollbarConfig';\n var custom = _.get(item, 'data.custom') || {};\n custom[configKey] = options;\n item.data.custom = custom;\n callback(null, item);\n}\n\nfunction addFunctionOption(options, name) {\n if(_.isFunction(options[name])) {\n options[name] = options[name].toString();\n }\n}\n\nfunction addConfiguredOptions(item, options, callback) {\n var configuredOptions = options._configuredOptions;\n\n // These must be stringified or they'll get dropped during serialization.\n addFunctionOption(configuredOptions, 'transform');\n addFunctionOption(configuredOptions, 'checkIgnore');\n addFunctionOption(configuredOptions, 'onSendCallback');\n\n delete configuredOptions.accessToken;\n item.data.notifier.configured_options = configuredOptions;\n callback(null, item);\n}\n\nfunction addDiagnosticKeys(item, options, callback) {\n var diagnostic = _.merge(item.notifier.client.notifier.diagnostic, item.diagnostic);\n\n if (_.get(item, 'err._isAnonymous')) {\n diagnostic.is_anonymous = true;\n }\n\n if (item._isUncaught) {\n diagnostic.is_uncaught = item._isUncaught;\n }\n\n if (item.err) {\n try {\n diagnostic.raw_error = {\n message: item.err.message,\n name: item.err.name,\n constructor_name: item.err.constructor && item.err.constructor.name,\n filename: item.err.fileName,\n line: item.err.lineNumber,\n column: item.err.columnNumber,\n stack: item.err.stack\n };\n } catch (e) {\n diagnostic.raw_error = { failed: String(e) };\n }\n }\n\n item.data.notifier.diagnostic = _.merge(item.data.notifier.diagnostic, diagnostic);\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError,\n userTransform: userTransform,\n addConfigToPayload: addConfigToPayload,\n addConfiguredOptions: addConfiguredOptions,\n addDiagnosticKeys: addDiagnosticKeys\n};\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction checkIgnore(item, settings) {\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore\n};\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction checkLevel(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = settings.reportLevel;\n var reportLevelVal = _.LEVELS[reportLevel] || 0;\n\n if (levelVal < reportLevelVal) {\n return false;\n }\n return true;\n}\n\nfunction userCheckIgnore(logger) {\n return function(item, settings) {\n var isUncaught = !!item._isUncaught;\n delete item._isUncaught;\n var args = item._originalArgs;\n delete item._originalArgs;\n try {\n if (_.isFunction(settings.onSendCallback)) {\n settings.onSendCallback(isUncaught, args, item);\n }\n } catch (e) {\n settings.onSendCallback = null;\n logger.error('Error while calling onSendCallback, removing', e);\n }\n try {\n if (_.isFunction(settings.checkIgnore) && settings.checkIgnore(isUncaught, args, item)) {\n return false;\n }\n } catch (e) {\n settings.checkIgnore = null;\n logger.error('Error while calling custom checkIgnore(), removing', e);\n }\n return true;\n }\n}\n\nfunction urlIsNotBlockListed(logger) {\n return function(item, settings) {\n return !urlIsOnAList(item, settings, 'blocklist', logger);\n }\n}\n\nfunction urlIsSafeListed(logger) {\n return function(item, settings) {\n return urlIsOnAList(item, settings, 'safelist', logger);\n }\n}\n\nfunction matchFrames(trace, list, block) {\n if (!trace) { return !block }\n\n var frames = trace.frames;\n\n if (!frames || frames.length === 0) { return !block; }\n\n var frame, filename, url, urlRegex;\n var listLength = list.length;\n var frameLength = frames.length;\n for (var i = 0; i < frameLength; i++) {\n frame = frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) { return !block; }\n\n for (var j = 0; j < listLength; j++) {\n url = list[j];\n urlRegex = new RegExp(url);\n\n if (urlRegex.test(filename)) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction urlIsOnAList(item, settings, safeOrBlock, logger) {\n // safelist is the default\n var block = false;\n if (safeOrBlock === 'blocklist') {\n block = true;\n }\n\n var list, traces;\n try {\n list = block ? settings.hostBlockList : settings.hostSafeList;\n traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];\n\n // These two checks are important to come first as they are defaults\n // in case the list is missing or the trace is missing or not well-formed\n if (!list || list.length === 0) {\n return !block;\n }\n if (traces.length === 0 || !traces[0]) {\n return !block;\n }\n\n var tracesLength = traces.length;\n for (var i = 0; i < tracesLength; i++) {\n if(matchFrames(traces[i], list, block)) {\n return true;\n }\n }\n } catch (e)\n /* istanbul ignore next */\n {\n if (block) {\n settings.hostBlockList = null;\n } else {\n settings.hostSafeList = null;\n }\n var listName = block ? 'hostBlockList' : 'hostSafeList';\n logger.error('Error while reading your configuration\\'s ' + listName + ' option. Removing custom ' + listName + '.', e);\n return !block;\n }\n return false;\n}\n\nfunction messageIsIgnored(logger) {\n return function(item, settings) {\n var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n messages = messagesFromItem(item);\n\n if (messages.length === 0){\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n\n for (j = 0; j < messages.length; j++) {\n messageIsIgnored = rIgnoredMessage.test(messages[j]);\n\n if (messageIsIgnored) {\n return false;\n }\n }\n }\n } catch(e)\n /* istanbul ignore next */\n {\n settings.ignoredMessages = null;\n logger.error('Error while reading your configuration\\'s ignoredMessages option. Removing custom ignoredMessages.');\n }\n\n return true;\n }\n}\n\nfunction messagesFromItem(item) {\n var body = item.body;\n var messages = [];\n\n // The payload schema only allows one of trace_chain, message, or trace.\n // However, existing test cases are based on having both trace and message present.\n // So here we preserve the ability to collect strings from any combination of these keys.\n if (body.trace_chain) {\n var traceChain = body.trace_chain;\n for (var i = 0; i < traceChain.length; i++) {\n var trace = traceChain[i];\n messages.push(_.get(trace, 'exception.message'));\n }\n }\n if (body.trace) {\n messages.push(_.get(body, 'trace.exception.message'));\n }\n if (body.message) {\n messages.push(_.get(body, 'message.body'));\n }\n return messages;\n}\n\nmodule.exports = {\n checkLevel: checkLevel,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlockListed: urlIsNotBlockListed,\n urlIsSafeListed: urlIsSafeListed,\n messageIsIgnored: messageIsIgnored\n};\n","'use strict';\n\nmodule.exports = {\n version: '2.24.0',\n endpoint: 'api.rollbar.com/api/1/item/',\n logLevel: 'debug',\n reportLevel: 'debug',\n uncaughtErrorLevel: 'error',\n maxItems: 0,\n itemsPerMin: 60\n}\n","'use strict';\n\nmodule.exports = {\n scrubFields: [\n 'pw',\n 'pass',\n 'passwd',\n 'password',\n 'secret',\n 'confirm_password',\n 'confirmPassword',\n 'password_confirmation',\n 'passwordConfirmation',\n 'access_token',\n 'accessToken',\n 'X-Rollbar-Access-Token',\n 'secret_key',\n 'secretKey',\n 'secretToken',\n 'cc-number',\n 'card number',\n 'cardnumber',\n 'cardnum',\n 'ccnum',\n 'ccnumber',\n 'cc num',\n 'creditcardnumber',\n 'credit card number',\n 'newcreditcardnumber',\n 'new credit card',\n 'creditcardno',\n 'credit card no',\n 'card#',\n 'card #',\n 'cc-csc',\n 'cvc',\n 'cvc2',\n 'cvv2',\n 'ccv2',\n 'security code',\n 'card verification',\n 'name on credit card',\n 'name on card',\n 'nameoncard',\n 'cardholder',\n 'card holder',\n 'name des karteninhabers',\n 'ccname',\n 'card type',\n 'cardtype',\n 'cc type',\n 'cctype',\n 'payment type',\n 'expiration date',\n 'expirationdate',\n 'expdate',\n 'cc-exp',\n 'ccmonth',\n 'ccyear'\n ]\n}\n","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.merge(options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n}\n\nTelemeter.prototype.configure = function(options) {\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n var deleteCount = 0;\n if (this.maxQueueSize > newMaxEvents) {\n deleteCount = this.maxQueueSize - newMaxEvents;\n }\n this.maxQueueSize = newMaxEvents;\n this.queue.splice(0, deleteCount);\n};\n\nTelemeter.prototype.copyEvents = function() {\n var events = Array.prototype.slice.call(this.queue, 0);\n if (_.isFunction(this.options.filterTelemetry)) {\n try {\n var i = events.length;\n while (i--) {\n if (this.options.filterTelemetry(events[i])) {\n events.splice(i, 1);\n }\n }\n } catch (e) {\n this.options.filterTelemetry = null;\n }\n }\n return events;\n};\n\nTelemeter.prototype.capture = function(type, metadata, level, rollbarUUID, timestamp) {\n var e = {\n level: getLevel(type, level),\n type: type,\n timestamp_ms: timestamp || _.now(),\n body: metadata,\n source: 'client'\n };\n if (rollbarUUID) {\n e.uuid = rollbarUUID;\n }\n\n try {\n if (_.isFunction(this.options.filterTelemetry) && this.options.filterTelemetry(e)) {\n return false;\n }\n } catch (exc) {\n this.options.filterTelemetry = null;\n }\n\n this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function(type, metadata, level, rollbarUUID) {\n return this.capture(type, metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.captureError = function(err, level, rollbarUUID, timestamp) {\n var metadata = {\n message: err.message || String(err)\n };\n if (err.stack) {\n metadata.stack = err.stack;\n }\n return this.capture('error', metadata, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureLog = function(message, level, rollbarUUID, timestamp) {\n return this.capture('log', {\n message: message\n }, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID, requestData) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\n if (requestData) {\n metadata.request = requestData;\n }\n var level = this.levelFromStatus(metadata.status_code);\n return this.capture('network', metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.levelFromStatus = function(statusCode) {\n if (statusCode >= 200 && statusCode < 400) {\n return 'info';\n }\n if (statusCode === 0 || statusCode >= 400) {\n return 'error';\n }\n return 'info';\n};\n\nTelemeter.prototype.captureDom = function(subtype, element, value, checked, rollbarUUID) {\n var metadata = {\n subtype: subtype,\n element: element\n };\n if (value !== undefined) {\n metadata.value = value;\n }\n if (checked !== undefined) {\n metadata.checked = checked;\n }\n return this.capture('dom', metadata, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureNavigation = function(from, to, rollbarUUID) {\n return this.capture('navigation', {from: from, to: to}, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureDomContentLoaded = function(ts) {\n return this.capture('navigation', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n */\n};\nTelemeter.prototype.captureLoad = function(ts) {\n return this.capture('navigation', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n */\n};\n\nTelemeter.prototype.captureConnectivityChange = function(type, rollbarUUID) {\n return this.captureNetwork({change: type}, 'connectivity', rollbarUUID);\n};\n\n// Only intended to be used internally by the notifier\nTelemeter.prototype._captureRollbarItem = function(item) {\n if (!this.options.includeItemsInTelemetry) {\n return;\n }\n if (item.err) {\n return this.captureError(item.err, item.level, item.uuid, item.timestamp);\n }\n if (item.message) {\n return this.captureLog(item.message, item.level, item.uuid, item.timestamp);\n }\n if (item.custom) {\n return this.capture('log', item.custom, item.level, item.uuid, item.timestamp);\n }\n};\n\nTelemeter.prototype.push = function(e) {\n this.queue.push(e);\n if (this.queue.length > this.maxQueueSize) {\n this.queue.shift();\n }\n};\n\nfunction getLevel(type, level) {\n if (level) {\n return level;\n }\n var defaultLevel = {\n error: 'error',\n manual: 'info'\n };\n return defaultLevel[type] || 'info';\n}\n\nmodule.exports = Telemeter;\n","'use strict';\n\nvar _ = require('../utility');\nvar scrub = require('../scrub');\nvar urlparser = require('./url');\nvar domUtil = require('./domUtility');\n\nvar defaults = {\n network: true,\n networkResponseHeaders: false,\n networkResponseBody: false,\n networkRequestHeaders: false,\n networkRequestBody: false,\n networkErrorOnHttp5xx: false,\n networkErrorOnHttp4xx: false,\n networkErrorOnHttp0: false,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true,\n contentSecurityPolicy: true,\n errorOnContentSecurityPolicy: false\n};\n\nfunction replace(obj, name, replacement, replacements, type) {\n var orig = obj[name];\n obj[name] = replacement(orig);\n if (replacements) {\n replacements[type].push([obj, name, orig]);\n }\n}\n\nfunction restore(replacements, type) {\n var b;\n while (replacements[type].length) {\n b = replacements[type].shift();\n b[0][b[1]] = b[2];\n }\n}\n\nfunction nameFromDescription(description) {\n if (!description || !description.attributes) { return null; }\n var attrs = description.attributes;\n for (var a = 0; a < attrs.length; ++a) {\n if (attrs[a].key === 'name') {\n return attrs[a].value;\n }\n }\n return null;\n}\n\nfunction defaultValueScrubber(scrubFields) {\n var patterns = [];\n for (var i = 0; i < scrubFields.length; ++i) {\n patterns.push(new RegExp(scrubFields[i], 'i'));\n }\n return function(description) {\n var name = nameFromDescription(description);\n if (!name) { return false; }\n for (var i = 0; i < patterns.length; ++i) {\n if (patterns[i].test(name)) {\n return true;\n }\n }\n return false;\n };\n}\n\nfunction Instrumenter(options, telemeter, rollbar, _window, _document) {\n this.options = options;\n var autoInstrument = options.autoInstrument;\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);\n this.telemeter = telemeter;\n this.rollbar = rollbar;\n this.diagnostic = rollbar.client.notifier.diagnostic;\n this._window = _window || {};\n this._document = _document || {};\n this.replacements = {\n network: [],\n log: [],\n navigation: [],\n connectivity: []\n };\n this.eventRemovers = {\n dom: [],\n connectivity: [],\n contentsecuritypolicy: []\n };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function(options) {\n this.options = _.merge(this.options, options);\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.merge(this.autoInstrument);\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n if (options.scrubTelemetryInputs !== undefined) {\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n }\n if (options.telemetryScrubber !== undefined) {\n this.telemetryScrubber = options.telemetryScrubber;\n }\n};\n\n// eslint-disable-next-line complexity\nInstrumenter.prototype.instrument = function(oldSettings) {\n if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {\n this.instrumentNetwork();\n } else if (!this.autoInstrument.network && oldSettings && oldSettings.network) {\n this.deinstrumentNetwork();\n }\n\n if (this.autoInstrument.log && !(oldSettings && oldSettings.log)) {\n this.instrumentConsole();\n } else if (!this.autoInstrument.log && oldSettings && oldSettings.log) {\n this.deinstrumentConsole();\n }\n\n if (this.autoInstrument.dom && !(oldSettings && oldSettings.dom)) {\n this.instrumentDom();\n } else if (!this.autoInstrument.dom && oldSettings && oldSettings.dom) {\n this.deinstrumentDom();\n }\n\n if (this.autoInstrument.navigation && !(oldSettings && oldSettings.navigation)) {\n this.instrumentNavigation();\n } else if (!this.autoInstrument.navigation && oldSettings && oldSettings.navigation) {\n this.deinstrumentNavigation();\n }\n\n if (this.autoInstrument.connectivity && !(oldSettings && oldSettings.connectivity)) {\n this.instrumentConnectivity();\n } else if (!this.autoInstrument.connectivity && oldSettings && oldSettings.connectivity) {\n this.deinstrumentConnectivity();\n }\n\n if (this.autoInstrument.contentSecurityPolicy && !(oldSettings && oldSettings.contentSecurityPolicy)) {\n this.instrumentContentSecurityPolicy();\n } else if (!this.autoInstrument.contentSecurityPolicy && oldSettings && oldSettings.contentSecurityPolicy) {\n this.deinstrumentContentSecurityPolicy();\n }\n};\n\nInstrumenter.prototype.deinstrumentNetwork = function() {\n restore(this.replacements, 'network');\n};\n\nInstrumenter.prototype.instrumentNetwork = function() {\n var self = this;\n\n function wrapProp(prop, xhr) {\n if (prop in xhr && _.isFunction(xhr[prop])) {\n replace(xhr, prop, function(orig) {\n return self.rollbar.wrap(orig);\n });\n }\n }\n\n if ('XMLHttpRequest' in this._window) {\n var xhrp = this._window.XMLHttpRequest.prototype;\n replace(xhrp, 'open', function(orig) {\n return function(method, url) {\n if (_.isType(url, 'string')) {\n if (this.__rollbar_xhr) {\n this.__rollbar_xhr.method = method;\n this.__rollbar_xhr.url = url;\n this.__rollbar_xhr.status_code = null;\n this.__rollbar_xhr.start_time_ms = _.now();\n this.__rollbar_xhr.end_time_ms = null;\n } else {\n this.__rollbar_xhr = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'setRequestHeader', function(orig) {\n return function(header, value) {\n // If xhr.open is async, __rollbar_xhr may not be initialized yet.\n if (!this.__rollbar_xhr) {\n this.__rollbar_xhr = {};\n }\n if (_.isType(header, 'string') && _.isType(value, 'string')) {\n if (self.autoInstrument.networkRequestHeaders) {\n if (!this.__rollbar_xhr.request_headers) {\n this.__rollbar_xhr.request_headers = {};\n }\n this.__rollbar_xhr.request_headers[header] = value;\n }\n // We want the content type even if request header telemetry is off.\n if (header.toLowerCase() === 'content-type') {\n this.__rollbar_xhr.request_content_type = value;\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'send', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(data) {\n /* eslint-enable no-unused-vars */\n var xhr = this;\n\n function onreadystatechangeHandler() {\n if (xhr.__rollbar_xhr) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n if (self.autoInstrument.networkRequestBody) {\n xhr.__rollbar_xhr.request = data;\n }\n xhr.__rollbar_event = self.captureNetwork(xhr.__rollbar_xhr, 'xhr', undefined);\n }\n if (xhr.readyState < 2) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n }\n if (xhr.readyState > 3) {\n xhr.__rollbar_xhr.end_time_ms = _.now();\n\n var headers = null;\n xhr.__rollbar_xhr.response_content_type = xhr.getResponseHeader('Content-Type');\n if (self.autoInstrument.networkResponseHeaders) {\n var headersConfig = self.autoInstrument.networkResponseHeaders;\n headers = {};\n try {\n var header, i;\n if (headersConfig === true) {\n var allHeaders = xhr.getAllResponseHeaders();\n if (allHeaders) {\n var arr = allHeaders.trim().split(/[\\r\\n]+/);\n var parts, value;\n for (i=0; i < arr.length; i++) {\n parts = arr[i].split(': ');\n header = parts.shift();\n value = parts.join(': ');\n headers[header] = value;\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n header = headersConfig[i];\n headers[header] = xhr.getResponseHeader(header);\n }\n }\n } catch (e) {\n /* we ignore the errors here that could come from different\n * browser issues with the xhr methods */\n }\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n try {\n body = xhr.responseText;\n } catch (e) {\n /* ignore errors from reading responseText */\n }\n }\n var response = null;\n if (body || headers) {\n response = {};\n if (body) {\n if (self.isJsonContentType(xhr.__rollbar_xhr.response_content_type)) {\n response.body = self.scrubJson(body);\n } else {\n response.body = body;\n }\n }\n if (headers) {\n response.headers = headers;\n }\n }\n if (response) {\n xhr.__rollbar_xhr.response = response;\n }\n try {\n var code = xhr.status;\n code = code === 1223 ? 204 : code;\n xhr.__rollbar_xhr.status_code = code;\n xhr.__rollbar_event.level = self.telemeter.levelFromStatus(code);\n self.errorOnHttpStatus(xhr.__rollbar_xhr);\n } catch (e) {\n /* ignore possible exception from xhr.status */\n }\n }\n }\n }\n\n wrapProp('onload', xhr);\n wrapProp('onerror', xhr);\n wrapProp('onprogress', xhr);\n\n if ('onreadystatechange' in xhr && _.isFunction(xhr.onreadystatechange)) {\n replace(xhr, 'onreadystatechange', function(orig) {\n return self.rollbar.wrap(orig, undefined, onreadystatechangeHandler);\n });\n } else {\n xhr.onreadystatechange = onreadystatechangeHandler;\n }\n if (xhr.__rollbar_xhr && self.trackHttpErrors()) {\n xhr.__rollbar_xhr.stack = (new Error()).stack;\n }\n return orig.apply(this, arguments);\n }\n }, this.replacements, 'network');\n }\n\n if ('fetch' in this._window) {\n replace(this._window, 'fetch', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(fn, t) {\n /* eslint-enable no-unused-vars */\n var args = new Array(arguments.length);\n for (var i=0, len=args.length; i < len; i++) {\n args[i] = arguments[i];\n }\n var input = args[0];\n var method = 'GET';\n var url;\n if (_.isType(input, 'string')) {\n url = input;\n } else if (input) {\n url = input.url;\n if (input.method) {\n method = input.method;\n }\n }\n if (args[1] && args[1].method) {\n method = args[1].method;\n }\n var metadata = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n if (args[1] && args[1].headers) {\n // Argument may be a Headers object, or plain object. Ensure here that\n // we are working with a Headers object with case-insensitive keys.\n var reqHeaders = new Headers(args[1].headers);\n\n metadata.request_content_type = reqHeaders.get('Content-Type');\n\n if (self.autoInstrument.networkRequestHeaders) {\n metadata.request_headers = self.fetchHeaders(reqHeaders, self.autoInstrument.networkRequestHeaders)\n }\n }\n\n if (self.autoInstrument.networkRequestBody) {\n if (args[1] && args[1].body) {\n metadata.request = args[1].body;\n } else if (args[0] && !_.isType(args[0], 'string') && args[0].body) {\n metadata.request = args[0].body;\n }\n }\n self.captureNetwork(metadata, 'fetch', undefined);\n if (self.trackHttpErrors()) {\n metadata.stack = (new Error()).stack;\n }\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n metadata.response_content_type = resp.headers.get('Content-Type');\n var headers = null;\n if (self.autoInstrument.networkResponseHeaders) {\n headers = self.fetchHeaders(resp.headers, self.autoInstrument.networkResponseHeaders);\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n if (typeof resp.text === 'function') { // Response.text() is not implemented on some platforms\n // The response must be cloned to prevent reading (and locking) the original stream.\n body = resp.clone().text(); //returns a Promise\n }\n }\n if (headers || body) {\n metadata.response = {};\n if (body) {\n // Test to ensure body is a Promise, which it should always be.\n if (typeof body.then === 'function') {\n body.then(function (text) {\n if (self.isJsonContentType(metadata.response_content_type)) {\n metadata.response.body = self.scrubJson(text);\n }\n });\n } else {\n metadata.response.body = body;\n }\n }\n if (headers) {\n metadata.response.headers = headers;\n }\n }\n self.errorOnHttpStatus(metadata);\n return resp;\n });\n };\n }, this.replacements, 'network');\n }\n};\n\nInstrumenter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID) {\n if (metadata.request && this.isJsonContentType(metadata.request_content_type)) {\n metadata.request = this.scrubJson(metadata.request);\n }\n return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);\n};\n\nInstrumenter.prototype.isJsonContentType = function(contentType) {\n return (contentType && _.isType(contentType, 'string') && contentType.toLowerCase().includes('json')) ? true : false;\n}\n\nInstrumenter.prototype.scrubJson = function(json) {\n return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));\n}\n\nInstrumenter.prototype.fetchHeaders = function(inHeaders, headersConfig) {\n var outHeaders = {};\n try {\n var i;\n if (headersConfig === true) {\n if (typeof inHeaders.entries === 'function') { // Headers.entries() is not implemented in IE\n var allHeaders = inHeaders.entries();\n var currentHeader = allHeaders.next();\n while (!currentHeader.done) {\n outHeaders[currentHeader.value[0]] = currentHeader.value[1];\n currentHeader = allHeaders.next();\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n var header = headersConfig[i];\n outHeaders[header] = inHeaders.get(header);\n }\n }\n } catch (e) {\n /* ignore probable IE errors */\n }\n return outHeaders;\n}\n\nInstrumenter.prototype.trackHttpErrors = function() {\n return this.autoInstrument.networkErrorOnHttp5xx ||\n this.autoInstrument.networkErrorOnHttp4xx ||\n this.autoInstrument.networkErrorOnHttp0;\n}\n\nInstrumenter.prototype.errorOnHttpStatus = function(metadata) {\n var status = metadata.status_code;\n\n if ((status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||\n (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||\n (status === 0 && this.autoInstrument.networkErrorOnHttp0)) {\n var error = new Error('HTTP request failed with Status ' + status);\n error.stack = metadata.stack;\n this.rollbar.error(error, { skipFrames: 1 });\n }\n}\n\nInstrumenter.prototype.deinstrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n var b;\n while (this.replacements['log'].length) {\n b = this.replacements['log'].shift();\n this._window.console[b[0]] = b[1];\n }\n};\n\nInstrumenter.prototype.instrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n\n var self = this;\n var c = this._window.console;\n\n function wrapConsole(method) {\n 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778\n\n var orig = c[method];\n var origConsole = c;\n var level = method === 'warn' ? 'warning' : method;\n c[method] = function() {\n var args = Array.prototype.slice.call(arguments);\n var message = _.formatArgsAsString(args);\n self.telemeter.captureLog(message, level);\n if (orig) {\n Function.prototype.apply.call(orig, origConsole, args);\n }\n };\n self.replacements['log'].push([method, orig]);\n }\n var methods = ['debug','info','warn','error','log'];\n try {\n for (var i=0, len=methods.length; i < len; i++) {\n wrapConsole(methods[i]);\n }\n } catch (e) {\n this.diagnostic.instrumentConsole = { error: e.message };\n }\n};\n\nInstrumenter.prototype.deinstrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n this.removeListeners('dom');\n};\n\nInstrumenter.prototype.instrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n var clickHandler = this.handleClick.bind(this);\n var blurHandler = this.handleBlur.bind(this);\n this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);\n this.addListener('dom', this._window, 'blur', 'onfocusout', blurHandler, true);\n};\n\nInstrumenter.prototype.handleClick = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n var hasTag = e && e.tagName;\n var anchorOrButton = domUtil.isDescribedElement(e, 'a') || domUtil.isDescribedElement(e, 'button');\n if (hasTag && (anchorOrButton || domUtil.isDescribedElement(e, 'input', ['button', 'submit']))) {\n this.captureDomEvent('click', e);\n } else if (domUtil.isDescribedElement(e, 'input', ['checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value, e.checked);\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleBlur = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n if (e && e.tagName) {\n if (domUtil.isDescribedElement(e, 'textarea')) {\n this.captureDomEvent('input', e, e.value);\n } else if (domUtil.isDescribedElement(e, 'select') && e.options && e.options.length) {\n this.handleSelectInputChanged(e);\n } else if (domUtil.isDescribedElement(e, 'input') && !domUtil.isDescribedElement(e, 'input', ['button', 'submit', 'hidden', 'checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value);\n }\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleSelectInputChanged = function(elem) {\n if (elem.multiple) {\n for (var i = 0; i < elem.options.length; i++) {\n if (elem.options[i].selected) {\n this.captureDomEvent('input', elem, elem.options[i].value);\n }\n }\n } else if (elem.selectedIndex >= 0 && elem.options[elem.selectedIndex]) {\n this.captureDomEvent('input', elem, elem.options[elem.selectedIndex].value);\n }\n};\n\nInstrumenter.prototype.captureDomEvent = function(subtype, element, value, isChecked) {\n if (value !== undefined) {\n if (this.scrubTelemetryInputs || (domUtil.getElementType(element) === 'password')) {\n value = '[scrubbed]';\n } else {\n var description = domUtil.describeElement(element);\n if (this.telemetryScrubber) {\n if (this.telemetryScrubber(description)) {\n value = '[scrubbed]';\n }\n } else if (this.defaultValueScrubber(description)) {\n value = '[scrubbed]';\n }\n }\n }\n var elementString = domUtil.elementArrayToString(domUtil.treeToArray(element));\n this.telemeter.captureDom(subtype, elementString, value, isChecked);\n};\n\nInstrumenter.prototype.deinstrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n restore(this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.instrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n var self = this;\n replace(this._window, 'onpopstate', function(orig) {\n return function() {\n var current = self._location.href;\n self.handleUrlChange(self._lastHref, current);\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n }, this.replacements, 'navigation');\n\n replace(this._window.history, 'pushState', function(orig) {\n return function() {\n var url = arguments.length > 2 ? arguments[2] : undefined;\n if (url) {\n self.handleUrlChange(self._lastHref, url + '');\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.handleUrlChange = function(from, to) {\n var parsedHref = urlparser.parse(this._location.href);\n var parsedTo = urlparser.parse(to);\n var parsedFrom = urlparser.parse(from);\n this._lastHref = to;\n if (parsedHref.protocol === parsedTo.protocol && parsedHref.host === parsedTo.host) {\n to = parsedTo.path + (parsedTo.hash || '');\n }\n if (parsedHref.protocol === parsedFrom.protocol && parsedHref.host === parsedFrom.host) {\n from = parsedFrom.path + (parsedFrom.hash || '');\n }\n this.telemeter.captureNavigation(from, to);\n};\n\nInstrumenter.prototype.deinstrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.removeListeners('connectivity');\n } else {\n restore(this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.instrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.addListener('connectivity', this._window, 'online', undefined, function() {\n this.telemeter.captureConnectivityChange('online');\n }.bind(this), true);\n this.addListener('connectivity', this._window, 'offline', undefined, function() {\n this.telemeter.captureConnectivityChange('offline');\n }.bind(this), true);\n } else {\n var self = this;\n replace(this._document.body, 'ononline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('online');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n replace(this._document.body, 'onoffline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('offline');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.handleCspEvent = function(cspEvent) {\n var message = 'Security Policy Violation: ' +\n 'blockedURI: ' + cspEvent.blockedURI + ', ' +\n 'violatedDirective: ' + cspEvent.violatedDirective + ', ' +\n 'effectiveDirective: ' + cspEvent.effectiveDirective + ', ';\n\n if (cspEvent.sourceFile) {\n message += 'location: ' + cspEvent.sourceFile + ', ' +\n 'line: ' + cspEvent.lineNumber + ', ' +\n 'col: ' + cspEvent.columnNumber + ', ';\n }\n\n message += 'originalPolicy: ' + cspEvent.originalPolicy;\n\n this.telemeter.captureLog(message, 'error');\n this.handleCspError(message);\n}\n\nInstrumenter.prototype.handleCspError = function(message) {\n if (this.autoInstrument.errorOnContentSecurityPolicy) {\n this.rollbar.error(message);\n }\n}\n\nInstrumenter.prototype.deinstrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._window)) { return; }\n\n this.removeListeners('contentsecuritypolicy');\n};\n\nInstrumenter.prototype.instrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._window)) { return; }\n\n var cspHandler = this.handleCspEvent.bind(this);\n this.addListener('contentsecuritypolicy', this._window, 'securitypolicyviolation', null, cspHandler, false);\n};\n\nInstrumenter.prototype.addListener = function(section, obj, type, altType, handler, capture) {\n if (obj.addEventListener) {\n obj.addEventListener(type, handler, capture);\n this.eventRemovers[section].push(function() {\n obj.removeEventListener(type, handler, capture);\n });\n } else if (altType) {\n obj.attachEvent(altType, handler);\n this.eventRemovers[section].push(function() {\n obj.detachEvent(altType, handler);\n });\n }\n};\n\nInstrumenter.prototype.removeListeners = function(section) {\n var r;\n while (this.eventRemovers[section].length) {\n r = this.eventRemovers[section].shift();\n r();\n }\n};\n\nmodule.exports = Instrumenter;\n","'use strict';\n\nfunction getElementType(e) {\n return (e.getAttribute('type') || '').toLowerCase();\n}\n\nfunction isDescribedElement(element, type, subtypes) {\n if (element.tagName.toLowerCase() !== type.toLowerCase()) {\n return false;\n }\n if (!subtypes) {\n return true;\n }\n element = getElementType(element);\n for (var i = 0; i < subtypes.length; i++) {\n if (subtypes[i] === element) {\n return true;\n }\n }\n return false;\n}\n\nfunction getElementFromEvent(evt, doc) {\n if (evt.target) {\n return evt.target;\n }\n if (doc && doc.elementFromPoint) {\n return doc.elementFromPoint(evt.clientX, evt.clientY);\n }\n return undefined;\n}\n\nfunction treeToArray(elem) {\n var MAX_HEIGHT = 5;\n var out = [];\n var nextDescription;\n for (var height = 0; elem && height < MAX_HEIGHT; height++) {\n nextDescription = describeElement(elem);\n if (nextDescription.tagName === 'html') {\n break;\n }\n out.unshift(nextDescription);\n elem = elem.parentNode;\n }\n return out;\n}\n\nfunction elementArrayToString(a) {\n var MAX_LENGTH = 80;\n var separator = ' > ', separatorLength = separator.length;\n var out = [], len = 0, nextStr, totalLength;\n\n for (var i = a.length - 1; i >= 0; i--) {\n nextStr = descriptionToString(a[i]);\n totalLength = len + (out.length * separatorLength) + nextStr.length;\n if (i < a.length - 1 && totalLength >= MAX_LENGTH + 3) {\n out.unshift('...');\n break;\n }\n out.unshift(nextStr);\n len += nextStr.length;\n }\n return out.join(separator);\n}\n\nfunction descriptionToString(desc) {\n if (!desc || !desc.tagName) {\n return '';\n }\n var out = [desc.tagName];\n if (desc.id) {\n out.push('#' + desc.id);\n }\n if (desc.classes) {\n out.push('.' + desc.classes.join('.'));\n }\n for (var i = 0; i < desc.attributes.length; i++) {\n out.push('[' + desc.attributes[i].key + '=\"' + desc.attributes[i].value + '\"]');\n }\n\n return out.join('');\n}\n\n/**\n * Input: a dom element\n * Output: null if tagName is falsey or input is falsey, else\n * {\n * tagName: String,\n * id: String | undefined,\n * classes: [String] | undefined,\n * attributes: [\n * {\n * key: OneOf(type, name, title, alt),\n * value: String\n * }\n * ]\n * }\n */\nfunction describeElement(elem) {\n if (!elem || !elem.tagName) {\n return null;\n }\n var out = {}, className, key, attr, i;\n out.tagName = elem.tagName.toLowerCase();\n if (elem.id) {\n out.id = elem.id;\n }\n className = elem.className;\n if (className && (typeof className === 'string')) {\n out.classes = className.split(/\\s+/);\n }\n var attributes = ['type', 'name', 'title', 'alt'];\n out.attributes = [];\n for (i = 0; i < attributes.length; i++) {\n key = attributes[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.attributes.push({key: key, value: attr});\n }\n }\n return out;\n}\n\nmodule.exports = {\n describeElement: describeElement,\n descriptionToString: descriptionToString,\n elementArrayToString: elementArrayToString,\n treeToArray: treeToArray,\n getElementFromEvent: getElementFromEvent,\n isDescribedElement: isDescribedElement,\n getElementType: getElementType\n};\n","'use strict';\n\nvar polyfillJSON = require('../../vendor/JSON-js/json3');\n\nmodule.exports = polyfillJSON;\n","// json3.js\n// 2017-02-21\n// Public Domain.\n// NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.\n// See http://www.JSON.org/js.html\n// This code should be minified before deployment.\n// See http://javascript.crockford.com/jsmin.html\n\n// USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO\n// NOT CONTROL.\n\n// This file creates a global JSON object containing two methods: stringify\n// and parse. This file provides the ES5 JSON capability to ES3 systems.\n// If a project might run on IE8 or earlier, then this file should be included.\n// This file does nothing on ES5 systems.\n\n// JSON.stringify(value, replacer, space)\n// value any JavaScript value, usually an object or array.\n// replacer an optional parameter that determines how object\n// values are stringified for objects. It can be a\n// function or an array of strings.\n// space an optional parameter that specifies the indentation\n// of nested structures. If it is omitted, the text will\n// be packed without extra whitespace. If it is a number,\n// it will specify the number of spaces to indent at each\n// level. If it is a string (such as \"\\t\" or \" \"),\n// it contains the characters used to indent at each level.\n// This method produces a JSON text from a JavaScript value.\n// When an object value is found, if the object contains a toJSON\n// method, its toJSON method will be called and the result will be\n// stringified. A toJSON method does not serialize: it returns the\n// value represented by the name/value pair that should be serialized,\n// or undefined if nothing should be serialized. The toJSON method\n// will be passed the key associated with the value, and this will be\n// bound to the value.\n\n// For example, this would serialize Dates as ISO strings.\n\n// Date.prototype.toJSON = function (key) {\n// function f(n) {\n// // Format integers to have at least two digits.\n// return (n < 10)\n// ? \"0\" + n\n// : n;\n// }\n// return this.getUTCFullYear() + \"-\" +\n// f(this.getUTCMonth() + 1) + \"-\" +\n// f(this.getUTCDate()) + \"T\" +\n// f(this.getUTCHours()) + \":\" +\n// f(this.getUTCMinutes()) + \":\" +\n// f(this.getUTCSeconds()) + \"Z\";\n// };\n\n// You can provide an optional replacer method. It will be passed the\n// key and value of each member, with this bound to the containing\n// object. The value that is returned from your method will be\n// serialized. If your method returns undefined, then the member will\n// be excluded from the serialization.\n\n// If the replacer parameter is an array of strings, then it will be\n// used to select the members to be serialized. It filters the results\n// such that only members with keys listed in the replacer array are\n// stringified.\n\n// Values that do not have JSON representations, such as undefined or\n// functions, will not be serialized. Such values in objects will be\n// dropped; in arrays they will be replaced with null. You can use\n// a replacer function to replace those with JSON values.\n\n// JSON.stringify(undefined) returns undefined.\n\n// The optional space parameter produces a stringification of the\n// value that is filled with line breaks and indentation to make it\n// easier to read.\n\n// If the space parameter is a non-empty string, then that string will\n// be used for indentation. If the space parameter is a number, then\n// the indentation will be that many spaces.\n\n// Example:\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}]);\n// // text is '[\"e\",{\"pluribus\":\"unum\"}]'\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}], null, \"\\t\");\n// // text is '[\\n\\t\"e\",\\n\\t{\\n\\t\\t\"pluribus\": \"unum\"\\n\\t}\\n]'\n\n// text = JSON.stringify([new Date()], function (key, value) {\n// return this[key] instanceof Date\n// ? \"Date(\" + this[key] + \")\"\n// : value;\n// });\n// // text is '[\"Date(---current time---)\"]'\n\n// JSON.parse(text, reviver)\n// This method parses a JSON text to produce an object or array.\n// It can throw a SyntaxError exception.\n// This has been modified to use JSON-js/json_parse_state.js as the\n// parser instead of the one built around eval found in JSON-js/json2.js\n\n// The optional reviver parameter is a function that can filter and\n// transform the results. It receives each of the keys and values,\n// and its return value is used instead of the original value.\n// If it returns what it received, then the structure is not modified.\n// If it returns undefined then the member is deleted.\n\n// Example:\n\n// // Parse the text. Values that look like ISO date strings will\n// // be converted to Date objects.\n\n// myData = JSON.parse(text, function (key, value) {\n// var a;\n// if (typeof value === \"string\") {\n// a =\n// /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2}(?:\\.\\d*)?)Z$/.exec(value);\n// if (a) {\n// return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],\n// +a[5], +a[6]));\n// }\n// }\n// return value;\n// });\n\n// myData = JSON.parse('[\"Date(09/09/2001)\"]', function (key, value) {\n// var d;\n// if (typeof value === \"string\" &&\n// value.slice(0, 5) === \"Date(\" &&\n// value.slice(-1) === \")\") {\n// d = new Date(value.slice(5, -1));\n// if (d) {\n// return d;\n// }\n// }\n// return value;\n// });\n\n// This is a reference implementation. You are free to copy, modify, or\n// redistribute.\n\n/*jslint\n for, this\n */\n\n/*property\n JSON, apply, call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,\n getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,\n lastIndex, length, parse, prototype, push, replace, slice, stringify,\n test, toJSON, toString, valueOf\n */\n\nvar setupCustomJSON = function(JSON) {\n\n var rx_one = /^[\\],:{}\\s]*$/;\n var rx_two = /\\\\(?:[\"\\\\\\/bfnrt]|u[0-9a-fA-F]{4})/g;\n var rx_three = /\"[^\"\\\\\\n\\r]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g;\n var rx_four = /(?:^|:|,)(?:\\s*\\[)+/g;\n var rx_escapable = /[\\\\\"\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n var rx_dangerous = /[\\u0000\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n\n function f(n) {\n // Format integers to have at least two digits.\n return n < 10\n ? \"0\" + n\n : n;\n }\n\n function this_value() {\n return this.valueOf();\n }\n\n if (typeof Date.prototype.toJSON !== \"function\") {\n\n Date.prototype.toJSON = function () {\n\n return isFinite(this.valueOf())\n ? this.getUTCFullYear() + \"-\" +\n f(this.getUTCMonth() + 1) + \"-\" +\n f(this.getUTCDate()) + \"T\" +\n f(this.getUTCHours()) + \":\" +\n f(this.getUTCMinutes()) + \":\" +\n f(this.getUTCSeconds()) + \"Z\"\n : null;\n };\n\n Boolean.prototype.toJSON = this_value;\n Number.prototype.toJSON = this_value;\n String.prototype.toJSON = this_value;\n }\n\n var gap;\n var indent;\n var meta;\n var rep;\n\n\n function quote(string) {\n\n // If the string contains no control characters, no quote characters, and no\n // backslash characters, then we can safely slap some quotes around it.\n // Otherwise we must also replace the offending characters with safe escape\n // sequences.\n\n rx_escapable.lastIndex = 0;\n return rx_escapable.test(string)\n ? \"\\\"\" + string.replace(rx_escapable, function (a) {\n var c = meta[a];\n return typeof c === \"string\"\n ? c\n : \"\\\\u\" + (\"0000\" + a.charCodeAt(0).toString(16)).slice(-4);\n }) + \"\\\"\"\n : \"\\\"\" + string + \"\\\"\";\n }\n\n\n function str(key, holder) {\n\n // Produce a string from holder[key].\n\n var i; // The loop counter.\n var k; // The member key.\n var v; // The member value.\n var length;\n var mind = gap;\n var partial;\n var value = holder[key];\n\n // If the value has a toJSON method, call it to obtain a replacement value.\n\n if (value && typeof value === \"object\" &&\n typeof value.toJSON === \"function\") {\n value = value.toJSON(key);\n }\n\n // If we were called with a replacer function, then call the replacer to\n // obtain a replacement value.\n\n if (typeof rep === \"function\") {\n value = rep.call(holder, key, value);\n }\n\n // What happens next depends on the value's type.\n\n switch (typeof value) {\n case \"string\":\n return quote(value);\n\n case \"number\":\n\n // JSON numbers must be finite. Encode non-finite numbers as null.\n\n return isFinite(value)\n ? String(value)\n : \"null\";\n\n case \"boolean\":\n case \"null\":\n\n // If the value is a boolean or null, convert it to a string. Note:\n // typeof null does not produce \"null\". The case is included here in\n // the remote chance that this gets fixed someday.\n\n return String(value);\n\n // If the type is \"object\", we might be dealing with an object or an array or\n // null.\n\n case \"object\":\n\n // Due to a specification blunder in ECMAScript, typeof null is \"object\",\n // so watch out for that case.\n\n if (!value) {\n return \"null\";\n }\n\n // Make an array to hold the partial results of stringifying this object value.\n\n gap += indent;\n partial = [];\n\n // Is the value an array?\n\n if (Object.prototype.toString.apply(value) === \"[object Array]\") {\n\n // The value is an array. Stringify every element. Use null as a placeholder\n // for non-JSON values.\n\n length = value.length;\n for (i = 0; i < length; i += 1) {\n partial[i] = str(i, value) || \"null\";\n }\n\n // Join all of the elements together, separated with commas, and wrap them in\n // brackets.\n\n v = partial.length === 0\n ? \"[]\"\n : gap\n ? \"[\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"]\"\n : \"[\" + partial.join(\",\") + \"]\";\n gap = mind;\n return v;\n }\n\n // If the replacer is an array, use it to select the members to be stringified.\n\n if (rep && typeof rep === \"object\") {\n length = rep.length;\n for (i = 0; i < length; i += 1) {\n if (typeof rep[i] === \"string\") {\n k = rep[i];\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n } else {\n\n // Otherwise, iterate through all of the keys in the object.\n\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(value, k)) {\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n }\n\n // Join all of the member texts together, separated with commas,\n // and wrap them in braces.\n\n v = partial.length === 0\n ? \"{}\"\n : gap\n ? \"{\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"}\"\n : \"{\" + partial.join(\",\") + \"}\";\n gap = mind;\n return v;\n }\n }\n\n // If the JSON object does not yet have a stringify method, give it one.\n\n if (typeof JSON.stringify !== \"function\") {\n meta = { // table of character substitutions\n \"\\b\": \"\\\\b\",\n \"\\t\": \"\\\\t\",\n \"\\n\": \"\\\\n\",\n \"\\f\": \"\\\\f\",\n \"\\r\": \"\\\\r\",\n \"\\\"\": \"\\\\\\\"\",\n \"\\\\\": \"\\\\\\\\\"\n };\n JSON.stringify = function (value, replacer, space) {\n\n // The stringify method takes a value and an optional replacer, and an optional\n // space parameter, and returns a JSON text. The replacer can be a function\n // that can replace values, or an array of strings that will select the keys.\n // A default replacer method can be provided. Use of the space parameter can\n // produce text that is more easily readable.\n\n var i;\n gap = \"\";\n indent = \"\";\n\n // If the space parameter is a number, make an indent string containing that\n // many spaces.\n\n if (typeof space === \"number\") {\n for (i = 0; i < space; i += 1) {\n indent += \" \";\n }\n\n // If the space parameter is a string, it will be used as the indent string.\n\n } else if (typeof space === \"string\") {\n indent = space;\n }\n\n // If there is a replacer, it must be a function or an array.\n // Otherwise, throw an error.\n\n rep = replacer;\n if (replacer && typeof replacer !== \"function\" &&\n (typeof replacer !== \"object\" ||\n typeof replacer.length !== \"number\")) {\n throw new Error(\"JSON.stringify\");\n }\n\n // Make a fake root object containing our value under the key of \"\".\n // Return the result of stringifying the value.\n\n return str(\"\", {\"\": value});\n };\n }\n\n\n // If the JSON object does not yet have a parse method, give it one.\n\n if (typeof JSON.parse !== \"function\") {\n JSON.parse = (function () {\n\n // This function creates a JSON parse function that uses a state machine rather\n // than the dangerous eval function to parse a JSON text.\n\n var state; // The state of the parser, one of\n // 'go' The starting state\n // 'ok' The final, accepting state\n // 'firstokey' Ready for the first key of the object or\n // the closing of an empty object\n // 'okey' Ready for the next key of the object\n // 'colon' Ready for the colon\n // 'ovalue' Ready for the value half of a key/value pair\n // 'ocomma' Ready for a comma or closing }\n // 'firstavalue' Ready for the first value of an array or\n // an empty array\n // 'avalue' Ready for the next value of an array\n // 'acomma' Ready for a comma or closing ]\n var stack; // The stack, for controlling nesting.\n var container; // The current container object or array\n var key; // The current key\n var value; // The current value\n var escapes = { // Escapement translation table\n \"\\\\\": \"\\\\\",\n \"\\\"\": \"\\\"\",\n \"/\": \"/\",\n \"t\": \"\\t\",\n \"n\": \"\\n\",\n \"r\": \"\\r\",\n \"f\": \"\\f\",\n \"b\": \"\\b\"\n };\n var string = { // The actions for string tokens\n go: function () {\n state = \"ok\";\n },\n firstokey: function () {\n key = value;\n state = \"colon\";\n },\n okey: function () {\n key = value;\n state = \"colon\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var number = { // The actions for number tokens\n go: function () {\n state = \"ok\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var action = {\n\n // The action table describes the behavior of the machine. It contains an\n // object for each token. Each object contains a method that is called when\n // a token is matched in a state. An object will lack a method for illegal\n // states.\n\n \"{\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = {};\n state = \"firstokey\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = {};\n state = \"firstokey\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n }\n },\n \"}\": {\n firstokey: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n ocomma: function () {\n var pop = stack.pop();\n container[key] = value;\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \"[\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = [];\n state = \"firstavalue\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = [];\n state = \"firstavalue\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n }\n },\n \"]\": {\n firstavalue: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n acomma: function () {\n var pop = stack.pop();\n container.push(value);\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \":\": {\n colon: function () {\n if (Object.hasOwnProperty.call(container, key)) {\n throw new SyntaxError(\"Duplicate key '\" + key + \"\\\"\");\n }\n state = \"ovalue\";\n }\n },\n \",\": {\n ocomma: function () {\n container[key] = value;\n state = \"okey\";\n },\n acomma: function () {\n container.push(value);\n state = \"avalue\";\n }\n },\n \"true\": {\n go: function () {\n value = true;\n state = \"ok\";\n },\n ovalue: function () {\n value = true;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = true;\n state = \"acomma\";\n },\n avalue: function () {\n value = true;\n state = \"acomma\";\n }\n },\n \"false\": {\n go: function () {\n value = false;\n state = \"ok\";\n },\n ovalue: function () {\n value = false;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = false;\n state = \"acomma\";\n },\n avalue: function () {\n value = false;\n state = \"acomma\";\n }\n },\n \"null\": {\n go: function () {\n value = null;\n state = \"ok\";\n },\n ovalue: function () {\n value = null;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = null;\n state = \"acomma\";\n },\n avalue: function () {\n value = null;\n state = \"acomma\";\n }\n }\n };\n\n function debackslashify(text) {\n\n // Remove and replace any backslash escapement.\n\n return text.replace(/\\\\(?:u(.{4})|([^u]))/g, function (ignore, b, c) {\n return b\n ? String.fromCharCode(parseInt(b, 16))\n : escapes[c];\n });\n }\n\n return function (source, reviver) {\n\n // A regular expression is used to extract tokens from the JSON text.\n // The extraction process is cautious.\n\n var result;\n var tx = /^[\\u0020\\t\\n\\r]*(?:([,:\\[\\]{}]|true|false|null)|(-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?)|\"((?:[^\\r\\n\\t\\\\\\\"]|\\\\(?:[\"\\\\\\/trnfb]|u[0-9a-fA-F]{4}))*)\")/;\n\n // Set the starting state.\n\n state = \"go\";\n\n // The stack records the container, key, and state for each object or array\n // that contains another object or array while processing nested structures.\n\n stack = [];\n\n // If any error occurs, we will catch it and ultimately throw a syntax error.\n\n try {\n\n // For each token...\n\n while (true) {\n result = tx.exec(source);\n if (!result) {\n break;\n }\n\n // result is the result array from matching the tokenizing regular expression.\n // result[0] contains everything that matched, including any initial whitespace.\n // result[1] contains any punctuation that was matched, or true, false, or null.\n // result[2] contains a matched number, still in string form.\n // result[3] contains a matched string, without quotes but with escapement.\n\n if (result[1]) {\n\n // Token: Execute the action for this state and token.\n\n action[result[1]][state]();\n\n } else if (result[2]) {\n\n // Number token: Convert the number string into a number value and execute\n // the action for this state and number.\n\n value = +result[2];\n number[state]();\n } else {\n\n // String token: Replace the escapement sequences and execute the action for\n // this state and string.\n\n value = debackslashify(result[3]);\n string[state]();\n }\n\n // Remove the token from the string. The loop will continue as long as there\n // are tokens. This is a slow process, but it allows the use of ^ matching,\n // which assures that no illegal tokens slip through.\n\n source = source.slice(result[0].length);\n }\n\n // If we find a state/token combination that is illegal, then the action will\n // cause an error. We handle the error by simply changing the state.\n\n } catch (e) {\n state = e;\n }\n\n // The parsing is finished. If we are not in the final \"ok\" state, or if the\n // remaining source contains anything except whitespace, then we did not have\n //a well-formed JSON text.\n\n if (state !== \"ok\" || (/[^\\u0020\\t\\n\\r]/.test(source))) {\n throw (state instanceof SyntaxError)\n ? state\n : new SyntaxError(\"JSON\");\n }\n\n // If there is a reviver function, we recursively walk the new structure,\n // passing each name/value pair to the reviver function for possible\n // transformation, starting with a temporary root object that holds the current\n // value in an empty key. If there is not a reviver function, we simply return\n // that value.\n\n return (typeof reviver === \"function\")\n ? (function walk(holder, key) {\n var k;\n var v;\n var val = holder[key];\n if (val && typeof val === \"object\") {\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(val, k)) {\n v = walk(val, k);\n if (v !== undefined) {\n val[k] = v;\n } else {\n delete val[k];\n }\n }\n }\n }\n return reviver.call(holder, key, val);\n }({\"\": value}, \"\"))\n : value;\n };\n }());\n }\n}\n\nmodule.exports = setupCustomJSON;\n","'use strict';\n\nfunction wrapGlobals(window, handler, shim) {\n if (!window) { return; }\n // Adapted from https://github.com/bugsnag/bugsnag-js\n var globals = 'EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload'.split(',');\n var i, global;\n for (i = 0; i < globals.length; ++i) {\n global = globals[i];\n\n if (window[global] && window[global].prototype) {\n _extendListenerPrototype(handler, window[global].prototype, shim);\n }\n }\n}\n\nfunction _extendListenerPrototype(handler, prototype, shim) {\n if (prototype.hasOwnProperty && prototype.hasOwnProperty('addEventListener')) {\n var oldAddEventListener = prototype.addEventListener;\n while (oldAddEventListener._rollbarOldAdd && oldAddEventListener.belongsToShim) {\n oldAddEventListener = oldAddEventListener._rollbarOldAdd;\n }\n var addFn = function(event, callback, bubble) {\n oldAddEventListener.call(this, event, handler.wrap(callback), bubble);\n };\n addFn._rollbarOldAdd = oldAddEventListener;\n addFn.belongsToShim = shim;\n prototype.addEventListener = addFn;\n\n var oldRemoveEventListener = prototype.removeEventListener;\n while (oldRemoveEventListener._rollbarOldRemove && oldRemoveEventListener.belongsToShim) {\n oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;\n }\n var removeFn = function(event, callback, bubble) {\n oldRemoveEventListener.call(this, event, callback && callback._rollbar_wrapped || callback, bubble);\n };\n removeFn._rollbarOldRemove = oldRemoveEventListener;\n removeFn.belongsToShim = shim;\n prototype.removeEventListener = removeFn;\n }\n}\n\nmodule.exports = wrapGlobals;\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction raw(payload, jsonBackup) {\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction selectFrames(frames, range) {\n var len = frames.length;\n if (len > range * 2) {\n return frames.slice(0, range).concat(frames.slice(len - range));\n }\n return frames;\n}\n\nfunction truncateFrames(payload, jsonBackup, range) {\n range = (typeof range === 'undefined') ? 30 : range;\n var body = payload.data.body;\n var frames;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n frames = chain[i].frames;\n frames = selectFrames(frames, range);\n chain[i].frames = frames;\n }\n } else if (body.trace) {\n frames = body.trace.frames;\n frames = selectFrames(frames, range);\n body.trace.frames = frames;\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction maybeTruncateValue(len, val) {\n if (!val) {\n return val;\n }\n if (val.length > len) {\n return val.slice(0, len - 3).concat('...');\n }\n return val;\n}\n\nfunction truncateStrings(len, payload, jsonBackup) {\n function truncator(k, v, seen) {\n switch (_.typeName(v)) {\n case 'string':\n return maybeTruncateValue(len, v);\n case 'object':\n case 'array':\n return traverse(v, truncator, seen);\n default:\n return v;\n }\n }\n payload = traverse(payload, truncator);\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction truncateTraceData(traceData) {\n if (traceData.exception) {\n delete traceData.exception.description;\n traceData.exception.message = maybeTruncateValue(255, traceData.exception.message);\n }\n traceData.frames = selectFrames(traceData.frames, 1);\n return traceData;\n}\n\nfunction minBody(payload, jsonBackup) {\n var body = payload.data.body;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n chain[i] = truncateTraceData(chain[i]);\n }\n } else if (body.trace) {\n body.trace = truncateTraceData(body.trace);\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction needsTruncation(payload, maxSize) {\n return _.maxByteSize(payload) > maxSize;\n}\n\nfunction truncate(payload, jsonBackup, maxSize) {\n maxSize = (typeof maxSize === 'undefined') ? (512 * 1024) : maxSize;\n var strategies = [\n raw,\n truncateFrames,\n truncateStrings.bind(null, 1024),\n truncateStrings.bind(null, 512),\n truncateStrings.bind(null, 256),\n minBody\n ];\n var strategy, results, result;\n\n while ((strategy = strategies.shift())) {\n results = strategy(payload, jsonBackup);\n payload = results[0];\n result = results[1];\n if (result.error || !needsTruncation(result.value, maxSize)) {\n return result;\n }\n }\n return result;\n}\n\nmodule.exports = {\n truncate: truncate,\n\n /* for testing */\n raw: raw,\n truncateFrames: truncateFrames,\n truncateStrings: truncateStrings,\n maybeTruncateValue: maybeTruncateValue\n};\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/utility.js","webpack:///./src/browser/logger.js","webpack:///./src/browser/url.js","webpack:///./src/errorParser.js","webpack:///./src/scrub.js","webpack:///./src/utility/traverse.js","webpack:///./src/browser/bundles/rollbar.js","webpack:///./src/browser/rollbar.js","webpack:///./src/browser/core.js","webpack:///./src/rollbar.js","webpack:///./src/rateLimiter.js","webpack:///./src/merge.js","webpack:///./src/queue.js","webpack:///./src/notifier.js","webpack:///./src/api.js","webpack:///./src/apiUtility.js","webpack:///./node_modules/console-polyfill/index.js","webpack:///./src/browser/detection.js","webpack:///./src/browser/globalSetup.js","webpack:///./src/browser/transport.js","webpack:///./src/browser/transforms.js","webpack:///./node_modules/error-stack-parser/error-stack-parser.js","webpack:///./node_modules/error-stack-parser/node_modules/stackframe/stackframe.js","webpack:///./src/transforms.js","webpack:///./src/browser/predicates.js","webpack:///./src/predicates.js","webpack:///./src/defaults.js","webpack:///./src/browser/defaults/scrubFields.js","webpack:///./src/telemetry.js","webpack:///./src/browser/telemetry.js","webpack:///./src/browser/domUtility.js","webpack:///./src/utility/polyfillJSON.js","webpack:///./vendor/JSON-js/json3.js","webpack:///./src/browser/wrapGlobals.js","webpack:///./src/truncation.js"],"names":[],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;AClFa;;AAEb,YAAY,mBAAO,CAAC,EAAS;;AAE7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,OAAO;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,EAAE;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,mCAAmC,OAAO;AAC1C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,iBAAiB,YAAY;AAC7B;AACA,qBAAqB;AACrB;AACA,KAAK,wBAAwB;AAC7B;AACA,KAAK,yBAAyB;AAC9B;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kCAAkC,OAAO;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,SAAS;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,kCAAkC,OAAO;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,SAAS,UAAU,YAAY,GAAG;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,aAAa;AAChC;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5wBa;;AAEb;AACA,mBAAO,CAAC,EAAkB;AAC1B,gBAAgB,mBAAO,CAAC,EAAa;AACrC,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;AC3Ca;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;AChFa;;AAEb,uBAAuB,mBAAO,CAAC,EAAoB;;AAEnD;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;;AAEA,sBAAsB,wBAAwB;AAC9C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,eAAe;AACf;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7Ha;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,eAAe,mBAAO,CAAC,CAAoB;;AAE3C;AACA;;AAEA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;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,mBAAO,CAAC,CAAU;AAC/B,cAAc,mBAAO,CAAC,EAAe;;AAErC,gBAAgB,mBAAO,CAAC,EAAa;AACrC,aAAa,mBAAO,CAAC,CAAO;;AAE5B,iBAAiB,mBAAO,CAAC,EAAc;AACvC,uBAAuB,mBAAO,CAAC,EAAe;AAC9C,iBAAiB,mBAAO,CAAC,EAAc;AACvC,uBAAuB,mBAAO,CAAC,EAAe;AAC9C,kBAAkB,mBAAO,CAAC,CAAgB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,0BAA0B,sBAAsB;AAChD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,oCAAoC,SAAS;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,eAAe,mBAAO,CAAC,EAAa;AACpC,kBAAkB,mBAAO,CAAC,EAAwB;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACpjBa;;AAEb,kBAAkB,mBAAO,CAAC,EAAe;AACzC,YAAY,mBAAO,CAAC,EAAS;AAC7B,eAAe,mBAAO,CAAC,EAAY;AACnC,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,6EAA6E,UAAU;AACvF,yFAAyF,UAAU;;AAEnG;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,6BAA6B;AAC7B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACnRa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AChJa;;AAEb;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA,WAAW,YAAY;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACvDa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wDAAwD,WAAW;AACnE;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,QAAQ;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,aAAa,8BAA8B;AAC3C;AACA;AACA;AACA;AACA,+CAA+C,SAAS;AACxD;AACA;AACA,cAAc;AACd;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,SAAS;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,+BAA+B;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC7Qa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACxHa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,cAAc,mBAAO,CAAC,EAAc;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;ACvGa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC7FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;AClBY;;AAEb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;AC/Ba;;AAEb;AACA,gBAAgB,QAAQ;AACxB;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;;AAEA;AACA,gBAAgB,QAAQ;;AAExB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;;;;;;;AClGa;;AAEb;;AAEA,QAAQ,mBAAO,CAAC,CAAY;AAC5B,aAAa,mBAAO,CAAC,CAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACvQa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,kBAAkB,mBAAO,CAAC,CAAgB;AAC1C,aAAa,mBAAO,CAAC,CAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,OAAO;AAC7C;AACA,oBAAoB,6CAA6C;AACjE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,4BAA4B,gBAAgB;AAC5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,sBAAsB;AACvC;AACA;AACA;;AAEA,4BAA4B,oBAAoB;AAChD;AACA;;AAEA;AACA;;AAEA;AACA;AACA,8BAA8B,aAAa;AAC3C;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,kBAAkB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC9UA;AACA;AACA;;AAEA;AACA,QAAQ,IAA0C;AAClD,QAAQ,iCAA6B,CAAC,uBAAY,CAAC,oCAAE,OAAO;AAAA;AAAA;AAAA,oGAAC;AAC7D,KAAK,MAAM,EAIN;AACL,CAAC;AACD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,MAAM;AACzB,oBAAoB,MAAM;AAC1B;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA,CAAC;;;;;;;ACzMD;AACA;AACA;;AAEA;AACA,QAAQ,IAA0C;AAClD,QAAQ,iCAAqB,EAAE,oCAAE,OAAO;AAAA;AAAA;AAAA,oGAAC;AACzC,KAAK,MAAM,EAIN;AACL,CAAC;AACD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,wBAAwB;AAC3C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA,CAAC;;;;;;;;AC9IY;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,sBAAsB;AAC1D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,8BAA8B;AAC9B;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrJa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;ACba;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe;;AAEf;;AAEA,uCAAuC,eAAe;;AAEtD;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA;;AAEA,wCAAwC,eAAe;;AAEvD,mBAAmB,gBAAgB;AACnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,SAAS;AAC1B;;AAEA,mBAAmB,qBAAqB;AACxC;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClMa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACVa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5Da;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qCAAqC,mBAAmB;AACxD;;AAEA;AACA,qCAAqC,4BAA4B;AACjE;AACA;AACA,8BAA8B,4BAA4B;AAC1D;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD;AACA;AACA,8BAA8B,gBAAgB;AAC9C;AACA;;AAEA;AACA,8BAA8B,aAAa;AAC3C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AClLa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,YAAY,mBAAO,CAAC,CAAU;AAC9B,gBAAgB,mBAAO,CAAC,CAAO;AAC/B,cAAc,mBAAO,CAAC,EAAc;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gDAAgD,aAAa;AAC7D;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B,mBAAmB,qBAAqB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,6BAA6B,0BAA0B;AACvD;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,eAAe,0BAA0B;AACzC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB;;AAEjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,SAAS;AAC9C;AACA;AACA,GAAG;AACH,yCAAyC;AACzC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,8CAA8C,QAAQ;;AAEtD;AACA;;AAEA;AACA,8CAA8C,QAAQ;;AAEtD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC/vBa;;AAEb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,6BAA6B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,4BAA4B,QAAQ;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,4BAA4B;AAC7C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,uBAAuB;AACpC;AACA;AACA;AACA,2BAA2B,sBAAsB;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnIa;;AAEb,mBAAmB,mBAAO,CAAC,EAA4B;;AAEvD;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB;AACpB;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,yCAAyC,iBAAiB;AAC1D,8BAA8B,kBAAkB;;AAEhD,yCAAyC,iBAAiB;AAC1D,sCAAsC,6BAA6B;;AAEnE;AACA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,wBAAwB;AACxB,+CAA+C,EAAE;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;;AAGA;;AAEA;;AAEA,UAAU;AACV,UAAU;AACV,UAAU;AACV;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA,qBAAqB,YAAY;AACjC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,qBAAqB,YAAY;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,eAAe;AACf;AACA,cAAc,wDAAwD;AACtE,cAAc,0BAA0B;AACxC;AACA;AACA;AACA;;AAEA;;AAEA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,mBAAmB,WAAW;AAC9B;AACA;;AAEA;;AAEA,OAAO;AACP;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,sBAAsB,UAAU;AAChC;AACA;;;AAGA;;AAEA;AACA;;AAEA;AACA;;AAEA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB,oBAAoB;AACpB,cAAc;AACd,gBAAgB;AAChB,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,UAAU;AACV;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,WAAW;AACX;AACA,wBAAwB,gDAAgD;AACxE;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,SAAS;AACT,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,WAAW;AACX;AACA,wBAAwB,gDAAgD;AACxE;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,sCAAsC,EAAE;AACxC;AACA;AACA;AACA,SAAS;AACT;;AAEA;;AAEA;AACA;;AAEA;AACA,+CAA+C,yGAAyG,EAAE;;AAE1J;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,SAAS;AACT;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE,UAAU;AACvB;AACA;AACA,KAAK;AACL;AACA;;AAEA;;;;;;;;AC1vBa;;AAEb;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,aAAa,oBAAoB;AACjC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC1Ca;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,eAAe,mBAAO,CAAC,CAAoB;;AAE3C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA","file":"rollbar.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n","'use strict';\n\nvar merge = require('./merge');\n\nvar RollbarJSON = {};\nfunction setupJSON(polyfillJSON) {\n if (isFunction(RollbarJSON.stringify) && isFunction(RollbarJSON.parse)) {\n return;\n }\n\n if (isDefined(JSON)) {\n // If polyfill is provided, prefer it over existing non-native shims.\n if(polyfillJSON) {\n if (isNativeFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isNativeFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n } else { // else accept any interface that is present.\n if (isFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n }\n }\n if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {\n polyfillJSON && polyfillJSON(RollbarJSON);\n }\n}\n\n/*\n * isType - Given a Javascript value and a string, returns true if the type of the value matches the\n * given string.\n *\n * @param x - any value\n * @param t - a lowercase string containing one of the following type names:\n * - undefined\n * - null\n * - error\n * - number\n * - boolean\n * - string\n * - symbol\n * - function\n * - object\n * - array\n * @returns true if x is of type t, otherwise false\n */\nfunction isType(x, t) {\n return t === typeName(x);\n}\n\n/*\n * typeName - Given a Javascript value, returns the type of the object as a string\n */\nfunction typeName(x) {\n var name = typeof x;\n if (name !== 'object') {\n return name;\n }\n if (!x) {\n return 'null';\n }\n if (x instanceof Error) {\n return 'error';\n }\n return ({}).toString.call(x).match(/\\s([a-zA-Z]+)/)[1].toLowerCase();\n}\n\n/* isFunction - a convenience function for checking if a value is a function\n *\n * @param f - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isFunction(f) {\n return isType(f, 'function');\n}\n\n/* isNativeFunction - a convenience function for checking if a value is a native JS function\n *\n * @param f - any value\n * @returns true if f is a native JS function, otherwise false\n */\nfunction isNativeFunction(f) {\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n var funcMatchString = Function.prototype.toString.call(Object.prototype.hasOwnProperty)\n .replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?');\n var reIsNative = RegExp('^' + funcMatchString + '$');\n return isObject(f) && reIsNative.test(f);\n}\n\n/* isObject - Checks if the argument is an object\n *\n * @param value - any value\n * @returns true is value is an object function is an object)\n*/\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/* isString - Checks if the argument is a string\n *\n * @param value - any value\n * @returns true if value is a string\n*/\nfunction isString(value) {\n return typeof value === 'string' || value instanceof String\n}\n\n/**\n * isFiniteNumber - determines whether the passed value is a finite number\n *\n * @param {*} n - any value\n * @returns true if value is a finite number\n */\n function isFiniteNumber(n) {\n return Number.isFinite(n);\n}\n\n/*\n * isDefined - a convenience function for checking if a value is not equal to undefined\n *\n * @param u - any value\n * @returns true if u is anything other than undefined\n */\nfunction isDefined(u) {\n return !isType(u, 'undefined');\n}\n\n/*\n * isIterable - convenience function for checking if a value can be iterated, essentially\n * whether it is an object or an array.\n *\n * @param i - any value\n * @returns true if i is an object or an array as determined by `typeName`\n */\nfunction isIterable(i) {\n var type = typeName(i);\n return (type === 'object' || type === 'array');\n}\n\n/*\n * isError - convenience function for checking if a value is of an error type\n *\n * @param e - any value\n * @returns true if e is an error\n */\nfunction isError(e) {\n // Detect both Error and Firefox Exception type\n return isType(e, 'error') || isType(e, 'exception');\n}\n\n/* isPromise - a convenience function for checking if a value is a promise\n *\n * @param p - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isPromise(p) {\n return isObject(p) && isType(p.then, 'function');\n}\n\nfunction redact() {\n return '********';\n}\n\n// from http://stackoverflow.com/a/8809472/1138191\nfunction uuid4() {\n var d = now();\n var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n var r = (d + Math.random() * 16) % 16 | 0;\n d = Math.floor(d / 16);\n return (c === 'x' ? r : (r & 0x7 | 0x8)).toString(16);\n });\n return uuid;\n}\n\nvar LEVELS = {\n debug: 0,\n info: 1,\n warning: 2,\n error: 3,\n critical: 4\n};\n\nfunction sanitizeUrl(url) {\n var baseUrlParts = parseUri(url);\n if (!baseUrlParts) {\n return '(unknown)';\n }\n\n // remove a trailing # if there is no anchor\n if (baseUrlParts.anchor === '') {\n baseUrlParts.source = baseUrlParts.source.replace('#', '');\n }\n\n url = baseUrlParts.source.replace('?' + baseUrlParts.query, '');\n return url;\n}\n\nvar parseUriOptions = {\n strictMode: false,\n key: [\n 'source',\n 'protocol',\n 'authority',\n 'userInfo',\n 'user',\n 'password',\n 'host',\n 'port',\n 'relative',\n 'path',\n 'directory',\n 'file',\n 'query',\n 'anchor'\n ],\n q: {\n name: 'queryKey',\n parser: /(?:^|&)([^&=]*)=?([^&]*)/g\n },\n parser: {\n strict: /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n loose: /^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/\n }\n};\n\nfunction parseUri(str) {\n if (!isType(str, 'string')) {\n return undefined;\n }\n\n var o = parseUriOptions;\n var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);\n var uri = {};\n\n for (var i = 0, l = o.key.length; i < l; ++i) {\n uri[o.key[i]] = m[i] || '';\n }\n\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) {\n uri[o.q.name][$1] = $2;\n }\n });\n\n return uri;\n}\n\nfunction addParamsAndAccessTokenToPath(accessToken, options, params) {\n params = params || {};\n params.access_token = accessToken;\n var paramsArray = [];\n var k;\n for (k in params) {\n if (Object.prototype.hasOwnProperty.call(params, k)) {\n paramsArray.push([k, params[k]].join('='));\n }\n }\n var query = '?' + paramsArray.sort().join('&');\n\n options = options || {};\n options.path = options.path || '';\n var qs = options.path.indexOf('?');\n var h = options.path.indexOf('#');\n var p;\n if (qs !== -1 && (h === -1 || h > qs)) {\n p = options.path;\n options.path = p.substring(0,qs) + query + '&' + p.substring(qs+1);\n } else {\n if (h !== -1) {\n p = options.path;\n options.path = p.substring(0,h) + query + p.substring(h);\n } else {\n options.path = options.path + query;\n }\n }\n}\n\nfunction formatUrl(u, protocol) {\n protocol = protocol || u.protocol;\n if (!protocol && u.port) {\n if (u.port === 80) {\n protocol = 'http:';\n } else if (u.port === 443) {\n protocol = 'https:';\n }\n }\n protocol = protocol || 'https:';\n\n if (!u.hostname) {\n return null;\n }\n var result = protocol + '//' + u.hostname;\n if (u.port) {\n result = result + ':' + u.port;\n }\n if (u.path) {\n result = result + u.path;\n }\n return result;\n}\n\nfunction stringify(obj, backup) {\n var value, error;\n try {\n value = RollbarJSON.stringify(obj);\n } catch (jsonError) {\n if (backup && isFunction(backup)) {\n try {\n value = backup(obj);\n } catch (backupError) {\n error = backupError;\n }\n } else {\n error = jsonError;\n }\n }\n return {error: error, value: value};\n}\n\nfunction maxByteSize(string) {\n // The transport will use utf-8, so assume utf-8 encoding.\n //\n // This minimal implementation will accurately count bytes for all UCS-2 and\n // single code point UTF-16. If presented with multi code point UTF-16,\n // which should be rare, it will safely overcount, not undercount.\n //\n // While robust utf-8 encoders exist, this is far smaller and far more performant.\n // For quickly counting payload size for truncation, smaller is better.\n\n var count = 0;\n var length = string.length;\n\n for (var i = 0; i < length; i++) {\n var code = string.charCodeAt(i);\n if (code < 128) { // up to 7 bits\n count = count + 1;\n } else if (code < 2048) { // up to 11 bits\n count = count + 2;\n } else if (code < 65536) { // up to 16 bits\n count = count + 3;\n }\n }\n\n return count;\n}\n\nfunction jsonParse(s) {\n var value, error;\n try {\n value = RollbarJSON.parse(s);\n } catch (e) {\n error = e;\n }\n return {error: error, value: value};\n}\n\nfunction makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n mode,\n backupMessage,\n errorParser\n) {\n var location = {\n url: url || '',\n line: lineno,\n column: colno\n };\n location.func = errorParser.guessFunctionName(location.url, location.line);\n location.context = errorParser.gatherContext(location.url, location.line);\n var href = typeof document !== 'undefined' && document && document.location && document.location.href;\n var useragent = typeof window !== 'undefined' && window && window.navigator && window.navigator.userAgent;\n return {\n 'mode': mode,\n 'message': error ? String(error) : (message || backupMessage),\n 'url': href,\n 'stack': [location],\n 'useragent': useragent\n };\n}\n\nfunction wrapCallback(logger, f) {\n return function(err, resp) {\n try {\n f(err, resp);\n } catch (e) {\n logger.error(e);\n }\n };\n}\n\nfunction nonCircularClone(obj) {\n var seen = [obj];\n\n function clone(obj, seen) {\n var value, name, newSeen, result = {};\n\n try {\n for (name in obj) {\n value = obj[name];\n\n if (value && (isType(value, 'object') || isType(value, 'array'))) {\n if (seen.includes(value)) {\n result[name] = 'Removed circular reference: ' + typeName(value);\n } else {\n newSeen = seen.slice();\n newSeen.push(value);\n result[name] = clone(value, newSeen);\n }\n continue;\n }\n\n result[name] = value;\n }\n } catch (e) {\n result = 'Failed cloning custom data: ' + e.message;\n }\n return result;\n }\n return clone(obj, seen);\n}\n\nfunction createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\n var diagnostic = {};\n var argTypes = [];\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n argTypes.push(typ);\n switch (typ) {\n case 'undefined':\n break;\n case 'string':\n message ? extraArgs.push(arg) : message = arg;\n break;\n case 'function':\n callback = wrapCallback(logger, arg);\n break;\n case 'date':\n extraArgs.push(arg);\n break;\n case 'error':\n case 'domexception':\n case 'exception': // Firefox Exception type\n err ? extraArgs.push(arg) : err = arg;\n break;\n case 'object':\n case 'array':\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n if (requestKeys && typ === 'object' && !request) {\n for (var j = 0, len = requestKeys.length; j < len; ++j) {\n if (arg[requestKeys[j]] !== undefined) {\n request = arg;\n break;\n }\n }\n if (request) {\n break;\n }\n }\n custom ? extraArgs.push(arg) : custom = arg;\n break;\n default:\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n extraArgs.push(arg);\n }\n }\n\n // if custom is an array this turns it into an object with integer keys\n if (custom) custom = nonCircularClone(custom);\n\n if (extraArgs.length > 0) {\n if (!custom) custom = nonCircularClone({});\n custom.extraArgs = nonCircularClone(extraArgs);\n }\n\n var item = {\n message: message,\n err: err,\n custom: custom,\n timestamp: now(),\n callback: callback,\n notifier: notifier,\n diagnostic: diagnostic,\n uuid: uuid4()\n };\n\n setCustomItemKeys(item, custom);\n\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n item.diagnostic.original_arg_types = argTypes;\n return item;\n}\n\nfunction setCustomItemKeys(item, custom) {\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (custom && custom.skipFrames !== undefined) {\n item.skipFrames = custom.skipFrames;\n delete custom.skipFrames;\n }\n}\n\nfunction addErrorContext(item, errors) {\n var custom = item.data.custom || {};\n var contextAdded = false;\n\n try {\n for (var i = 0; i < errors.length; ++i) {\n if (errors[i].hasOwnProperty('rollbarContext')) {\n custom = merge(custom, nonCircularClone(errors[i].rollbarContext));\n contextAdded = true;\n }\n }\n\n // Avoid adding an empty object to the data.\n if (contextAdded) {\n item.data.custom = custom;\n }\n } catch (e) {\n item.diagnostic.error_context = 'Failed: ' + e.message;\n }\n}\n\nvar TELEMETRY_TYPES = ['log', 'network', 'dom', 'navigation', 'error', 'manual'];\nvar TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];\n\nfunction arrayIncludes(arr, val) {\n for (var k = 0; k < arr.length; ++k) {\n if (arr[k] === val) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction createTelemetryEvent(args) {\n var type, metadata, level;\n var arg;\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n switch (typ) {\n case 'string':\n if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {\n type = arg;\n } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {\n level = arg;\n }\n break;\n case 'object':\n metadata = arg;\n break;\n default:\n break;\n }\n }\n var event = {\n type: type || 'manual',\n metadata: metadata || {},\n level: level\n };\n\n return event;\n}\n\n/*\n * get - given an obj/array and a keypath, return the value at that keypath or\n * undefined if not possible.\n *\n * @param obj - an object or array\n * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'\n * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`\n */\nfunction get(obj, path) {\n if (!obj) {\n return undefined;\n }\n var keys = path.split('.');\n var result = obj;\n try {\n for (var i = 0, len = keys.length; i < len; ++i) {\n result = result[keys[i]];\n }\n } catch (e) {\n result = undefined;\n }\n return result;\n}\n\nfunction set(obj, path, value) {\n if (!obj) {\n return;\n }\n var keys = path.split('.');\n var len = keys.length;\n if (len < 1) {\n return;\n }\n if (len === 1) {\n obj[keys[0]] = value;\n return;\n }\n try {\n var temp = obj[keys[0]] || {};\n var replacement = temp;\n for (var i = 1; i < len - 1; ++i) {\n temp[keys[i]] = temp[keys[i]] || {};\n temp = temp[keys[i]];\n }\n temp[keys[len-1]] = value;\n obj[keys[0]] = replacement;\n } catch (e) {\n return;\n }\n}\n\nfunction formatArgsAsString(args) {\n var i, len, arg;\n var result = [];\n for (i = 0, len = args.length; i < len; ++i) {\n arg = args[i];\n switch (typeName(arg)) {\n case 'object':\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500) {\n arg = arg.substr(0, 497) + '...';\n }\n break;\n case 'null':\n arg = 'null';\n break;\n case 'undefined':\n arg = 'undefined';\n break;\n case 'symbol':\n arg = arg.toString();\n break;\n }\n result.push(arg);\n }\n return result.join(' ');\n}\n\nfunction now() {\n if (Date.now) {\n return +Date.now();\n }\n return +new Date();\n}\n\nfunction filterIp(requestData, captureIp) {\n if (!requestData || !requestData['user_ip'] || captureIp === true) {\n return;\n }\n var newIp = requestData['user_ip'];\n if (!captureIp) {\n newIp = null;\n } else {\n try {\n var parts;\n if (newIp.indexOf('.') !== -1) {\n parts = newIp.split('.');\n parts.pop();\n parts.push('0');\n newIp = parts.join('.');\n } else if (newIp.indexOf(':') !== -1) {\n parts = newIp.split(':');\n if (parts.length > 2) {\n var beginning = parts.slice(0, 3);\n var slashIdx = beginning[2].indexOf('/');\n if (slashIdx !== -1) {\n beginning[2] = beginning[2].substring(0, slashIdx);\n }\n var terminal = '0000:0000:0000:0000:0000';\n newIp = beginning.concat(terminal).join(':');\n }\n } else {\n newIp = null;\n }\n } catch (e) {\n newIp = null;\n }\n }\n requestData['user_ip'] = newIp;\n}\n\nfunction handleOptions(current, input, payload, logger) {\n var result = merge(current, input, payload);\n result = updateDeprecatedOptions(result, logger);\n if (!input || input.overwriteScrubFields) {\n return result;\n }\n if (input.scrubFields) {\n result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);\n }\n return result;\n}\n\nfunction updateDeprecatedOptions(options, logger) {\n if(options.hostWhiteList && !options.hostSafeList) {\n options.hostSafeList = options.hostWhiteList;\n options.hostWhiteList = undefined;\n logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');\n }\n if(options.hostBlackList && !options.hostBlockList) {\n options.hostBlockList = options.hostBlackList;\n options.hostBlackList = undefined;\n logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');\n }\n return options;\n}\n\nmodule.exports = {\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n createItem: createItem,\n addErrorContext: addErrorContext,\n createTelemetryEvent: createTelemetryEvent,\n filterIp: filterIp,\n formatArgsAsString: formatArgsAsString,\n formatUrl: formatUrl,\n get: get,\n handleOptions: handleOptions,\n isError: isError,\n isFiniteNumber: isFiniteNumber,\n isFunction: isFunction,\n isIterable: isIterable,\n isNativeFunction: isNativeFunction,\n isObject: isObject,\n isString: isString,\n isType: isType,\n isPromise: isPromise,\n jsonParse: jsonParse,\n LEVELS: LEVELS,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n merge: merge,\n now: now,\n redact: redact,\n RollbarJSON: RollbarJSON,\n sanitizeUrl: sanitizeUrl,\n set: set,\n setupJSON: setupJSON,\n stringify: stringify,\n maxByteSize: maxByteSize,\n typeName: typeName,\n uuid4: uuid4\n};\n","'use strict';\n\n/* eslint-disable no-console */\nrequire('console-polyfill');\nvar detection = require('./detection');\nvar _ = require('../utility');\n\nfunction error() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.error(_.formatArgsAsString(args));\n } else {\n console.error.apply(console, args);\n }\n}\n\nfunction info() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.info(_.formatArgsAsString(args));\n } else {\n console.info.apply(console, args);\n }\n}\n\nfunction log() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.log(_.formatArgsAsString(args));\n } else {\n console.log.apply(console, args);\n }\n}\n\n/* eslint-enable no-console */\n\nmodule.exports = {\n error: error,\n info: info,\n log: log\n};\n","'use strict';\n\n// See https://nodejs.org/docs/latest/api/url.html\nfunction parse(url) {\n var result = {\n protocol: null, auth: null, host: null, path: null,\n hash: null, href: url, hostname: null, port: null,\n pathname: null, search: null, query: null\n };\n\n var i, last;\n i = url.indexOf('//');\n if (i !== -1) {\n result.protocol = url.substring(0,i);\n last = i+2;\n } else {\n last = 0;\n }\n \n i = url.indexOf('@', last);\n if (i !== -1) {\n result.auth = url.substring(last, i);\n last = i+1;\n }\n\n i = url.indexOf('/', last);\n if (i === -1) {\n i = url.indexOf('?', last);\n if (i === -1) {\n i = url.indexOf('#', last);\n if (i === -1) {\n result.host = url.substring(last);\n } else {\n result.host = url.substring(last, i);\n result.hash = url.substring(i);\n }\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n return result;\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n\n i = url.indexOf('#', last);\n if (i === -1) {\n result.path = url.substring(last);\n } else {\n result.path = url.substring(last, i);\n result.hash = url.substring(i);\n }\n\n if (result.path) {\n var pathParts = result.path.split('?');\n result.pathname = pathParts[0];\n result.query = pathParts[1];\n result.search = result.query ? '?' + result.query : null;\n }\n return result;\n}\n\nmodule.exports = {\n parse: parse\n};\n","'use strict';\n\nvar ErrorStackParser = require('error-stack-parser');\n\nvar UNKNOWN_FUNCTION = '?';\nvar ERR_CLASS_REGEXP = new RegExp('^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ');\n\nfunction guessFunctionName() {\n return UNKNOWN_FUNCTION;\n}\n\n\nfunction gatherContext() {\n return null;\n}\n\n\nfunction Frame(stackFrame) {\n var data = {};\n\n data._stackFrame = stackFrame;\n\n data.url = stackFrame.fileName;\n data.line = stackFrame.lineNumber;\n data.func = stackFrame.functionName;\n data.column = stackFrame.columnNumber;\n data.args = stackFrame.args;\n\n data.context = gatherContext();\n\n return data;\n}\n\n\nfunction Stack(exception, skip) {\n function getStack() {\n var parserStack = [];\n\n skip = skip || 0;\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch(e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = skip; i < parserStack.length; i++) {\n stack.push(new Frame(parserStack[i]));\n }\n\n return stack;\n }\n\n return {\n stack: getStack(),\n message: exception.message,\n name: _mostSpecificErrorName(exception),\n rawStack: exception.stack,\n rawException: exception\n };\n}\n\n\nfunction parse(e, skip) {\n var err = e;\n\n if (err.nested) {\n var traceChain = [];\n while (err) {\n traceChain.push(new Stack(err, skip));\n err = err.nested;\n\n skip = 0; // Only apply skip value to primary error\n }\n\n // Return primary error with full trace chain attached.\n traceChain[0].traceChain = traceChain;\n return traceChain[0];\n } else {\n return new Stack(err, skip);\n }\n}\n\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg || !errMsg.match) {\n return ['Unknown error. There was no error message to display.', ''];\n }\n var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);\n var errClass = '(unknown)';\n\n if (errClassMatch) {\n errClass = errClassMatch[errClassMatch.length - 1];\n errMsg = errMsg.replace((errClassMatch[errClassMatch.length - 2] || '') + errClass + ':', '');\n errMsg = errMsg.replace(/(^[\\s]+|[\\s]+$)/g, '');\n }\n return [errClass, errMsg];\n}\n\n// * Prefers any value over an empty string\n// * Prefers any value over 'Error' where possible\n// * Prefers name over constructor.name when both are more specific than 'Error'\nfunction _mostSpecificErrorName(error) {\n var name = error.name && error.name.length && error.name;\n var constructorName = error.constructor.name && error.constructor.name.length && error.constructor.name;\n\n if (!name || !constructorName) {\n return name || constructorName;\n }\n\n if (name === 'Error') {\n return constructorName;\n }\n return name;\n}\n\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame\n};\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction scrub(data, scrubFields, scrubPaths) {\n scrubFields = scrubFields || [];\n\n if (scrubPaths) {\n for (var i = 0; i < scrubPaths.length; ++i) {\n scrubPath(data, scrubPaths[i]);\n }\n }\n\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart) {\n return paramPart + _.redact();\n }\n\n function paramScrubber(v) {\n var i;\n if (_.isType(v, 'string')) {\n for (i = 0; i < queryRes.length; ++i) {\n v = v.replace(queryRes[i], redactQueryParam);\n }\n }\n return v;\n }\n\n function valScrubber(k, v) {\n var i;\n for (i = 0; i < paramRes.length; ++i) {\n if (paramRes[i].test(k)) {\n v = _.redact();\n break;\n }\n }\n return v;\n }\n\n function scrubber(k, v, seen) {\n var tmpV = valScrubber(k, v);\n if (tmpV === v) {\n if (_.isType(v, 'object') || _.isType(v, 'array')) {\n return traverse(v, scrubber, seen);\n }\n return paramScrubber(tmpV);\n } else {\n return tmpV;\n }\n }\n\n return traverse(data, scrubber);\n}\n\nfunction scrubPath(obj, path) {\n var keys = path.split('.');\n var last = keys.length - 1;\n try {\n for (var i = 0; i <= last; ++i) {\n if (i < last) {\n obj = obj[keys[i]];\n } else {\n obj[keys[i]] = _.redact();\n }\n }\n } catch (e) {\n // Missing key is OK;\n }\n}\n\nfunction _getScrubFieldRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '^\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?$';\n ret.push(new RegExp(pat, 'i'));\n }\n return ret;\n}\n\n\nfunction _getScrubQueryParamRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?';\n ret.push(new RegExp('(' + pat + '=)([^&\\\\n]+)', 'igm'));\n }\n return ret;\n}\n\nmodule.exports = scrub;\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction traverse(obj, func, seen) {\n var k, v, i;\n var isObj = _.isType(obj, 'object');\n var isArray = _.isType(obj, 'array');\n var keys = [];\n var seenIndex;\n\n // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.\n seen = seen || { obj: [], mapped: []};\n\n if (isObj) {\n seenIndex = seen.obj.indexOf(obj);\n\n if (isObj && seenIndex !== -1) {\n // Prefer the mapped object if there is one.\n return seen.mapped[seenIndex] || seen.obj[seenIndex];\n }\n\n seen.obj.push(obj);\n seenIndex = seen.obj.length - 1;\n }\n\n if (isObj) {\n for (k in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, k)) {\n keys.push(k);\n }\n }\n } else if (isArray) {\n for (i = 0; i < obj.length; ++i) {\n keys.push(i);\n }\n }\n\n var result = isObj ? {} : [];\n var same = true;\n for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n result[k] = func(k, v, seen);\n same = same && result[k] === obj[k];\n }\n\n if (isObj && !same) {\n seen.mapped[seenIndex] = result;\n }\n\n return !same ? result : obj;\n}\n\nmodule.exports = traverse;\n","'use strict';\n\nvar rollbar = require('../rollbar');\n\nvar options = (typeof window !== 'undefined') && window._rollbarConfig;\nvar alias = options && options.globalAlias || 'Rollbar';\nvar shimRunning = (typeof window !== 'undefined') && window[alias] && typeof window[alias].shimId === 'function' && window[alias].shimId() !== undefined;\n\nif ((typeof window !== 'undefined') && !window._rollbarStartTime) {\n window._rollbarStartTime = (new Date()).getTime();\n}\n\nif (!shimRunning && options) {\n var Rollbar = new rollbar(options);\n window[alias] = Rollbar;\n} else if (typeof window !== 'undefined') {\n window.rollbar = rollbar;\n window._rollbarDidLoad = true;\n} else if (typeof self !== 'undefined') {\n self.rollbar = rollbar;\n self._rollbarDidLoad = true;\n}\n\nmodule.exports = rollbar;\n","'use strict';\n\nvar Rollbar = require('./core');\nvar telemeter = require('../telemetry');\nvar instrumenter = require('./telemetry');\nvar polyfillJSON = require('../utility/polyfillJSON');\nvar wrapGlobals = require('./wrapGlobals');\nvar scrub = require('../scrub');\nvar truncation = require('../truncation');\n\nRollbar.setComponents({\n telemeter: telemeter,\n instrumenter: instrumenter,\n polyfillJSON: polyfillJSON,\n wrapGlobals: wrapGlobals,\n scrub: scrub,\n truncation: truncation\n});\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar Client = require('../rollbar');\nvar _ = require('../utility');\nvar API = require('../api');\nvar logger = require('./logger');\nvar globals = require('./globalSetup');\n\nvar Transport = require('./transport');\nvar urllib = require('./url');\n\nvar transforms = require('./transforms');\nvar sharedTransforms = require('../transforms');\nvar predicates = require('./predicates');\nvar sharedPredicates = require('../predicates');\nvar errorParser = require('../errorParser');\n\nfunction Rollbar(options, client) {\n this.options = _.handleOptions(defaultOptions, options, null, logger);\n this.options._configuredOptions = options;\n var Telemeter = this.components.telemeter;\n var Instrumenter = this.components.instrumenter;\n var polyfillJSON = this.components.polyfillJSON;\n this.wrapGlobals = this.components.wrapGlobals;\n this.scrub = this.components.scrub;\n var truncation = this.components.truncation;\n\n var transport = new Transport(truncation);\n var api = new API(this.options, transport, urllib, truncation);\n if (Telemeter) {\n this.telemeter = new Telemeter(this.options);\n }\n this.client = client || new Client(this.options, api, logger, this.telemeter, 'browser');\n var gWindow = _gWindow();\n var gDocument = (typeof document != 'undefined') && document;\n this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers\n this.anonymousErrorsPending = 0;\n addTransformsToNotifier(this.client.notifier, this, gWindow);\n addPredicatesToQueue(this.client.queue);\n this.setupUnhandledCapture();\n if (Instrumenter) {\n this.instrumenter = new Instrumenter(this.options, this.client.telemeter, this, gWindow, gDocument);\n this.instrumenter.instrument();\n }\n _.setupJSON(polyfillJSON);\n}\n\nvar _instance = null;\nRollbar.init = function(options, client) {\n if (_instance) {\n return _instance.global(options).configure(options);\n }\n _instance = new Rollbar(options, client);\n return _instance;\n};\n\nRollbar.prototype.components = {};\n\nRollbar.setComponents = function(components) {\n Rollbar.prototype.components = components;\n}\n\nfunction handleUninitialized(maybeCallback) {\n var message = 'Rollbar is not initialized';\n logger.error(message);\n if (maybeCallback) {\n maybeCallback(new Error(message));\n }\n}\n\nRollbar.prototype.global = function(options) {\n this.client.global(options);\n return this;\n};\nRollbar.global = function(options) {\n if (_instance) {\n return _instance.global(options);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.configure = function(options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = {payload: payloadData};\n }\n this.options = _.handleOptions(oldOptions, options, payload, logger);\n this.options._configuredOptions = _.handleOptions(oldOptions._configuredOptions, options, payload);\n this.client.configure(this.options, payloadData);\n this.instrumenter && this.instrumenter.configure(this.options);\n this.setupUnhandledCapture();\n return this;\n};\nRollbar.configure = function(options, payloadData) {\n if (_instance) {\n return _instance.configure(options, payloadData);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.lastError = function() {\n return this.client.lastError;\n};\nRollbar.lastError = function() {\n if (_instance) {\n return _instance.lastError();\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.log = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.log(item);\n return {uuid: uuid};\n};\nRollbar.log = function() {\n if (_instance) {\n return _instance.log.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.debug = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.debug(item);\n return {uuid: uuid};\n};\nRollbar.debug = function() {\n if (_instance) {\n return _instance.debug.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.info = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.info(item);\n return {uuid: uuid};\n};\nRollbar.info = function() {\n if (_instance) {\n return _instance.info.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warn = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warn(item);\n return {uuid: uuid};\n};\nRollbar.warn = function() {\n if (_instance) {\n return _instance.warn.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warning = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warning(item);\n return {uuid: uuid};\n};\nRollbar.warning = function() {\n if (_instance) {\n return _instance.warning.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.error = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.error(item);\n return {uuid: uuid};\n};\nRollbar.error = function() {\n if (_instance) {\n return _instance.error.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.critical = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.critical(item);\n return {uuid: uuid};\n};\nRollbar.critical = function() {\n if (_instance) {\n return _instance.critical.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.buildJsonPayload = function(item) {\n return this.client.buildJsonPayload(item);\n};\nRollbar.buildJsonPayload = function() {\n if (_instance) {\n return _instance.buildJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.sendJsonPayload = function(jsonPayload) {\n return this.client.sendJsonPayload(jsonPayload);\n};\nRollbar.sendJsonPayload = function() {\n if (_instance) {\n return _instance.sendJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.setupUnhandledCapture = function() {\n var gWindow = _gWindow();\n\n if (!this.unhandledExceptionsInitialized) {\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(gWindow, this);\n if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {\n this.wrapGlobals(gWindow, this);\n }\n this.unhandledExceptionsInitialized = true;\n }\n }\n if (!this.unhandledRejectionsInitialized) {\n if (this.options.captureUnhandledRejections || this.options.handleUnhandledRejections) {\n globals.captureUnhandledRejections(gWindow, this);\n this.unhandledRejectionsInitialized = true;\n }\n }\n};\n\nRollbar.prototype.handleUncaughtException = function(message, url, lineno, colno, error, context) {\n if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {\n return;\n }\n\n // Chrome will always send 5+ arguments and error will be valid or null, not undefined.\n // If error is undefined, we have a different caller.\n // Chrome also sends errors from web workers with null error, but does not invoke\n // prepareStackTrace() for these. Test for empty url to skip them.\n if (this.options.inspectAnonymousErrors && this.isChrome && error === null && url === '') {\n return 'anonymous';\n }\n\n var item;\n var stackInfo = _.makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n 'onerror',\n 'uncaught exception',\n errorParser\n );\n if (_.isError(error)) {\n item = this._createItem([message, error, context]);\n item._unhandledStackInfo = stackInfo;\n } else if (_.isError(url)) {\n item = this._createItem([message, url, context]);\n item._unhandledStackInfo = stackInfo;\n } else {\n item = this._createItem([message, context]);\n item.stackInfo = stackInfo;\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n this.client.log(item);\n};\n\n/**\n * Chrome only. Other browsers will ignore.\n *\n * Use Error.prepareStackTrace to extract information about errors that\n * do not have a valid error object in onerror().\n *\n * In tested version of Chrome, onerror is called first but has no way\n * to communicate with prepareStackTrace. Use a counter to let this\n * handler know which errors to send to Rollbar.\n *\n * In config options, set inspectAnonymousErrors to enable.\n */\nRollbar.prototype.handleAnonymousErrors = function() {\n if (!this.options.inspectAnonymousErrors || !this.isChrome) {\n return;\n }\n\n var r = this;\n function prepareStackTrace(error, _stack) { // eslint-disable-line no-unused-vars\n if (r.options.inspectAnonymousErrors) {\n if (r.anonymousErrorsPending) {\n // This is the only known way to detect that onerror saw an anonymous error.\n // It depends on onerror reliably being called before Error.prepareStackTrace,\n // which so far holds true on tested versions of Chrome. If versions of Chrome\n // are tested that behave differently, this logic will need to be updated\n // accordingly.\n r.anonymousErrorsPending -= 1;\n\n if (!error) {\n // Not likely to get here, but calling handleUncaughtException from here\n // without an error object would throw off the anonymousErrorsPending counter,\n // so return now.\n return;\n }\n\n // Allow this to be tracked later.\n error._isAnonymous = true;\n\n // url, lineno, colno shouldn't be needed for these errors.\n // If that changes, update this accordingly, using the unused\n // _stack param as needed (rather than parse error.toString()).\n r.handleUncaughtException(error.message, null, null, null, error);\n }\n }\n\n // Workaround to ensure stack is preserved for normal errors.\n return error.stack;\n }\n\n // https://v8.dev/docs/stack-trace-api\n try {\n Error.prepareStackTrace = prepareStackTrace;\n } catch (e) {\n this.options.inspectAnonymousErrors = false;\n this.error('anonymous error handler failed', e);\n }\n}\n\nRollbar.prototype.handleUnhandledRejection = function(reason, promise) {\n if (!this.options.captureUnhandledRejections && !this.options.handleUnhandledRejections) {\n return;\n }\n\n var message = 'unhandled rejection was null or undefined!';\n if (reason) {\n if (reason.message) {\n message = reason.message;\n } else {\n var reasonResult = _.stringify(reason);\n if (reasonResult.value) {\n message = reasonResult.value;\n }\n }\n }\n var context = (reason && reason._rollbarContext) || (promise && promise._rollbarContext);\n\n var item;\n if (_.isError(reason)) {\n item = this._createItem([message, reason, context]);\n } else {\n item = this._createItem([message, reason, context]);\n item.stackInfo = _.makeUnhandledStackInfo(\n message,\n '',\n 0,\n 0,\n null,\n 'unhandledrejection',\n '',\n errorParser\n );\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n item._originalArgs = item._originalArgs || [];\n item._originalArgs.push(promise);\n this.client.log(item);\n};\n\nRollbar.prototype.wrap = function(f, context, _before) {\n try {\n var ctxFn;\n if(_.isFunction(context)) {\n ctxFn = context;\n } else {\n ctxFn = function() { return context || {}; };\n }\n\n if (!_.isFunction(f)) {\n return f;\n }\n\n if (f._isWrap) {\n return f;\n }\n\n if (!f._rollbar_wrapped) {\n f._rollbar_wrapped = function () {\n if (_before && _.isFunction(_before)) {\n _before.apply(this, arguments);\n }\n try {\n return f.apply(this, arguments);\n } catch(exc) {\n var e = exc;\n if (e && window._rollbarWrappedError !== e) {\n if (_.isType(e, 'string')) {\n e = new String(e);\n }\n e._rollbarContext = ctxFn() || {};\n e._rollbarContext._wrappedSource = f.toString();\n\n window._rollbarWrappedError = e;\n }\n throw e;\n }\n };\n\n f._rollbar_wrapped._isWrap = true;\n\n if (f.hasOwnProperty) {\n for (var prop in f) {\n if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {\n f._rollbar_wrapped[prop] = f[prop];\n }\n }\n }\n }\n\n return f._rollbar_wrapped;\n } catch (e) {\n // Return the original function if the wrap fails.\n return f;\n }\n};\nRollbar.wrap = function(f, context) {\n if (_instance) {\n return _instance.wrap(f, context);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.captureEvent = function() {\n var event = _.createTelemetryEvent(arguments);\n return this.client.captureEvent(event.type, event.metadata, event.level);\n};\nRollbar.captureEvent = function() {\n if (_instance) {\n return _instance.captureEvent.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\n// The following two methods are used internally and are not meant for public use\nRollbar.prototype.captureDomContentLoaded = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureLoad(ts);\n};\n\n/* Internal */\n\nfunction addTransformsToNotifier(notifier, rollbar, gWindow) {\n notifier\n .addTransform(transforms.handleDomException)\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(gWindow))\n .addTransform(transforms.addClientInfo(gWindow))\n .addTransform(transforms.addPluginInfo(gWindow))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(sharedTransforms.addConfigToPayload)\n .addTransform(transforms.addScrubber(rollbar.scrub))\n .addTransform(sharedTransforms.userTransform(logger))\n .addTransform(sharedTransforms.addConfiguredOptions)\n .addTransform(sharedTransforms.addDiagnosticKeys)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(sharedPredicates.checkLevel)\n .addPredicate(predicates.checkIgnore)\n .addPredicate(sharedPredicates.userCheckIgnore(logger))\n .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))\n .addPredicate(sharedPredicates.urlIsSafeListed(logger))\n .addPredicate(sharedPredicates.messageIsIgnored(logger));\n}\n\nRollbar.prototype.loadFull = function() {\n logger.info('Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.');\n};\n\nRollbar.prototype._createItem = function(args) {\n return _.createItem(args, logger, this);\n};\n\nfunction _getFirstFunction(args) {\n for (var i = 0, len = args.length; i < len; ++i) {\n if (_.isFunction(args[i])) {\n return args[i];\n }\n }\n return undefined;\n}\n\nfunction _gWindow() {\n return ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n}\n\nvar defaults = require('../defaults');\nvar scrubFields = require('./defaults/scrubFields');\n\nvar defaultOptions = {\n version: defaults.version,\n scrubFields: scrubFields.scrubFields,\n logLevel: defaults.logLevel,\n reportLevel: defaults.reportLevel,\n uncaughtErrorLevel: defaults.uncaughtErrorLevel,\n endpoint: defaults.endpoint,\n verbose: false,\n enabled: true,\n transmit: true,\n sendConfig: false,\n includeItemsInTelemetry: true,\n captureIp: true,\n inspectAnonymousErrors: true,\n ignoreDuplicateErrors: true,\n wrapGlobalEventHandlers: false\n};\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar _ = require('./utility');\n\n/*\n * Rollbar - the interface to Rollbar\n *\n * @param options\n * @param api\n * @param logger\n */\nfunction Rollbar(options, api, logger, telemeter, platform) {\n this.options = _.merge(options);\n this.logger = logger;\n Rollbar.rateLimiter.configureGlobal(this.options);\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.api = api;\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n\n // This must happen before the Notifier is created\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = telemeter;\n setStackTraceLimit(options);\n this.lastError = null;\n this.lastErrorHash = 'none';\n}\n\nvar defaultOptions = {\n maxItems: 0,\n itemsPerMinute: 60\n};\n\nRollbar.rateLimiter = new RateLimiter(defaultOptions);\n\nRollbar.prototype.global = function (options) {\n Rollbar.rateLimiter.configureGlobal(options);\n return this;\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n\n this.options = _.merge(oldOptions, options, payload);\n\n // This must happen before the Notifier is configured\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier && this.notifier.configure(this.options);\n this.telemeter && this.telemeter.configure(this.options);\n setStackTraceLimit(options);\n this.global(this.options);\n\n if (validateTracer(options.tracer)) {\n this.tracer = options.tracer\n }\n\n return this;\n};\n\nRollbar.prototype.log = function (item) {\n var level = this._defaultLogLevel();\n return this._log(level, item);\n};\n\nRollbar.prototype.debug = function (item) {\n this._log('debug', item);\n};\n\nRollbar.prototype.info = function (item) {\n this._log('info', item);\n};\n\nRollbar.prototype.warn = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.warning = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.error = function (item) {\n this._log('error', item);\n};\n\nRollbar.prototype.critical = function (item) {\n this._log('critical', item);\n};\n\nRollbar.prototype.wait = function (callback) {\n this.queue.wait(callback);\n};\n\nRollbar.prototype.captureEvent = function (type, metadata, level) {\n return this.telemeter && this.telemeter.captureEvent(type, metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function (ts) {\n return this.telemeter && this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (ts) {\n return this.telemeter && this.telemeter.captureLoad(ts);\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.api.buildJsonPayload(item);\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n this.api.postJsonPayload(jsonPayload);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function (defaultLevel, item) {\n var callback;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {\n if (callback) {\n var error = new Error('ignored identical item');\n error.item = item;\n callback(error);\n }\n return;\n }\n try {\n this._addTracingInfo(item);\n item.level = item.level || defaultLevel;\n this.telemeter && this.telemeter._captureRollbarItem(item);\n item.telemetryEvents = (this.telemeter && this.telemeter.copyEvents()) || [];\n this.notifier.log(item, callback);\n } catch (e) {\n if (callback) {\n callback(e);\n }\n this.logger.error(e);\n }\n};\n\nRollbar.prototype._defaultLogLevel = function () {\n return this.options.logLevel || 'debug';\n};\n\nRollbar.prototype._sameAsLastError = function (item) {\n if (!item._isUncaught) {\n return false;\n }\n var itemHash = generateItemHash(item);\n if (this.lastErrorHash === itemHash) {\n return true;\n }\n this.lastError = item.err;\n this.lastErrorHash = itemHash;\n return false;\n};\n\nRollbar.prototype._addTracingInfo = function (item) {\n // Tracer validation occurs in the constructor\n // or in the Rollbar.prototype.configure methods\n if (this.tracer) {\n // add rollbar occurrence uuid to span\n var span = this.tracer.scope().active();\n\n if (validateSpan(span)) {\n span.setTag('rollbar.error_uuid', item.uuid);\n span.setTag('rollbar.has_error', true);\n span.setTag('error', true);\n span.setTag('rollbar.item_url', `https://rollbar.com/item/uuid/?uuid=${item.uuid}`);\n span.setTag('rollbar.occurrence_url', `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`);\n\n // add span ID & trace ID to occurrence\n var opentracingSpanId = span.context().toSpanId();\n var opentracingTraceId = span.context().toTraceId();\n\n if (item.custom) {\n item.custom.opentracing_span_id = opentracingSpanId;\n item.custom.opentracing_trace_id = opentracingTraceId;\n } else {\n item.custom = {\n opentracing_span_id: opentracingSpanId,\n opentracing_trace_id: opentracingTraceId\n };\n }\n }\n }\n}\n\nfunction generateItemHash(item) {\n var message = item.message || '';\n var stack = (item.err || {}).stack || String(item.err);\n return message + '::' + stack;\n}\n\n// Node.js, Chrome, Safari, and some other browsers support this property\n// which globally sets the number of stack frames returned in an Error object.\n// If a browser can't use it, no harm done.\nfunction setStackTraceLimit(options) {\n if (options.stackTraceLimit) {\n Error.stackTraceLimit = options.stackTraceLimit;\n }\n}\n\n/**\n * Validate the Tracer object provided to the Client\n * is valid for our Opentracing use case.\n * @param {opentracer.Tracer} tracer\n */\nfunction validateTracer(tracer) {\n if (!tracer) {\n return false;\n }\n\n if (!tracer.scope || typeof tracer.scope !== 'function') {\n return false;\n }\n\n var scope = tracer.scope();\n\n if (!scope || !scope.active || typeof scope.active !== 'function') {\n return false;\n }\n\n return true;\n}\n\n/**\n * Validate the Span object provided\n * @param {opentracer.Span} span\n */\nfunction validateSpan(span) {\n if (!span || !span.context || typeof span.context !== 'function') {\n return false;\n }\n\n var spanContext = span.context();\n\n if (!spanContext\n || !spanContext.toSpanId\n || !spanContext.toTraceId\n || typeof spanContext.toSpanId !== 'function'\n || typeof spanContext.toTraceId !== 'function') {\n return false\n }\n\n return true;\n}\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar\n *\n * @param options - the same options that are accepted by configureGlobal offered as a convenience\n */\nfunction RateLimiter(options) {\n this.startTime = _.now();\n this.counter = 0;\n this.perMinCounter = 0;\n this.platform = null;\n this.platformOptions = {};\n this.configureGlobal(options);\n}\n\nRateLimiter.globalSettings = {\n startTime: _.now(),\n maxItems: undefined,\n itemsPerMinute: undefined\n};\n\n/*\n * configureGlobal - set the global rate limiter options\n *\n * @param options - Only the following values are recognized:\n * startTime: a timestamp of the form returned by (new Date()).getTime()\n * maxItems: the maximum items\n * itemsPerMinute: the max number of items to send in a given minute\n */\nRateLimiter.prototype.configureGlobal = function(options) {\n if (options.startTime !== undefined) {\n RateLimiter.globalSettings.startTime = options.startTime;\n }\n if (options.maxItems !== undefined) {\n RateLimiter.globalSettings.maxItems = options.maxItems;\n }\n if (options.itemsPerMinute !== undefined) {\n RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;\n }\n};\n\n/*\n * shouldSend - determine if we should send a given item based on rate limit settings\n *\n * @param item - the item we are about to send\n * @returns An object with the following structure:\n * error: (Error|null)\n * shouldSend: bool\n * payload: (Object|null)\n * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and\n * exactly one of error or payload will be non-null. If error is non-null, the returned Error will\n * describe the situation, but it means that we were already over a rate limit (either globally or\n * per minute) when this item was checked. If error is null, and therefore payload is non-null, it\n * means this item put us over the global rate limit and the payload should be sent to Rollbar in\n * place of the passed in item.\n */\nRateLimiter.prototype.shouldSend = function(item, now) {\n now = now || _.now();\n var elapsedTime = now - this.startTime;\n if (elapsedTime < 0 || elapsedTime >= 60000) {\n this.startTime = now;\n this.perMinCounter = 0;\n }\n\n var globalRateLimit = RateLimiter.globalSettings.maxItems;\n var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;\n\n if (checkRate(item, globalRateLimit, this.counter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimit + ' max items reached', false);\n } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimitPerMin + ' items per minute reached', false);\n }\n this.counter++;\n this.perMinCounter++;\n\n var shouldSend = !checkRate(item, globalRateLimit, this.counter);\n var perMinute = shouldSend;\n shouldSend = shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);\n return shouldSendValue(this.platform, this.platformOptions, null, shouldSend, globalRateLimit, globalRateLimitPerMin, perMinute);\n};\n\nRateLimiter.prototype.setPlatformOptions = function(platform, options) {\n this.platform = platform;\n this.platformOptions = options;\n};\n\n/* Helpers */\n\nfunction checkRate(item, limit, counter) {\n return !item.ignoreRateLimit && limit >= 1 && counter > limit;\n}\n\nfunction shouldSendValue(platform, options, error, shouldSend, globalRateLimit, limitPerMin, perMinute) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute);\n }\n return {error: error, shouldSend: shouldSend, payload: payload};\n}\n\nfunction rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute) {\n var environment = options.environment || (options.payload && options.payload.environment);\n var msg;\n if (perMinute) {\n msg = 'item per minute limit reached, ignoring errors until timeout';\n } else {\n msg = 'maxItems has been hit, ignoring errors until reset.';\n }\n var item = {\n body: {\n message: {\n body: msg,\n extra: {\n maxItems: globalRateLimit,\n itemsPerMinute: limitPerMin\n }\n }\n },\n language: 'javascript',\n environment: environment,\n notifier: {\n version: (options.notifier && options.notifier.version) || options.version\n }\n };\n if (platform === 'browser') {\n item.platform = 'browser';\n item.framework = 'browser-js';\n item.notifier.name = 'rollbar-browser-js';\n } else if (platform === 'server') {\n item.framework = options.framework || 'node-js';\n item.notifier.name = options.notifier.name;\n } else if (platform === 'react-native') {\n item.framework = options.framework || 'react-native';\n item.notifier.name = options.notifier.name;\n }\n return item;\n}\n\nmodule.exports = RateLimiter;\n","'use strict';\n\n'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isPlainObject = function isPlainObject(obj) {\n\tif (!obj || toStr.call(obj) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tvar hasOwnConstructor = hasOwn.call(obj, 'constructor');\n\tvar hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n\t// Not own constructor property must be Object\n\tif (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n\t\treturn false;\n\t}\n\n\t// Own properties are enumerated firstly, so to speed up,\n\t// if last one is own, then all properties are own.\n\tvar key;\n\tfor (key in obj) {/**/}\n\n\treturn typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\nfunction merge() {\n var i, src, copy, clone, name,\n result = {},\n current = null,\n length = arguments.length;\n\n for (i=0; i < length; i++) {\n current = arguments[i];\n if (current == null) {\n continue;\n }\n\n for (name in current) {\n src = result[name];\n copy = current[name];\n if (result !== copy) {\n if (copy && isPlainObject(copy)) {\n clone = src && isPlainObject(src) ? src : {};\n result[name] = merge(clone, copy);\n } else if (typeof copy !== 'undefined') {\n result[name] = copy;\n }\n }\n }\n }\n return result;\n}\n\nmodule.exports = merge;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Queue - an object which handles which handles a queue of items to be sent to Rollbar.\n * This object handles rate limiting via a passed in rate limiter, retries based on connection\n * errors, and filtering of items based on a set of configurable predicates. The communication to\n * the backend is performed via a given API object.\n *\n * @param rateLimiter - An object which conforms to the interface\n * rateLimiter.shouldSend(item) -> bool\n * @param api - An object which conforms to the interface\n * api.postItem(payload, function(err, response))\n * @param logger - An object used to log verbose messages if desired\n * @param options - see Queue.prototype.configure\n */\nfunction Queue(rateLimiter, api, logger, options) {\n this.rateLimiter = rateLimiter;\n this.api = api;\n this.logger = logger;\n this.options = options;\n this.predicates = [];\n this.pendingItems = [];\n this.pendingRequests = [];\n this.retryQueue = [];\n this.retryHandle = null;\n this.waitCallback = null;\n this.waitIntervalID = null;\n}\n\n/*\n * configure - updates the options this queue uses\n *\n * @param options\n */\nQueue.prototype.configure = function(options) {\n this.api && this.api.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addPredicate - adds a predicate to the end of the list of predicates for this queue\n *\n * @param predicate - function(item, options) -> (bool|{err: Error})\n * Returning true means that this predicate passes and the item is okay to go on the queue\n * Returning false means do not add the item to the queue, but it is not an error\n * Returning {err: Error} means do not add the item to the queue, and the given error explains why\n * Returning {err: undefined} is equivalent to returning true but don't do that\n */\nQueue.prototype.addPredicate = function(predicate) {\n if (_.isFunction(predicate)) {\n this.predicates.push(predicate);\n }\n return this;\n};\n\nQueue.prototype.addPendingItem = function(item) {\n this.pendingItems.push(item);\n};\n\nQueue.prototype.removePendingItem = function(item) {\n var idx = this.pendingItems.indexOf(item);\n if (idx !== -1) {\n this.pendingItems.splice(idx, 1);\n }\n};\n\n/*\n * addItem - Send an item to the Rollbar API if all of the predicates are satisfied\n *\n * @param item - The payload to send to the backend\n * @param callback - function(error, repsonse) which will be called with the response from the API\n * in the case of a success, otherwise response will be null and error will have a value. If both\n * error and response are null then the item was stopped by a predicate which did not consider this\n * to be an error condition, but nonetheless did not send the item to the API.\n * @param originalError - The original error before any transformations that is to be logged if any\n */\nQueue.prototype.addItem = function(item, callback, originalError, originalItem) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() { return; };\n }\n var predicateResult = this._applyPredicates(item);\n if (predicateResult.stop) {\n this.removePendingItem(originalItem);\n callback(predicateResult.err);\n return;\n }\n this._maybeLog(item, originalError);\n this.removePendingItem(originalItem);\n if (!this.options.transmit) {\n callback(new Error('Transmit disabled'));\n return;\n }\n this.pendingRequests.push(item);\n try {\n this._makeApiRequest(item, function(err, resp) {\n this._dequeuePendingRequest(item);\n callback(err, resp);\n }.bind(this));\n } catch (e) {\n this._dequeuePendingRequest(item);\n callback(e);\n }\n};\n\n/*\n * wait - Stop any further errors from being added to the queue, and get called back when all items\n * currently processing have finished sending to the backend.\n *\n * @param callback - function() called when all pending items have been sent\n */\nQueue.prototype.wait = function(callback) {\n if (!_.isFunction(callback)) {\n return;\n }\n this.waitCallback = callback;\n if (this._maybeCallWait()) {\n return;\n }\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitIntervalID = setInterval(function() {\n this._maybeCallWait();\n }.bind(this), 500);\n};\n\n/* _applyPredicates - Sequentially applies the predicates that have been added to the queue to the\n * given item with the currently configured options.\n *\n * @param item - An item in the queue\n * @returns {stop: bool, err: (Error|null)} - stop being true means do not add item to the queue,\n * the error value should be passed up to a callbak if we are stopping.\n */\nQueue.prototype._applyPredicates = function(item) {\n var p = null;\n for (var i = 0, len = this.predicates.length; i < len; i++) {\n p = this.predicates[i](item, this.options);\n if (!p || p.err !== undefined) {\n return {stop: true, err: p.err};\n }\n }\n return {stop: false, err: null};\n};\n\n/*\n * _makeApiRequest - Send an item to Rollbar, callback when done, if there is an error make an\n * effort to retry if we are configured to do so.\n *\n * @param item - an item ready to send to the backend\n * @param callback - function(err, response)\n */\nQueue.prototype._makeApiRequest = function(item, callback) {\n var rateLimitResponse = this.rateLimiter.shouldSend(item);\n if (rateLimitResponse.shouldSend) {\n this.api.postItem(item, function(err, resp) {\n if (err) {\n this._maybeRetry(err, item, callback);\n } else {\n callback(err, resp);\n }\n }.bind(this));\n } else if (rateLimitResponse.error) {\n callback(rateLimitResponse.error);\n } else {\n this.api.postItem(rateLimitResponse.payload, callback);\n }\n};\n\n// These are errors basically mean there is no internet connection\nvar RETRIABLE_ERRORS = ['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED', 'EHOSTUNREACH', 'EPIPE', 'EAI_AGAIN'];\n\n/*\n * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback\n * with the error.\n *\n * @param err - an error returned by the API transport\n * @param item - the item that was trying to be sent when this error occured\n * @param callback - function(err, response)\n */\nQueue.prototype._maybeRetry = function(err, item, callback) {\n var shouldRetry = false;\n if (this.options.retryInterval) {\n for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {\n if (err.code === RETRIABLE_ERRORS[i]) {\n shouldRetry = true;\n break;\n }\n }\n if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {\n item.retries = item.retries ? item.retries + 1 : 1;\n if (item.retries > this.options.maxRetries) {\n shouldRetry = false;\n }\n }\n }\n if (shouldRetry) {\n this._retryApiRequest(item, callback);\n } else {\n callback(err);\n }\n};\n\n/*\n * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process\n * that queue based on the retryInterval in the options for this queue.\n *\n * @param item - an item that failed to send due to an error we deem retriable\n * @param callback - function(err, response)\n */\nQueue.prototype._retryApiRequest = function(item, callback) {\n this.retryQueue.push({item: item, callback: callback});\n\n if (!this.retryHandle) {\n this.retryHandle = setInterval(function() {\n while (this.retryQueue.length) {\n var retryObject = this.retryQueue.shift();\n this._makeApiRequest(retryObject.item, retryObject.callback);\n }\n }.bind(this), this.options.retryInterval);\n }\n};\n\n/*\n * _dequeuePendingRequest - Removes the item from the pending request queue, this queue is used to\n * enable to functionality of providing a callback that clients can pass to `wait` to be notified\n * when the pending request queue has been emptied. This must be called when the API finishes\n * processing this item. If a `wait` callback is configured, it is called by this function.\n *\n * @param item - the item previously added to the pending request queue\n */\nQueue.prototype._dequeuePendingRequest = function(item) {\n var idx = this.pendingRequests.indexOf(item);\n if (idx !== -1) {\n this.pendingRequests.splice(idx, 1);\n this._maybeCallWait();\n }\n};\n\nQueue.prototype._maybeLog = function(data, originalError) {\n if (this.logger && this.options.verbose) {\n var message = originalError;\n message = message || _.get(data, 'body.trace.exception.message');\n message = message || _.get(data, 'body.trace_chain.0.exception.message');\n if (message) {\n this.logger.error(message);\n return;\n }\n message = _.get(data, 'body.message.body');\n if (message) {\n this.logger.log(message);\n }\n }\n};\n\nQueue.prototype._maybeCallWait = function() {\n if (_.isFunction(this.waitCallback) && this.pendingItems.length === 0 && this.pendingRequests.length === 0) {\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitCallback();\n return true;\n }\n return false;\n};\n\nmodule.exports = Queue;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Notifier - the internal object responsible for delegating between the client exposed API, the\n * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the\n * queue which handles the communcation with the Rollbar API servers.\n *\n * @param queue - an object that conforms to the interface: addItem(item, callback)\n * @param options - an object representing the options to be set for this notifier, this should have\n * any defaults already set by the caller\n */\nfunction Notifier(queue, options) {\n this.queue = queue;\n this.options = options;\n this.transforms = [];\n this.diagnostic = {};\n}\n\n/*\n * configure - updates the options for this notifier with the passed in object\n *\n * @param options - an object which gets merged with the current options set on this notifier\n * @returns this\n */\nNotifier.prototype.configure = function(options) {\n this.queue && this.queue.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addTransform - adds a transform onto the end of the queue of transforms for this notifier\n *\n * @param transform - a function which takes three arguments:\n * * item: An Object representing the data to eventually be sent to Rollbar\n * * options: The current value of the options for this notifier\n * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this\n * callback with a null value for error if it wants the processing chain to continue, otherwise\n * with an error to terminate the processing. The item should be the updated item after this\n * transform is finished modifying it.\n */\nNotifier.prototype.addTransform = function(transform) {\n if (_.isFunction(transform)) {\n this.transforms.push(transform);\n }\n return this;\n};\n\n/*\n * log - the internal log function which applies the configured transforms and then pushes onto the\n * queue to be sent to the backend.\n *\n * @param item - An object with the following structure:\n * message [String] - An optional string to be sent to rollbar\n * error [Error] - An optional error\n *\n * @param callback - A function of type function(err, resp) which will be called with exactly one\n * null argument and one non-null argument. The callback will be called once, either during the\n * transform stage if an error occurs inside a transform, or in response to the communication with\n * the backend. The second argument will be the response from the backend in case of success.\n */\nNotifier.prototype.log = function(item, callback) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!this.options.enabled) {\n return callback(new Error('Rollbar is not enabled'));\n }\n\n this.queue.addPendingItem(item);\n var originalError = item.err;\n this._applyTransforms(item, function(err, i) {\n if (err) {\n this.queue.removePendingItem(item);\n return callback(err, null);\n }\n this.queue.addItem(i, callback, originalError, item);\n }.bind(this));\n};\n\n/* Internal */\n\n/*\n * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See\n * `addTransform` for more information.\n *\n * @param item - An item to be transformed\n * @param callback - A function of type function(err, item) which will be called with a non-null\n * error and a null item in the case of a transform failure, or a null error and non-null item after\n * all transforms have been applied.\n */\nNotifier.prototype._applyTransforms = function(item, callback) {\n var transformIndex = -1;\n var transformsLength = this.transforms.length;\n var transforms = this.transforms;\n var options = this.options;\n\n var cb = function(err, i) {\n if (err) {\n callback(err, null);\n return;\n }\n\n transformIndex++;\n\n if (transformIndex === transformsLength) {\n callback(null, i);\n return;\n }\n\n transforms[transformIndex](i, options, cb);\n };\n\n cb(null, item);\n};\n\nmodule.exports = Notifier;\n","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1/item/',\n search: null,\n version: '1',\n protocol: 'https:',\n port: 443\n};\n\n/**\n * Api is an object that encapsulates methods of communicating with\n * the Rollbar API. It is a standard interface with some parts implemented\n * differently for server or browser contexts. It is an object that should\n * be instantiated when used so it can contain non-global options that may\n * be different for another instance of RollbarApi.\n *\n * @param options {\n * accessToken: the accessToken to use for posting items to rollbar\n * endpoint: an alternative endpoint to send errors to\n * must be a valid, fully qualified URL.\n * The default is: https://api.rollbar.com/api/1/item\n * proxy: if you wish to proxy requests provide an object\n * with the following keys:\n * host or hostname (required): foo.example.com\n * port (optional): 123\n * protocol (optional): https\n * }\n */\nfunction Api(options, transport, urllib, truncation, jsonBackup) {\n this.options = options;\n this.transport = transport;\n this.url = urllib;\n this.truncation = truncation;\n this.jsonBackup = jsonBackup;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, urllib);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function(data, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n this.transport.post(this.accessToken, transportOptions, payload, callback);\n};\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.buildJsonPayload = function(data, callback) {\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n\n if (stringifyResult.error) {\n if (callback) {\n callback(stringifyResult.error);\n }\n return null;\n }\n\n return stringifyResult.value;\n};\n\n/**\n *\n * @param jsonPayload\n * @param callback\n */\nApi.prototype.postJsonPayload = function(jsonPayload, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n this.transport.postJsonPayload(this.accessToken, transportOptions, jsonPayload, callback);\n};\n\nApi.prototype.configure = function(options) {\n var oldOptions = this.oldOptions;\n this.options = _.merge(oldOptions, options);\n this.transportOptions = _getTransport(this.options, this.url);\n if (this.options.accessToken !== undefined) {\n this.accessToken = this.options.accessToken;\n }\n return this;\n};\n\nfunction _getTransport(options, url) {\n return helpers.getTransportFromOptions(options, defaultOptions, url);\n}\n\nmodule.exports = Api;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (!_.isType(data.context, 'string')) {\n var contextResult = _.stringify(data.context, jsonBackup);\n if (contextResult.error) {\n data.context = 'Error: could not serialize \\'context\\'';\n } else {\n data.context = contextResult.value || '';\n }\n if (data.context.length > 255) {\n data.context = data.context.substr(0, 255);\n }\n }\n return {\n access_token: accessToken,\n data: data\n };\n}\n\nfunction getTransportFromOptions(options, defaults, url) {\n var hostname = defaults.hostname;\n var protocol = defaults.protocol;\n var port = defaults.port;\n var path = defaults.path;\n var search = defaults.search;\n var timeout = options.timeout;\n\n var proxy = options.proxy;\n if (options.endpoint) {\n var opts = url.parse(options.endpoint);\n hostname = opts.hostname;\n protocol = opts.protocol;\n port = opts.port;\n path = opts.pathname;\n search = opts.search;\n }\n return {\n timeout: timeout,\n hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy\n };\n}\n\nfunction transportOptions(transport, method) {\n var protocol = transport.protocol || 'https:';\n var port = transport.port || (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);\n var hostname = transport.hostname;\n var path = transport.path;\n var timeout = transport.timeout;\n if (transport.search) {\n path = path + transport.search;\n }\n if (transport.proxy) {\n path = protocol + '//' + hostname + path;\n hostname = transport.proxy.host || transport.proxy.hostname;\n port = transport.proxy.port;\n protocol = transport.proxy.protocol || protocol;\n }\n return {\n timeout: timeout,\n protocol: protocol,\n hostname: hostname,\n path: path,\n port: port,\n method: method\n };\n}\n\nfunction appendPathToPath(base, path) {\n var baseTrailingSlash = /\\/$/.test(base);\n var pathBeginningSlash = /^\\//.test(path);\n\n if (baseTrailingSlash && pathBeginningSlash) {\n path = path.substring(1);\n } else if (!baseTrailingSlash && !pathBeginningSlash) {\n path = '/' + path;\n }\n\n return base + path;\n}\n\nmodule.exports = {\n buildPayload: buildPayload,\n getTransportFromOptions: getTransportFromOptions,\n transportOptions: transportOptions,\n appendPathToPath: appendPathToPath\n};\n","// Console-polyfill. MIT license.\n// https://github.com/paulmillr/console-polyfill\n// Make it safe to do console.log() always.\n(function(global) {\n 'use strict';\n if (!global.console) {\n global.console = {};\n }\n var con = global.console;\n var prop, method;\n var dummy = function() {};\n var properties = ['memory'];\n var methods = ('assert,clear,count,debug,dir,dirxml,error,exception,group,' +\n 'groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,' +\n 'show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn').split(',');\n while (prop = properties.pop()) if (!con[prop]) con[prop] = {};\n while (method = methods.pop()) if (!con[method]) con[method] = dummy;\n // Using `this` for web workers & supports Browserify / Webpack.\n})(typeof window === 'undefined' ? this : window);\n","'use strict';\n\n// This detection.js module is used to encapsulate any ugly browser/feature\n// detection we may need to do.\n\n// Figure out which version of IE we're using, if any.\n// This is gleaned from http://stackoverflow.com/questions/5574842/best-way-to-check-for-ie-less-than-9-in-javascript-without-library\n// Will return an integer on IE (i.e. 8)\n// Will return undefined otherwise\nfunction getIEVersion() {\n\tvar undef;\n\tif (typeof document === 'undefined') {\n\t\treturn undef;\n\t}\n\n var v = 3,\n div = document.createElement('div'),\n all = div.getElementsByTagName('i');\n\n while (\n div.innerHTML = '',\n all[0]\n );\n\n return v > 4 ? v : undef;\n}\n\nvar Detection = {\n ieVersion: getIEVersion\n};\n\nmodule.exports = Detection;\n","'use strict';\n\nfunction captureUncaughtExceptions(window, handler, shim) {\n if (!window) { return; }\n var oldOnError;\n\n if (typeof handler._rollbarOldOnError === 'function') {\n oldOnError = handler._rollbarOldOnError;\n } else if (window.onerror) {\n oldOnError = window.onerror;\n while (oldOnError._rollbarOldOnError) {\n oldOnError = oldOnError._rollbarOldOnError;\n }\n handler._rollbarOldOnError = oldOnError;\n }\n\n handler.handleAnonymousErrors();\n\n var fn = function() {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n if (shim) {\n fn._rollbarOldOnError = oldOnError;\n }\n window.onerror = fn;\n}\n\nfunction _rollbarWindowOnError(window, r, old, args) {\n if (window._rollbarWrappedError) {\n if (!args[4]) {\n args[4] = window._rollbarWrappedError;\n }\n if (!args[5]) {\n args[5] = window._rollbarWrappedError._rollbarContext;\n }\n window._rollbarWrappedError = null;\n }\n\n var ret = r.handleUncaughtException.apply(r, args);\n\n if (old) {\n old.apply(window, args);\n }\n\n // Let other chained onerror handlers above run before setting this.\n // If an error is thrown and caught within a chained onerror handler,\n // Error.prepareStackTrace() will see that one before the one we want.\n if (ret === 'anonymous') {\n r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()\n }\n}\n\nfunction captureUnhandledRejections(window, handler, shim) {\n if (!window) { return; }\n\n if (typeof window._rollbarURH === 'function' && window._rollbarURH.belongsToShim) {\n window.removeEventListener('unhandledrejection', window._rollbarURH);\n }\n\n var rejectionHandler = function (evt) {\n var reason, promise, detail;\n try {\n reason = evt.reason;\n } catch (e) {\n reason = undefined;\n }\n try {\n promise = evt.promise;\n } catch (e) {\n promise = '[unhandledrejection] error getting `promise` from event';\n }\n try {\n detail = evt.detail;\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\n }\n } catch (e) {\n // Ignore\n }\n if (!reason) {\n reason = '[unhandledrejection] error getting `reason` from event';\n }\n\n if (handler && handler.handleUnhandledRejection) {\n handler.handleUnhandledRejection(reason, promise);\n }\n };\n rejectionHandler.belongsToShim = shim;\n window._rollbarURH = rejectionHandler;\n window.addEventListener('unhandledrejection', rejectionHandler);\n}\n\n\nmodule.exports = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections\n};\n","'use strict';\n\n/*global XDomainRequest*/\n\nvar _ = require('../utility');\nvar logger = require('./logger');\n\n/*\n * accessToken may be embedded in payload but that should not\n * be assumed\n *\n * options: {\n * hostname\n * protocol\n * path\n * port\n * method\n * }\n *\n * params is an object containing key/value pairs. These\n * will be appended to the path as 'key=value&key=value'\n *\n * payload is an unserialized object\n */\nfunction Transport(truncation) {\n this.truncation = truncation;\n}\n\nTransport.prototype.get = function(accessToken, options, params, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n _.addParamsAndAccessTokenToPath(accessToken, options, params);\n\n var method = 'GET';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, null, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.post = function(accessToken, options, payload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!payload) {\n return callback(new Error('Cannot send empty request'));\n }\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n if (stringifyResult.error) {\n return callback(stringifyResult.error);\n }\n\n var writeData = stringifyResult.value;\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, writeData, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.postJsonPayload = function (accessToken, options, jsonPayload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, jsonPayload, callback, requestFactory, options.timeout);\n}\n\n\n// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope\n// so Angular change detection isn't triggered on each API call.\n// This is the equivalent of runOutsideAngular().\n//\nfunction _makeZoneRequest() {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;\n var args = Array.prototype.slice.call(arguments);\n\n if (currentZone && currentZone._name === 'angular') {\n var rootZone = currentZone._parent;\n rootZone.run(function () {\n _makeRequest.apply(undefined, args);\n });\n } else {\n _makeRequest.apply(undefined, args);\n }\n}\n\n/* global RollbarProxy */\nfunction _proxyRequest(json, callback) {\n var rollbarProxy = new RollbarProxy();\n rollbarProxy.sendJsonPayload(\n json,\n function(_msg) { /* do nothing */ }, // eslint-disable-line no-unused-vars\n function(err) {\n callback(new Error(err));\n }\n );\n}\n\nfunction _makeRequest(accessToken, url, method, data, callback, requestFactory, timeout) {\n if (typeof RollbarProxy !== 'undefined') {\n return _proxyRequest(data, callback);\n }\n\n var request;\n if (requestFactory) {\n request = requestFactory();\n } else {\n request = _createXMLHTTPObject();\n }\n if (!request) {\n // Give up, no way to send requests\n return callback(new Error('No way to send a request'));\n }\n try {\n try {\n var onreadystatechange = function() {\n try {\n if (onreadystatechange && request.readyState === 4) {\n onreadystatechange = undefined;\n\n var parseResponse = _.jsonParse(request.responseText);\n if (_isSuccess(request)) {\n callback(parseResponse.error, parseResponse.value);\n return;\n } else if (_isNormalFailure(request)) {\n if (request.status === 403) {\n // likely caused by using a server access token\n var message = parseResponse.value && parseResponse.value.message;\n logger.error(message);\n }\n // return valid http status codes\n callback(new Error(String(request.status)));\n } else {\n // IE will return a status 12000+ on some sort of connection failure,\n // so we return a blank error\n // http://msdn.microsoft.com/en-us/library/aa383770%28VS.85%29.aspx\n var msg = 'XHR response had no status code (likely connection failure)';\n callback(_newRetriableError(msg));\n }\n }\n } catch (ex) {\n //jquery source mentions firefox may error out while accessing the\n //request members if there is a network error\n //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111\n var exc;\n if (ex && ex.stack) {\n exc = ex;\n } else {\n exc = new Error(ex);\n }\n callback(exc);\n }\n };\n\n request.open(method, url, true);\n if (request.setRequestHeader) {\n request.setRequestHeader('Content-Type', 'application/json');\n request.setRequestHeader('X-Rollbar-Access-Token', accessToken);\n }\n\n if(_.isFiniteNumber(timeout)) {\n request.timeout = timeout;\n }\n\n request.onreadystatechange = onreadystatechange;\n request.send(data);\n } catch (e1) {\n // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest\n if (typeof XDomainRequest !== 'undefined') {\n\n // Assume we are in a really old browser which has a bunch of limitations:\n // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx\n\n // Extreme paranoia: if we have XDomainRequest then we have a window, but just in case\n if (!window || !window.location) {\n return callback(new Error('No window available during request, unknown environment'));\n }\n\n // If the current page is http, try and send over http\n if (window.location.href.substring(0, 5) === 'http:' && url.substring(0, 5) === 'https') {\n url = 'http' + url.substring(5);\n }\n\n var xdomainrequest = new XDomainRequest();\n xdomainrequest.onprogress = function() {};\n xdomainrequest.ontimeout = function() {\n var msg = 'Request timed out';\n var code = 'ETIMEDOUT';\n callback(_newRetriableError(msg, code));\n };\n xdomainrequest.onerror = function() {\n callback(new Error('Error during request'));\n };\n xdomainrequest.onload = function() {\n var parseResponse = _.jsonParse(xdomainrequest.responseText);\n callback(parseResponse.error, parseResponse.value);\n };\n xdomainrequest.open(method, url, true);\n xdomainrequest.send(data);\n } else {\n callback(new Error('Cannot find a method to transport a request'));\n }\n }\n } catch (e2) {\n callback(e2);\n }\n}\n\nfunction _createXMLHTTPObject() {\n /* global ActiveXObject:false */\n\n var factories = [\n function () {\n return new XMLHttpRequest();\n },\n function () {\n return new ActiveXObject('Msxml2.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Msxml3.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Microsoft.XMLHTTP');\n }\n ];\n var xmlhttp;\n var i;\n var numFactories = factories.length;\n for (i = 0; i < numFactories; i++) {\n /* eslint-disable no-empty */\n try {\n xmlhttp = factories[i]();\n break;\n } catch (e) {\n // pass\n }\n /* eslint-enable no-empty */\n }\n return xmlhttp;\n}\n\nfunction _isSuccess(r) {\n return r && r.status && r.status === 200;\n}\n\nfunction _isNormalFailure(r) {\n return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;\n}\n\nfunction _newRetriableError(message, code) {\n var err = new Error(message);\n err.code = code || 'ENOTFOUND';\n return err;\n}\n\nmodule.exports = Transport;\n","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('../errorParser');\nvar logger = require('./logger');\n\nfunction handleDomException(item, options, callback) {\n if(item.err && errorParser.Stack(item.err).name === 'DOMException') {\n var originalError = new Error();\n originalError.name = item.err.name;\n originalError.message = item.err.message;\n originalError.stack = item.err.stack;\n originalError.nested = item.err;\n item.err = originalError;\n }\n callback(null, item);\n}\n\nfunction handleItemWithError(item, options, callback) {\n item.data = item.data || {};\n if (item.err) {\n try {\n item.stackInfo = item.err._savedStackTrace || errorParser.parse(item.err, item.skipFrames);\n\n if (options.addErrorContext) {\n addErrorContext(item);\n }\n } catch (e) {\n logger.error('Error while parsing the error object.', e);\n try {\n item.message = item.err.message || item.err.description || item.message || String(item.err);\n } catch (e2) {\n item.message = String(item.err) || String(e2);\n }\n delete item.err;\n }\n }\n callback(null, item);\n}\n\nfunction addErrorContext(item) {\n var chain = [];\n var err = item.err;\n\n chain.push(err);\n\n while (err.nested) {\n err = err.nested;\n chain.push(err);\n }\n\n _.addErrorContext(item, chain);\n}\n\nfunction ensureItemHasSomethingToSay(item, options, callback) {\n if (!item.message && !item.stackInfo && !item.custom) {\n callback(new Error('No message, stack info, or custom data'), null);\n }\n callback(null, item);\n}\n\nfunction addBaseInfo(item, options, callback) {\n var environment = (options.payload && options.payload.environment) || options.environment;\n item.data = _.merge(item.data, {\n environment: environment,\n level: item.level,\n endpoint: options.endpoint,\n platform: 'browser',\n framework: 'browser-js',\n language: 'javascript',\n server: {},\n uuid: item.uuid,\n notifier: {\n name: 'rollbar-browser-js',\n version: options.version\n },\n custom: item.custom\n });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.location) {\n return callback(null, item);\n }\n var remoteString = '$remote_ip';\n if (!options.captureIp) {\n remoteString = null;\n } else if (options.captureIp !== true) {\n remoteString += '_anonymize';\n }\n _.set(item, 'data.request', {\n url: window.location.href,\n query_string: window.location.search,\n user_ip: remoteString\n });\n callback(null, item);\n };\n}\n\nfunction addClientInfo(window) {\n return function(item, options, callback) {\n if (!window) {\n return callback(null, item);\n }\n var nav = window.navigator || {};\n var scr = window.screen || {};\n _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: nav.userAgent,\n language: nav.language,\n cookie_enabled: nav.cookieEnabled,\n screen: {\n width: scr.width,\n height: scr.height\n }\n }\n });\n callback(null, item);\n };\n}\n\nfunction addPluginInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.navigator) {\n return callback(null, item);\n }\n var plugins = [];\n var navPlugins = window.navigator.plugins || [];\n var cur;\n for (var i=0, l=navPlugins.length; i < l; ++i) {\n cur = navPlugins[i];\n plugins.push({name: cur.name, description: cur.description});\n }\n _.set(item, 'data.client.javascript.plugins', plugins);\n callback(null, item);\n };\n}\n\nfunction addBody(item, options, callback) {\n if (item.stackInfo) {\n if (item.stackInfo.traceChain) {\n addBodyTraceChain(item, options, callback);\n } else {\n addBodyTrace(item, options, callback);\n }\n } else {\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction addBodyMessage(item, options, callback) {\n var message = item.message;\n var custom = item.custom;\n\n if (!message) {\n message = 'Item sent with null or missing arguments.';\n }\n var result = {\n body: message\n };\n\n if (custom) {\n result.extra = _.merge(custom);\n }\n\n _.set(item, 'data.body', {message: result});\n callback(null, item);\n}\n\nfunction stackFromItem(item) {\n // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = item.stackInfo.stack;\n if (stack && stack.length === 0 && item._unhandledStackInfo && item._unhandledStackInfo.stack) {\n stack = item._unhandledStackInfo.stack;\n }\n return stack;\n}\n\nfunction addBodyTraceChain(item, options, callback) {\n var traceChain = item.stackInfo.traceChain;\n var traces = [];\n\n var traceChainLength = traceChain.length;\n for (var i = 0; i < traceChainLength; i++) {\n var trace = buildTrace(item, traceChain[i], options);\n traces.push(trace);\n }\n\n _.set(item, 'data.body', {trace_chain: traces});\n callback(null, item);\n}\n\nfunction addBodyTrace(item, options, callback) {\n var stack = stackFromItem(item);\n\n if (stack) {\n var trace = buildTrace(item, item.stackInfo, options);\n _.set(item, 'data.body', {trace: trace});\n callback(null, item);\n } else {\n var stackInfo = item.stackInfo;\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction buildTrace(item, stackInfo, options) {\n var description = item && item.data.description;\n var custom = item && item.custom;\n var stack = stackFromItem(item);\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n var trace = {\n exception: {\n 'class': className,\n message: message\n }\n };\n\n if (description) {\n trace.exception.description = description;\n }\n\n if (stack) {\n if (stack.length === 0) {\n trace.exception.stack = stackInfo.rawStack;\n trace.exception.raw = String(stackInfo.rawException);\n }\n var stackFrame;\n var frame;\n var code;\n var pre;\n var post;\n var contextLength;\n var i, mid;\n\n trace.frames = [];\n for (i = 0; i < stack.length; ++i) {\n stackFrame = stack[i];\n frame = {\n filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',\n lineno: stackFrame.line || null,\n method: (!stackFrame.func || stackFrame.func === '?') ? '[anonymous]' : stackFrame.func,\n colno: stackFrame.column\n };\n if (options.sendFrameUrl) {\n frame.url = stackFrame.url;\n }\n if (frame.method && frame.method.endsWith && frame.method.endsWith('_rollbar_wrapped')) {\n continue;\n }\n\n code = pre = post = null;\n contextLength = stackFrame.context ? stackFrame.context.length : 0;\n if (contextLength) {\n mid = Math.floor(contextLength / 2);\n pre = stackFrame.context.slice(0, mid);\n code = stackFrame.context[mid];\n post = stackFrame.context.slice(mid);\n }\n\n if (code) {\n frame.code = code;\n }\n\n if (pre || post) {\n frame.context = {};\n if (pre && pre.length) {\n frame.context.pre = pre;\n }\n if (post && post.length) {\n frame.context.post = post;\n }\n }\n\n if (stackFrame.args) {\n frame.args = stackFrame.args;\n }\n\n trace.frames.push(frame);\n }\n\n // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last\n trace.frames.reverse();\n\n if (custom) {\n trace.extra = _.merge(custom);\n }\n }\n\n return trace;\n}\n\nfunction errorClass(stackInfo, guess, options) {\n if (stackInfo.name) {\n return stackInfo.name;\n } else if (options.guessErrorClass) {\n return guess;\n } else {\n return '(unknown)';\n }\n}\n\nfunction addScrubber(scrubFn) {\n return function (item, options, callback) {\n if (scrubFn) {\n var scrubFields = options.scrubFields || [];\n var scrubPaths = options.scrubPaths || [];\n item.data = scrubFn(item.data, scrubFields, scrubPaths);\n }\n callback(null, item);\n }\n}\n\nmodule.exports = {\n handleDomException: handleDomException,\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n addScrubber: addScrubber\n};\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('error-stack-parser', ['stackframe'], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory(require('stackframe'));\n } else {\n root.ErrorStackParser = factory(root.StackFrame);\n }\n}(this, function ErrorStackParser(StackFrame) {\n 'use strict';\n\n var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\\S+:\\d+/;\n var CHROME_IE_STACK_REGEXP = /^\\s*at .*(\\S+:\\d+|\\(native\\))/m;\n var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\\[native code])?$/;\n\n return {\n /**\n * Given an Error object, extract the most information from it.\n *\n * @param {Error} error object\n * @return {Array} of StackFrames\n */\n parse: function ErrorStackParser$$parse(error) {\n if (typeof error.stacktrace !== 'undefined' || typeof error['opera#sourceloc'] !== 'undefined') {\n return this.parseOpera(error);\n } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {\n return this.parseV8OrIE(error);\n } else if (error.stack) {\n return this.parseFFOrSafari(error);\n } else {\n throw new Error('Cannot parse given Error object');\n }\n },\n\n // Separate line and column numbers from a string of the form: (URI:Line:Column)\n extractLocation: function ErrorStackParser$$extractLocation(urlLike) {\n // Fail-fast but return locations like \"(native)\"\n if (urlLike.indexOf(':') === -1) {\n return [urlLike];\n }\n\n var regExp = /(.+?)(?::(\\d+))?(?::(\\d+))?$/;\n var parts = regExp.exec(urlLike.replace(/[()]/g, ''));\n return [parts[1], parts[2] || undefined, parts[3] || undefined];\n },\n\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(CHROME_IE_STACK_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n if (line.indexOf('(eval ') > -1) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n line = line.replace(/eval code/g, 'eval').replace(/(\\(eval at [^()]*)|(\\),.*$)/g, '');\n }\n var sanitizedLine = line.replace(/^\\s+/, '').replace(/\\(eval code/g, '(');\n\n // capture and preseve the parenthesized location \"(/foo/my bar.js:12:87)\" in\n // case it has spaces in it, as the string is split on \\s+ later on\n var location = sanitizedLine.match(/ (\\((.+):(\\d+):(\\d+)\\)$)/);\n\n // remove the parenthesized location from the line, if it was matched\n sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;\n\n var tokens = sanitizedLine.split(/\\s+/).slice(1);\n // if a location was matched, pass it to extractLocation() otherwise pop the last token\n var locationParts = this.extractLocation(location ? location[1] : tokens.pop());\n var functionName = tokens.join(' ') || undefined;\n var fileName = ['eval', ''].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];\n\n return new StackFrame({\n functionName: functionName,\n fileName: fileName,\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n },\n\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n if (line.indexOf(' > eval') > -1) {\n line = line.replace(/ line (\\d+)(?: > eval line \\d+)* > eval:\\d+:\\d+/g, ':$1');\n }\n\n if (line.indexOf('@') === -1 && line.indexOf(':') === -1) {\n // Safari eval frames only have function names and nothing else\n return new StackFrame({\n functionName: line\n });\n } else {\n var functionNameRegex = /((.*\".+\"[^@]*)?[^@]*)(?:@)/;\n var matches = line.match(functionNameRegex);\n var functionName = matches && matches[1] ? matches[1] : undefined;\n var locationParts = this.extractLocation(line.replace(functionNameRegex, ''));\n\n return new StackFrame({\n functionName: functionName,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }\n }, this);\n },\n\n parseOpera: function ErrorStackParser$$parseOpera(e) {\n if (!e.stacktrace || (e.message.indexOf('\\n') > -1 &&\n e.message.split('\\n').length > e.stacktrace.split('\\n').length)) {\n return this.parseOpera9(e);\n } else if (!e.stack) {\n return this.parseOpera10(e);\n } else {\n return this.parseOpera11(e);\n }\n },\n\n parseOpera9: function ErrorStackParser$$parseOpera9(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)/i;\n var lines = e.message.split('\\n');\n var result = [];\n\n for (var i = 2, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(new StackFrame({\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n }));\n }\n }\n\n return result;\n },\n\n parseOpera10: function ErrorStackParser$$parseOpera10(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)(?:: In function (\\S+))?$/i;\n var lines = e.stacktrace.split('\\n');\n var result = [];\n\n for (var i = 0, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(\n new StackFrame({\n functionName: match[3] || undefined,\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n })\n );\n }\n }\n\n return result;\n },\n\n // Opera 10.65+ Error.stack very similar to FF/Safari\n parseOpera11: function ErrorStackParser$$parseOpera11(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);\n }, this);\n\n return filtered.map(function(line) {\n var tokens = line.split('@');\n var locationParts = this.extractLocation(tokens.pop());\n var functionCall = (tokens.shift() || '');\n var functionName = functionCall\n .replace(//, '$2')\n .replace(/\\([^)]*\\)/g, '') || undefined;\n var argsRaw;\n if (functionCall.match(/\\(([^)]*)\\)/)) {\n argsRaw = functionCall.replace(/^[^(]+\\(([^)]*)\\)$/, '$1');\n }\n var args = (argsRaw === undefined || argsRaw === '[arguments not available]') ?\n undefined : argsRaw.split(',');\n\n return new StackFrame({\n functionName: functionName,\n args: args,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n }\n };\n}));\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('stackframe', [], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.StackFrame = factory();\n }\n}(this, function() {\n 'use strict';\n function _isNumber(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n }\n\n function _capitalize(str) {\n return str.charAt(0).toUpperCase() + str.substring(1);\n }\n\n function _getter(p) {\n return function() {\n return this[p];\n };\n }\n\n var booleanProps = ['isConstructor', 'isEval', 'isNative', 'isToplevel'];\n var numericProps = ['columnNumber', 'lineNumber'];\n var stringProps = ['fileName', 'functionName', 'source'];\n var arrayProps = ['args'];\n var objectProps = ['evalOrigin'];\n\n var props = booleanProps.concat(numericProps, stringProps, arrayProps, objectProps);\n\n function StackFrame(obj) {\n if (!obj) return;\n for (var i = 0; i < props.length; i++) {\n if (obj[props[i]] !== undefined) {\n this['set' + _capitalize(props[i])](obj[props[i]]);\n }\n }\n }\n\n StackFrame.prototype = {\n getArgs: function() {\n return this.args;\n },\n setArgs: function(v) {\n if (Object.prototype.toString.call(v) !== '[object Array]') {\n throw new TypeError('Args must be an Array');\n }\n this.args = v;\n },\n\n getEvalOrigin: function() {\n return this.evalOrigin;\n },\n setEvalOrigin: function(v) {\n if (v instanceof StackFrame) {\n this.evalOrigin = v;\n } else if (v instanceof Object) {\n this.evalOrigin = new StackFrame(v);\n } else {\n throw new TypeError('Eval Origin must be an Object or StackFrame');\n }\n },\n\n toString: function() {\n var fileName = this.getFileName() || '';\n var lineNumber = this.getLineNumber() || '';\n var columnNumber = this.getColumnNumber() || '';\n var functionName = this.getFunctionName() || '';\n if (this.getIsEval()) {\n if (fileName) {\n return '[eval] (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return '[eval]:' + lineNumber + ':' + columnNumber;\n }\n if (functionName) {\n return functionName + ' (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return fileName + ':' + lineNumber + ':' + columnNumber;\n }\n };\n\n StackFrame.fromString = function StackFrame$$fromString(str) {\n var argsStartIndex = str.indexOf('(');\n var argsEndIndex = str.lastIndexOf(')');\n\n var functionName = str.substring(0, argsStartIndex);\n var args = str.substring(argsStartIndex + 1, argsEndIndex).split(',');\n var locationString = str.substring(argsEndIndex + 1);\n\n if (locationString.indexOf('@') === 0) {\n var parts = /@(.+?)(?::(\\d+))?(?::(\\d+))?$/.exec(locationString, '');\n var fileName = parts[1];\n var lineNumber = parts[2];\n var columnNumber = parts[3];\n }\n\n return new StackFrame({\n functionName: functionName,\n args: args || undefined,\n fileName: fileName,\n lineNumber: lineNumber || undefined,\n columnNumber: columnNumber || undefined\n });\n };\n\n for (var i = 0; i < booleanProps.length; i++) {\n StackFrame.prototype['get' + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);\n StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function(p) {\n return function(v) {\n this[p] = Boolean(v);\n };\n })(booleanProps[i]);\n }\n\n for (var j = 0; j < numericProps.length; j++) {\n StackFrame.prototype['get' + _capitalize(numericProps[j])] = _getter(numericProps[j]);\n StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function(p) {\n return function(v) {\n if (!_isNumber(v)) {\n throw new TypeError(p + ' must be a Number');\n }\n this[p] = Number(v);\n };\n })(numericProps[j]);\n }\n\n for (var k = 0; k < stringProps.length; k++) {\n StackFrame.prototype['get' + _capitalize(stringProps[k])] = _getter(stringProps[k]);\n StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function(p) {\n return function(v) {\n this[p] = String(v);\n };\n })(stringProps[k]);\n }\n\n return StackFrame;\n}));\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction itemToPayload(item, options, callback) {\n var payloadOptions = options.payload || {};\n if (payloadOptions.body) {\n delete payloadOptions.body;\n }\n\n var data = _.merge(item.data, payloadOptions);\n if (item._isUncaught) {\n data._isUncaught = true;\n }\n if (item._originalArgs) {\n data._originalArgs = item._originalArgs;\n }\n callback(null, data);\n}\n\nfunction addTelemetryData(item, options, callback) {\n if (item.telemetryEvents) {\n _.set(item, 'data.body.telemetry', item.telemetryEvents);\n }\n callback(null, item);\n}\n\nfunction addMessageWithError(item, options, callback) {\n if (!item.message) {\n callback(null, item);\n return;\n }\n var tracePath = 'data.body.trace_chain.0';\n var trace = _.get(item, tracePath);\n if (!trace) {\n tracePath = 'data.body.trace';\n trace = _.get(item, tracePath);\n }\n if (trace) {\n if (!(trace.exception && trace.exception.description)) {\n _.set(item, tracePath+'.exception.description', item.message);\n callback(null, item);\n return;\n }\n var extra = _.get(item, tracePath+'.extra') || {};\n var newExtra = _.merge(extra, {message: item.message});\n _.set(item, tracePath+'.extra', newExtra);\n }\n callback(null, item);\n}\n\nfunction userTransform(logger) {\n return function(item, options, callback) {\n var newItem = _.merge(item);\n var response = null;\n try {\n if (_.isFunction(options.transform)) {\n response = options.transform(newItem.data, item);\n }\n } catch (e) {\n options.transform = null;\n logger.error('Error while calling custom transform() function. Removing custom transform().', e);\n callback(null, item);\n return;\n }\n if(_.isPromise(response)) {\n response.then(function (promisedItem) {\n if(promisedItem) {\n newItem.data = promisedItem;\n }\n callback(null, newItem);\n }, function (error) {\n callback(error, item);\n });\n } else {\n callback(null, newItem);\n }\n }\n}\n\nfunction addConfigToPayload(item, options, callback) {\n if (!options.sendConfig) {\n return callback(null, item);\n }\n var configKey = '_rollbarConfig';\n var custom = _.get(item, 'data.custom') || {};\n custom[configKey] = options;\n item.data.custom = custom;\n callback(null, item);\n}\n\nfunction addFunctionOption(options, name) {\n if(_.isFunction(options[name])) {\n options[name] = options[name].toString();\n }\n}\n\nfunction addConfiguredOptions(item, options, callback) {\n var configuredOptions = options._configuredOptions;\n\n // These must be stringified or they'll get dropped during serialization.\n addFunctionOption(configuredOptions, 'transform');\n addFunctionOption(configuredOptions, 'checkIgnore');\n addFunctionOption(configuredOptions, 'onSendCallback');\n\n delete configuredOptions.accessToken;\n item.data.notifier.configured_options = configuredOptions;\n callback(null, item);\n}\n\nfunction addDiagnosticKeys(item, options, callback) {\n var diagnostic = _.merge(item.notifier.client.notifier.diagnostic, item.diagnostic);\n\n if (_.get(item, 'err._isAnonymous')) {\n diagnostic.is_anonymous = true;\n }\n\n if (item._isUncaught) {\n diagnostic.is_uncaught = item._isUncaught;\n }\n\n if (item.err) {\n try {\n diagnostic.raw_error = {\n message: item.err.message,\n name: item.err.name,\n constructor_name: item.err.constructor && item.err.constructor.name,\n filename: item.err.fileName,\n line: item.err.lineNumber,\n column: item.err.columnNumber,\n stack: item.err.stack\n };\n } catch (e) {\n diagnostic.raw_error = { failed: String(e) };\n }\n }\n\n item.data.notifier.diagnostic = _.merge(item.data.notifier.diagnostic, diagnostic);\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError,\n userTransform: userTransform,\n addConfigToPayload: addConfigToPayload,\n addConfiguredOptions: addConfiguredOptions,\n addDiagnosticKeys: addDiagnosticKeys\n};\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction checkIgnore(item, settings) {\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore\n};\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction checkLevel(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = settings.reportLevel;\n var reportLevelVal = _.LEVELS[reportLevel] || 0;\n\n if (levelVal < reportLevelVal) {\n return false;\n }\n return true;\n}\n\nfunction userCheckIgnore(logger) {\n return function(item, settings) {\n var isUncaught = !!item._isUncaught;\n delete item._isUncaught;\n var args = item._originalArgs;\n delete item._originalArgs;\n try {\n if (_.isFunction(settings.onSendCallback)) {\n settings.onSendCallback(isUncaught, args, item);\n }\n } catch (e) {\n settings.onSendCallback = null;\n logger.error('Error while calling onSendCallback, removing', e);\n }\n try {\n if (_.isFunction(settings.checkIgnore) && settings.checkIgnore(isUncaught, args, item)) {\n return false;\n }\n } catch (e) {\n settings.checkIgnore = null;\n logger.error('Error while calling custom checkIgnore(), removing', e);\n }\n return true;\n }\n}\n\nfunction urlIsNotBlockListed(logger) {\n return function(item, settings) {\n return !urlIsOnAList(item, settings, 'blocklist', logger);\n }\n}\n\nfunction urlIsSafeListed(logger) {\n return function(item, settings) {\n return urlIsOnAList(item, settings, 'safelist', logger);\n }\n}\n\nfunction matchFrames(trace, list, block) {\n if (!trace) { return !block }\n\n var frames = trace.frames;\n\n if (!frames || frames.length === 0) { return !block; }\n\n var frame, filename, url, urlRegex;\n var listLength = list.length;\n var frameLength = frames.length;\n for (var i = 0; i < frameLength; i++) {\n frame = frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) { return !block; }\n\n for (var j = 0; j < listLength; j++) {\n url = list[j];\n urlRegex = new RegExp(url);\n\n if (urlRegex.test(filename)) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction urlIsOnAList(item, settings, safeOrBlock, logger) {\n // safelist is the default\n var block = false;\n if (safeOrBlock === 'blocklist') {\n block = true;\n }\n\n var list, traces;\n try {\n list = block ? settings.hostBlockList : settings.hostSafeList;\n traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];\n\n // These two checks are important to come first as they are defaults\n // in case the list is missing or the trace is missing or not well-formed\n if (!list || list.length === 0) {\n return !block;\n }\n if (traces.length === 0 || !traces[0]) {\n return !block;\n }\n\n var tracesLength = traces.length;\n for (var i = 0; i < tracesLength; i++) {\n if(matchFrames(traces[i], list, block)) {\n return true;\n }\n }\n } catch (e)\n /* istanbul ignore next */\n {\n if (block) {\n settings.hostBlockList = null;\n } else {\n settings.hostSafeList = null;\n }\n var listName = block ? 'hostBlockList' : 'hostSafeList';\n logger.error('Error while reading your configuration\\'s ' + listName + ' option. Removing custom ' + listName + '.', e);\n return !block;\n }\n return false;\n}\n\nfunction messageIsIgnored(logger) {\n return function(item, settings) {\n var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n messages = messagesFromItem(item);\n\n if (messages.length === 0){\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n\n for (j = 0; j < messages.length; j++) {\n messageIsIgnored = rIgnoredMessage.test(messages[j]);\n\n if (messageIsIgnored) {\n return false;\n }\n }\n }\n } catch(e)\n /* istanbul ignore next */\n {\n settings.ignoredMessages = null;\n logger.error('Error while reading your configuration\\'s ignoredMessages option. Removing custom ignoredMessages.');\n }\n\n return true;\n }\n}\n\nfunction messagesFromItem(item) {\n var body = item.body;\n var messages = [];\n\n // The payload schema only allows one of trace_chain, message, or trace.\n // However, existing test cases are based on having both trace and message present.\n // So here we preserve the ability to collect strings from any combination of these keys.\n if (body.trace_chain) {\n var traceChain = body.trace_chain;\n for (var i = 0; i < traceChain.length; i++) {\n var trace = traceChain[i];\n messages.push(_.get(trace, 'exception.message'));\n }\n }\n if (body.trace) {\n messages.push(_.get(body, 'trace.exception.message'));\n }\n if (body.message) {\n messages.push(_.get(body, 'message.body'));\n }\n return messages;\n}\n\nmodule.exports = {\n checkLevel: checkLevel,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlockListed: urlIsNotBlockListed,\n urlIsSafeListed: urlIsSafeListed,\n messageIsIgnored: messageIsIgnored\n};\n","'use strict';\n\nmodule.exports = {\n version: '2.24.1',\n endpoint: 'api.rollbar.com/api/1/item/',\n logLevel: 'debug',\n reportLevel: 'debug',\n uncaughtErrorLevel: 'error',\n maxItems: 0,\n itemsPerMin: 60\n}\n","'use strict';\n\nmodule.exports = {\n scrubFields: [\n 'pw',\n 'pass',\n 'passwd',\n 'password',\n 'secret',\n 'confirm_password',\n 'confirmPassword',\n 'password_confirmation',\n 'passwordConfirmation',\n 'access_token',\n 'accessToken',\n 'X-Rollbar-Access-Token',\n 'secret_key',\n 'secretKey',\n 'secretToken',\n 'cc-number',\n 'card number',\n 'cardnumber',\n 'cardnum',\n 'ccnum',\n 'ccnumber',\n 'cc num',\n 'creditcardnumber',\n 'credit card number',\n 'newcreditcardnumber',\n 'new credit card',\n 'creditcardno',\n 'credit card no',\n 'card#',\n 'card #',\n 'cc-csc',\n 'cvc',\n 'cvc2',\n 'cvv2',\n 'ccv2',\n 'security code',\n 'card verification',\n 'name on credit card',\n 'name on card',\n 'nameoncard',\n 'cardholder',\n 'card holder',\n 'name des karteninhabers',\n 'ccname',\n 'card type',\n 'cardtype',\n 'cc type',\n 'cctype',\n 'payment type',\n 'expiration date',\n 'expirationdate',\n 'expdate',\n 'cc-exp',\n 'ccmonth',\n 'ccyear'\n ]\n}\n","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.merge(options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n}\n\nTelemeter.prototype.configure = function(options) {\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n var deleteCount = 0;\n if (this.maxQueueSize > newMaxEvents) {\n deleteCount = this.maxQueueSize - newMaxEvents;\n }\n this.maxQueueSize = newMaxEvents;\n this.queue.splice(0, deleteCount);\n};\n\nTelemeter.prototype.copyEvents = function() {\n var events = Array.prototype.slice.call(this.queue, 0);\n if (_.isFunction(this.options.filterTelemetry)) {\n try {\n var i = events.length;\n while (i--) {\n if (this.options.filterTelemetry(events[i])) {\n events.splice(i, 1);\n }\n }\n } catch (e) {\n this.options.filterTelemetry = null;\n }\n }\n return events;\n};\n\nTelemeter.prototype.capture = function(type, metadata, level, rollbarUUID, timestamp) {\n var e = {\n level: getLevel(type, level),\n type: type,\n timestamp_ms: timestamp || _.now(),\n body: metadata,\n source: 'client'\n };\n if (rollbarUUID) {\n e.uuid = rollbarUUID;\n }\n\n try {\n if (_.isFunction(this.options.filterTelemetry) && this.options.filterTelemetry(e)) {\n return false;\n }\n } catch (exc) {\n this.options.filterTelemetry = null;\n }\n\n this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function(type, metadata, level, rollbarUUID) {\n return this.capture(type, metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.captureError = function(err, level, rollbarUUID, timestamp) {\n var metadata = {\n message: err.message || String(err)\n };\n if (err.stack) {\n metadata.stack = err.stack;\n }\n return this.capture('error', metadata, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureLog = function(message, level, rollbarUUID, timestamp) {\n return this.capture('log', {\n message: message\n }, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID, requestData) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\n if (requestData) {\n metadata.request = requestData;\n }\n var level = this.levelFromStatus(metadata.status_code);\n return this.capture('network', metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.levelFromStatus = function(statusCode) {\n if (statusCode >= 200 && statusCode < 400) {\n return 'info';\n }\n if (statusCode === 0 || statusCode >= 400) {\n return 'error';\n }\n return 'info';\n};\n\nTelemeter.prototype.captureDom = function(subtype, element, value, checked, rollbarUUID) {\n var metadata = {\n subtype: subtype,\n element: element\n };\n if (value !== undefined) {\n metadata.value = value;\n }\n if (checked !== undefined) {\n metadata.checked = checked;\n }\n return this.capture('dom', metadata, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureNavigation = function(from, to, rollbarUUID) {\n return this.capture('navigation', {from: from, to: to}, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureDomContentLoaded = function(ts) {\n return this.capture('navigation', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n */\n};\nTelemeter.prototype.captureLoad = function(ts) {\n return this.capture('navigation', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n */\n};\n\nTelemeter.prototype.captureConnectivityChange = function(type, rollbarUUID) {\n return this.captureNetwork({change: type}, 'connectivity', rollbarUUID);\n};\n\n// Only intended to be used internally by the notifier\nTelemeter.prototype._captureRollbarItem = function(item) {\n if (!this.options.includeItemsInTelemetry) {\n return;\n }\n if (item.err) {\n return this.captureError(item.err, item.level, item.uuid, item.timestamp);\n }\n if (item.message) {\n return this.captureLog(item.message, item.level, item.uuid, item.timestamp);\n }\n if (item.custom) {\n return this.capture('log', item.custom, item.level, item.uuid, item.timestamp);\n }\n};\n\nTelemeter.prototype.push = function(e) {\n this.queue.push(e);\n if (this.queue.length > this.maxQueueSize) {\n this.queue.shift();\n }\n};\n\nfunction getLevel(type, level) {\n if (level) {\n return level;\n }\n var defaultLevel = {\n error: 'error',\n manual: 'info'\n };\n return defaultLevel[type] || 'info';\n}\n\nmodule.exports = Telemeter;\n","'use strict';\n\nvar _ = require('../utility');\nvar scrub = require('../scrub');\nvar urlparser = require('./url');\nvar domUtil = require('./domUtility');\n\nvar defaults = {\n network: true,\n networkResponseHeaders: false,\n networkResponseBody: false,\n networkRequestHeaders: false,\n networkRequestBody: false,\n networkErrorOnHttp5xx: false,\n networkErrorOnHttp4xx: false,\n networkErrorOnHttp0: false,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true,\n contentSecurityPolicy: true,\n errorOnContentSecurityPolicy: false\n};\n\nfunction replace(obj, name, replacement, replacements, type) {\n var orig = obj[name];\n obj[name] = replacement(orig);\n if (replacements) {\n replacements[type].push([obj, name, orig]);\n }\n}\n\nfunction restore(replacements, type) {\n var b;\n while (replacements[type].length) {\n b = replacements[type].shift();\n b[0][b[1]] = b[2];\n }\n}\n\nfunction nameFromDescription(description) {\n if (!description || !description.attributes) { return null; }\n var attrs = description.attributes;\n for (var a = 0; a < attrs.length; ++a) {\n if (attrs[a].key === 'name') {\n return attrs[a].value;\n }\n }\n return null;\n}\n\nfunction defaultValueScrubber(scrubFields) {\n var patterns = [];\n for (var i = 0; i < scrubFields.length; ++i) {\n patterns.push(new RegExp(scrubFields[i], 'i'));\n }\n return function(description) {\n var name = nameFromDescription(description);\n if (!name) { return false; }\n for (var i = 0; i < patterns.length; ++i) {\n if (patterns[i].test(name)) {\n return true;\n }\n }\n return false;\n };\n}\n\nfunction Instrumenter(options, telemeter, rollbar, _window, _document) {\n this.options = options;\n var autoInstrument = options.autoInstrument;\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);\n this.telemeter = telemeter;\n this.rollbar = rollbar;\n this.diagnostic = rollbar.client.notifier.diagnostic;\n this._window = _window || {};\n this._document = _document || {};\n this.replacements = {\n network: [],\n log: [],\n navigation: [],\n connectivity: []\n };\n this.eventRemovers = {\n dom: [],\n connectivity: [],\n contentsecuritypolicy: []\n };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function(options) {\n this.options = _.merge(this.options, options);\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.merge(this.autoInstrument);\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n if (options.scrubTelemetryInputs !== undefined) {\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n }\n if (options.telemetryScrubber !== undefined) {\n this.telemetryScrubber = options.telemetryScrubber;\n }\n};\n\n// eslint-disable-next-line complexity\nInstrumenter.prototype.instrument = function(oldSettings) {\n if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {\n this.instrumentNetwork();\n } else if (!this.autoInstrument.network && oldSettings && oldSettings.network) {\n this.deinstrumentNetwork();\n }\n\n if (this.autoInstrument.log && !(oldSettings && oldSettings.log)) {\n this.instrumentConsole();\n } else if (!this.autoInstrument.log && oldSettings && oldSettings.log) {\n this.deinstrumentConsole();\n }\n\n if (this.autoInstrument.dom && !(oldSettings && oldSettings.dom)) {\n this.instrumentDom();\n } else if (!this.autoInstrument.dom && oldSettings && oldSettings.dom) {\n this.deinstrumentDom();\n }\n\n if (this.autoInstrument.navigation && !(oldSettings && oldSettings.navigation)) {\n this.instrumentNavigation();\n } else if (!this.autoInstrument.navigation && oldSettings && oldSettings.navigation) {\n this.deinstrumentNavigation();\n }\n\n if (this.autoInstrument.connectivity && !(oldSettings && oldSettings.connectivity)) {\n this.instrumentConnectivity();\n } else if (!this.autoInstrument.connectivity && oldSettings && oldSettings.connectivity) {\n this.deinstrumentConnectivity();\n }\n\n if (this.autoInstrument.contentSecurityPolicy && !(oldSettings && oldSettings.contentSecurityPolicy)) {\n this.instrumentContentSecurityPolicy();\n } else if (!this.autoInstrument.contentSecurityPolicy && oldSettings && oldSettings.contentSecurityPolicy) {\n this.deinstrumentContentSecurityPolicy();\n }\n};\n\nInstrumenter.prototype.deinstrumentNetwork = function() {\n restore(this.replacements, 'network');\n};\n\nInstrumenter.prototype.instrumentNetwork = function() {\n var self = this;\n\n function wrapProp(prop, xhr) {\n if (prop in xhr && _.isFunction(xhr[prop])) {\n replace(xhr, prop, function(orig) {\n return self.rollbar.wrap(orig);\n });\n }\n }\n\n if ('XMLHttpRequest' in this._window) {\n var xhrp = this._window.XMLHttpRequest.prototype;\n replace(xhrp, 'open', function(orig) {\n return function(method, url) {\n if (_.isType(url, 'string')) {\n if (this.__rollbar_xhr) {\n this.__rollbar_xhr.method = method;\n this.__rollbar_xhr.url = url;\n this.__rollbar_xhr.status_code = null;\n this.__rollbar_xhr.start_time_ms = _.now();\n this.__rollbar_xhr.end_time_ms = null;\n } else {\n this.__rollbar_xhr = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'setRequestHeader', function(orig) {\n return function(header, value) {\n // If xhr.open is async, __rollbar_xhr may not be initialized yet.\n if (!this.__rollbar_xhr) {\n this.__rollbar_xhr = {};\n }\n if (_.isType(header, 'string') && _.isType(value, 'string')) {\n if (self.autoInstrument.networkRequestHeaders) {\n if (!this.__rollbar_xhr.request_headers) {\n this.__rollbar_xhr.request_headers = {};\n }\n this.__rollbar_xhr.request_headers[header] = value;\n }\n // We want the content type even if request header telemetry is off.\n if (header.toLowerCase() === 'content-type') {\n this.__rollbar_xhr.request_content_type = value;\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'send', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(data) {\n /* eslint-enable no-unused-vars */\n var xhr = this;\n\n function onreadystatechangeHandler() {\n if (xhr.__rollbar_xhr) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n if (self.autoInstrument.networkRequestBody) {\n xhr.__rollbar_xhr.request = data;\n }\n xhr.__rollbar_event = self.captureNetwork(xhr.__rollbar_xhr, 'xhr', undefined);\n }\n if (xhr.readyState < 2) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n }\n if (xhr.readyState > 3) {\n xhr.__rollbar_xhr.end_time_ms = _.now();\n\n var headers = null;\n xhr.__rollbar_xhr.response_content_type = xhr.getResponseHeader('Content-Type');\n if (self.autoInstrument.networkResponseHeaders) {\n var headersConfig = self.autoInstrument.networkResponseHeaders;\n headers = {};\n try {\n var header, i;\n if (headersConfig === true) {\n var allHeaders = xhr.getAllResponseHeaders();\n if (allHeaders) {\n var arr = allHeaders.trim().split(/[\\r\\n]+/);\n var parts, value;\n for (i=0; i < arr.length; i++) {\n parts = arr[i].split(': ');\n header = parts.shift();\n value = parts.join(': ');\n headers[header] = value;\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n header = headersConfig[i];\n headers[header] = xhr.getResponseHeader(header);\n }\n }\n } catch (e) {\n /* we ignore the errors here that could come from different\n * browser issues with the xhr methods */\n }\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n try {\n body = xhr.responseText;\n } catch (e) {\n /* ignore errors from reading responseText */\n }\n }\n var response = null;\n if (body || headers) {\n response = {};\n if (body) {\n if (self.isJsonContentType(xhr.__rollbar_xhr.response_content_type)) {\n response.body = self.scrubJson(body);\n } else {\n response.body = body;\n }\n }\n if (headers) {\n response.headers = headers;\n }\n }\n if (response) {\n xhr.__rollbar_xhr.response = response;\n }\n try {\n var code = xhr.status;\n code = code === 1223 ? 204 : code;\n xhr.__rollbar_xhr.status_code = code;\n xhr.__rollbar_event.level = self.telemeter.levelFromStatus(code);\n self.errorOnHttpStatus(xhr.__rollbar_xhr);\n } catch (e) {\n /* ignore possible exception from xhr.status */\n }\n }\n }\n }\n\n wrapProp('onload', xhr);\n wrapProp('onerror', xhr);\n wrapProp('onprogress', xhr);\n\n if ('onreadystatechange' in xhr && _.isFunction(xhr.onreadystatechange)) {\n replace(xhr, 'onreadystatechange', function(orig) {\n return self.rollbar.wrap(orig, undefined, onreadystatechangeHandler);\n });\n } else {\n xhr.onreadystatechange = onreadystatechangeHandler;\n }\n if (xhr.__rollbar_xhr && self.trackHttpErrors()) {\n xhr.__rollbar_xhr.stack = (new Error()).stack;\n }\n return orig.apply(this, arguments);\n }\n }, this.replacements, 'network');\n }\n\n if ('fetch' in this._window) {\n replace(this._window, 'fetch', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(fn, t) {\n /* eslint-enable no-unused-vars */\n var args = new Array(arguments.length);\n for (var i=0, len=args.length; i < len; i++) {\n args[i] = arguments[i];\n }\n var input = args[0];\n var method = 'GET';\n var url;\n if (_.isType(input, 'string')) {\n url = input;\n } else if (input) {\n url = input.url;\n if (input.method) {\n method = input.method;\n }\n }\n if (args[1] && args[1].method) {\n method = args[1].method;\n }\n var metadata = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n if (args[1] && args[1].headers) {\n // Argument may be a Headers object, or plain object. Ensure here that\n // we are working with a Headers object with case-insensitive keys.\n var reqHeaders = new Headers(args[1].headers);\n\n metadata.request_content_type = reqHeaders.get('Content-Type');\n\n if (self.autoInstrument.networkRequestHeaders) {\n metadata.request_headers = self.fetchHeaders(reqHeaders, self.autoInstrument.networkRequestHeaders)\n }\n }\n\n if (self.autoInstrument.networkRequestBody) {\n if (args[1] && args[1].body) {\n metadata.request = args[1].body;\n } else if (args[0] && !_.isType(args[0], 'string') && args[0].body) {\n metadata.request = args[0].body;\n }\n }\n self.captureNetwork(metadata, 'fetch', undefined);\n if (self.trackHttpErrors()) {\n metadata.stack = (new Error()).stack;\n }\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n metadata.response_content_type = resp.headers.get('Content-Type');\n var headers = null;\n if (self.autoInstrument.networkResponseHeaders) {\n headers = self.fetchHeaders(resp.headers, self.autoInstrument.networkResponseHeaders);\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n if (typeof resp.text === 'function') { // Response.text() is not implemented on some platforms\n // The response must be cloned to prevent reading (and locking) the original stream.\n body = resp.clone().text(); //returns a Promise\n }\n }\n if (headers || body) {\n metadata.response = {};\n if (body) {\n // Test to ensure body is a Promise, which it should always be.\n if (typeof body.then === 'function') {\n body.then(function (text) {\n if (self.isJsonContentType(metadata.response_content_type)) {\n metadata.response.body = self.scrubJson(text);\n }\n });\n } else {\n metadata.response.body = body;\n }\n }\n if (headers) {\n metadata.response.headers = headers;\n }\n }\n self.errorOnHttpStatus(metadata);\n return resp;\n });\n };\n }, this.replacements, 'network');\n }\n};\n\nInstrumenter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID) {\n if (metadata.request && this.isJsonContentType(metadata.request_content_type)) {\n metadata.request = this.scrubJson(metadata.request);\n }\n return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);\n};\n\nInstrumenter.prototype.isJsonContentType = function(contentType) {\n return (contentType && _.isType(contentType, 'string') && contentType.toLowerCase().includes('json')) ? true : false;\n}\n\nInstrumenter.prototype.scrubJson = function(json) {\n return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));\n}\n\nInstrumenter.prototype.fetchHeaders = function(inHeaders, headersConfig) {\n var outHeaders = {};\n try {\n var i;\n if (headersConfig === true) {\n if (typeof inHeaders.entries === 'function') { // Headers.entries() is not implemented in IE\n var allHeaders = inHeaders.entries();\n var currentHeader = allHeaders.next();\n while (!currentHeader.done) {\n outHeaders[currentHeader.value[0]] = currentHeader.value[1];\n currentHeader = allHeaders.next();\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n var header = headersConfig[i];\n outHeaders[header] = inHeaders.get(header);\n }\n }\n } catch (e) {\n /* ignore probable IE errors */\n }\n return outHeaders;\n}\n\nInstrumenter.prototype.trackHttpErrors = function() {\n return this.autoInstrument.networkErrorOnHttp5xx ||\n this.autoInstrument.networkErrorOnHttp4xx ||\n this.autoInstrument.networkErrorOnHttp0;\n}\n\nInstrumenter.prototype.errorOnHttpStatus = function(metadata) {\n var status = metadata.status_code;\n\n if ((status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||\n (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||\n (status === 0 && this.autoInstrument.networkErrorOnHttp0)) {\n var error = new Error('HTTP request failed with Status ' + status);\n error.stack = metadata.stack;\n this.rollbar.error(error, { skipFrames: 1 });\n }\n}\n\nInstrumenter.prototype.deinstrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n var b;\n while (this.replacements['log'].length) {\n b = this.replacements['log'].shift();\n this._window.console[b[0]] = b[1];\n }\n};\n\nInstrumenter.prototype.instrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n\n var self = this;\n var c = this._window.console;\n\n function wrapConsole(method) {\n 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778\n\n var orig = c[method];\n var origConsole = c;\n var level = method === 'warn' ? 'warning' : method;\n c[method] = function() {\n var args = Array.prototype.slice.call(arguments);\n var message = _.formatArgsAsString(args);\n self.telemeter.captureLog(message, level);\n if (orig) {\n Function.prototype.apply.call(orig, origConsole, args);\n }\n };\n self.replacements['log'].push([method, orig]);\n }\n var methods = ['debug','info','warn','error','log'];\n try {\n for (var i=0, len=methods.length; i < len; i++) {\n wrapConsole(methods[i]);\n }\n } catch (e) {\n this.diagnostic.instrumentConsole = { error: e.message };\n }\n};\n\nInstrumenter.prototype.deinstrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n this.removeListeners('dom');\n};\n\nInstrumenter.prototype.instrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n var clickHandler = this.handleClick.bind(this);\n var blurHandler = this.handleBlur.bind(this);\n this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);\n this.addListener('dom', this._window, 'blur', 'onfocusout', blurHandler, true);\n};\n\nInstrumenter.prototype.handleClick = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n var hasTag = e && e.tagName;\n var anchorOrButton = domUtil.isDescribedElement(e, 'a') || domUtil.isDescribedElement(e, 'button');\n if (hasTag && (anchorOrButton || domUtil.isDescribedElement(e, 'input', ['button', 'submit']))) {\n this.captureDomEvent('click', e);\n } else if (domUtil.isDescribedElement(e, 'input', ['checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value, e.checked);\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleBlur = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n if (e && e.tagName) {\n if (domUtil.isDescribedElement(e, 'textarea')) {\n this.captureDomEvent('input', e, e.value);\n } else if (domUtil.isDescribedElement(e, 'select') && e.options && e.options.length) {\n this.handleSelectInputChanged(e);\n } else if (domUtil.isDescribedElement(e, 'input') && !domUtil.isDescribedElement(e, 'input', ['button', 'submit', 'hidden', 'checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value);\n }\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleSelectInputChanged = function(elem) {\n if (elem.multiple) {\n for (var i = 0; i < elem.options.length; i++) {\n if (elem.options[i].selected) {\n this.captureDomEvent('input', elem, elem.options[i].value);\n }\n }\n } else if (elem.selectedIndex >= 0 && elem.options[elem.selectedIndex]) {\n this.captureDomEvent('input', elem, elem.options[elem.selectedIndex].value);\n }\n};\n\nInstrumenter.prototype.captureDomEvent = function(subtype, element, value, isChecked) {\n if (value !== undefined) {\n if (this.scrubTelemetryInputs || (domUtil.getElementType(element) === 'password')) {\n value = '[scrubbed]';\n } else {\n var description = domUtil.describeElement(element);\n if (this.telemetryScrubber) {\n if (this.telemetryScrubber(description)) {\n value = '[scrubbed]';\n }\n } else if (this.defaultValueScrubber(description)) {\n value = '[scrubbed]';\n }\n }\n }\n var elementString = domUtil.elementArrayToString(domUtil.treeToArray(element));\n this.telemeter.captureDom(subtype, elementString, value, isChecked);\n};\n\nInstrumenter.prototype.deinstrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n restore(this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.instrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n var self = this;\n replace(this._window, 'onpopstate', function(orig) {\n return function() {\n var current = self._location.href;\n self.handleUrlChange(self._lastHref, current);\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n }, this.replacements, 'navigation');\n\n replace(this._window.history, 'pushState', function(orig) {\n return function() {\n var url = arguments.length > 2 ? arguments[2] : undefined;\n if (url) {\n self.handleUrlChange(self._lastHref, url + '');\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.handleUrlChange = function(from, to) {\n var parsedHref = urlparser.parse(this._location.href);\n var parsedTo = urlparser.parse(to);\n var parsedFrom = urlparser.parse(from);\n this._lastHref = to;\n if (parsedHref.protocol === parsedTo.protocol && parsedHref.host === parsedTo.host) {\n to = parsedTo.path + (parsedTo.hash || '');\n }\n if (parsedHref.protocol === parsedFrom.protocol && parsedHref.host === parsedFrom.host) {\n from = parsedFrom.path + (parsedFrom.hash || '');\n }\n this.telemeter.captureNavigation(from, to);\n};\n\nInstrumenter.prototype.deinstrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.removeListeners('connectivity');\n } else {\n restore(this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.instrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.addListener('connectivity', this._window, 'online', undefined, function() {\n this.telemeter.captureConnectivityChange('online');\n }.bind(this), true);\n this.addListener('connectivity', this._window, 'offline', undefined, function() {\n this.telemeter.captureConnectivityChange('offline');\n }.bind(this), true);\n } else {\n var self = this;\n replace(this._document.body, 'ononline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('online');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n replace(this._document.body, 'onoffline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('offline');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.handleCspEvent = function(cspEvent) {\n var message = 'Security Policy Violation: ' +\n 'blockedURI: ' + cspEvent.blockedURI + ', ' +\n 'violatedDirective: ' + cspEvent.violatedDirective + ', ' +\n 'effectiveDirective: ' + cspEvent.effectiveDirective + ', ';\n\n if (cspEvent.sourceFile) {\n message += 'location: ' + cspEvent.sourceFile + ', ' +\n 'line: ' + cspEvent.lineNumber + ', ' +\n 'col: ' + cspEvent.columnNumber + ', ';\n }\n\n message += 'originalPolicy: ' + cspEvent.originalPolicy;\n\n this.telemeter.captureLog(message, 'error');\n this.handleCspError(message);\n}\n\nInstrumenter.prototype.handleCspError = function(message) {\n if (this.autoInstrument.errorOnContentSecurityPolicy) {\n this.rollbar.error(message);\n }\n}\n\nInstrumenter.prototype.deinstrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._window)) { return; }\n\n this.removeListeners('contentsecuritypolicy');\n};\n\nInstrumenter.prototype.instrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._window)) { return; }\n\n var cspHandler = this.handleCspEvent.bind(this);\n this.addListener('contentsecuritypolicy', this._window, 'securitypolicyviolation', null, cspHandler, false);\n};\n\nInstrumenter.prototype.addListener = function(section, obj, type, altType, handler, capture) {\n if (obj.addEventListener) {\n obj.addEventListener(type, handler, capture);\n this.eventRemovers[section].push(function() {\n obj.removeEventListener(type, handler, capture);\n });\n } else if (altType) {\n obj.attachEvent(altType, handler);\n this.eventRemovers[section].push(function() {\n obj.detachEvent(altType, handler);\n });\n }\n};\n\nInstrumenter.prototype.removeListeners = function(section) {\n var r;\n while (this.eventRemovers[section].length) {\n r = this.eventRemovers[section].shift();\n r();\n }\n};\n\nmodule.exports = Instrumenter;\n","'use strict';\n\nfunction getElementType(e) {\n return (e.getAttribute('type') || '').toLowerCase();\n}\n\nfunction isDescribedElement(element, type, subtypes) {\n if (element.tagName.toLowerCase() !== type.toLowerCase()) {\n return false;\n }\n if (!subtypes) {\n return true;\n }\n element = getElementType(element);\n for (var i = 0; i < subtypes.length; i++) {\n if (subtypes[i] === element) {\n return true;\n }\n }\n return false;\n}\n\nfunction getElementFromEvent(evt, doc) {\n if (evt.target) {\n return evt.target;\n }\n if (doc && doc.elementFromPoint) {\n return doc.elementFromPoint(evt.clientX, evt.clientY);\n }\n return undefined;\n}\n\nfunction treeToArray(elem) {\n var MAX_HEIGHT = 5;\n var out = [];\n var nextDescription;\n for (var height = 0; elem && height < MAX_HEIGHT; height++) {\n nextDescription = describeElement(elem);\n if (nextDescription.tagName === 'html') {\n break;\n }\n out.unshift(nextDescription);\n elem = elem.parentNode;\n }\n return out;\n}\n\nfunction elementArrayToString(a) {\n var MAX_LENGTH = 80;\n var separator = ' > ', separatorLength = separator.length;\n var out = [], len = 0, nextStr, totalLength;\n\n for (var i = a.length - 1; i >= 0; i--) {\n nextStr = descriptionToString(a[i]);\n totalLength = len + (out.length * separatorLength) + nextStr.length;\n if (i < a.length - 1 && totalLength >= MAX_LENGTH + 3) {\n out.unshift('...');\n break;\n }\n out.unshift(nextStr);\n len += nextStr.length;\n }\n return out.join(separator);\n}\n\nfunction descriptionToString(desc) {\n if (!desc || !desc.tagName) {\n return '';\n }\n var out = [desc.tagName];\n if (desc.id) {\n out.push('#' + desc.id);\n }\n if (desc.classes) {\n out.push('.' + desc.classes.join('.'));\n }\n for (var i = 0; i < desc.attributes.length; i++) {\n out.push('[' + desc.attributes[i].key + '=\"' + desc.attributes[i].value + '\"]');\n }\n\n return out.join('');\n}\n\n/**\n * Input: a dom element\n * Output: null if tagName is falsey or input is falsey, else\n * {\n * tagName: String,\n * id: String | undefined,\n * classes: [String] | undefined,\n * attributes: [\n * {\n * key: OneOf(type, name, title, alt),\n * value: String\n * }\n * ]\n * }\n */\nfunction describeElement(elem) {\n if (!elem || !elem.tagName) {\n return null;\n }\n var out = {}, className, key, attr, i;\n out.tagName = elem.tagName.toLowerCase();\n if (elem.id) {\n out.id = elem.id;\n }\n className = elem.className;\n if (className && (typeof className === 'string')) {\n out.classes = className.split(/\\s+/);\n }\n var attributes = ['type', 'name', 'title', 'alt'];\n out.attributes = [];\n for (i = 0; i < attributes.length; i++) {\n key = attributes[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.attributes.push({key: key, value: attr});\n }\n }\n return out;\n}\n\nmodule.exports = {\n describeElement: describeElement,\n descriptionToString: descriptionToString,\n elementArrayToString: elementArrayToString,\n treeToArray: treeToArray,\n getElementFromEvent: getElementFromEvent,\n isDescribedElement: isDescribedElement,\n getElementType: getElementType\n};\n","'use strict';\n\nvar polyfillJSON = require('../../vendor/JSON-js/json3');\n\nmodule.exports = polyfillJSON;\n","// json3.js\n// 2017-02-21\n// Public Domain.\n// NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.\n// See http://www.JSON.org/js.html\n// This code should be minified before deployment.\n// See http://javascript.crockford.com/jsmin.html\n\n// USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO\n// NOT CONTROL.\n\n// This file creates a global JSON object containing two methods: stringify\n// and parse. This file provides the ES5 JSON capability to ES3 systems.\n// If a project might run on IE8 or earlier, then this file should be included.\n// This file does nothing on ES5 systems.\n\n// JSON.stringify(value, replacer, space)\n// value any JavaScript value, usually an object or array.\n// replacer an optional parameter that determines how object\n// values are stringified for objects. It can be a\n// function or an array of strings.\n// space an optional parameter that specifies the indentation\n// of nested structures. If it is omitted, the text will\n// be packed without extra whitespace. If it is a number,\n// it will specify the number of spaces to indent at each\n// level. If it is a string (such as \"\\t\" or \" \"),\n// it contains the characters used to indent at each level.\n// This method produces a JSON text from a JavaScript value.\n// When an object value is found, if the object contains a toJSON\n// method, its toJSON method will be called and the result will be\n// stringified. A toJSON method does not serialize: it returns the\n// value represented by the name/value pair that should be serialized,\n// or undefined if nothing should be serialized. The toJSON method\n// will be passed the key associated with the value, and this will be\n// bound to the value.\n\n// For example, this would serialize Dates as ISO strings.\n\n// Date.prototype.toJSON = function (key) {\n// function f(n) {\n// // Format integers to have at least two digits.\n// return (n < 10)\n// ? \"0\" + n\n// : n;\n// }\n// return this.getUTCFullYear() + \"-\" +\n// f(this.getUTCMonth() + 1) + \"-\" +\n// f(this.getUTCDate()) + \"T\" +\n// f(this.getUTCHours()) + \":\" +\n// f(this.getUTCMinutes()) + \":\" +\n// f(this.getUTCSeconds()) + \"Z\";\n// };\n\n// You can provide an optional replacer method. It will be passed the\n// key and value of each member, with this bound to the containing\n// object. The value that is returned from your method will be\n// serialized. If your method returns undefined, then the member will\n// be excluded from the serialization.\n\n// If the replacer parameter is an array of strings, then it will be\n// used to select the members to be serialized. It filters the results\n// such that only members with keys listed in the replacer array are\n// stringified.\n\n// Values that do not have JSON representations, such as undefined or\n// functions, will not be serialized. Such values in objects will be\n// dropped; in arrays they will be replaced with null. You can use\n// a replacer function to replace those with JSON values.\n\n// JSON.stringify(undefined) returns undefined.\n\n// The optional space parameter produces a stringification of the\n// value that is filled with line breaks and indentation to make it\n// easier to read.\n\n// If the space parameter is a non-empty string, then that string will\n// be used for indentation. If the space parameter is a number, then\n// the indentation will be that many spaces.\n\n// Example:\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}]);\n// // text is '[\"e\",{\"pluribus\":\"unum\"}]'\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}], null, \"\\t\");\n// // text is '[\\n\\t\"e\",\\n\\t{\\n\\t\\t\"pluribus\": \"unum\"\\n\\t}\\n]'\n\n// text = JSON.stringify([new Date()], function (key, value) {\n// return this[key] instanceof Date\n// ? \"Date(\" + this[key] + \")\"\n// : value;\n// });\n// // text is '[\"Date(---current time---)\"]'\n\n// JSON.parse(text, reviver)\n// This method parses a JSON text to produce an object or array.\n// It can throw a SyntaxError exception.\n// This has been modified to use JSON-js/json_parse_state.js as the\n// parser instead of the one built around eval found in JSON-js/json2.js\n\n// The optional reviver parameter is a function that can filter and\n// transform the results. It receives each of the keys and values,\n// and its return value is used instead of the original value.\n// If it returns what it received, then the structure is not modified.\n// If it returns undefined then the member is deleted.\n\n// Example:\n\n// // Parse the text. Values that look like ISO date strings will\n// // be converted to Date objects.\n\n// myData = JSON.parse(text, function (key, value) {\n// var a;\n// if (typeof value === \"string\") {\n// a =\n// /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2}(?:\\.\\d*)?)Z$/.exec(value);\n// if (a) {\n// return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],\n// +a[5], +a[6]));\n// }\n// }\n// return value;\n// });\n\n// myData = JSON.parse('[\"Date(09/09/2001)\"]', function (key, value) {\n// var d;\n// if (typeof value === \"string\" &&\n// value.slice(0, 5) === \"Date(\" &&\n// value.slice(-1) === \")\") {\n// d = new Date(value.slice(5, -1));\n// if (d) {\n// return d;\n// }\n// }\n// return value;\n// });\n\n// This is a reference implementation. You are free to copy, modify, or\n// redistribute.\n\n/*jslint\n for, this\n */\n\n/*property\n JSON, apply, call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,\n getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,\n lastIndex, length, parse, prototype, push, replace, slice, stringify,\n test, toJSON, toString, valueOf\n */\n\nvar setupCustomJSON = function(JSON) {\n\n var rx_one = /^[\\],:{}\\s]*$/;\n var rx_two = /\\\\(?:[\"\\\\\\/bfnrt]|u[0-9a-fA-F]{4})/g;\n var rx_three = /\"[^\"\\\\\\n\\r]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g;\n var rx_four = /(?:^|:|,)(?:\\s*\\[)+/g;\n var rx_escapable = /[\\\\\"\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n var rx_dangerous = /[\\u0000\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n\n function f(n) {\n // Format integers to have at least two digits.\n return n < 10\n ? \"0\" + n\n : n;\n }\n\n function this_value() {\n return this.valueOf();\n }\n\n if (typeof Date.prototype.toJSON !== \"function\") {\n\n Date.prototype.toJSON = function () {\n\n return isFinite(this.valueOf())\n ? this.getUTCFullYear() + \"-\" +\n f(this.getUTCMonth() + 1) + \"-\" +\n f(this.getUTCDate()) + \"T\" +\n f(this.getUTCHours()) + \":\" +\n f(this.getUTCMinutes()) + \":\" +\n f(this.getUTCSeconds()) + \"Z\"\n : null;\n };\n\n Boolean.prototype.toJSON = this_value;\n Number.prototype.toJSON = this_value;\n String.prototype.toJSON = this_value;\n }\n\n var gap;\n var indent;\n var meta;\n var rep;\n\n\n function quote(string) {\n\n // If the string contains no control characters, no quote characters, and no\n // backslash characters, then we can safely slap some quotes around it.\n // Otherwise we must also replace the offending characters with safe escape\n // sequences.\n\n rx_escapable.lastIndex = 0;\n return rx_escapable.test(string)\n ? \"\\\"\" + string.replace(rx_escapable, function (a) {\n var c = meta[a];\n return typeof c === \"string\"\n ? c\n : \"\\\\u\" + (\"0000\" + a.charCodeAt(0).toString(16)).slice(-4);\n }) + \"\\\"\"\n : \"\\\"\" + string + \"\\\"\";\n }\n\n\n function str(key, holder) {\n\n // Produce a string from holder[key].\n\n var i; // The loop counter.\n var k; // The member key.\n var v; // The member value.\n var length;\n var mind = gap;\n var partial;\n var value = holder[key];\n\n // If the value has a toJSON method, call it to obtain a replacement value.\n\n if (value && typeof value === \"object\" &&\n typeof value.toJSON === \"function\") {\n value = value.toJSON(key);\n }\n\n // If we were called with a replacer function, then call the replacer to\n // obtain a replacement value.\n\n if (typeof rep === \"function\") {\n value = rep.call(holder, key, value);\n }\n\n // What happens next depends on the value's type.\n\n switch (typeof value) {\n case \"string\":\n return quote(value);\n\n case \"number\":\n\n // JSON numbers must be finite. Encode non-finite numbers as null.\n\n return isFinite(value)\n ? String(value)\n : \"null\";\n\n case \"boolean\":\n case \"null\":\n\n // If the value is a boolean or null, convert it to a string. Note:\n // typeof null does not produce \"null\". The case is included here in\n // the remote chance that this gets fixed someday.\n\n return String(value);\n\n // If the type is \"object\", we might be dealing with an object or an array or\n // null.\n\n case \"object\":\n\n // Due to a specification blunder in ECMAScript, typeof null is \"object\",\n // so watch out for that case.\n\n if (!value) {\n return \"null\";\n }\n\n // Make an array to hold the partial results of stringifying this object value.\n\n gap += indent;\n partial = [];\n\n // Is the value an array?\n\n if (Object.prototype.toString.apply(value) === \"[object Array]\") {\n\n // The value is an array. Stringify every element. Use null as a placeholder\n // for non-JSON values.\n\n length = value.length;\n for (i = 0; i < length; i += 1) {\n partial[i] = str(i, value) || \"null\";\n }\n\n // Join all of the elements together, separated with commas, and wrap them in\n // brackets.\n\n v = partial.length === 0\n ? \"[]\"\n : gap\n ? \"[\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"]\"\n : \"[\" + partial.join(\",\") + \"]\";\n gap = mind;\n return v;\n }\n\n // If the replacer is an array, use it to select the members to be stringified.\n\n if (rep && typeof rep === \"object\") {\n length = rep.length;\n for (i = 0; i < length; i += 1) {\n if (typeof rep[i] === \"string\") {\n k = rep[i];\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n } else {\n\n // Otherwise, iterate through all of the keys in the object.\n\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(value, k)) {\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n }\n\n // Join all of the member texts together, separated with commas,\n // and wrap them in braces.\n\n v = partial.length === 0\n ? \"{}\"\n : gap\n ? \"{\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"}\"\n : \"{\" + partial.join(\",\") + \"}\";\n gap = mind;\n return v;\n }\n }\n\n // If the JSON object does not yet have a stringify method, give it one.\n\n if (typeof JSON.stringify !== \"function\") {\n meta = { // table of character substitutions\n \"\\b\": \"\\\\b\",\n \"\\t\": \"\\\\t\",\n \"\\n\": \"\\\\n\",\n \"\\f\": \"\\\\f\",\n \"\\r\": \"\\\\r\",\n \"\\\"\": \"\\\\\\\"\",\n \"\\\\\": \"\\\\\\\\\"\n };\n JSON.stringify = function (value, replacer, space) {\n\n // The stringify method takes a value and an optional replacer, and an optional\n // space parameter, and returns a JSON text. The replacer can be a function\n // that can replace values, or an array of strings that will select the keys.\n // A default replacer method can be provided. Use of the space parameter can\n // produce text that is more easily readable.\n\n var i;\n gap = \"\";\n indent = \"\";\n\n // If the space parameter is a number, make an indent string containing that\n // many spaces.\n\n if (typeof space === \"number\") {\n for (i = 0; i < space; i += 1) {\n indent += \" \";\n }\n\n // If the space parameter is a string, it will be used as the indent string.\n\n } else if (typeof space === \"string\") {\n indent = space;\n }\n\n // If there is a replacer, it must be a function or an array.\n // Otherwise, throw an error.\n\n rep = replacer;\n if (replacer && typeof replacer !== \"function\" &&\n (typeof replacer !== \"object\" ||\n typeof replacer.length !== \"number\")) {\n throw new Error(\"JSON.stringify\");\n }\n\n // Make a fake root object containing our value under the key of \"\".\n // Return the result of stringifying the value.\n\n return str(\"\", {\"\": value});\n };\n }\n\n\n // If the JSON object does not yet have a parse method, give it one.\n\n if (typeof JSON.parse !== \"function\") {\n JSON.parse = (function () {\n\n // This function creates a JSON parse function that uses a state machine rather\n // than the dangerous eval function to parse a JSON text.\n\n var state; // The state of the parser, one of\n // 'go' The starting state\n // 'ok' The final, accepting state\n // 'firstokey' Ready for the first key of the object or\n // the closing of an empty object\n // 'okey' Ready for the next key of the object\n // 'colon' Ready for the colon\n // 'ovalue' Ready for the value half of a key/value pair\n // 'ocomma' Ready for a comma or closing }\n // 'firstavalue' Ready for the first value of an array or\n // an empty array\n // 'avalue' Ready for the next value of an array\n // 'acomma' Ready for a comma or closing ]\n var stack; // The stack, for controlling nesting.\n var container; // The current container object or array\n var key; // The current key\n var value; // The current value\n var escapes = { // Escapement translation table\n \"\\\\\": \"\\\\\",\n \"\\\"\": \"\\\"\",\n \"/\": \"/\",\n \"t\": \"\\t\",\n \"n\": \"\\n\",\n \"r\": \"\\r\",\n \"f\": \"\\f\",\n \"b\": \"\\b\"\n };\n var string = { // The actions for string tokens\n go: function () {\n state = \"ok\";\n },\n firstokey: function () {\n key = value;\n state = \"colon\";\n },\n okey: function () {\n key = value;\n state = \"colon\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var number = { // The actions for number tokens\n go: function () {\n state = \"ok\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var action = {\n\n // The action table describes the behavior of the machine. It contains an\n // object for each token. Each object contains a method that is called when\n // a token is matched in a state. An object will lack a method for illegal\n // states.\n\n \"{\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = {};\n state = \"firstokey\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = {};\n state = \"firstokey\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n }\n },\n \"}\": {\n firstokey: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n ocomma: function () {\n var pop = stack.pop();\n container[key] = value;\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \"[\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = [];\n state = \"firstavalue\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = [];\n state = \"firstavalue\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n }\n },\n \"]\": {\n firstavalue: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n acomma: function () {\n var pop = stack.pop();\n container.push(value);\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \":\": {\n colon: function () {\n if (Object.hasOwnProperty.call(container, key)) {\n throw new SyntaxError(\"Duplicate key '\" + key + \"\\\"\");\n }\n state = \"ovalue\";\n }\n },\n \",\": {\n ocomma: function () {\n container[key] = value;\n state = \"okey\";\n },\n acomma: function () {\n container.push(value);\n state = \"avalue\";\n }\n },\n \"true\": {\n go: function () {\n value = true;\n state = \"ok\";\n },\n ovalue: function () {\n value = true;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = true;\n state = \"acomma\";\n },\n avalue: function () {\n value = true;\n state = \"acomma\";\n }\n },\n \"false\": {\n go: function () {\n value = false;\n state = \"ok\";\n },\n ovalue: function () {\n value = false;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = false;\n state = \"acomma\";\n },\n avalue: function () {\n value = false;\n state = \"acomma\";\n }\n },\n \"null\": {\n go: function () {\n value = null;\n state = \"ok\";\n },\n ovalue: function () {\n value = null;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = null;\n state = \"acomma\";\n },\n avalue: function () {\n value = null;\n state = \"acomma\";\n }\n }\n };\n\n function debackslashify(text) {\n\n // Remove and replace any backslash escapement.\n\n return text.replace(/\\\\(?:u(.{4})|([^u]))/g, function (ignore, b, c) {\n return b\n ? String.fromCharCode(parseInt(b, 16))\n : escapes[c];\n });\n }\n\n return function (source, reviver) {\n\n // A regular expression is used to extract tokens from the JSON text.\n // The extraction process is cautious.\n\n var result;\n var tx = /^[\\u0020\\t\\n\\r]*(?:([,:\\[\\]{}]|true|false|null)|(-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?)|\"((?:[^\\r\\n\\t\\\\\\\"]|\\\\(?:[\"\\\\\\/trnfb]|u[0-9a-fA-F]{4}))*)\")/;\n\n // Set the starting state.\n\n state = \"go\";\n\n // The stack records the container, key, and state for each object or array\n // that contains another object or array while processing nested structures.\n\n stack = [];\n\n // If any error occurs, we will catch it and ultimately throw a syntax error.\n\n try {\n\n // For each token...\n\n while (true) {\n result = tx.exec(source);\n if (!result) {\n break;\n }\n\n // result is the result array from matching the tokenizing regular expression.\n // result[0] contains everything that matched, including any initial whitespace.\n // result[1] contains any punctuation that was matched, or true, false, or null.\n // result[2] contains a matched number, still in string form.\n // result[3] contains a matched string, without quotes but with escapement.\n\n if (result[1]) {\n\n // Token: Execute the action for this state and token.\n\n action[result[1]][state]();\n\n } else if (result[2]) {\n\n // Number token: Convert the number string into a number value and execute\n // the action for this state and number.\n\n value = +result[2];\n number[state]();\n } else {\n\n // String token: Replace the escapement sequences and execute the action for\n // this state and string.\n\n value = debackslashify(result[3]);\n string[state]();\n }\n\n // Remove the token from the string. The loop will continue as long as there\n // are tokens. This is a slow process, but it allows the use of ^ matching,\n // which assures that no illegal tokens slip through.\n\n source = source.slice(result[0].length);\n }\n\n // If we find a state/token combination that is illegal, then the action will\n // cause an error. We handle the error by simply changing the state.\n\n } catch (e) {\n state = e;\n }\n\n // The parsing is finished. If we are not in the final \"ok\" state, or if the\n // remaining source contains anything except whitespace, then we did not have\n //a well-formed JSON text.\n\n if (state !== \"ok\" || (/[^\\u0020\\t\\n\\r]/.test(source))) {\n throw (state instanceof SyntaxError)\n ? state\n : new SyntaxError(\"JSON\");\n }\n\n // If there is a reviver function, we recursively walk the new structure,\n // passing each name/value pair to the reviver function for possible\n // transformation, starting with a temporary root object that holds the current\n // value in an empty key. If there is not a reviver function, we simply return\n // that value.\n\n return (typeof reviver === \"function\")\n ? (function walk(holder, key) {\n var k;\n var v;\n var val = holder[key];\n if (val && typeof val === \"object\") {\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(val, k)) {\n v = walk(val, k);\n if (v !== undefined) {\n val[k] = v;\n } else {\n delete val[k];\n }\n }\n }\n }\n return reviver.call(holder, key, val);\n }({\"\": value}, \"\"))\n : value;\n };\n }());\n }\n}\n\nmodule.exports = setupCustomJSON;\n","'use strict';\n\nfunction wrapGlobals(window, handler, shim) {\n if (!window) { return; }\n // Adapted from https://github.com/bugsnag/bugsnag-js\n var globals = 'EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload'.split(',');\n var i, global;\n for (i = 0; i < globals.length; ++i) {\n global = globals[i];\n\n if (window[global] && window[global].prototype) {\n _extendListenerPrototype(handler, window[global].prototype, shim);\n }\n }\n}\n\nfunction _extendListenerPrototype(handler, prototype, shim) {\n if (prototype.hasOwnProperty && prototype.hasOwnProperty('addEventListener')) {\n var oldAddEventListener = prototype.addEventListener;\n while (oldAddEventListener._rollbarOldAdd && oldAddEventListener.belongsToShim) {\n oldAddEventListener = oldAddEventListener._rollbarOldAdd;\n }\n var addFn = function(event, callback, bubble) {\n oldAddEventListener.call(this, event, handler.wrap(callback), bubble);\n };\n addFn._rollbarOldAdd = oldAddEventListener;\n addFn.belongsToShim = shim;\n prototype.addEventListener = addFn;\n\n var oldRemoveEventListener = prototype.removeEventListener;\n while (oldRemoveEventListener._rollbarOldRemove && oldRemoveEventListener.belongsToShim) {\n oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;\n }\n var removeFn = function(event, callback, bubble) {\n oldRemoveEventListener.call(this, event, callback && callback._rollbar_wrapped || callback, bubble);\n };\n removeFn._rollbarOldRemove = oldRemoveEventListener;\n removeFn.belongsToShim = shim;\n prototype.removeEventListener = removeFn;\n }\n}\n\nmodule.exports = wrapGlobals;\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction raw(payload, jsonBackup) {\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction selectFrames(frames, range) {\n var len = frames.length;\n if (len > range * 2) {\n return frames.slice(0, range).concat(frames.slice(len - range));\n }\n return frames;\n}\n\nfunction truncateFrames(payload, jsonBackup, range) {\n range = (typeof range === 'undefined') ? 30 : range;\n var body = payload.data.body;\n var frames;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n frames = chain[i].frames;\n frames = selectFrames(frames, range);\n chain[i].frames = frames;\n }\n } else if (body.trace) {\n frames = body.trace.frames;\n frames = selectFrames(frames, range);\n body.trace.frames = frames;\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction maybeTruncateValue(len, val) {\n if (!val) {\n return val;\n }\n if (val.length > len) {\n return val.slice(0, len - 3).concat('...');\n }\n return val;\n}\n\nfunction truncateStrings(len, payload, jsonBackup) {\n function truncator(k, v, seen) {\n switch (_.typeName(v)) {\n case 'string':\n return maybeTruncateValue(len, v);\n case 'object':\n case 'array':\n return traverse(v, truncator, seen);\n default:\n return v;\n }\n }\n payload = traverse(payload, truncator);\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction truncateTraceData(traceData) {\n if (traceData.exception) {\n delete traceData.exception.description;\n traceData.exception.message = maybeTruncateValue(255, traceData.exception.message);\n }\n traceData.frames = selectFrames(traceData.frames, 1);\n return traceData;\n}\n\nfunction minBody(payload, jsonBackup) {\n var body = payload.data.body;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n chain[i] = truncateTraceData(chain[i]);\n }\n } else if (body.trace) {\n body.trace = truncateTraceData(body.trace);\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction needsTruncation(payload, maxSize) {\n return _.maxByteSize(payload) > maxSize;\n}\n\nfunction truncate(payload, jsonBackup, maxSize) {\n maxSize = (typeof maxSize === 'undefined') ? (512 * 1024) : maxSize;\n var strategies = [\n raw,\n truncateFrames,\n truncateStrings.bind(null, 1024),\n truncateStrings.bind(null, 512),\n truncateStrings.bind(null, 256),\n minBody\n ];\n var strategy, results, result;\n\n while ((strategy = strategies.shift())) {\n results = strategy(payload, jsonBackup);\n payload = results[0];\n result = results[1];\n if (result.error || !needsTruncation(result.value, maxSize)) {\n return result;\n }\n }\n return result;\n}\n\nmodule.exports = {\n truncate: truncate,\n\n /* for testing */\n raw: raw,\n truncateFrames: truncateFrames,\n truncateStrings: truncateStrings,\n maybeTruncateValue: maybeTruncateValue\n};\n"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/rollbar.min.js b/dist/rollbar.min.js index f75f7e99a..c6f374e5a 100644 --- a/dist/rollbar.min.js +++ b/dist/rollbar.min.js @@ -1 +1 @@ -!function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=6)}([function(t,e,r){"use strict";var n=r(11),o={};function i(t,e){return e===s(t)}function s(t){var e=typeof t;return"object"!==e?e:t?t instanceof Error?"error":{}.toString.call(t).match(/\s([a-zA-Z]+)/)[1].toLowerCase():"null"}function a(t){return i(t,"function")}function u(t){var e=Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?"),r=RegExp("^"+e+"$");return c(t)&&r.test(t)}function c(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function l(){var t=v();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var r=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?r:7&r|8).toString(16)}))}var p={strictMode:!1,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};function f(t,e){var r,n;try{r=o.stringify(t)}catch(o){if(e&&a(e))try{r=e(t)}catch(t){n=t}else n=o}return{error:n,value:r}}function h(t,e){return function(r,n){try{e(r,n)}catch(e){t.error(e)}}}var d=["log","network","dom","navigation","error","manual"],m=["critical","error","warning","info","debug"];function g(t,e){for(var r=0;ra)?(s=e.path,e.path=s.substring(0,a)+i+"&"+s.substring(a+1)):-1!==u?(s=e.path,e.path=s.substring(0,u)+i+s.substring(u)):e.path=e.path+i},createItem:function(t,e,r,o,i){for(var a,u,c,p,f,d,m=[],g=[],y=0,b=t.length;y0&&((c=n(c)).extraArgs=m);var k={message:a,err:u,custom:c,timestamp:v(),callback:p,notifier:r,diagnostic:{},uuid:l()};return function(t,e){e&&void 0!==e.level&&(t.level=e.level,delete e.level);e&&void 0!==e.skipFrames&&(t.skipFrames=e.skipFrames,delete e.skipFrames)}(k,c),o&&f&&(k.request=f),i&&(k.lambdaContext=i),k._originalArgs=t,k.diagnostic.original_arg_types=g,k},addErrorContext:function(t,e){var r=t.data.custom||{},o=!1;try{for(var i=0;i2){var o=n.slice(0,3),i=o[2].indexOf("/");-1!==i&&(o[2]=o[2].substring(0,i));r=o.concat("0000:0000:0000:0000:0000").join(":")}}else r=null}catch(t){r=null}else r=null;t.user_ip=r}},formatArgsAsString:function(t){var e,r,n,o=[];for(e=0,r=t.length;e500&&(n=n.substr(0,497)+"...");break;case"null":n="null";break;case"undefined":n="undefined";break;case"symbol":n=n.toString()}o.push(n)}return o.join(" ")},formatUrl:function(t,e){if(!(e=e||t.protocol)&&t.port&&(80===t.port?e="http:":443===t.port&&(e="https:")),e=e||"https:",!t.hostname)return null;var r=e+"//"+t.hostname;return t.port&&(r=r+":"+t.port),t.path&&(r+=t.path),r},get:function(t,e){if(t){var r=e.split("."),n=t;try{for(var o=0,i=r.length;o=1&&r>e}function s(t,e,r,n,o,i,s){var a=null;return r&&(r=new Error(r)),r||n||(a=function(t,e,r,n,o){var i,s=e.environment||e.payload&&e.payload.environment;i=o?"item per minute limit reached, ignoring errors until timeout":"maxItems has been hit, ignoring errors until reset.";var a={body:{message:{body:i,extra:{maxItems:r,itemsPerMinute:n}}},language:"javascript",environment:s,notifier:{version:e.notifier&&e.notifier.version||e.version}};"browser"===t?(a.platform="browser",a.framework="browser-js",a.notifier.name="rollbar-browser-js"):"server"===t?(a.framework=e.framework||"node-js",a.notifier.name=e.notifier.name):"react-native"===t&&(a.framework=e.framework||"react-native",a.notifier.name=e.notifier.name);return a}(t,e,o,i,s)),{error:r,shouldSend:n,payload:a}}o.globalSettings={startTime:n.now(),maxItems:void 0,itemsPerMinute:void 0},o.prototype.configureGlobal=function(t){void 0!==t.startTime&&(o.globalSettings.startTime=t.startTime),void 0!==t.maxItems&&(o.globalSettings.maxItems=t.maxItems),void 0!==t.itemsPerMinute&&(o.globalSettings.itemsPerMinute=t.itemsPerMinute)},o.prototype.shouldSend=function(t,e){var r=(e=e||n.now())-this.startTime;(r<0||r>=6e4)&&(this.startTime=e,this.perMinCounter=0);var a=o.globalSettings.maxItems,u=o.globalSettings.itemsPerMinute;if(i(t,a,this.counter))return s(this.platform,this.platformOptions,a+" max items reached",!1);if(i(t,u,this.perMinCounter))return s(this.platform,this.platformOptions,u+" items per minute reached",!1);this.counter++,this.perMinCounter++;var c=!i(t,a,this.counter),l=c;return c=c&&!i(t,u,this.perMinCounter),s(this.platform,this.platformOptions,null,c,a,u,l)},o.prototype.setPlatformOptions=function(t,e){this.platform=t,this.platformOptions=e},t.exports=o},function(t,e,r){"use strict";var n=Object.prototype.hasOwnProperty,o=Object.prototype.toString,i=function(t){if(!t||"[object Object]"!==o.call(t))return!1;var e,r=n.call(t,"constructor"),i=t.constructor&&t.constructor.prototype&&n.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!r&&!i)return!1;for(e in t);return void 0===e||n.call(t,e)};t.exports=function t(){var e,r,n,o,s,a={},u=null,c=arguments.length;for(e=0;ethis.options.maxRetries&&(o=!1))}o?this._retryApiRequest(e,r):r(t)},o.prototype._retryApiRequest=function(t,e){this.retryQueue.push({item:t,callback:e}),this.retryHandle||(this.retryHandle=setInterval(function(){for(;this.retryQueue.length;){var t=this.retryQueue.shift();this._makeApiRequest(t.item,t.callback)}}.bind(this),this.options.retryInterval))},o.prototype._dequeuePendingRequest=function(t){var e=this.pendingRequests.indexOf(t);-1!==e&&(this.pendingRequests.splice(e,1),this._maybeCallWait())},o.prototype._maybeLog=function(t,e){if(this.logger&&this.options.verbose){var r=e;if(r=(r=r||n.get(t,"body.trace.exception.message"))||n.get(t,"body.trace_chain.0.exception.message"))return void this.logger.error(r);(r=n.get(t,"body.message.body"))&&this.logger.log(r)}},o.prototype._maybeCallWait=function(){return!(!n.isFunction(this.waitCallback)||0!==this.pendingItems.length||0!==this.pendingRequests.length)&&(this.waitIntervalID&&(this.waitIntervalID=clearInterval(this.waitIntervalID)),this.waitCallback(),!0)},t.exports=o},function(t,e,r){"use strict";var n=r(0);function o(t,e){this.queue=t,this.options=e,this.transforms=[],this.diagnostic={}}o.prototype.configure=function(t){this.queue&&this.queue.configure(t);var e=this.options;return this.options=n.merge(e,t),this},o.prototype.addTransform=function(t){return n.isFunction(t)&&this.transforms.push(t),this},o.prototype.log=function(t,e){if(e&&n.isFunction(e)||(e=function(){}),!this.options.enabled)return e(new Error("Rollbar is not enabled"));this.queue.addPendingItem(t);var r=t.err;this._applyTransforms(t,function(n,o){if(n)return this.queue.removePendingItem(t),e(n,null);this.queue.addItem(o,e,r,t)}.bind(this))},o.prototype._applyTransforms=function(t,e){var r=-1,n=this.transforms.length,o=this.transforms,i=this.options,s=function(t,a){t?e(t,null):++r!==n?o[r](a,i,s):e(null,a)};s(null,t)},t.exports=o},function(t,e,r){"use strict";var n=r(0),o=r(15),i={hostname:"api.rollbar.com",path:"/api/1/item/",search:null,version:"1",protocol:"https:",port:443};function s(t,e,r,n,o){this.options=t,this.transport=e,this.url=r,this.truncation=n,this.jsonBackup=o,this.accessToken=t.accessToken,this.transportOptions=a(t,r)}function a(t,e){return o.getTransportFromOptions(t,i,e)}s.prototype.postItem=function(t,e){var r=o.transportOptions(this.transportOptions,"POST"),n=o.buildPayload(this.accessToken,t,this.jsonBackup);this.transport.post(this.accessToken,r,n,e)},s.prototype.buildJsonPayload=function(t,e){var r,i=o.buildPayload(this.accessToken,t,this.jsonBackup);return(r=this.truncation?this.truncation.truncate(i):n.stringify(i)).error?(e&&e(r.error),null):r.value},s.prototype.postJsonPayload=function(t,e){var r=o.transportOptions(this.transportOptions,"POST");this.transport.postJsonPayload(this.accessToken,r,t,e)},s.prototype.configure=function(t){var e=this.oldOptions;return this.options=n.merge(e,t),this.transportOptions=a(this.options,this.url),void 0!==this.options.accessToken&&(this.accessToken=this.options.accessToken),this},t.exports=s},function(t,e,r){"use strict";var n=r(0);t.exports={buildPayload:function(t,e,r){if(!n.isType(e.context,"string")){var o=n.stringify(e.context,r);o.error?e.context="Error: could not serialize 'context'":e.context=o.value||"",e.context.length>255&&(e.context=e.context.substr(0,255))}return{access_token:t,data:e}},getTransportFromOptions:function(t,e,r){var n=e.hostname,o=e.protocol,i=e.port,s=e.path,a=e.search,u=t.timeout,c=t.proxy;if(t.endpoint){var l=r.parse(t.endpoint);n=l.hostname,o=l.protocol,i=l.port,s=l.pathname,a=l.search}return{timeout:u,hostname:n,protocol:o,port:i,path:s,search:a,proxy:c}},transportOptions:function(t,e){var r=t.protocol||"https:",n=t.port||("http:"===r?80:"https:"===r?443:void 0),o=t.hostname,i=t.path,s=t.timeout;return t.search&&(i+=t.search),t.proxy&&(i=r+"//"+o+i,o=t.proxy.host||t.proxy.hostname,n=t.proxy.port,r=t.proxy.protocol||r),{timeout:s,protocol:r,hostname:o,path:i,port:n,method:e}},appendPathToPath:function(t,e){var r=/\/$/.test(t),n=/^\//.test(e);return r&&n?e=e.substring(1):r||n||(e="/"+e),t+e}}},function(t,e){!function(t){"use strict";t.console||(t.console={});for(var e,r,n=t.console,o=function(){},i=["memory"],s="assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(",");e=i.pop();)n[e]||(n[e]={});for(;r=s.pop();)n[r]||(n[r]=o)}("undefined"==typeof window?this:window)},function(t,e,r){"use strict";var n={ieVersion:function(){if("undefined"!=typeof document){for(var t=3,e=document.createElement("div"),r=e.getElementsByTagName("i");e.innerHTML="\x3c!--[if gt IE "+ ++t+"]>4?t:void 0}}};t.exports=n},function(t,e,r){"use strict";function n(t,e,r,n){t._rollbarWrappedError&&(n[4]||(n[4]=t._rollbarWrappedError),n[5]||(n[5]=t._rollbarWrappedError._rollbarContext),t._rollbarWrappedError=null);var o=e.handleUncaughtException.apply(e,n);r&&r.apply(t,n),"anonymous"===o&&(e.anonymousErrorsPending+=1)}t.exports={captureUncaughtExceptions:function(t,e,r){if(t){var o;if("function"==typeof e._rollbarOldOnError)o=e._rollbarOldOnError;else if(t.onerror){for(o=t.onerror;o._rollbarOldOnError;)o=o._rollbarOldOnError;e._rollbarOldOnError=o}e.handleAnonymousErrors();var i=function(){var r=Array.prototype.slice.call(arguments,0);n(t,e,o,r)};r&&(i._rollbarOldOnError=o),t.onerror=i}},captureUnhandledRejections:function(t,e,r){if(t){"function"==typeof t._rollbarURH&&t._rollbarURH.belongsToShim&&t.removeEventListener("unhandledrejection",t._rollbarURH);var n=function(t){var r,n,o;try{r=t.reason}catch(t){r=void 0}try{n=t.promise}catch(t){n="[unhandledrejection] error getting `promise` from event"}try{o=t.detail,!r&&o&&(r=o.reason,n=o.promise)}catch(t){}r||(r="[unhandledrejection] error getting `reason` from event"),e&&e.handleUnhandledRejection&&e.handleUnhandledRejection(r,n)};n.belongsToShim=r,t._rollbarURH=n,t.addEventListener("unhandledrejection",n)}}}},function(t,e,r){"use strict";var n=r(0),o=r(1);function i(t){this.truncation=t}function s(){var t="undefined"!=typeof window&&window||"undefined"!=typeof self&&self,e=t&&t.Zone&&t.Zone.current,r=Array.prototype.slice.call(arguments);if(e&&"angular"===e._name){var n=e._parent;n.run((function(){a.apply(void 0,r)}))}else a.apply(void 0,r)}function a(t,e,r,i,s,a,c){if("undefined"!=typeof RollbarProxy)return function(t,e){(new RollbarProxy).sendJsonPayload(t,(function(t){}),(function(t){e(new Error(t))}))}(i,s);var l;if(!(l=a?a():function(){var t,e,r=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],n=r.length;for(e=0;e=400&&t.status<600}(l)){if(403===l.status){var e=t.value&&t.value.message;o.error(e)}s(new Error(String(l.status)))}else{s(u("XHR response had no status code (likely connection failure)"))}}}catch(t){var r;r=t&&t.stack?t:new Error(t),s(r)}var i};l.open(r,e,!0),l.setRequestHeader&&(l.setRequestHeader("Content-Type","application/json"),l.setRequestHeader("X-Rollbar-Access-Token",t)),n.isFiniteNumber(c)&&(l.timeout=c),l.onreadystatechange=p,l.send(i)}catch(t){if("undefined"!=typeof XDomainRequest){if(!window||!window.location)return s(new Error("No window available during request, unknown environment"));"http:"===window.location.href.substring(0,5)&&"https"===e.substring(0,5)&&(e="http"+e.substring(5));var f=new XDomainRequest;f.onprogress=function(){},f.ontimeout=function(){s(u("Request timed out","ETIMEDOUT"))},f.onerror=function(){s(new Error("Error during request"))},f.onload=function(){var t=n.jsonParse(f.responseText);s(t.error,t.value)},f.open(r,e,!0),f.send(i)}else s(new Error("Cannot find a method to transport a request"))}}catch(t){s(t)}}function u(t,e){var r=new Error(t);return r.code=e||"ENOTFOUND",r}i.prototype.get=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){}),n.addParamsAndAccessTokenToPath(t,e,r);s(t,n.formatUrl(e),"GET",null,o,i,e.timeout)},i.prototype.post=function(t,e,r,o,i){if(o&&n.isFunction(o)||(o=function(){}),!r)return o(new Error("Cannot send empty request"));var a;if((a=this.truncation?this.truncation.truncate(r):n.stringify(r)).error)return o(a.error);var u=a.value;s(t,n.formatUrl(e),"POST",u,o,i,e.timeout)},i.prototype.postJsonPayload=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){});s(t,n.formatUrl(e),"POST",r,o,i,e.timeout)},t.exports=i},function(t,e,r){"use strict";var n=r(0),o=r(3),i=r(1);function s(t,e,r){var o=t.message,i=t.custom;o||(o="Item sent with null or missing arguments.");var s={body:o};i&&(s.extra=n.merge(i)),n.set(t,"data.body",{message:s}),r(null,t)}function a(t){var e=t.stackInfo.stack;return e&&0===e.length&&t._unhandledStackInfo&&t._unhandledStackInfo.stack&&(e=t._unhandledStackInfo.stack),e}function u(t,e,r){var i=t&&t.data.description,s=t&&t.custom,u=a(t),l=o.guessErrorClass(e.message),p={exception:{class:c(e,l[0],r),message:l[1]}};if(i&&(p.exception.description=i),u){var f,h,d,m,g,v,y,b;for(0===u.length&&(p.exception.stack=e.rawStack,p.exception.raw=String(e.rawException)),p.frames=[],y=0;y-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var r=e.replace(/^\s+/,"").replace(/\(eval code/g,"("),n=r.match(/ (\((.+):(\d+):(\d+)\)$)/),o=(r=n?r.replace(n[0],""):r).split(/\s+/).slice(1),i=this.extractLocation(n?n[1]:o.pop()),s=o.join(" ")||void 0,a=["eval",""].indexOf(i[0])>-1?void 0:i[0];return new t({functionName:s,fileName:a,lineNumber:i[1],columnNumber:i[2],source:e})}),this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter((function(t){return!t.match(n)}),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 t({functionName:e});var r=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(r),o=n&&n[1]?n[1]:void 0,i=this.extractLocation(e.replace(r,""));return new t({functionName:o,fileName:i[0],lineNumber:i[1],columnNumber:i[2],source:e})}),this)},parseOpera:function(t){return!t.stacktrace||t.message.indexOf("\n")>-1&&t.message.split("\n").length>t.stacktrace.split("\n").length?this.parseOpera9(t):t.stack?this.parseOpera11(t):this.parseOpera10(t)},parseOpera9:function(e){for(var r=/Line (\d+).*script (?:in )?(\S+)/i,n=e.message.split("\n"),o=[],i=2,s=n.length;i/,"$2").replace(/\([^)]*\)/g,"")||void 0;i.match(/\(([^)]*)\)/)&&(r=i.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var a=void 0===r||"[arguments not available]"===r?void 0:r.split(",");return new t({functionName:s,args:a,fileName:o[0],lineNumber:o[1],columnNumber:o[2],source:e})}),this)}}})?n.apply(e,o):n)||(t.exports=i)}()},function(t,e,r){var n,o,i;!function(r,s){"use strict";o=[],void 0===(i="function"==typeof(n=function(){function t(t){return t.charAt(0).toUpperCase()+t.substring(1)}function e(t){return function(){return this[t]}}var r=["isConstructor","isEval","isNative","isToplevel"],n=["columnNumber","lineNumber"],o=["fileName","functionName","source"],i=r.concat(n,o,["args"],["evalOrigin"]);function s(e){if(e)for(var r=0;ro&&(i=this.maxQueueSize-o),this.maxQueueSize=o,this.queue.splice(0,i)},o.prototype.copyEvents=function(){var t=Array.prototype.slice.call(this.queue,0);if(n.isFunction(this.options.filterTelemetry))try{for(var e=t.length;e--;)this.options.filterTelemetry(t[e])&&t.splice(e,1)}catch(t){this.options.filterTelemetry=null}return t},o.prototype.capture=function(t,e,r,o,s){var a={level:i(t,r),type:t,timestamp_ms:s||n.now(),body:e,source:"client"};o&&(a.uuid=o);try{if(n.isFunction(this.options.filterTelemetry)&&this.options.filterTelemetry(a))return!1}catch(t){this.options.filterTelemetry=null}return this.push(a),a},o.prototype.captureEvent=function(t,e,r,n){return this.capture(t,e,r,n)},o.prototype.captureError=function(t,e,r,n){var o={message:t.message||String(t)};return t.stack&&(o.stack=t.stack),this.capture("error",o,e,r,n)},o.prototype.captureLog=function(t,e,r,n){return this.capture("log",{message:t},e,r,n)},o.prototype.captureNetwork=function(t,e,r,n){e=e||"xhr",t.subtype=t.subtype||e,n&&(t.request=n);var o=this.levelFromStatus(t.status_code);return this.capture("network",t,o,r)},o.prototype.levelFromStatus=function(t){return t>=200&&t<400?"info":0===t||t>=400?"error":"info"},o.prototype.captureDom=function(t,e,r,n,o){var i={subtype:t,element:e};return void 0!==r&&(i.value=r),void 0!==n&&(i.checked=n),this.capture("dom",i,"info",o)},o.prototype.captureNavigation=function(t,e,r){return this.capture("navigation",{from:t,to:e},"info",r)},o.prototype.captureDomContentLoaded=function(t){return this.capture("navigation",{subtype:"DOMContentLoaded"},"info",void 0,t&&t.getTime())},o.prototype.captureLoad=function(t){return this.capture("navigation",{subtype:"load"},"info",void 0,t&&t.getTime())},o.prototype.captureConnectivityChange=function(t,e){return this.captureNetwork({change:t},"connectivity",e)},o.prototype._captureRollbarItem=function(t){if(this.options.includeItemsInTelemetry)return t.err?this.captureError(t.err,t.level,t.uuid,t.timestamp):t.message?this.captureLog(t.message,t.level,t.uuid,t.timestamp):t.custom?this.capture("log",t.custom,t.level,t.uuid,t.timestamp):void 0},o.prototype.push=function(t){this.queue.push(t),this.queue.length>this.maxQueueSize&&this.queue.shift()},t.exports=o},function(t,e,r){"use strict";var n=r(0),o=r(4),i=r(2),s=r(30),a={network:!0,networkResponseHeaders:!1,networkResponseBody:!1,networkRequestHeaders:!1,networkRequestBody:!1,networkErrorOnHttp5xx:!1,networkErrorOnHttp4xx:!1,networkErrorOnHttp0:!1,log:!0,dom:!0,navigation:!0,connectivity:!0,contentSecurityPolicy:!0,errorOnContentSecurityPolicy:!1};function u(t,e,r,n,o){var i=t[e];t[e]=r(i),n&&n[o].push([t,e,i])}function c(t,e){for(var r;t[e].length;)(r=t[e].shift())[0][r[1]]=r[2]}function l(t,e,r,o,i){this.options=t;var s=t.autoInstrument;!1===t.enabled||!1===s?this.autoInstrument={}:(n.isType(s,"object")||(s=a),this.autoInstrument=n.merge(a,s)),this.scrubTelemetryInputs=!!t.scrubTelemetryInputs,this.telemetryScrubber=t.telemetryScrubber,this.defaultValueScrubber=function(t){for(var e=[],r=0;r3)){i.__rollbar_xhr.end_time_ms=n.now();var e=null;if(i.__rollbar_xhr.response_content_type=i.getResponseHeader("Content-Type"),t.autoInstrument.networkResponseHeaders){var r=t.autoInstrument.networkResponseHeaders;e={};try{var s,a;if(!0===r){var u=i.getAllResponseHeaders();if(u){var c,l,p=u.trim().split(/[\r\n]+/);for(a=0;a=500&&this.autoInstrument.networkErrorOnHttp5xx||e>=400&&this.autoInstrument.networkErrorOnHttp4xx||0===e&&this.autoInstrument.networkErrorOnHttp0){var r=new Error("HTTP request failed with Status "+e);r.stack=t.stack,this.rollbar.error(r,{skipFrames:1})}},l.prototype.deinstrumentConsole=function(){if("console"in this._window&&this._window.console.log)for(var t;this.replacements.log.length;)t=this.replacements.log.shift(),this._window.console[t[0]]=t[1]},l.prototype.instrumentConsole=function(){if("console"in this._window&&this._window.console.log){var t=this,e=this._window.console,r=["debug","info","warn","error","log"];try{for(var o=0,i=r.length;o=0&&t.options[t.selectedIndex]&&this.captureDomEvent("input",t,t.options[t.selectedIndex].value)},l.prototype.captureDomEvent=function(t,e,r,n){if(void 0!==r)if(this.scrubTelemetryInputs||"password"===s.getElementType(e))r="[scrubbed]";else{var o=s.describeElement(e);this.telemetryScrubber?this.telemetryScrubber(o)&&(r="[scrubbed]"):this.defaultValueScrubber(o)&&(r="[scrubbed]")}var i=s.elementArrayToString(s.treeToArray(e));this.telemeter.captureDom(t,i,r,n)},l.prototype.deinstrumentNavigation=function(){var t=this._window.chrome;!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState&&c(this.replacements,"navigation")},l.prototype.instrumentNavigation=function(){var t=this._window.chrome;if(!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState){var e=this;u(this._window,"onpopstate",(function(t){return function(){var r=e._location.href;e.handleUrlChange(e._lastHref,r),t&&t.apply(this,arguments)}}),this.replacements,"navigation"),u(this._window.history,"pushState",(function(t){return function(){var r=arguments.length>2?arguments[2]:void 0;return r&&e.handleUrlChange(e._lastHref,r+""),t.apply(this,arguments)}}),this.replacements,"navigation")}},l.prototype.handleUrlChange=function(t,e){var r=i.parse(this._location.href),n=i.parse(e),o=i.parse(t);this._lastHref=e,r.protocol===n.protocol&&r.host===n.host&&(e=n.path+(n.hash||"")),r.protocol===o.protocol&&r.host===o.host&&(t=o.path+(o.hash||"")),this.telemeter.captureNavigation(t,e)},l.prototype.deinstrumentConnectivity=function(){("addEventListener"in this._window||"body"in this._document)&&(this._window.addEventListener?this.removeListeners("connectivity"):c(this.replacements,"connectivity"))},l.prototype.instrumentConnectivity=function(){if("addEventListener"in this._window||"body"in this._document)if(this._window.addEventListener)this.addListener("connectivity",this._window,"online",void 0,function(){this.telemeter.captureConnectivityChange("online")}.bind(this),!0),this.addListener("connectivity",this._window,"offline",void 0,function(){this.telemeter.captureConnectivityChange("offline")}.bind(this),!0);else{var t=this;u(this._document.body,"ononline",(function(e){return function(){t.telemeter.captureConnectivityChange("online"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity"),u(this._document.body,"onoffline",(function(e){return function(){t.telemeter.captureConnectivityChange("offline"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity")}},l.prototype.handleCspEvent=function(t){var e="Security Policy Violation: blockedURI: "+t.blockedURI+", violatedDirective: "+t.violatedDirective+", effectiveDirective: "+t.effectiveDirective+", ";t.sourceFile&&(e+="location: "+t.sourceFile+", line: "+t.lineNumber+", col: "+t.columnNumber+", "),e+="originalPolicy: "+t.originalPolicy,this.telemeter.captureLog(e,"error"),this.handleCspError(e)},l.prototype.handleCspError=function(t){this.autoInstrument.errorOnContentSecurityPolicy&&this.rollbar.error(t)},l.prototype.deinstrumentContentSecurityPolicy=function(){"addEventListener"in this._window&&this.removeListeners("contentsecuritypolicy")},l.prototype.instrumentContentSecurityPolicy=function(){if("addEventListener"in this._window){var t=this.handleCspEvent.bind(this);this.addListener("contentsecuritypolicy",this._window,"securitypolicyviolation",null,t,!1)}},l.prototype.addListener=function(t,e,r,n,o,i){e.addEventListener?(e.addEventListener(r,o,i),this.eventRemovers[t].push((function(){e.removeEventListener(r,o,i)}))):n&&(e.attachEvent(n,o),this.eventRemovers[t].push((function(){e.detachEvent(n,o)})))},l.prototype.removeListeners=function(t){for(;this.eventRemovers[t].length;)this.eventRemovers[t].shift()()},t.exports=l},function(t,e,r){"use strict";function n(t){return(t.getAttribute("type")||"").toLowerCase()}function o(t){if(!t||!t.tagName)return"";var e=[t.tagName];t.id&&e.push("#"+t.id),t.classes&&e.push("."+t.classes.join("."));for(var r=0;r=0;a--){if(e=o(t[a]),r=s+i.length*n+e.length,a=83){i.unshift("...");break}i.unshift(e),s+=e.length}return i.join(" > ")},treeToArray:function(t){for(var e,r=[],n=0;t&&n<5&&"html"!==(e=i(t)).tagName;n++)r.unshift(e),t=t.parentNode;return r},getElementFromEvent:function(t,e){return t.target?t.target:e&&e.elementFromPoint?e.elementFromPoint(t.clientX,t.clientY):void 0},isDescribedElement:function(t,e,r){if(t.tagName.toLowerCase()!==e.toLowerCase())return!1;if(!r)return!0;t=n(t);for(var o=0;o2*e?t.slice(0,e).concat(t.slice(r-e)):t}function a(t,e,r){r=void 0===r?30:r;var o,i=t.data.body;if(i.trace_chain)for(var a=i.trace_chain,u=0;ut?e.slice(0,t-3).concat("..."):e}function c(t,e,r){return[e=o(e,(function e(r,i,s){switch(n.typeName(i)){case"string":return u(t,i);case"object":case"array":return o(i,e,s);default:return i}})),n.stringify(e,r)]}function l(t){return t.exception&&(delete t.exception.description,t.exception.message=u(255,t.exception.message)),t.frames=s(t.frames,1),t}function p(t,e){var r=t.data.body;if(r.trace_chain)for(var o=r.trace_chain,i=0;ie}t.exports={truncate:function(t,e,r){r=void 0===r?524288:r;for(var n,o,s,u=[i,a,c.bind(null,1024),c.bind(null,512),c.bind(null,256),p];n=u.shift();)if(t=(o=n(t,e))[0],(s=o[1]).error||!f(s.value,r))return s;return s},raw:i,truncateFrames:a,truncateStrings:c,maybeTruncateValue:u}}]); \ No newline at end of file +!function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=6)}([function(t,e,r){"use strict";var n=r(11),o={};function i(t,e){return e===s(t)}function s(t){var e=typeof t;return"object"!==e?e:t?t instanceof Error?"error":{}.toString.call(t).match(/\s([a-zA-Z]+)/)[1].toLowerCase():"null"}function a(t){return i(t,"function")}function u(t){var e=Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?"),r=RegExp("^"+e+"$");return c(t)&&r.test(t)}function c(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function l(){var t=y();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var r=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?r:7&r|8).toString(16)}))}var p={strictMode:!1,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};function f(t,e){var r,n;try{r=o.stringify(t)}catch(o){if(e&&a(e))try{r=e(t)}catch(t){n=t}else n=o}return{error:n,value:r}}function h(t,e){return function(r,n){try{e(r,n)}catch(e){t.error(e)}}}function d(t){return function t(e,r){var n,o,a,u={};try{for(o in e)(n=e[o])&&(i(n,"object")||i(n,"array"))?r.includes(n)?u[o]="Removed circular reference: "+s(n):((a=r.slice()).push(n),u[o]=t(n,a)):u[o]=n}catch(t){u="Failed cloning custom data: "+t.message}return u}(t,[t])}var m=["log","network","dom","navigation","error","manual"],g=["critical","error","warning","info","debug"];function v(t,e){for(var r=0;ra)?(s=e.path,e.path=s.substring(0,a)+i+"&"+s.substring(a+1)):-1!==u?(s=e.path,e.path=s.substring(0,u)+i+s.substring(u)):e.path=e.path+i},createItem:function(t,e,r,n,o){for(var i,a,u,c,p,f,m=[],g=[],v=0,b=t.length;v0&&(u||(u=d({})),u.extraArgs=d(m));var k={message:i,err:a,custom:u,timestamp:y(),callback:c,notifier:r,diagnostic:{},uuid:l()};return function(t,e){e&&void 0!==e.level&&(t.level=e.level,delete e.level);e&&void 0!==e.skipFrames&&(t.skipFrames=e.skipFrames,delete e.skipFrames)}(k,u),n&&p&&(k.request=p),o&&(k.lambdaContext=o),k._originalArgs=t,k.diagnostic.original_arg_types=g,k},addErrorContext:function(t,e){var r=t.data.custom||{},o=!1;try{for(var i=0;i2){var o=n.slice(0,3),i=o[2].indexOf("/");-1!==i&&(o[2]=o[2].substring(0,i));r=o.concat("0000:0000:0000:0000:0000").join(":")}}else r=null}catch(t){r=null}else r=null;t.user_ip=r}},formatArgsAsString:function(t){var e,r,n,o=[];for(e=0,r=t.length;e500&&(n=n.substr(0,497)+"...");break;case"null":n="null";break;case"undefined":n="undefined";break;case"symbol":n=n.toString()}o.push(n)}return o.join(" ")},formatUrl:function(t,e){if(!(e=e||t.protocol)&&t.port&&(80===t.port?e="http:":443===t.port&&(e="https:")),e=e||"https:",!t.hostname)return null;var r=e+"//"+t.hostname;return t.port&&(r=r+":"+t.port),t.path&&(r+=t.path),r},get:function(t,e){if(t){var r=e.split("."),n=t;try{for(var o=0,i=r.length;o=1&&r>e}function s(t,e,r,n,o,i,s){var a=null;return r&&(r=new Error(r)),r||n||(a=function(t,e,r,n,o){var i,s=e.environment||e.payload&&e.payload.environment;i=o?"item per minute limit reached, ignoring errors until timeout":"maxItems has been hit, ignoring errors until reset.";var a={body:{message:{body:i,extra:{maxItems:r,itemsPerMinute:n}}},language:"javascript",environment:s,notifier:{version:e.notifier&&e.notifier.version||e.version}};"browser"===t?(a.platform="browser",a.framework="browser-js",a.notifier.name="rollbar-browser-js"):"server"===t?(a.framework=e.framework||"node-js",a.notifier.name=e.notifier.name):"react-native"===t&&(a.framework=e.framework||"react-native",a.notifier.name=e.notifier.name);return a}(t,e,o,i,s)),{error:r,shouldSend:n,payload:a}}o.globalSettings={startTime:n.now(),maxItems:void 0,itemsPerMinute:void 0},o.prototype.configureGlobal=function(t){void 0!==t.startTime&&(o.globalSettings.startTime=t.startTime),void 0!==t.maxItems&&(o.globalSettings.maxItems=t.maxItems),void 0!==t.itemsPerMinute&&(o.globalSettings.itemsPerMinute=t.itemsPerMinute)},o.prototype.shouldSend=function(t,e){var r=(e=e||n.now())-this.startTime;(r<0||r>=6e4)&&(this.startTime=e,this.perMinCounter=0);var a=o.globalSettings.maxItems,u=o.globalSettings.itemsPerMinute;if(i(t,a,this.counter))return s(this.platform,this.platformOptions,a+" max items reached",!1);if(i(t,u,this.perMinCounter))return s(this.platform,this.platformOptions,u+" items per minute reached",!1);this.counter++,this.perMinCounter++;var c=!i(t,a,this.counter),l=c;return c=c&&!i(t,u,this.perMinCounter),s(this.platform,this.platformOptions,null,c,a,u,l)},o.prototype.setPlatformOptions=function(t,e){this.platform=t,this.platformOptions=e},t.exports=o},function(t,e,r){"use strict";var n=Object.prototype.hasOwnProperty,o=Object.prototype.toString,i=function(t){if(!t||"[object Object]"!==o.call(t))return!1;var e,r=n.call(t,"constructor"),i=t.constructor&&t.constructor.prototype&&n.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!r&&!i)return!1;for(e in t);return void 0===e||n.call(t,e)};t.exports=function t(){var e,r,n,o,s,a={},u=null,c=arguments.length;for(e=0;ethis.options.maxRetries&&(o=!1))}o?this._retryApiRequest(e,r):r(t)},o.prototype._retryApiRequest=function(t,e){this.retryQueue.push({item:t,callback:e}),this.retryHandle||(this.retryHandle=setInterval(function(){for(;this.retryQueue.length;){var t=this.retryQueue.shift();this._makeApiRequest(t.item,t.callback)}}.bind(this),this.options.retryInterval))},o.prototype._dequeuePendingRequest=function(t){var e=this.pendingRequests.indexOf(t);-1!==e&&(this.pendingRequests.splice(e,1),this._maybeCallWait())},o.prototype._maybeLog=function(t,e){if(this.logger&&this.options.verbose){var r=e;if(r=(r=r||n.get(t,"body.trace.exception.message"))||n.get(t,"body.trace_chain.0.exception.message"))return void this.logger.error(r);(r=n.get(t,"body.message.body"))&&this.logger.log(r)}},o.prototype._maybeCallWait=function(){return!(!n.isFunction(this.waitCallback)||0!==this.pendingItems.length||0!==this.pendingRequests.length)&&(this.waitIntervalID&&(this.waitIntervalID=clearInterval(this.waitIntervalID)),this.waitCallback(),!0)},t.exports=o},function(t,e,r){"use strict";var n=r(0);function o(t,e){this.queue=t,this.options=e,this.transforms=[],this.diagnostic={}}o.prototype.configure=function(t){this.queue&&this.queue.configure(t);var e=this.options;return this.options=n.merge(e,t),this},o.prototype.addTransform=function(t){return n.isFunction(t)&&this.transforms.push(t),this},o.prototype.log=function(t,e){if(e&&n.isFunction(e)||(e=function(){}),!this.options.enabled)return e(new Error("Rollbar is not enabled"));this.queue.addPendingItem(t);var r=t.err;this._applyTransforms(t,function(n,o){if(n)return this.queue.removePendingItem(t),e(n,null);this.queue.addItem(o,e,r,t)}.bind(this))},o.prototype._applyTransforms=function(t,e){var r=-1,n=this.transforms.length,o=this.transforms,i=this.options,s=function(t,a){t?e(t,null):++r!==n?o[r](a,i,s):e(null,a)};s(null,t)},t.exports=o},function(t,e,r){"use strict";var n=r(0),o=r(15),i={hostname:"api.rollbar.com",path:"/api/1/item/",search:null,version:"1",protocol:"https:",port:443};function s(t,e,r,n,o){this.options=t,this.transport=e,this.url=r,this.truncation=n,this.jsonBackup=o,this.accessToken=t.accessToken,this.transportOptions=a(t,r)}function a(t,e){return o.getTransportFromOptions(t,i,e)}s.prototype.postItem=function(t,e){var r=o.transportOptions(this.transportOptions,"POST"),n=o.buildPayload(this.accessToken,t,this.jsonBackup);this.transport.post(this.accessToken,r,n,e)},s.prototype.buildJsonPayload=function(t,e){var r,i=o.buildPayload(this.accessToken,t,this.jsonBackup);return(r=this.truncation?this.truncation.truncate(i):n.stringify(i)).error?(e&&e(r.error),null):r.value},s.prototype.postJsonPayload=function(t,e){var r=o.transportOptions(this.transportOptions,"POST");this.transport.postJsonPayload(this.accessToken,r,t,e)},s.prototype.configure=function(t){var e=this.oldOptions;return this.options=n.merge(e,t),this.transportOptions=a(this.options,this.url),void 0!==this.options.accessToken&&(this.accessToken=this.options.accessToken),this},t.exports=s},function(t,e,r){"use strict";var n=r(0);t.exports={buildPayload:function(t,e,r){if(!n.isType(e.context,"string")){var o=n.stringify(e.context,r);o.error?e.context="Error: could not serialize 'context'":e.context=o.value||"",e.context.length>255&&(e.context=e.context.substr(0,255))}return{access_token:t,data:e}},getTransportFromOptions:function(t,e,r){var n=e.hostname,o=e.protocol,i=e.port,s=e.path,a=e.search,u=t.timeout,c=t.proxy;if(t.endpoint){var l=r.parse(t.endpoint);n=l.hostname,o=l.protocol,i=l.port,s=l.pathname,a=l.search}return{timeout:u,hostname:n,protocol:o,port:i,path:s,search:a,proxy:c}},transportOptions:function(t,e){var r=t.protocol||"https:",n=t.port||("http:"===r?80:"https:"===r?443:void 0),o=t.hostname,i=t.path,s=t.timeout;return t.search&&(i+=t.search),t.proxy&&(i=r+"//"+o+i,o=t.proxy.host||t.proxy.hostname,n=t.proxy.port,r=t.proxy.protocol||r),{timeout:s,protocol:r,hostname:o,path:i,port:n,method:e}},appendPathToPath:function(t,e){var r=/\/$/.test(t),n=/^\//.test(e);return r&&n?e=e.substring(1):r||n||(e="/"+e),t+e}}},function(t,e){!function(t){"use strict";t.console||(t.console={});for(var e,r,n=t.console,o=function(){},i=["memory"],s="assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(",");e=i.pop();)n[e]||(n[e]={});for(;r=s.pop();)n[r]||(n[r]=o)}("undefined"==typeof window?this:window)},function(t,e,r){"use strict";var n={ieVersion:function(){if("undefined"!=typeof document){for(var t=3,e=document.createElement("div"),r=e.getElementsByTagName("i");e.innerHTML="\x3c!--[if gt IE "+ ++t+"]>4?t:void 0}}};t.exports=n},function(t,e,r){"use strict";function n(t,e,r,n){t._rollbarWrappedError&&(n[4]||(n[4]=t._rollbarWrappedError),n[5]||(n[5]=t._rollbarWrappedError._rollbarContext),t._rollbarWrappedError=null);var o=e.handleUncaughtException.apply(e,n);r&&r.apply(t,n),"anonymous"===o&&(e.anonymousErrorsPending+=1)}t.exports={captureUncaughtExceptions:function(t,e,r){if(t){var o;if("function"==typeof e._rollbarOldOnError)o=e._rollbarOldOnError;else if(t.onerror){for(o=t.onerror;o._rollbarOldOnError;)o=o._rollbarOldOnError;e._rollbarOldOnError=o}e.handleAnonymousErrors();var i=function(){var r=Array.prototype.slice.call(arguments,0);n(t,e,o,r)};r&&(i._rollbarOldOnError=o),t.onerror=i}},captureUnhandledRejections:function(t,e,r){if(t){"function"==typeof t._rollbarURH&&t._rollbarURH.belongsToShim&&t.removeEventListener("unhandledrejection",t._rollbarURH);var n=function(t){var r,n,o;try{r=t.reason}catch(t){r=void 0}try{n=t.promise}catch(t){n="[unhandledrejection] error getting `promise` from event"}try{o=t.detail,!r&&o&&(r=o.reason,n=o.promise)}catch(t){}r||(r="[unhandledrejection] error getting `reason` from event"),e&&e.handleUnhandledRejection&&e.handleUnhandledRejection(r,n)};n.belongsToShim=r,t._rollbarURH=n,t.addEventListener("unhandledrejection",n)}}}},function(t,e,r){"use strict";var n=r(0),o=r(1);function i(t){this.truncation=t}function s(){var t="undefined"!=typeof window&&window||"undefined"!=typeof self&&self,e=t&&t.Zone&&t.Zone.current,r=Array.prototype.slice.call(arguments);if(e&&"angular"===e._name){var n=e._parent;n.run((function(){a.apply(void 0,r)}))}else a.apply(void 0,r)}function a(t,e,r,i,s,a,c){if("undefined"!=typeof RollbarProxy)return function(t,e){(new RollbarProxy).sendJsonPayload(t,(function(t){}),(function(t){e(new Error(t))}))}(i,s);var l;if(!(l=a?a():function(){var t,e,r=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],n=r.length;for(e=0;e=400&&t.status<600}(l)){if(403===l.status){var e=t.value&&t.value.message;o.error(e)}s(new Error(String(l.status)))}else{s(u("XHR response had no status code (likely connection failure)"))}}}catch(t){var r;r=t&&t.stack?t:new Error(t),s(r)}var i};l.open(r,e,!0),l.setRequestHeader&&(l.setRequestHeader("Content-Type","application/json"),l.setRequestHeader("X-Rollbar-Access-Token",t)),n.isFiniteNumber(c)&&(l.timeout=c),l.onreadystatechange=p,l.send(i)}catch(t){if("undefined"!=typeof XDomainRequest){if(!window||!window.location)return s(new Error("No window available during request, unknown environment"));"http:"===window.location.href.substring(0,5)&&"https"===e.substring(0,5)&&(e="http"+e.substring(5));var f=new XDomainRequest;f.onprogress=function(){},f.ontimeout=function(){s(u("Request timed out","ETIMEDOUT"))},f.onerror=function(){s(new Error("Error during request"))},f.onload=function(){var t=n.jsonParse(f.responseText);s(t.error,t.value)},f.open(r,e,!0),f.send(i)}else s(new Error("Cannot find a method to transport a request"))}}catch(t){s(t)}}function u(t,e){var r=new Error(t);return r.code=e||"ENOTFOUND",r}i.prototype.get=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){}),n.addParamsAndAccessTokenToPath(t,e,r);s(t,n.formatUrl(e),"GET",null,o,i,e.timeout)},i.prototype.post=function(t,e,r,o,i){if(o&&n.isFunction(o)||(o=function(){}),!r)return o(new Error("Cannot send empty request"));var a;if((a=this.truncation?this.truncation.truncate(r):n.stringify(r)).error)return o(a.error);var u=a.value;s(t,n.formatUrl(e),"POST",u,o,i,e.timeout)},i.prototype.postJsonPayload=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){});s(t,n.formatUrl(e),"POST",r,o,i,e.timeout)},t.exports=i},function(t,e,r){"use strict";var n=r(0),o=r(3),i=r(1);function s(t,e,r){var o=t.message,i=t.custom;o||(o="Item sent with null or missing arguments.");var s={body:o};i&&(s.extra=n.merge(i)),n.set(t,"data.body",{message:s}),r(null,t)}function a(t){var e=t.stackInfo.stack;return e&&0===e.length&&t._unhandledStackInfo&&t._unhandledStackInfo.stack&&(e=t._unhandledStackInfo.stack),e}function u(t,e,r){var i=t&&t.data.description,s=t&&t.custom,u=a(t),l=o.guessErrorClass(e.message),p={exception:{class:c(e,l[0],r),message:l[1]}};if(i&&(p.exception.description=i),u){var f,h,d,m,g,v,y,b;for(0===u.length&&(p.exception.stack=e.rawStack,p.exception.raw=String(e.rawException)),p.frames=[],y=0;y-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var r=e.replace(/^\s+/,"").replace(/\(eval code/g,"("),n=r.match(/ (\((.+):(\d+):(\d+)\)$)/),o=(r=n?r.replace(n[0],""):r).split(/\s+/).slice(1),i=this.extractLocation(n?n[1]:o.pop()),s=o.join(" ")||void 0,a=["eval",""].indexOf(i[0])>-1?void 0:i[0];return new t({functionName:s,fileName:a,lineNumber:i[1],columnNumber:i[2],source:e})}),this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter((function(t){return!t.match(n)}),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 t({functionName:e});var r=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(r),o=n&&n[1]?n[1]:void 0,i=this.extractLocation(e.replace(r,""));return new t({functionName:o,fileName:i[0],lineNumber:i[1],columnNumber:i[2],source:e})}),this)},parseOpera:function(t){return!t.stacktrace||t.message.indexOf("\n")>-1&&t.message.split("\n").length>t.stacktrace.split("\n").length?this.parseOpera9(t):t.stack?this.parseOpera11(t):this.parseOpera10(t)},parseOpera9:function(e){for(var r=/Line (\d+).*script (?:in )?(\S+)/i,n=e.message.split("\n"),o=[],i=2,s=n.length;i/,"$2").replace(/\([^)]*\)/g,"")||void 0;i.match(/\(([^)]*)\)/)&&(r=i.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var a=void 0===r||"[arguments not available]"===r?void 0:r.split(",");return new t({functionName:s,args:a,fileName:o[0],lineNumber:o[1],columnNumber:o[2],source:e})}),this)}}})?n.apply(e,o):n)||(t.exports=i)}()},function(t,e,r){var n,o,i;!function(r,s){"use strict";o=[],void 0===(i="function"==typeof(n=function(){function t(t){return t.charAt(0).toUpperCase()+t.substring(1)}function e(t){return function(){return this[t]}}var r=["isConstructor","isEval","isNative","isToplevel"],n=["columnNumber","lineNumber"],o=["fileName","functionName","source"],i=r.concat(n,o,["args"],["evalOrigin"]);function s(e){if(e)for(var r=0;ro&&(i=this.maxQueueSize-o),this.maxQueueSize=o,this.queue.splice(0,i)},o.prototype.copyEvents=function(){var t=Array.prototype.slice.call(this.queue,0);if(n.isFunction(this.options.filterTelemetry))try{for(var e=t.length;e--;)this.options.filterTelemetry(t[e])&&t.splice(e,1)}catch(t){this.options.filterTelemetry=null}return t},o.prototype.capture=function(t,e,r,o,s){var a={level:i(t,r),type:t,timestamp_ms:s||n.now(),body:e,source:"client"};o&&(a.uuid=o);try{if(n.isFunction(this.options.filterTelemetry)&&this.options.filterTelemetry(a))return!1}catch(t){this.options.filterTelemetry=null}return this.push(a),a},o.prototype.captureEvent=function(t,e,r,n){return this.capture(t,e,r,n)},o.prototype.captureError=function(t,e,r,n){var o={message:t.message||String(t)};return t.stack&&(o.stack=t.stack),this.capture("error",o,e,r,n)},o.prototype.captureLog=function(t,e,r,n){return this.capture("log",{message:t},e,r,n)},o.prototype.captureNetwork=function(t,e,r,n){e=e||"xhr",t.subtype=t.subtype||e,n&&(t.request=n);var o=this.levelFromStatus(t.status_code);return this.capture("network",t,o,r)},o.prototype.levelFromStatus=function(t){return t>=200&&t<400?"info":0===t||t>=400?"error":"info"},o.prototype.captureDom=function(t,e,r,n,o){var i={subtype:t,element:e};return void 0!==r&&(i.value=r),void 0!==n&&(i.checked=n),this.capture("dom",i,"info",o)},o.prototype.captureNavigation=function(t,e,r){return this.capture("navigation",{from:t,to:e},"info",r)},o.prototype.captureDomContentLoaded=function(t){return this.capture("navigation",{subtype:"DOMContentLoaded"},"info",void 0,t&&t.getTime())},o.prototype.captureLoad=function(t){return this.capture("navigation",{subtype:"load"},"info",void 0,t&&t.getTime())},o.prototype.captureConnectivityChange=function(t,e){return this.captureNetwork({change:t},"connectivity",e)},o.prototype._captureRollbarItem=function(t){if(this.options.includeItemsInTelemetry)return t.err?this.captureError(t.err,t.level,t.uuid,t.timestamp):t.message?this.captureLog(t.message,t.level,t.uuid,t.timestamp):t.custom?this.capture("log",t.custom,t.level,t.uuid,t.timestamp):void 0},o.prototype.push=function(t){this.queue.push(t),this.queue.length>this.maxQueueSize&&this.queue.shift()},t.exports=o},function(t,e,r){"use strict";var n=r(0),o=r(4),i=r(2),s=r(30),a={network:!0,networkResponseHeaders:!1,networkResponseBody:!1,networkRequestHeaders:!1,networkRequestBody:!1,networkErrorOnHttp5xx:!1,networkErrorOnHttp4xx:!1,networkErrorOnHttp0:!1,log:!0,dom:!0,navigation:!0,connectivity:!0,contentSecurityPolicy:!0,errorOnContentSecurityPolicy:!1};function u(t,e,r,n,o){var i=t[e];t[e]=r(i),n&&n[o].push([t,e,i])}function c(t,e){for(var r;t[e].length;)(r=t[e].shift())[0][r[1]]=r[2]}function l(t,e,r,o,i){this.options=t;var s=t.autoInstrument;!1===t.enabled||!1===s?this.autoInstrument={}:(n.isType(s,"object")||(s=a),this.autoInstrument=n.merge(a,s)),this.scrubTelemetryInputs=!!t.scrubTelemetryInputs,this.telemetryScrubber=t.telemetryScrubber,this.defaultValueScrubber=function(t){for(var e=[],r=0;r3)){i.__rollbar_xhr.end_time_ms=n.now();var e=null;if(i.__rollbar_xhr.response_content_type=i.getResponseHeader("Content-Type"),t.autoInstrument.networkResponseHeaders){var r=t.autoInstrument.networkResponseHeaders;e={};try{var s,a;if(!0===r){var u=i.getAllResponseHeaders();if(u){var c,l,p=u.trim().split(/[\r\n]+/);for(a=0;a=500&&this.autoInstrument.networkErrorOnHttp5xx||e>=400&&this.autoInstrument.networkErrorOnHttp4xx||0===e&&this.autoInstrument.networkErrorOnHttp0){var r=new Error("HTTP request failed with Status "+e);r.stack=t.stack,this.rollbar.error(r,{skipFrames:1})}},l.prototype.deinstrumentConsole=function(){if("console"in this._window&&this._window.console.log)for(var t;this.replacements.log.length;)t=this.replacements.log.shift(),this._window.console[t[0]]=t[1]},l.prototype.instrumentConsole=function(){if("console"in this._window&&this._window.console.log){var t=this,e=this._window.console,r=["debug","info","warn","error","log"];try{for(var o=0,i=r.length;o=0&&t.options[t.selectedIndex]&&this.captureDomEvent("input",t,t.options[t.selectedIndex].value)},l.prototype.captureDomEvent=function(t,e,r,n){if(void 0!==r)if(this.scrubTelemetryInputs||"password"===s.getElementType(e))r="[scrubbed]";else{var o=s.describeElement(e);this.telemetryScrubber?this.telemetryScrubber(o)&&(r="[scrubbed]"):this.defaultValueScrubber(o)&&(r="[scrubbed]")}var i=s.elementArrayToString(s.treeToArray(e));this.telemeter.captureDom(t,i,r,n)},l.prototype.deinstrumentNavigation=function(){var t=this._window.chrome;!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState&&c(this.replacements,"navigation")},l.prototype.instrumentNavigation=function(){var t=this._window.chrome;if(!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState){var e=this;u(this._window,"onpopstate",(function(t){return function(){var r=e._location.href;e.handleUrlChange(e._lastHref,r),t&&t.apply(this,arguments)}}),this.replacements,"navigation"),u(this._window.history,"pushState",(function(t){return function(){var r=arguments.length>2?arguments[2]:void 0;return r&&e.handleUrlChange(e._lastHref,r+""),t.apply(this,arguments)}}),this.replacements,"navigation")}},l.prototype.handleUrlChange=function(t,e){var r=i.parse(this._location.href),n=i.parse(e),o=i.parse(t);this._lastHref=e,r.protocol===n.protocol&&r.host===n.host&&(e=n.path+(n.hash||"")),r.protocol===o.protocol&&r.host===o.host&&(t=o.path+(o.hash||"")),this.telemeter.captureNavigation(t,e)},l.prototype.deinstrumentConnectivity=function(){("addEventListener"in this._window||"body"in this._document)&&(this._window.addEventListener?this.removeListeners("connectivity"):c(this.replacements,"connectivity"))},l.prototype.instrumentConnectivity=function(){if("addEventListener"in this._window||"body"in this._document)if(this._window.addEventListener)this.addListener("connectivity",this._window,"online",void 0,function(){this.telemeter.captureConnectivityChange("online")}.bind(this),!0),this.addListener("connectivity",this._window,"offline",void 0,function(){this.telemeter.captureConnectivityChange("offline")}.bind(this),!0);else{var t=this;u(this._document.body,"ononline",(function(e){return function(){t.telemeter.captureConnectivityChange("online"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity"),u(this._document.body,"onoffline",(function(e){return function(){t.telemeter.captureConnectivityChange("offline"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity")}},l.prototype.handleCspEvent=function(t){var e="Security Policy Violation: blockedURI: "+t.blockedURI+", violatedDirective: "+t.violatedDirective+", effectiveDirective: "+t.effectiveDirective+", ";t.sourceFile&&(e+="location: "+t.sourceFile+", line: "+t.lineNumber+", col: "+t.columnNumber+", "),e+="originalPolicy: "+t.originalPolicy,this.telemeter.captureLog(e,"error"),this.handleCspError(e)},l.prototype.handleCspError=function(t){this.autoInstrument.errorOnContentSecurityPolicy&&this.rollbar.error(t)},l.prototype.deinstrumentContentSecurityPolicy=function(){"addEventListener"in this._window&&this.removeListeners("contentsecuritypolicy")},l.prototype.instrumentContentSecurityPolicy=function(){if("addEventListener"in this._window){var t=this.handleCspEvent.bind(this);this.addListener("contentsecuritypolicy",this._window,"securitypolicyviolation",null,t,!1)}},l.prototype.addListener=function(t,e,r,n,o,i){e.addEventListener?(e.addEventListener(r,o,i),this.eventRemovers[t].push((function(){e.removeEventListener(r,o,i)}))):n&&(e.attachEvent(n,o),this.eventRemovers[t].push((function(){e.detachEvent(n,o)})))},l.prototype.removeListeners=function(t){for(;this.eventRemovers[t].length;)this.eventRemovers[t].shift()()},t.exports=l},function(t,e,r){"use strict";function n(t){return(t.getAttribute("type")||"").toLowerCase()}function o(t){if(!t||!t.tagName)return"";var e=[t.tagName];t.id&&e.push("#"+t.id),t.classes&&e.push("."+t.classes.join("."));for(var r=0;r=0;a--){if(e=o(t[a]),r=s+i.length*n+e.length,a=83){i.unshift("...");break}i.unshift(e),s+=e.length}return i.join(" > ")},treeToArray:function(t){for(var e,r=[],n=0;t&&n<5&&"html"!==(e=i(t)).tagName;n++)r.unshift(e),t=t.parentNode;return r},getElementFromEvent:function(t,e){return t.target?t.target:e&&e.elementFromPoint?e.elementFromPoint(t.clientX,t.clientY):void 0},isDescribedElement:function(t,e,r){if(t.tagName.toLowerCase()!==e.toLowerCase())return!1;if(!r)return!0;t=n(t);for(var o=0;o2*e?t.slice(0,e).concat(t.slice(r-e)):t}function a(t,e,r){r=void 0===r?30:r;var o,i=t.data.body;if(i.trace_chain)for(var a=i.trace_chain,u=0;ut?e.slice(0,t-3).concat("..."):e}function c(t,e,r){return[e=o(e,(function e(r,i,s){switch(n.typeName(i)){case"string":return u(t,i);case"object":case"array":return o(i,e,s);default:return i}})),n.stringify(e,r)]}function l(t){return t.exception&&(delete t.exception.description,t.exception.message=u(255,t.exception.message)),t.frames=s(t.frames,1),t}function p(t,e){var r=t.data.body;if(r.trace_chain)for(var o=r.trace_chain,i=0;ie}t.exports={truncate:function(t,e,r){r=void 0===r?524288:r;for(var n,o,s,u=[i,a,c.bind(null,1024),c.bind(null,512),c.bind(null,256),p];n=u.shift();)if(t=(o=n(t,e))[0],(s=o[1]).error||!f(s.value,r))return s;return s},raw:i,truncateFrames:a,truncateStrings:c,maybeTruncateValue:u}}]); \ No newline at end of file diff --git a/dist/rollbar.min.js.map b/dist/rollbar.min.js.map index 9af196853..2c78903b8 100644 --- a/dist/rollbar.min.js.map +++ b/dist/rollbar.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/utility.js","webpack:///./src/browser/logger.js","webpack:///./src/browser/url.js","webpack:///./src/errorParser.js","webpack:///./src/scrub.js","webpack:///./src/utility/traverse.js","webpack:///./src/browser/bundles/rollbar.js","webpack:///./src/browser/rollbar.js","webpack:///./src/browser/core.js","webpack:///./src/rollbar.js","webpack:///./src/rateLimiter.js","webpack:///./src/merge.js","webpack:///./src/queue.js","webpack:///./src/notifier.js","webpack:///./src/api.js","webpack:///./src/apiUtility.js","webpack:///./node_modules/console-polyfill/index.js","webpack:///./src/browser/detection.js","webpack:///./src/browser/globalSetup.js","webpack:///./src/browser/transport.js","webpack:///./src/browser/transforms.js","webpack:///./node_modules/error-stack-parser/error-stack-parser.js","webpack:///./node_modules/error-stack-parser/node_modules/stackframe/stackframe.js","webpack:///./src/transforms.js","webpack:///./src/browser/predicates.js","webpack:///./src/predicates.js","webpack:///./src/defaults.js","webpack:///./src/browser/defaults/scrubFields.js","webpack:///./src/telemetry.js","webpack:///./src/browser/telemetry.js","webpack:///./src/browser/domUtility.js","webpack:///./src/utility/polyfillJSON.js","webpack:///./vendor/JSON-js/json3.js","webpack:///./src/browser/wrapGlobals.js","webpack:///./src/truncation.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","merge","RollbarJSON","isType","x","typeName","Error","toString","match","toLowerCase","isFunction","f","isNativeFunction","funcMatchString","Function","replace","reIsNative","RegExp","isObject","test","type","uuid4","now","Math","random","floor","parseUriOptions","strictMode","q","parser","strict","loose","stringify","obj","backup","error","jsonError","backupError","wrapCallback","logger","err","resp","e","TELEMETRY_TYPES","TELEMETRY_LEVELS","arrayIncludes","arr","val","k","length","Date","addParamsAndAccessTokenToPath","accessToken","options","params","access_token","paramsArray","push","join","query","sort","path","qs","indexOf","h","substring","createItem","args","notifier","requestKeys","lambdaContext","message","custom","callback","request","arg","extraArgs","argTypes","typ","DOMException","j","len","undefined","item","timestamp","diagnostic","uuid","level","skipFrames","setCustomItemKeys","_originalArgs","original_arg_types","addErrorContext","errors","data","contextAdded","rollbarContext","error_context","createTelemetryEvent","metadata","filterIp","requestData","captureIp","newIp","parts","split","pop","beginning","slice","slashIdx","concat","formatArgsAsString","result","substr","formatUrl","u","protocol","port","hostname","keys","handleOptions","current","input","payload","hostWhiteList","hostSafeList","log","hostBlackList","hostBlockList","updateDeprecatedOptions","overwriteScrubFields","scrubFields","isError","isFiniteNumber","Number","isFinite","isIterable","isString","String","isPromise","then","jsonParse","parse","LEVELS","debug","info","warning","critical","makeUnhandledStackInfo","url","lineno","colno","backupMessage","errorParser","location","line","column","func","guessFunctionName","context","gatherContext","href","document","useragent","window","navigator","userAgent","redact","sanitizeUrl","baseUrlParts","str","exec","uri","$0","$1","$2","parseUri","anchor","source","set","temp","replacement","setupJSON","polyfillJSON","JSON","maxByteSize","string","count","code","charCodeAt","detection","_","Array","arguments","unshift","ieVersion","console","apply","last","auth","host","hash","pathname","search","parseInt","pathParts","ErrorStackParser","ERR_CLASS_REGEXP","Frame","stackFrame","_stackFrame","fileName","lineNumber","functionName","columnNumber","Stack","exception","skip","stack","parserStack","getStack","_mostSpecificErrorName","rawStack","rawException","constructorName","constructor","guessErrorClass","errMsg","errClassMatch","errClass","nested","traceChain","traverse","scrubPath","scrubPaths","paramRes","pat","ret","_getScrubFieldRegexs","queryRes","_getScrubQueryParamRegexs","redactQueryParam","dummy0","paramPart","scrubber","v","seen","tmpV","valScrubber","paramScrubber","seenIndex","isObj","isArray","mapped","same","rollbar","_rollbarConfig","alias","globalAlias","shimRunning","shimId","_rollbarStartTime","getTime","Rollbar","_rollbarDidLoad","self","telemeter","instrumenter","wrapGlobals","scrub","truncation","setComponents","Client","API","globals","Transport","urllib","transforms","sharedTransforms","predicates","sharedPredicates","client","this","defaultOptions","_configuredOptions","Telemeter","components","Instrumenter","transport","api","gWindow","_gWindow","gDocument","isChrome","chrome","runtime","anonymousErrorsPending","addTransform","handleDomException","handleItemWithError","ensureItemHasSomethingToSay","addBaseInfo","addRequestInfo","addClientInfo","addPluginInfo","addBody","addMessageWithError","addTelemetryData","addConfigToPayload","addScrubber","userTransform","addConfiguredOptions","addDiagnosticKeys","itemToPayload","addTransformsToNotifier","queue","addPredicate","checkLevel","checkIgnore","userCheckIgnore","urlIsNotBlockListed","urlIsSafeListed","messageIsIgnored","setupUnhandledCapture","instrument","_instance","handleUninitialized","maybeCallback","_getFirstFunction","init","global","configure","payloadData","oldOptions","lastError","_createItem","warn","buildJsonPayload","sendJsonPayload","jsonPayload","unhandledExceptionsInitialized","captureUncaught","handleUncaughtExceptions","captureUncaughtExceptions","wrapGlobalEventHandlers","unhandledRejectionsInitialized","captureUnhandledRejections","handleUnhandledRejections","handleUncaughtException","inspectAnonymousErrors","stackInfo","_unhandledStackInfo","uncaughtErrorLevel","_isUncaught","handleAnonymousErrors","prepareStackTrace","_stack","_isAnonymous","handleUnhandledRejection","reason","promise","reasonResult","_rollbarContext","wrap","_before","ctxFn","_isWrap","_rollbar_wrapped","exc","_rollbarWrappedError","_wrappedSource","prop","captureEvent","event","captureDomContentLoaded","ts","captureLoad","loadFull","defaults","version","logLevel","reportLevel","endpoint","verbose","enabled","transmit","sendConfig","includeItemsInTelemetry","ignoreDuplicateErrors","RateLimiter","Queue","Notifier","platform","rateLimiter","configureGlobal","setPlatformOptions","tracer","validateTracer","setStackTraceLimit","lastErrorHash","stackTraceLimit","scope","active","maxItems","itemsPerMinute","_defaultLogLevel","_log","wait","postJsonPayload","defaultLevel","_sameAsLastError","_addTracingInfo","_captureRollbarItem","telemetryEvents","copyEvents","itemHash","generateItemHash","span","spanContext","toSpanId","toTraceId","validateSpan","setTag","opentracingSpanId","opentracingTraceId","opentracing_span_id","opentracing_trace_id","startTime","counter","perMinCounter","platformOptions","checkRate","limit","ignoreRateLimit","shouldSendValue","shouldSend","globalRateLimit","limitPerMin","perMinute","msg","environment","body","extra","language","framework","rateLimitPayload","globalSettings","elapsedTime","globalRateLimitPerMin","hasOwn","toStr","isPlainObject","hasOwnConstructor","hasIsPrototypeOf","src","copy","clone","pendingItems","pendingRequests","retryQueue","retryHandle","waitCallback","waitIntervalID","predicate","addPendingItem","removePendingItem","idx","splice","addItem","originalError","originalItem","predicateResult","_applyPredicates","stop","_maybeLog","_makeApiRequest","_dequeuePendingRequest","_maybeCallWait","clearInterval","setInterval","rateLimitResponse","postItem","_maybeRetry","RETRIABLE_ERRORS","shouldRetry","retryInterval","maxRetries","retries","_retryApiRequest","retryObject","shift","transform","_applyTransforms","transformIndex","transformsLength","cb","helpers","Api","jsonBackup","transportOptions","_getTransport","getTransportFromOptions","buildPayload","post","stringifyResult","truncate","contextResult","timeout","proxy","opts","method","appendPathToPath","base","baseTrailingSlash","pathBeginningSlash","con","dummy","properties","methods","Detection","div","createElement","all","getElementsByTagName","innerHTML","undef","_rollbarWindowOnError","old","handler","shim","oldOnError","_rollbarOldOnError","onerror","fn","_rollbarURH","belongsToShim","removeEventListener","rejectionHandler","evt","detail","addEventListener","_makeZoneRequest","currentZone","Zone","_name","rootZone","_parent","run","_makeRequest","requestFactory","RollbarProxy","json","_msg","_proxyRequest","xmlhttp","factories","XMLHttpRequest","ActiveXObject","numFactories","_createXMLHTTPObject","onreadystatechange","readyState","parseResponse","responseText","status","_isNormalFailure","_newRetriableError","ex","open","setRequestHeader","send","e1","XDomainRequest","xdomainrequest","onprogress","ontimeout","onload","e2","writeData","addBodyMessage","stackFromItem","buildTrace","description","guess","trace","errorClass","frame","pre","contextLength","mid","raw","frames","filename","sendFrameUrl","endsWith","reverse","_savedStackTrace","chain","server","remoteString","query_string","user_ip","nav","scr","screen","runtime_ms","round","javascript","browser","cookie_enabled","cookieEnabled","width","height","cur","plugins","navPlugins","traces","traceChainLength","trace_chain","addBodyTraceChain","className","addBodyTrace","scrubFn","StackFrame","FIREFOX_SAFARI_STACK_REGEXP","CHROME_IE_STACK_REGEXP","SAFARI_NATIVE_CODE_REGEXP","stacktrace","parseOpera","parseV8OrIE","parseFFOrSafari","extractLocation","urlLike","filter","map","sanitizedLine","tokens","locationParts","functionNameRegex","matches","parseOpera9","parseOpera11","parseOpera10","lineRE","lines","argsRaw","functionCall","_capitalize","charAt","toUpperCase","_getter","booleanProps","numericProps","stringProps","props","getArgs","setArgs","TypeError","getEvalOrigin","evalOrigin","setEvalOrigin","getFileName","getLineNumber","getColumnNumber","getFunctionName","getIsEval","fromString","argsStartIndex","argsEndIndex","lastIndexOf","locationString","Boolean","isNaN","parseFloat","addFunctionOption","payloadOptions","tracePath","newExtra","newItem","response","promisedItem","configuredOptions","configured_options","is_anonymous","is_uncaught","raw_error","constructor_name","failed","settings","matchFrames","list","block","listLength","frameLength","urlIsOnAList","safeOrBlock","tracesLength","listName","levelVal","isUncaught","onSendCallback","ignoredMessages","rIgnoredMessage","messages","messagesFromItem","itemsPerMin","maxTelemetryEvents","maxQueueSize","max","min","getLevel","manual","newMaxEvents","deleteCount","events","filterTelemetry","capture","rollbarUUID","timestamp_ms","captureError","captureLog","captureNetwork","subtype","levelFromStatus","status_code","statusCode","captureDom","element","checked","captureNavigation","from","to","captureConnectivityChange","change","urlparser","domUtil","network","networkResponseHeaders","networkResponseBody","networkRequestHeaders","networkRequestBody","networkErrorOnHttp5xx","networkErrorOnHttp4xx","networkErrorOnHttp0","dom","navigation","connectivity","contentSecurityPolicy","errorOnContentSecurityPolicy","replacements","orig","restore","b","_window","_document","autoInstrument","scrubTelemetryInputs","telemetryScrubber","defaultValueScrubber","patterns","attributes","attrs","a","nameFromDescription","eventRemovers","contentsecuritypolicy","_location","_lastHref","oldSettings","deinstrumentNetwork","instrumentNetwork","deinstrumentConsole","instrumentConsole","deinstrumentDom","instrumentDom","deinstrumentNavigation","instrumentNavigation","deinstrumentConnectivity","instrumentConnectivity","deinstrumentContentSecurityPolicy","instrumentContentSecurityPolicy","wrapProp","xhr","xhrp","__rollbar_xhr","start_time_ms","end_time_ms","header","request_headers","request_content_type","onreadystatechangeHandler","__rollbar_event","headers","response_content_type","getResponseHeader","headersConfig","allHeaders","getAllResponseHeaders","trim","isJsonContentType","scrubJson","errorOnHttpStatus","trackHttpErrors","reqHeaders","Headers","fetchHeaders","text","contentType","includes","inHeaders","outHeaders","entries","currentHeader","next","done","wrapConsole","origConsole","removeListeners","clickHandler","handleClick","blurHandler","handleBlur","addListener","getElementFromEvent","hasTag","tagName","anchorOrButton","isDescribedElement","captureDomEvent","handleSelectInputChanged","elem","multiple","selected","selectedIndex","isChecked","getElementType","describeElement","elementString","elementArrayToString","treeToArray","app","history","pushState","handleUrlChange","parsedHref","parsedTo","parsedFrom","handleCspEvent","cspEvent","blockedURI","violatedDirective","effectiveDirective","sourceFile","originalPolicy","handleCspError","cspHandler","section","altType","attachEvent","detachEvent","getAttribute","descriptionToString","desc","out","id","classes","attr","nextStr","totalLength","separatorLength","MAX_LENGTH","nextDescription","parentNode","doc","target","elementFromPoint","clientX","clientY","subtypes","gap","indent","meta","rep","state","container","escapes","number","action","rx_escapable","this_value","valueOf","quote","lastIndex","toJSON","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","\"","replacer","space","holder","partial","mind","go","firstokey","okey","ovalue","firstavalue","avalue","ocomma","acomma","colon","SyntaxError","reviver","tx","ignore","fromCharCode","walk","_extendListenerPrototype","oldAddEventListener","_rollbarOldAdd","addFn","bubble","oldRemoveEventListener","_rollbarOldRemove","removeFn","selectFrames","range","truncateFrames","maybeTruncateValue","truncateStrings","truncator","truncateTraceData","traceData","minBody","needsTruncation","maxSize","strategy","results","strategies"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAU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EAAgB56B,KAAK,KAAM,KAC3Bg7B,GAIMG,EAAWE,EAAWpc,SAI5B,GAFA/W,GADAkzB,EAAUD,EAASjzB,EAASuX,IACV,IAClBlY,EAAS6zB,EAAQ,IACN14B,QAAUu4B,EAAgB1zB,EAAO9H,MAAOy7B,GACjD,OAAO3zB,EAGX,OAAOA,GAOP8d,IAAKA,EACLqV,eAAgBA,EAChBE,gBAAiBA,EACjBD,mBAAoBA","file":"rollbar.min.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n","'use strict';\n\nvar merge = require('./merge');\n\nvar RollbarJSON = {};\nfunction setupJSON(polyfillJSON) {\n if (isFunction(RollbarJSON.stringify) && isFunction(RollbarJSON.parse)) {\n return;\n }\n\n if (isDefined(JSON)) {\n // If polyfill is provided, prefer it over existing non-native shims.\n if(polyfillJSON) {\n if (isNativeFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isNativeFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n } else { // else accept any interface that is present.\n if (isFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n }\n }\n if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {\n polyfillJSON && polyfillJSON(RollbarJSON);\n }\n}\n\n/*\n * isType - Given a Javascript value and a string, returns true if the type of the value matches the\n * given string.\n *\n * @param x - any value\n * @param t - a lowercase string containing one of the following type names:\n * - undefined\n * - null\n * - error\n * - number\n * - boolean\n * - string\n * - symbol\n * - function\n * - object\n * - array\n * @returns true if x is of type t, otherwise false\n */\nfunction isType(x, t) {\n return t === typeName(x);\n}\n\n/*\n * typeName - Given a Javascript value, returns the type of the object as a string\n */\nfunction typeName(x) {\n var name = typeof x;\n if (name !== 'object') {\n return name;\n }\n if (!x) {\n return 'null';\n }\n if (x instanceof Error) {\n return 'error';\n }\n return ({}).toString.call(x).match(/\\s([a-zA-Z]+)/)[1].toLowerCase();\n}\n\n/* isFunction - a convenience function for checking if a value is a function\n *\n * @param f - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isFunction(f) {\n return isType(f, 'function');\n}\n\n/* isNativeFunction - a convenience function for checking if a value is a native JS function\n *\n * @param f - any value\n * @returns true if f is a native JS function, otherwise false\n */\nfunction isNativeFunction(f) {\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n var funcMatchString = Function.prototype.toString.call(Object.prototype.hasOwnProperty)\n .replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?');\n var reIsNative = RegExp('^' + funcMatchString + '$');\n return isObject(f) && reIsNative.test(f);\n}\n\n/* isObject - Checks if the argument is an object\n *\n * @param value - any value\n * @returns true is value is an object function is an object)\n*/\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/* isString - Checks if the argument is a string\n *\n * @param value - any value\n * @returns true if value is a string\n*/\nfunction isString(value) {\n return typeof value === 'string' || value instanceof String\n}\n\n/**\n * isFiniteNumber - determines whether the passed value is a finite number\n *\n * @param {*} n - any value\n * @returns true if value is a finite number\n */\n function isFiniteNumber(n) {\n return Number.isFinite(n);\n}\n\n/*\n * isDefined - a convenience function for checking if a value is not equal to undefined\n *\n * @param u - any value\n * @returns true if u is anything other than undefined\n */\nfunction isDefined(u) {\n return !isType(u, 'undefined');\n}\n\n/*\n * isIterable - convenience function for checking if a value can be iterated, essentially\n * whether it is an object or an array.\n *\n * @param i - any value\n * @returns true if i is an object or an array as determined by `typeName`\n */\nfunction isIterable(i) {\n var type = typeName(i);\n return (type === 'object' || type === 'array');\n}\n\n/*\n * isError - convenience function for checking if a value is of an error type\n *\n * @param e - any value\n * @returns true if e is an error\n */\nfunction isError(e) {\n // Detect both Error and Firefox Exception type\n return isType(e, 'error') || isType(e, 'exception');\n}\n\n/* isPromise - a convenience function for checking if a value is a promise\n *\n * @param p - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isPromise(p) {\n return isObject(p) && isType(p.then, 'function');\n}\n\nfunction redact() {\n return '********';\n}\n\n// from http://stackoverflow.com/a/8809472/1138191\nfunction uuid4() {\n var d = now();\n var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n var r = (d + Math.random() * 16) % 16 | 0;\n d = Math.floor(d / 16);\n return (c === 'x' ? r : (r & 0x7 | 0x8)).toString(16);\n });\n return uuid;\n}\n\nvar LEVELS = {\n debug: 0,\n info: 1,\n warning: 2,\n error: 3,\n critical: 4\n};\n\nfunction sanitizeUrl(url) {\n var baseUrlParts = parseUri(url);\n if (!baseUrlParts) {\n return '(unknown)';\n }\n\n // remove a trailing # if there is no anchor\n if (baseUrlParts.anchor === '') {\n baseUrlParts.source = baseUrlParts.source.replace('#', '');\n }\n\n url = baseUrlParts.source.replace('?' + baseUrlParts.query, '');\n return url;\n}\n\nvar parseUriOptions = {\n strictMode: false,\n key: [\n 'source',\n 'protocol',\n 'authority',\n 'userInfo',\n 'user',\n 'password',\n 'host',\n 'port',\n 'relative',\n 'path',\n 'directory',\n 'file',\n 'query',\n 'anchor'\n ],\n q: {\n name: 'queryKey',\n parser: /(?:^|&)([^&=]*)=?([^&]*)/g\n },\n parser: {\n strict: /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n loose: /^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/\n }\n};\n\nfunction parseUri(str) {\n if (!isType(str, 'string')) {\n return undefined;\n }\n\n var o = parseUriOptions;\n var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);\n var uri = {};\n\n for (var i = 0, l = o.key.length; i < l; ++i) {\n uri[o.key[i]] = m[i] || '';\n }\n\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) {\n uri[o.q.name][$1] = $2;\n }\n });\n\n return uri;\n}\n\nfunction addParamsAndAccessTokenToPath(accessToken, options, params) {\n params = params || {};\n params.access_token = accessToken;\n var paramsArray = [];\n var k;\n for (k in params) {\n if (Object.prototype.hasOwnProperty.call(params, k)) {\n paramsArray.push([k, params[k]].join('='));\n }\n }\n var query = '?' + paramsArray.sort().join('&');\n\n options = options || {};\n options.path = options.path || '';\n var qs = options.path.indexOf('?');\n var h = options.path.indexOf('#');\n var p;\n if (qs !== -1 && (h === -1 || h > qs)) {\n p = options.path;\n options.path = p.substring(0,qs) + query + '&' + p.substring(qs+1);\n } else {\n if (h !== -1) {\n p = options.path;\n options.path = p.substring(0,h) + query + p.substring(h);\n } else {\n options.path = options.path + query;\n }\n }\n}\n\nfunction formatUrl(u, protocol) {\n protocol = protocol || u.protocol;\n if (!protocol && u.port) {\n if (u.port === 80) {\n protocol = 'http:';\n } else if (u.port === 443) {\n protocol = 'https:';\n }\n }\n protocol = protocol || 'https:';\n\n if (!u.hostname) {\n return null;\n }\n var result = protocol + '//' + u.hostname;\n if (u.port) {\n result = result + ':' + u.port;\n }\n if (u.path) {\n result = result + u.path;\n }\n return result;\n}\n\nfunction stringify(obj, backup) {\n var value, error;\n try {\n value = RollbarJSON.stringify(obj);\n } catch (jsonError) {\n if (backup && isFunction(backup)) {\n try {\n value = backup(obj);\n } catch (backupError) {\n error = backupError;\n }\n } else {\n error = jsonError;\n }\n }\n return {error: error, value: value};\n}\n\nfunction maxByteSize(string) {\n // The transport will use utf-8, so assume utf-8 encoding.\n //\n // This minimal implementation will accurately count bytes for all UCS-2 and\n // single code point UTF-16. If presented with multi code point UTF-16,\n // which should be rare, it will safely overcount, not undercount.\n //\n // While robust utf-8 encoders exist, this is far smaller and far more performant.\n // For quickly counting payload size for truncation, smaller is better.\n\n var count = 0;\n var length = string.length;\n\n for (var i = 0; i < length; i++) {\n var code = string.charCodeAt(i);\n if (code < 128) { // up to 7 bits\n count = count + 1;\n } else if (code < 2048) { // up to 11 bits\n count = count + 2;\n } else if (code < 65536) { // up to 16 bits\n count = count + 3;\n }\n }\n\n return count;\n}\n\nfunction jsonParse(s) {\n var value, error;\n try {\n value = RollbarJSON.parse(s);\n } catch (e) {\n error = e;\n }\n return {error: error, value: value};\n}\n\nfunction makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n mode,\n backupMessage,\n errorParser\n) {\n var location = {\n url: url || '',\n line: lineno,\n column: colno\n };\n location.func = errorParser.guessFunctionName(location.url, location.line);\n location.context = errorParser.gatherContext(location.url, location.line);\n var href = typeof document !== 'undefined' && document && document.location && document.location.href;\n var useragent = typeof window !== 'undefined' && window && window.navigator && window.navigator.userAgent;\n return {\n 'mode': mode,\n 'message': error ? String(error) : (message || backupMessage),\n 'url': href,\n 'stack': [location],\n 'useragent': useragent\n };\n}\n\nfunction wrapCallback(logger, f) {\n return function(err, resp) {\n try {\n f(err, resp);\n } catch (e) {\n logger.error(e);\n }\n };\n}\n\nfunction createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\n var diagnostic = {};\n var argTypes = [];\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n argTypes.push(typ);\n switch (typ) {\n case 'undefined':\n break;\n case 'string':\n message ? extraArgs.push(arg) : message = arg;\n break;\n case 'function':\n callback = wrapCallback(logger, arg);\n break;\n case 'date':\n extraArgs.push(arg);\n break;\n case 'error':\n case 'domexception':\n case 'exception': // Firefox Exception type\n err ? extraArgs.push(arg) : err = arg;\n break;\n case 'object':\n case 'array':\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n if (requestKeys && typ === 'object' && !request) {\n for (var j = 0, len = requestKeys.length; j < len; ++j) {\n if (arg[requestKeys[j]] !== undefined) {\n request = arg;\n break;\n }\n }\n if (request) {\n break;\n }\n }\n custom ? extraArgs.push(arg) : custom = arg;\n break;\n default:\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n extraArgs.push(arg);\n }\n }\n\n if (extraArgs.length > 0) {\n // if custom is an array this turns it into an object with integer keys\n custom = merge(custom);\n custom.extraArgs = extraArgs;\n }\n\n var item = {\n message: message,\n err: err,\n custom: custom,\n timestamp: now(),\n callback: callback,\n notifier: notifier,\n diagnostic: diagnostic,\n uuid: uuid4()\n };\n\n setCustomItemKeys(item, custom);\n\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n item.diagnostic.original_arg_types = argTypes;\n return item;\n}\n\nfunction setCustomItemKeys(item, custom) {\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (custom && custom.skipFrames !== undefined) {\n item.skipFrames = custom.skipFrames;\n delete custom.skipFrames;\n }\n}\n\nfunction addErrorContext(item, errors) {\n var custom = item.data.custom || {};\n var contextAdded = false;\n\n try {\n for (var i = 0; i < errors.length; ++i) {\n if (errors[i].hasOwnProperty('rollbarContext')) {\n custom = merge(custom, errors[i].rollbarContext);\n contextAdded = true;\n }\n }\n\n // Avoid adding an empty object to the data.\n if (contextAdded) {\n item.data.custom = custom;\n }\n } catch (e) {\n item.diagnostic.error_context = 'Failed: ' + e.message;\n }\n}\n\nvar TELEMETRY_TYPES = ['log', 'network', 'dom', 'navigation', 'error', 'manual'];\nvar TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];\n\nfunction arrayIncludes(arr, val) {\n for (var k = 0; k < arr.length; ++k) {\n if (arr[k] === val) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction createTelemetryEvent(args) {\n var type, metadata, level;\n var arg;\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n switch (typ) {\n case 'string':\n if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {\n type = arg;\n } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {\n level = arg;\n }\n break;\n case 'object':\n metadata = arg;\n break;\n default:\n break;\n }\n }\n var event = {\n type: type || 'manual',\n metadata: metadata || {},\n level: level\n };\n\n return event;\n}\n\n/*\n * get - given an obj/array and a keypath, return the value at that keypath or\n * undefined if not possible.\n *\n * @param obj - an object or array\n * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'\n * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`\n */\nfunction get(obj, path) {\n if (!obj) {\n return undefined;\n }\n var keys = path.split('.');\n var result = obj;\n try {\n for (var i = 0, len = keys.length; i < len; ++i) {\n result = result[keys[i]];\n }\n } catch (e) {\n result = undefined;\n }\n return result;\n}\n\nfunction set(obj, path, value) {\n if (!obj) {\n return;\n }\n var keys = path.split('.');\n var len = keys.length;\n if (len < 1) {\n return;\n }\n if (len === 1) {\n obj[keys[0]] = value;\n return;\n }\n try {\n var temp = obj[keys[0]] || {};\n var replacement = temp;\n for (var i = 1; i < len - 1; ++i) {\n temp[keys[i]] = temp[keys[i]] || {};\n temp = temp[keys[i]];\n }\n temp[keys[len-1]] = value;\n obj[keys[0]] = replacement;\n } catch (e) {\n return;\n }\n}\n\nfunction formatArgsAsString(args) {\n var i, len, arg;\n var result = [];\n for (i = 0, len = args.length; i < len; ++i) {\n arg = args[i];\n switch (typeName(arg)) {\n case 'object':\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500) {\n arg = arg.substr(0, 497) + '...';\n }\n break;\n case 'null':\n arg = 'null';\n break;\n case 'undefined':\n arg = 'undefined';\n break;\n case 'symbol':\n arg = arg.toString();\n break;\n }\n result.push(arg);\n }\n return result.join(' ');\n}\n\nfunction now() {\n if (Date.now) {\n return +Date.now();\n }\n return +new Date();\n}\n\nfunction filterIp(requestData, captureIp) {\n if (!requestData || !requestData['user_ip'] || captureIp === true) {\n return;\n }\n var newIp = requestData['user_ip'];\n if (!captureIp) {\n newIp = null;\n } else {\n try {\n var parts;\n if (newIp.indexOf('.') !== -1) {\n parts = newIp.split('.');\n parts.pop();\n parts.push('0');\n newIp = parts.join('.');\n } else if (newIp.indexOf(':') !== -1) {\n parts = newIp.split(':');\n if (parts.length > 2) {\n var beginning = parts.slice(0, 3);\n var slashIdx = beginning[2].indexOf('/');\n if (slashIdx !== -1) {\n beginning[2] = beginning[2].substring(0, slashIdx);\n }\n var terminal = '0000:0000:0000:0000:0000';\n newIp = beginning.concat(terminal).join(':');\n }\n } else {\n newIp = null;\n }\n } catch (e) {\n newIp = null;\n }\n }\n requestData['user_ip'] = newIp;\n}\n\nfunction handleOptions(current, input, payload, logger) {\n var result = merge(current, input, payload);\n result = updateDeprecatedOptions(result, logger);\n if (!input || input.overwriteScrubFields) {\n return result;\n }\n if (input.scrubFields) {\n result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);\n }\n return result;\n}\n\nfunction updateDeprecatedOptions(options, logger) {\n if(options.hostWhiteList && !options.hostSafeList) {\n options.hostSafeList = options.hostWhiteList;\n options.hostWhiteList = undefined;\n logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');\n }\n if(options.hostBlackList && !options.hostBlockList) {\n options.hostBlockList = options.hostBlackList;\n options.hostBlackList = undefined;\n logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');\n }\n return options;\n}\n\nmodule.exports = {\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n createItem: createItem,\n addErrorContext: addErrorContext,\n createTelemetryEvent: createTelemetryEvent,\n filterIp: filterIp,\n formatArgsAsString: formatArgsAsString,\n formatUrl: formatUrl,\n get: get,\n handleOptions: handleOptions,\n isError: isError,\n isFiniteNumber: isFiniteNumber,\n isFunction: isFunction,\n isIterable: isIterable,\n isNativeFunction: isNativeFunction,\n isObject: isObject,\n isString: isString,\n isType: isType,\n isPromise: isPromise,\n jsonParse: jsonParse,\n LEVELS: LEVELS,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n merge: merge,\n now: now,\n redact: redact,\n RollbarJSON: RollbarJSON,\n sanitizeUrl: sanitizeUrl,\n set: set,\n setupJSON: setupJSON,\n stringify: stringify,\n maxByteSize: maxByteSize,\n typeName: typeName,\n uuid4: uuid4\n};\n","'use strict';\n\n/* eslint-disable no-console */\nrequire('console-polyfill');\nvar detection = require('./detection');\nvar _ = require('../utility');\n\nfunction error() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.error(_.formatArgsAsString(args));\n } else {\n console.error.apply(console, args);\n }\n}\n\nfunction info() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.info(_.formatArgsAsString(args));\n } else {\n console.info.apply(console, args);\n }\n}\n\nfunction log() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.log(_.formatArgsAsString(args));\n } else {\n console.log.apply(console, args);\n }\n}\n\n/* eslint-enable no-console */\n\nmodule.exports = {\n error: error,\n info: info,\n log: log\n};\n","'use strict';\n\n// See https://nodejs.org/docs/latest/api/url.html\nfunction parse(url) {\n var result = {\n protocol: null, auth: null, host: null, path: null,\n hash: null, href: url, hostname: null, port: null,\n pathname: null, search: null, query: null\n };\n\n var i, last;\n i = url.indexOf('//');\n if (i !== -1) {\n result.protocol = url.substring(0,i);\n last = i+2;\n } else {\n last = 0;\n }\n \n i = url.indexOf('@', last);\n if (i !== -1) {\n result.auth = url.substring(last, i);\n last = i+1;\n }\n\n i = url.indexOf('/', last);\n if (i === -1) {\n i = url.indexOf('?', last);\n if (i === -1) {\n i = url.indexOf('#', last);\n if (i === -1) {\n result.host = url.substring(last);\n } else {\n result.host = url.substring(last, i);\n result.hash = url.substring(i);\n }\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n return result;\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n\n i = url.indexOf('#', last);\n if (i === -1) {\n result.path = url.substring(last);\n } else {\n result.path = url.substring(last, i);\n result.hash = url.substring(i);\n }\n\n if (result.path) {\n var pathParts = result.path.split('?');\n result.pathname = pathParts[0];\n result.query = pathParts[1];\n result.search = result.query ? '?' + result.query : null;\n }\n return result;\n}\n\nmodule.exports = {\n parse: parse\n};\n","'use strict';\n\nvar ErrorStackParser = require('error-stack-parser');\n\nvar UNKNOWN_FUNCTION = '?';\nvar ERR_CLASS_REGEXP = new RegExp('^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ');\n\nfunction guessFunctionName() {\n return UNKNOWN_FUNCTION;\n}\n\n\nfunction gatherContext() {\n return null;\n}\n\n\nfunction Frame(stackFrame) {\n var data = {};\n\n data._stackFrame = stackFrame;\n\n data.url = stackFrame.fileName;\n data.line = stackFrame.lineNumber;\n data.func = stackFrame.functionName;\n data.column = stackFrame.columnNumber;\n data.args = stackFrame.args;\n\n data.context = gatherContext();\n\n return data;\n}\n\n\nfunction Stack(exception, skip) {\n function getStack() {\n var parserStack = [];\n\n skip = skip || 0;\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch(e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = skip; i < parserStack.length; i++) {\n stack.push(new Frame(parserStack[i]));\n }\n\n return stack;\n }\n\n return {\n stack: getStack(),\n message: exception.message,\n name: _mostSpecificErrorName(exception),\n rawStack: exception.stack,\n rawException: exception\n };\n}\n\n\nfunction parse(e, skip) {\n var err = e;\n\n if (err.nested) {\n var traceChain = [];\n while (err) {\n traceChain.push(new Stack(err, skip));\n err = err.nested;\n\n skip = 0; // Only apply skip value to primary error\n }\n\n // Return primary error with full trace chain attached.\n traceChain[0].traceChain = traceChain;\n return traceChain[0];\n } else {\n return new Stack(err, skip);\n }\n}\n\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg || !errMsg.match) {\n return ['Unknown error. There was no error message to display.', ''];\n }\n var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);\n var errClass = '(unknown)';\n\n if (errClassMatch) {\n errClass = errClassMatch[errClassMatch.length - 1];\n errMsg = errMsg.replace((errClassMatch[errClassMatch.length - 2] || '') + errClass + ':', '');\n errMsg = errMsg.replace(/(^[\\s]+|[\\s]+$)/g, '');\n }\n return [errClass, errMsg];\n}\n\n// * Prefers any value over an empty string\n// * Prefers any value over 'Error' where possible\n// * Prefers name over constructor.name when both are more specific than 'Error'\nfunction _mostSpecificErrorName(error) {\n var name = error.name && error.name.length && error.name;\n var constructorName = error.constructor.name && error.constructor.name.length && error.constructor.name;\n\n if (!name || !constructorName) {\n return name || constructorName;\n }\n\n if (name === 'Error') {\n return constructorName;\n }\n return name;\n}\n\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame\n};\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction scrub(data, scrubFields, scrubPaths) {\n scrubFields = scrubFields || [];\n\n if (scrubPaths) {\n for (var i = 0; i < scrubPaths.length; ++i) {\n scrubPath(data, scrubPaths[i]);\n }\n }\n\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart) {\n return paramPart + _.redact();\n }\n\n function paramScrubber(v) {\n var i;\n if (_.isType(v, 'string')) {\n for (i = 0; i < queryRes.length; ++i) {\n v = v.replace(queryRes[i], redactQueryParam);\n }\n }\n return v;\n }\n\n function valScrubber(k, v) {\n var i;\n for (i = 0; i < paramRes.length; ++i) {\n if (paramRes[i].test(k)) {\n v = _.redact();\n break;\n }\n }\n return v;\n }\n\n function scrubber(k, v, seen) {\n var tmpV = valScrubber(k, v);\n if (tmpV === v) {\n if (_.isType(v, 'object') || _.isType(v, 'array')) {\n return traverse(v, scrubber, seen);\n }\n return paramScrubber(tmpV);\n } else {\n return tmpV;\n }\n }\n\n return traverse(data, scrubber);\n}\n\nfunction scrubPath(obj, path) {\n var keys = path.split('.');\n var last = keys.length - 1;\n try {\n for (var i = 0; i <= last; ++i) {\n if (i < last) {\n obj = obj[keys[i]];\n } else {\n obj[keys[i]] = _.redact();\n }\n }\n } catch (e) {\n // Missing key is OK;\n }\n}\n\nfunction _getScrubFieldRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '^\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?$';\n ret.push(new RegExp(pat, 'i'));\n }\n return ret;\n}\n\n\nfunction _getScrubQueryParamRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?';\n ret.push(new RegExp('(' + pat + '=)([^&\\\\n]+)', 'igm'));\n }\n return ret;\n}\n\nmodule.exports = scrub;\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction traverse(obj, func, seen) {\n var k, v, i;\n var isObj = _.isType(obj, 'object');\n var isArray = _.isType(obj, 'array');\n var keys = [];\n var seenIndex;\n\n // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.\n seen = seen || { obj: [], mapped: []};\n\n if (isObj) {\n seenIndex = seen.obj.indexOf(obj);\n\n if (isObj && seenIndex !== -1) {\n // Prefer the mapped object if there is one.\n return seen.mapped[seenIndex] || seen.obj[seenIndex];\n }\n\n seen.obj.push(obj);\n seenIndex = seen.obj.length - 1;\n }\n\n if (isObj) {\n for (k in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, k)) {\n keys.push(k);\n }\n }\n } else if (isArray) {\n for (i = 0; i < obj.length; ++i) {\n keys.push(i);\n }\n }\n\n var result = isObj ? {} : [];\n var same = true;\n for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n result[k] = func(k, v, seen);\n same = same && result[k] === obj[k];\n }\n\n if (isObj && !same) {\n seen.mapped[seenIndex] = result;\n }\n\n return !same ? result : obj;\n}\n\nmodule.exports = traverse;\n","'use strict';\n\nvar rollbar = require('../rollbar');\n\nvar options = (typeof window !== 'undefined') && window._rollbarConfig;\nvar alias = options && options.globalAlias || 'Rollbar';\nvar shimRunning = (typeof window !== 'undefined') && window[alias] && typeof window[alias].shimId === 'function' && window[alias].shimId() !== undefined;\n\nif ((typeof window !== 'undefined') && !window._rollbarStartTime) {\n window._rollbarStartTime = (new Date()).getTime();\n}\n\nif (!shimRunning && options) {\n var Rollbar = new rollbar(options);\n window[alias] = Rollbar;\n} else if (typeof window !== 'undefined') {\n window.rollbar = rollbar;\n window._rollbarDidLoad = true;\n} else if (typeof self !== 'undefined') {\n self.rollbar = rollbar;\n self._rollbarDidLoad = true;\n}\n\nmodule.exports = rollbar;\n","'use strict';\n\nvar Rollbar = require('./core');\nvar telemeter = require('../telemetry');\nvar instrumenter = require('./telemetry');\nvar polyfillJSON = require('../utility/polyfillJSON');\nvar wrapGlobals = require('./wrapGlobals');\nvar scrub = require('../scrub');\nvar truncation = require('../truncation');\n\nRollbar.setComponents({\n telemeter: telemeter,\n instrumenter: instrumenter,\n polyfillJSON: polyfillJSON,\n wrapGlobals: wrapGlobals,\n scrub: scrub,\n truncation: truncation\n});\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar Client = require('../rollbar');\nvar _ = require('../utility');\nvar API = require('../api');\nvar logger = require('./logger');\nvar globals = require('./globalSetup');\n\nvar Transport = require('./transport');\nvar urllib = require('./url');\n\nvar transforms = require('./transforms');\nvar sharedTransforms = require('../transforms');\nvar predicates = require('./predicates');\nvar sharedPredicates = require('../predicates');\nvar errorParser = require('../errorParser');\n\nfunction Rollbar(options, client) {\n this.options = _.handleOptions(defaultOptions, options, null, logger);\n this.options._configuredOptions = options;\n var Telemeter = this.components.telemeter;\n var Instrumenter = this.components.instrumenter;\n var polyfillJSON = this.components.polyfillJSON;\n this.wrapGlobals = this.components.wrapGlobals;\n this.scrub = this.components.scrub;\n var truncation = this.components.truncation;\n\n var transport = new Transport(truncation);\n var api = new API(this.options, transport, urllib, truncation);\n if (Telemeter) {\n this.telemeter = new Telemeter(this.options);\n }\n this.client = client || new Client(this.options, api, logger, this.telemeter, 'browser');\n var gWindow = _gWindow();\n var gDocument = (typeof document != 'undefined') && document;\n this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers\n this.anonymousErrorsPending = 0;\n addTransformsToNotifier(this.client.notifier, this, gWindow);\n addPredicatesToQueue(this.client.queue);\n this.setupUnhandledCapture();\n if (Instrumenter) {\n this.instrumenter = new Instrumenter(this.options, this.client.telemeter, this, gWindow, gDocument);\n this.instrumenter.instrument();\n }\n _.setupJSON(polyfillJSON);\n}\n\nvar _instance = null;\nRollbar.init = function(options, client) {\n if (_instance) {\n return _instance.global(options).configure(options);\n }\n _instance = new Rollbar(options, client);\n return _instance;\n};\n\nRollbar.prototype.components = {};\n\nRollbar.setComponents = function(components) {\n Rollbar.prototype.components = components;\n}\n\nfunction handleUninitialized(maybeCallback) {\n var message = 'Rollbar is not initialized';\n logger.error(message);\n if (maybeCallback) {\n maybeCallback(new Error(message));\n }\n}\n\nRollbar.prototype.global = function(options) {\n this.client.global(options);\n return this;\n};\nRollbar.global = function(options) {\n if (_instance) {\n return _instance.global(options);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.configure = function(options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = {payload: payloadData};\n }\n this.options = _.handleOptions(oldOptions, options, payload, logger);\n this.options._configuredOptions = _.handleOptions(oldOptions._configuredOptions, options, payload);\n this.client.configure(this.options, payloadData);\n this.instrumenter && this.instrumenter.configure(this.options);\n this.setupUnhandledCapture();\n return this;\n};\nRollbar.configure = function(options, payloadData) {\n if (_instance) {\n return _instance.configure(options, payloadData);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.lastError = function() {\n return this.client.lastError;\n};\nRollbar.lastError = function() {\n if (_instance) {\n return _instance.lastError();\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.log = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.log(item);\n return {uuid: uuid};\n};\nRollbar.log = function() {\n if (_instance) {\n return _instance.log.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.debug = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.debug(item);\n return {uuid: uuid};\n};\nRollbar.debug = function() {\n if (_instance) {\n return _instance.debug.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.info = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.info(item);\n return {uuid: uuid};\n};\nRollbar.info = function() {\n if (_instance) {\n return _instance.info.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warn = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warn(item);\n return {uuid: uuid};\n};\nRollbar.warn = function() {\n if (_instance) {\n return _instance.warn.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warning = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warning(item);\n return {uuid: uuid};\n};\nRollbar.warning = function() {\n if (_instance) {\n return _instance.warning.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.error = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.error(item);\n return {uuid: uuid};\n};\nRollbar.error = function() {\n if (_instance) {\n return _instance.error.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.critical = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.critical(item);\n return {uuid: uuid};\n};\nRollbar.critical = function() {\n if (_instance) {\n return _instance.critical.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.buildJsonPayload = function(item) {\n return this.client.buildJsonPayload(item);\n};\nRollbar.buildJsonPayload = function() {\n if (_instance) {\n return _instance.buildJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.sendJsonPayload = function(jsonPayload) {\n return this.client.sendJsonPayload(jsonPayload);\n};\nRollbar.sendJsonPayload = function() {\n if (_instance) {\n return _instance.sendJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.setupUnhandledCapture = function() {\n var gWindow = _gWindow();\n\n if (!this.unhandledExceptionsInitialized) {\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(gWindow, this);\n if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {\n this.wrapGlobals(gWindow, this);\n }\n this.unhandledExceptionsInitialized = true;\n }\n }\n if (!this.unhandledRejectionsInitialized) {\n if (this.options.captureUnhandledRejections || this.options.handleUnhandledRejections) {\n globals.captureUnhandledRejections(gWindow, this);\n this.unhandledRejectionsInitialized = true;\n }\n }\n};\n\nRollbar.prototype.handleUncaughtException = function(message, url, lineno, colno, error, context) {\n if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {\n return;\n }\n\n // Chrome will always send 5+ arguments and error will be valid or null, not undefined.\n // If error is undefined, we have a different caller.\n // Chrome also sends errors from web workers with null error, but does not invoke\n // prepareStackTrace() for these. Test for empty url to skip them.\n if (this.options.inspectAnonymousErrors && this.isChrome && error === null && url === '') {\n return 'anonymous';\n }\n\n var item;\n var stackInfo = _.makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n 'onerror',\n 'uncaught exception',\n errorParser\n );\n if (_.isError(error)) {\n item = this._createItem([message, error, context]);\n item._unhandledStackInfo = stackInfo;\n } else if (_.isError(url)) {\n item = this._createItem([message, url, context]);\n item._unhandledStackInfo = stackInfo;\n } else {\n item = this._createItem([message, context]);\n item.stackInfo = stackInfo;\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n this.client.log(item);\n};\n\n/**\n * Chrome only. Other browsers will ignore.\n *\n * Use Error.prepareStackTrace to extract information about errors that\n * do not have a valid error object in onerror().\n *\n * In tested version of Chrome, onerror is called first but has no way\n * to communicate with prepareStackTrace. Use a counter to let this\n * handler know which errors to send to Rollbar.\n *\n * In config options, set inspectAnonymousErrors to enable.\n */\nRollbar.prototype.handleAnonymousErrors = function() {\n if (!this.options.inspectAnonymousErrors || !this.isChrome) {\n return;\n }\n\n var r = this;\n function prepareStackTrace(error, _stack) { // eslint-disable-line no-unused-vars\n if (r.options.inspectAnonymousErrors) {\n if (r.anonymousErrorsPending) {\n // This is the only known way to detect that onerror saw an anonymous error.\n // It depends on onerror reliably being called before Error.prepareStackTrace,\n // which so far holds true on tested versions of Chrome. If versions of Chrome\n // are tested that behave differently, this logic will need to be updated\n // accordingly.\n r.anonymousErrorsPending -= 1;\n\n if (!error) {\n // Not likely to get here, but calling handleUncaughtException from here\n // without an error object would throw off the anonymousErrorsPending counter,\n // so return now.\n return;\n }\n\n // Allow this to be tracked later.\n error._isAnonymous = true;\n\n // url, lineno, colno shouldn't be needed for these errors.\n // If that changes, update this accordingly, using the unused\n // _stack param as needed (rather than parse error.toString()).\n r.handleUncaughtException(error.message, null, null, null, error);\n }\n }\n\n // Workaround to ensure stack is preserved for normal errors.\n return error.stack;\n }\n\n // https://v8.dev/docs/stack-trace-api\n try {\n Error.prepareStackTrace = prepareStackTrace;\n } catch (e) {\n this.options.inspectAnonymousErrors = false;\n this.error('anonymous error handler failed', e);\n }\n}\n\nRollbar.prototype.handleUnhandledRejection = function(reason, promise) {\n if (!this.options.captureUnhandledRejections && !this.options.handleUnhandledRejections) {\n return;\n }\n\n var message = 'unhandled rejection was null or undefined!';\n if (reason) {\n if (reason.message) {\n message = reason.message;\n } else {\n var reasonResult = _.stringify(reason);\n if (reasonResult.value) {\n message = reasonResult.value;\n }\n }\n }\n var context = (reason && reason._rollbarContext) || (promise && promise._rollbarContext);\n\n var item;\n if (_.isError(reason)) {\n item = this._createItem([message, reason, context]);\n } else {\n item = this._createItem([message, reason, context]);\n item.stackInfo = _.makeUnhandledStackInfo(\n message,\n '',\n 0,\n 0,\n null,\n 'unhandledrejection',\n '',\n errorParser\n );\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n item._originalArgs = item._originalArgs || [];\n item._originalArgs.push(promise);\n this.client.log(item);\n};\n\nRollbar.prototype.wrap = function(f, context, _before) {\n try {\n var ctxFn;\n if(_.isFunction(context)) {\n ctxFn = context;\n } else {\n ctxFn = function() { return context || {}; };\n }\n\n if (!_.isFunction(f)) {\n return f;\n }\n\n if (f._isWrap) {\n return f;\n }\n\n if (!f._rollbar_wrapped) {\n f._rollbar_wrapped = function () {\n if (_before && _.isFunction(_before)) {\n _before.apply(this, arguments);\n }\n try {\n return f.apply(this, arguments);\n } catch(exc) {\n var e = exc;\n if (e && window._rollbarWrappedError !== e) {\n if (_.isType(e, 'string')) {\n e = new String(e);\n }\n e._rollbarContext = ctxFn() || {};\n e._rollbarContext._wrappedSource = f.toString();\n\n window._rollbarWrappedError = e;\n }\n throw e;\n }\n };\n\n f._rollbar_wrapped._isWrap = true;\n\n if (f.hasOwnProperty) {\n for (var prop in f) {\n if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {\n f._rollbar_wrapped[prop] = f[prop];\n }\n }\n }\n }\n\n return f._rollbar_wrapped;\n } catch (e) {\n // Return the original function if the wrap fails.\n return f;\n }\n};\nRollbar.wrap = function(f, context) {\n if (_instance) {\n return _instance.wrap(f, context);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.captureEvent = function() {\n var event = _.createTelemetryEvent(arguments);\n return this.client.captureEvent(event.type, event.metadata, event.level);\n};\nRollbar.captureEvent = function() {\n if (_instance) {\n return _instance.captureEvent.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\n// The following two methods are used internally and are not meant for public use\nRollbar.prototype.captureDomContentLoaded = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureLoad(ts);\n};\n\n/* Internal */\n\nfunction addTransformsToNotifier(notifier, rollbar, gWindow) {\n notifier\n .addTransform(transforms.handleDomException)\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(gWindow))\n .addTransform(transforms.addClientInfo(gWindow))\n .addTransform(transforms.addPluginInfo(gWindow))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(sharedTransforms.addConfigToPayload)\n .addTransform(transforms.addScrubber(rollbar.scrub))\n .addTransform(sharedTransforms.userTransform(logger))\n .addTransform(sharedTransforms.addConfiguredOptions)\n .addTransform(sharedTransforms.addDiagnosticKeys)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(sharedPredicates.checkLevel)\n .addPredicate(predicates.checkIgnore)\n .addPredicate(sharedPredicates.userCheckIgnore(logger))\n .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))\n .addPredicate(sharedPredicates.urlIsSafeListed(logger))\n .addPredicate(sharedPredicates.messageIsIgnored(logger));\n}\n\nRollbar.prototype.loadFull = function() {\n logger.info('Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.');\n};\n\nRollbar.prototype._createItem = function(args) {\n return _.createItem(args, logger, this);\n};\n\nfunction _getFirstFunction(args) {\n for (var i = 0, len = args.length; i < len; ++i) {\n if (_.isFunction(args[i])) {\n return args[i];\n }\n }\n return undefined;\n}\n\nfunction _gWindow() {\n return ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n}\n\nvar defaults = require('../defaults');\nvar scrubFields = require('./defaults/scrubFields');\n\nvar defaultOptions = {\n version: defaults.version,\n scrubFields: scrubFields.scrubFields,\n logLevel: defaults.logLevel,\n reportLevel: defaults.reportLevel,\n uncaughtErrorLevel: defaults.uncaughtErrorLevel,\n endpoint: defaults.endpoint,\n verbose: false,\n enabled: true,\n transmit: true,\n sendConfig: false,\n includeItemsInTelemetry: true,\n captureIp: true,\n inspectAnonymousErrors: true,\n ignoreDuplicateErrors: true,\n wrapGlobalEventHandlers: false\n};\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar _ = require('./utility');\n\n/*\n * Rollbar - the interface to Rollbar\n *\n * @param options\n * @param api\n * @param logger\n */\nfunction Rollbar(options, api, logger, telemeter, platform) {\n this.options = _.merge(options);\n this.logger = logger;\n Rollbar.rateLimiter.configureGlobal(this.options);\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.api = api;\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n\n // This must happen before the Notifier is created\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = telemeter;\n setStackTraceLimit(options);\n this.lastError = null;\n this.lastErrorHash = 'none';\n}\n\nvar defaultOptions = {\n maxItems: 0,\n itemsPerMinute: 60\n};\n\nRollbar.rateLimiter = new RateLimiter(defaultOptions);\n\nRollbar.prototype.global = function (options) {\n Rollbar.rateLimiter.configureGlobal(options);\n return this;\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n\n this.options = _.merge(oldOptions, options, payload);\n\n // This must happen before the Notifier is configured\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier && this.notifier.configure(this.options);\n this.telemeter && this.telemeter.configure(this.options);\n setStackTraceLimit(options);\n this.global(this.options);\n\n if (validateTracer(options.tracer)) {\n this.tracer = options.tracer\n }\n\n return this;\n};\n\nRollbar.prototype.log = function (item) {\n var level = this._defaultLogLevel();\n return this._log(level, item);\n};\n\nRollbar.prototype.debug = function (item) {\n this._log('debug', item);\n};\n\nRollbar.prototype.info = function (item) {\n this._log('info', item);\n};\n\nRollbar.prototype.warn = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.warning = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.error = function (item) {\n this._log('error', item);\n};\n\nRollbar.prototype.critical = function (item) {\n this._log('critical', item);\n};\n\nRollbar.prototype.wait = function (callback) {\n this.queue.wait(callback);\n};\n\nRollbar.prototype.captureEvent = function (type, metadata, level) {\n return this.telemeter && this.telemeter.captureEvent(type, metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function (ts) {\n return this.telemeter && this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (ts) {\n return this.telemeter && this.telemeter.captureLoad(ts);\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.api.buildJsonPayload(item);\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n this.api.postJsonPayload(jsonPayload);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function (defaultLevel, item) {\n var callback;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {\n if (callback) {\n var error = new Error('ignored identical item');\n error.item = item;\n callback(error);\n }\n return;\n }\n try {\n this._addTracingInfo(item);\n item.level = item.level || defaultLevel;\n this.telemeter && this.telemeter._captureRollbarItem(item);\n item.telemetryEvents = (this.telemeter && this.telemeter.copyEvents()) || [];\n this.notifier.log(item, callback);\n } catch (e) {\n if (callback) {\n callback(e);\n }\n this.logger.error(e);\n }\n};\n\nRollbar.prototype._defaultLogLevel = function () {\n return this.options.logLevel || 'debug';\n};\n\nRollbar.prototype._sameAsLastError = function (item) {\n if (!item._isUncaught) {\n return false;\n }\n var itemHash = generateItemHash(item);\n if (this.lastErrorHash === itemHash) {\n return true;\n }\n this.lastError = item.err;\n this.lastErrorHash = itemHash;\n return false;\n};\n\nRollbar.prototype._addTracingInfo = function (item) {\n // Tracer validation occurs in the constructor\n // or in the Rollbar.prototype.configure methods\n if (this.tracer) {\n // add rollbar occurrence uuid to span\n var span = this.tracer.scope().active();\n\n if (validateSpan(span)) {\n span.setTag('rollbar.error_uuid', item.uuid);\n span.setTag('rollbar.has_error', true);\n span.setTag('error', true);\n span.setTag('rollbar.item_url', `https://rollbar.com/item/uuid/?uuid=${item.uuid}`);\n span.setTag('rollbar.occurrence_url', `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`);\n\n // add span ID & trace ID to occurrence\n var opentracingSpanId = span.context().toSpanId();\n var opentracingTraceId = span.context().toTraceId();\n\n if (item.custom) {\n item.custom.opentracing_span_id = opentracingSpanId;\n item.custom.opentracing_trace_id = opentracingTraceId;\n } else {\n item.custom = {\n opentracing_span_id: opentracingSpanId,\n opentracing_trace_id: opentracingTraceId\n };\n }\n }\n }\n}\n\nfunction generateItemHash(item) {\n var message = item.message || '';\n var stack = (item.err || {}).stack || String(item.err);\n return message + '::' + stack;\n}\n\n// Node.js, Chrome, Safari, and some other browsers support this property\n// which globally sets the number of stack frames returned in an Error object.\n// If a browser can't use it, no harm done.\nfunction setStackTraceLimit(options) {\n if (options.stackTraceLimit) {\n Error.stackTraceLimit = options.stackTraceLimit;\n }\n}\n\n/**\n * Validate the Tracer object provided to the Client\n * is valid for our Opentracing use case.\n * @param {opentracer.Tracer} tracer\n */\nfunction validateTracer(tracer) {\n if (!tracer) {\n return false;\n }\n\n if (!tracer.scope || typeof tracer.scope !== 'function') {\n return false;\n }\n\n var scope = tracer.scope();\n\n if (!scope || !scope.active || typeof scope.active !== 'function') {\n return false;\n }\n\n return true;\n}\n\n/**\n * Validate the Span object provided\n * @param {opentracer.Span} span\n */\nfunction validateSpan(span) {\n if (!span || !span.context || typeof span.context !== 'function') {\n return false;\n }\n\n var spanContext = span.context();\n\n if (!spanContext\n || !spanContext.toSpanId\n || !spanContext.toTraceId\n || typeof spanContext.toSpanId !== 'function'\n || typeof spanContext.toTraceId !== 'function') {\n return false\n }\n\n return true;\n}\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar\n *\n * @param options - the same options that are accepted by configureGlobal offered as a convenience\n */\nfunction RateLimiter(options) {\n this.startTime = _.now();\n this.counter = 0;\n this.perMinCounter = 0;\n this.platform = null;\n this.platformOptions = {};\n this.configureGlobal(options);\n}\n\nRateLimiter.globalSettings = {\n startTime: _.now(),\n maxItems: undefined,\n itemsPerMinute: undefined\n};\n\n/*\n * configureGlobal - set the global rate limiter options\n *\n * @param options - Only the following values are recognized:\n * startTime: a timestamp of the form returned by (new Date()).getTime()\n * maxItems: the maximum items\n * itemsPerMinute: the max number of items to send in a given minute\n */\nRateLimiter.prototype.configureGlobal = function(options) {\n if (options.startTime !== undefined) {\n RateLimiter.globalSettings.startTime = options.startTime;\n }\n if (options.maxItems !== undefined) {\n RateLimiter.globalSettings.maxItems = options.maxItems;\n }\n if (options.itemsPerMinute !== undefined) {\n RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;\n }\n};\n\n/*\n * shouldSend - determine if we should send a given item based on rate limit settings\n *\n * @param item - the item we are about to send\n * @returns An object with the following structure:\n * error: (Error|null)\n * shouldSend: bool\n * payload: (Object|null)\n * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and\n * exactly one of error or payload will be non-null. If error is non-null, the returned Error will\n * describe the situation, but it means that we were already over a rate limit (either globally or\n * per minute) when this item was checked. If error is null, and therefore payload is non-null, it\n * means this item put us over the global rate limit and the payload should be sent to Rollbar in\n * place of the passed in item.\n */\nRateLimiter.prototype.shouldSend = function(item, now) {\n now = now || _.now();\n var elapsedTime = now - this.startTime;\n if (elapsedTime < 0 || elapsedTime >= 60000) {\n this.startTime = now;\n this.perMinCounter = 0;\n }\n\n var globalRateLimit = RateLimiter.globalSettings.maxItems;\n var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;\n\n if (checkRate(item, globalRateLimit, this.counter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimit + ' max items reached', false);\n } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimitPerMin + ' items per minute reached', false);\n }\n this.counter++;\n this.perMinCounter++;\n\n var shouldSend = !checkRate(item, globalRateLimit, this.counter);\n var perMinute = shouldSend;\n shouldSend = shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);\n return shouldSendValue(this.platform, this.platformOptions, null, shouldSend, globalRateLimit, globalRateLimitPerMin, perMinute);\n};\n\nRateLimiter.prototype.setPlatformOptions = function(platform, options) {\n this.platform = platform;\n this.platformOptions = options;\n};\n\n/* Helpers */\n\nfunction checkRate(item, limit, counter) {\n return !item.ignoreRateLimit && limit >= 1 && counter > limit;\n}\n\nfunction shouldSendValue(platform, options, error, shouldSend, globalRateLimit, limitPerMin, perMinute) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute);\n }\n return {error: error, shouldSend: shouldSend, payload: payload};\n}\n\nfunction rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute) {\n var environment = options.environment || (options.payload && options.payload.environment);\n var msg;\n if (perMinute) {\n msg = 'item per minute limit reached, ignoring errors until timeout';\n } else {\n msg = 'maxItems has been hit, ignoring errors until reset.';\n }\n var item = {\n body: {\n message: {\n body: msg,\n extra: {\n maxItems: globalRateLimit,\n itemsPerMinute: limitPerMin\n }\n }\n },\n language: 'javascript',\n environment: environment,\n notifier: {\n version: (options.notifier && options.notifier.version) || options.version\n }\n };\n if (platform === 'browser') {\n item.platform = 'browser';\n item.framework = 'browser-js';\n item.notifier.name = 'rollbar-browser-js';\n } else if (platform === 'server') {\n item.framework = options.framework || 'node-js';\n item.notifier.name = options.notifier.name;\n } else if (platform === 'react-native') {\n item.framework = options.framework || 'react-native';\n item.notifier.name = options.notifier.name;\n }\n return item;\n}\n\nmodule.exports = RateLimiter;\n","'use strict';\n\n'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isPlainObject = function isPlainObject(obj) {\n\tif (!obj || toStr.call(obj) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tvar hasOwnConstructor = hasOwn.call(obj, 'constructor');\n\tvar hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n\t// Not own constructor property must be Object\n\tif (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n\t\treturn false;\n\t}\n\n\t// Own properties are enumerated firstly, so to speed up,\n\t// if last one is own, then all properties are own.\n\tvar key;\n\tfor (key in obj) {/**/}\n\n\treturn typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\nfunction merge() {\n var i, src, copy, clone, name,\n result = {},\n current = null,\n length = arguments.length;\n\n for (i=0; i < length; i++) {\n current = arguments[i];\n if (current == null) {\n continue;\n }\n\n for (name in current) {\n src = result[name];\n copy = current[name];\n if (result !== copy) {\n if (copy && isPlainObject(copy)) {\n clone = src && isPlainObject(src) ? src : {};\n result[name] = merge(clone, copy);\n } else if (typeof copy !== 'undefined') {\n result[name] = copy;\n }\n }\n }\n }\n return result;\n}\n\nmodule.exports = merge;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Queue - an object which handles which handles a queue of items to be sent to Rollbar.\n * This object handles rate limiting via a passed in rate limiter, retries based on connection\n * errors, and filtering of items based on a set of configurable predicates. The communication to\n * the backend is performed via a given API object.\n *\n * @param rateLimiter - An object which conforms to the interface\n * rateLimiter.shouldSend(item) -> bool\n * @param api - An object which conforms to the interface\n * api.postItem(payload, function(err, response))\n * @param logger - An object used to log verbose messages if desired\n * @param options - see Queue.prototype.configure\n */\nfunction Queue(rateLimiter, api, logger, options) {\n this.rateLimiter = rateLimiter;\n this.api = api;\n this.logger = logger;\n this.options = options;\n this.predicates = [];\n this.pendingItems = [];\n this.pendingRequests = [];\n this.retryQueue = [];\n this.retryHandle = null;\n this.waitCallback = null;\n this.waitIntervalID = null;\n}\n\n/*\n * configure - updates the options this queue uses\n *\n * @param options\n */\nQueue.prototype.configure = function(options) {\n this.api && this.api.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addPredicate - adds a predicate to the end of the list of predicates for this queue\n *\n * @param predicate - function(item, options) -> (bool|{err: Error})\n * Returning true means that this predicate passes and the item is okay to go on the queue\n * Returning false means do not add the item to the queue, but it is not an error\n * Returning {err: Error} means do not add the item to the queue, and the given error explains why\n * Returning {err: undefined} is equivalent to returning true but don't do that\n */\nQueue.prototype.addPredicate = function(predicate) {\n if (_.isFunction(predicate)) {\n this.predicates.push(predicate);\n }\n return this;\n};\n\nQueue.prototype.addPendingItem = function(item) {\n this.pendingItems.push(item);\n};\n\nQueue.prototype.removePendingItem = function(item) {\n var idx = this.pendingItems.indexOf(item);\n if (idx !== -1) {\n this.pendingItems.splice(idx, 1);\n }\n};\n\n/*\n * addItem - Send an item to the Rollbar API if all of the predicates are satisfied\n *\n * @param item - The payload to send to the backend\n * @param callback - function(error, repsonse) which will be called with the response from the API\n * in the case of a success, otherwise response will be null and error will have a value. If both\n * error and response are null then the item was stopped by a predicate which did not consider this\n * to be an error condition, but nonetheless did not send the item to the API.\n * @param originalError - The original error before any transformations that is to be logged if any\n */\nQueue.prototype.addItem = function(item, callback, originalError, originalItem) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() { return; };\n }\n var predicateResult = this._applyPredicates(item);\n if (predicateResult.stop) {\n this.removePendingItem(originalItem);\n callback(predicateResult.err);\n return;\n }\n this._maybeLog(item, originalError);\n this.removePendingItem(originalItem);\n if (!this.options.transmit) {\n callback(new Error('Transmit disabled'));\n return;\n }\n this.pendingRequests.push(item);\n try {\n this._makeApiRequest(item, function(err, resp) {\n this._dequeuePendingRequest(item);\n callback(err, resp);\n }.bind(this));\n } catch (e) {\n this._dequeuePendingRequest(item);\n callback(e);\n }\n};\n\n/*\n * wait - Stop any further errors from being added to the queue, and get called back when all items\n * currently processing have finished sending to the backend.\n *\n * @param callback - function() called when all pending items have been sent\n */\nQueue.prototype.wait = function(callback) {\n if (!_.isFunction(callback)) {\n return;\n }\n this.waitCallback = callback;\n if (this._maybeCallWait()) {\n return;\n }\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitIntervalID = setInterval(function() {\n this._maybeCallWait();\n }.bind(this), 500);\n};\n\n/* _applyPredicates - Sequentially applies the predicates that have been added to the queue to the\n * given item with the currently configured options.\n *\n * @param item - An item in the queue\n * @returns {stop: bool, err: (Error|null)} - stop being true means do not add item to the queue,\n * the error value should be passed up to a callbak if we are stopping.\n */\nQueue.prototype._applyPredicates = function(item) {\n var p = null;\n for (var i = 0, len = this.predicates.length; i < len; i++) {\n p = this.predicates[i](item, this.options);\n if (!p || p.err !== undefined) {\n return {stop: true, err: p.err};\n }\n }\n return {stop: false, err: null};\n};\n\n/*\n * _makeApiRequest - Send an item to Rollbar, callback when done, if there is an error make an\n * effort to retry if we are configured to do so.\n *\n * @param item - an item ready to send to the backend\n * @param callback - function(err, response)\n */\nQueue.prototype._makeApiRequest = function(item, callback) {\n var rateLimitResponse = this.rateLimiter.shouldSend(item);\n if (rateLimitResponse.shouldSend) {\n this.api.postItem(item, function(err, resp) {\n if (err) {\n this._maybeRetry(err, item, callback);\n } else {\n callback(err, resp);\n }\n }.bind(this));\n } else if (rateLimitResponse.error) {\n callback(rateLimitResponse.error);\n } else {\n this.api.postItem(rateLimitResponse.payload, callback);\n }\n};\n\n// These are errors basically mean there is no internet connection\nvar RETRIABLE_ERRORS = ['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED', 'EHOSTUNREACH', 'EPIPE', 'EAI_AGAIN'];\n\n/*\n * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback\n * with the error.\n *\n * @param err - an error returned by the API transport\n * @param item - the item that was trying to be sent when this error occured\n * @param callback - function(err, response)\n */\nQueue.prototype._maybeRetry = function(err, item, callback) {\n var shouldRetry = false;\n if (this.options.retryInterval) {\n for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {\n if (err.code === RETRIABLE_ERRORS[i]) {\n shouldRetry = true;\n break;\n }\n }\n if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {\n item.retries = item.retries ? item.retries + 1 : 1;\n if (item.retries > this.options.maxRetries) {\n shouldRetry = false;\n }\n }\n }\n if (shouldRetry) {\n this._retryApiRequest(item, callback);\n } else {\n callback(err);\n }\n};\n\n/*\n * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process\n * that queue based on the retryInterval in the options for this queue.\n *\n * @param item - an item that failed to send due to an error we deem retriable\n * @param callback - function(err, response)\n */\nQueue.prototype._retryApiRequest = function(item, callback) {\n this.retryQueue.push({item: item, callback: callback});\n\n if (!this.retryHandle) {\n this.retryHandle = setInterval(function() {\n while (this.retryQueue.length) {\n var retryObject = this.retryQueue.shift();\n this._makeApiRequest(retryObject.item, retryObject.callback);\n }\n }.bind(this), this.options.retryInterval);\n }\n};\n\n/*\n * _dequeuePendingRequest - Removes the item from the pending request queue, this queue is used to\n * enable to functionality of providing a callback that clients can pass to `wait` to be notified\n * when the pending request queue has been emptied. This must be called when the API finishes\n * processing this item. If a `wait` callback is configured, it is called by this function.\n *\n * @param item - the item previously added to the pending request queue\n */\nQueue.prototype._dequeuePendingRequest = function(item) {\n var idx = this.pendingRequests.indexOf(item);\n if (idx !== -1) {\n this.pendingRequests.splice(idx, 1);\n this._maybeCallWait();\n }\n};\n\nQueue.prototype._maybeLog = function(data, originalError) {\n if (this.logger && this.options.verbose) {\n var message = originalError;\n message = message || _.get(data, 'body.trace.exception.message');\n message = message || _.get(data, 'body.trace_chain.0.exception.message');\n if (message) {\n this.logger.error(message);\n return;\n }\n message = _.get(data, 'body.message.body');\n if (message) {\n this.logger.log(message);\n }\n }\n};\n\nQueue.prototype._maybeCallWait = function() {\n if (_.isFunction(this.waitCallback) && this.pendingItems.length === 0 && this.pendingRequests.length === 0) {\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitCallback();\n return true;\n }\n return false;\n};\n\nmodule.exports = Queue;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Notifier - the internal object responsible for delegating between the client exposed API, the\n * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the\n * queue which handles the communcation with the Rollbar API servers.\n *\n * @param queue - an object that conforms to the interface: addItem(item, callback)\n * @param options - an object representing the options to be set for this notifier, this should have\n * any defaults already set by the caller\n */\nfunction Notifier(queue, options) {\n this.queue = queue;\n this.options = options;\n this.transforms = [];\n this.diagnostic = {};\n}\n\n/*\n * configure - updates the options for this notifier with the passed in object\n *\n * @param options - an object which gets merged with the current options set on this notifier\n * @returns this\n */\nNotifier.prototype.configure = function(options) {\n this.queue && this.queue.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addTransform - adds a transform onto the end of the queue of transforms for this notifier\n *\n * @param transform - a function which takes three arguments:\n * * item: An Object representing the data to eventually be sent to Rollbar\n * * options: The current value of the options for this notifier\n * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this\n * callback with a null value for error if it wants the processing chain to continue, otherwise\n * with an error to terminate the processing. The item should be the updated item after this\n * transform is finished modifying it.\n */\nNotifier.prototype.addTransform = function(transform) {\n if (_.isFunction(transform)) {\n this.transforms.push(transform);\n }\n return this;\n};\n\n/*\n * log - the internal log function which applies the configured transforms and then pushes onto the\n * queue to be sent to the backend.\n *\n * @param item - An object with the following structure:\n * message [String] - An optional string to be sent to rollbar\n * error [Error] - An optional error\n *\n * @param callback - A function of type function(err, resp) which will be called with exactly one\n * null argument and one non-null argument. The callback will be called once, either during the\n * transform stage if an error occurs inside a transform, or in response to the communication with\n * the backend. The second argument will be the response from the backend in case of success.\n */\nNotifier.prototype.log = function(item, callback) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!this.options.enabled) {\n return callback(new Error('Rollbar is not enabled'));\n }\n\n this.queue.addPendingItem(item);\n var originalError = item.err;\n this._applyTransforms(item, function(err, i) {\n if (err) {\n this.queue.removePendingItem(item);\n return callback(err, null);\n }\n this.queue.addItem(i, callback, originalError, item);\n }.bind(this));\n};\n\n/* Internal */\n\n/*\n * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See\n * `addTransform` for more information.\n *\n * @param item - An item to be transformed\n * @param callback - A function of type function(err, item) which will be called with a non-null\n * error and a null item in the case of a transform failure, or a null error and non-null item after\n * all transforms have been applied.\n */\nNotifier.prototype._applyTransforms = function(item, callback) {\n var transformIndex = -1;\n var transformsLength = this.transforms.length;\n var transforms = this.transforms;\n var options = this.options;\n\n var cb = function(err, i) {\n if (err) {\n callback(err, null);\n return;\n }\n\n transformIndex++;\n\n if (transformIndex === transformsLength) {\n callback(null, i);\n return;\n }\n\n transforms[transformIndex](i, options, cb);\n };\n\n cb(null, item);\n};\n\nmodule.exports = Notifier;\n","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1/item/',\n search: null,\n version: '1',\n protocol: 'https:',\n port: 443\n};\n\n/**\n * Api is an object that encapsulates methods of communicating with\n * the Rollbar API. It is a standard interface with some parts implemented\n * differently for server or browser contexts. It is an object that should\n * be instantiated when used so it can contain non-global options that may\n * be different for another instance of RollbarApi.\n *\n * @param options {\n * accessToken: the accessToken to use for posting items to rollbar\n * endpoint: an alternative endpoint to send errors to\n * must be a valid, fully qualified URL.\n * The default is: https://api.rollbar.com/api/1/item\n * proxy: if you wish to proxy requests provide an object\n * with the following keys:\n * host or hostname (required): foo.example.com\n * port (optional): 123\n * protocol (optional): https\n * }\n */\nfunction Api(options, transport, urllib, truncation, jsonBackup) {\n this.options = options;\n this.transport = transport;\n this.url = urllib;\n this.truncation = truncation;\n this.jsonBackup = jsonBackup;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, urllib);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function(data, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n this.transport.post(this.accessToken, transportOptions, payload, callback);\n};\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.buildJsonPayload = function(data, callback) {\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n\n if (stringifyResult.error) {\n if (callback) {\n callback(stringifyResult.error);\n }\n return null;\n }\n\n return stringifyResult.value;\n};\n\n/**\n *\n * @param jsonPayload\n * @param callback\n */\nApi.prototype.postJsonPayload = function(jsonPayload, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n this.transport.postJsonPayload(this.accessToken, transportOptions, jsonPayload, callback);\n};\n\nApi.prototype.configure = function(options) {\n var oldOptions = this.oldOptions;\n this.options = _.merge(oldOptions, options);\n this.transportOptions = _getTransport(this.options, this.url);\n if (this.options.accessToken !== undefined) {\n this.accessToken = this.options.accessToken;\n }\n return this;\n};\n\nfunction _getTransport(options, url) {\n return helpers.getTransportFromOptions(options, defaultOptions, url);\n}\n\nmodule.exports = Api;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (!_.isType(data.context, 'string')) {\n var contextResult = _.stringify(data.context, jsonBackup);\n if (contextResult.error) {\n data.context = 'Error: could not serialize \\'context\\'';\n } else {\n data.context = contextResult.value || '';\n }\n if (data.context.length > 255) {\n data.context = data.context.substr(0, 255);\n }\n }\n return {\n access_token: accessToken,\n data: data\n };\n}\n\nfunction getTransportFromOptions(options, defaults, url) {\n var hostname = defaults.hostname;\n var protocol = defaults.protocol;\n var port = defaults.port;\n var path = defaults.path;\n var search = defaults.search;\n var timeout = options.timeout;\n\n var proxy = options.proxy;\n if (options.endpoint) {\n var opts = url.parse(options.endpoint);\n hostname = opts.hostname;\n protocol = opts.protocol;\n port = opts.port;\n path = opts.pathname;\n search = opts.search;\n }\n return {\n timeout: timeout,\n hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy\n };\n}\n\nfunction transportOptions(transport, method) {\n var protocol = transport.protocol || 'https:';\n var port = transport.port || (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);\n var hostname = transport.hostname;\n var path = transport.path;\n var timeout = transport.timeout;\n if (transport.search) {\n path = path + transport.search;\n }\n if (transport.proxy) {\n path = protocol + '//' + hostname + path;\n hostname = transport.proxy.host || transport.proxy.hostname;\n port = transport.proxy.port;\n protocol = transport.proxy.protocol || protocol;\n }\n return {\n timeout: timeout,\n protocol: protocol,\n hostname: hostname,\n path: path,\n port: port,\n method: method\n };\n}\n\nfunction appendPathToPath(base, path) {\n var baseTrailingSlash = /\\/$/.test(base);\n var pathBeginningSlash = /^\\//.test(path);\n\n if (baseTrailingSlash && pathBeginningSlash) {\n path = path.substring(1);\n } else if (!baseTrailingSlash && !pathBeginningSlash) {\n path = '/' + path;\n }\n\n return base + path;\n}\n\nmodule.exports = {\n buildPayload: buildPayload,\n getTransportFromOptions: getTransportFromOptions,\n transportOptions: transportOptions,\n appendPathToPath: appendPathToPath\n};\n","// Console-polyfill. MIT license.\n// https://github.com/paulmillr/console-polyfill\n// Make it safe to do console.log() always.\n(function(global) {\n 'use strict';\n if (!global.console) {\n global.console = {};\n }\n var con = global.console;\n var prop, method;\n var dummy = function() {};\n var properties = ['memory'];\n var methods = ('assert,clear,count,debug,dir,dirxml,error,exception,group,' +\n 'groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,' +\n 'show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn').split(',');\n while (prop = properties.pop()) if (!con[prop]) con[prop] = {};\n while (method = methods.pop()) if (!con[method]) con[method] = dummy;\n // Using `this` for web workers & supports Browserify / Webpack.\n})(typeof window === 'undefined' ? this : window);\n","'use strict';\n\n// This detection.js module is used to encapsulate any ugly browser/feature\n// detection we may need to do.\n\n// Figure out which version of IE we're using, if any.\n// This is gleaned from http://stackoverflow.com/questions/5574842/best-way-to-check-for-ie-less-than-9-in-javascript-without-library\n// Will return an integer on IE (i.e. 8)\n// Will return undefined otherwise\nfunction getIEVersion() {\n\tvar undef;\n\tif (typeof document === 'undefined') {\n\t\treturn undef;\n\t}\n\n var v = 3,\n div = document.createElement('div'),\n all = div.getElementsByTagName('i');\n\n while (\n div.innerHTML = '',\n all[0]\n );\n\n return v > 4 ? v : undef;\n}\n\nvar Detection = {\n ieVersion: getIEVersion\n};\n\nmodule.exports = Detection;\n","'use strict';\n\nfunction captureUncaughtExceptions(window, handler, shim) {\n if (!window) { return; }\n var oldOnError;\n\n if (typeof handler._rollbarOldOnError === 'function') {\n oldOnError = handler._rollbarOldOnError;\n } else if (window.onerror) {\n oldOnError = window.onerror;\n while (oldOnError._rollbarOldOnError) {\n oldOnError = oldOnError._rollbarOldOnError;\n }\n handler._rollbarOldOnError = oldOnError;\n }\n\n handler.handleAnonymousErrors();\n\n var fn = function() {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n if (shim) {\n fn._rollbarOldOnError = oldOnError;\n }\n window.onerror = fn;\n}\n\nfunction _rollbarWindowOnError(window, r, old, args) {\n if (window._rollbarWrappedError) {\n if (!args[4]) {\n args[4] = window._rollbarWrappedError;\n }\n if (!args[5]) {\n args[5] = window._rollbarWrappedError._rollbarContext;\n }\n window._rollbarWrappedError = null;\n }\n\n var ret = r.handleUncaughtException.apply(r, args);\n\n if (old) {\n old.apply(window, args);\n }\n\n // Let other chained onerror handlers above run before setting this.\n // If an error is thrown and caught within a chained onerror handler,\n // Error.prepareStackTrace() will see that one before the one we want.\n if (ret === 'anonymous') {\n r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()\n }\n}\n\nfunction captureUnhandledRejections(window, handler, shim) {\n if (!window) { return; }\n\n if (typeof window._rollbarURH === 'function' && window._rollbarURH.belongsToShim) {\n window.removeEventListener('unhandledrejection', window._rollbarURH);\n }\n\n var rejectionHandler = function (evt) {\n var reason, promise, detail;\n try {\n reason = evt.reason;\n } catch (e) {\n reason = undefined;\n }\n try {\n promise = evt.promise;\n } catch (e) {\n promise = '[unhandledrejection] error getting `promise` from event';\n }\n try {\n detail = evt.detail;\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\n }\n } catch (e) {\n // Ignore\n }\n if (!reason) {\n reason = '[unhandledrejection] error getting `reason` from event';\n }\n\n if (handler && handler.handleUnhandledRejection) {\n handler.handleUnhandledRejection(reason, promise);\n }\n };\n rejectionHandler.belongsToShim = shim;\n window._rollbarURH = rejectionHandler;\n window.addEventListener('unhandledrejection', rejectionHandler);\n}\n\n\nmodule.exports = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections\n};\n","'use strict';\n\n/*global XDomainRequest*/\n\nvar _ = require('../utility');\nvar logger = require('./logger');\n\n/*\n * accessToken may be embedded in payload but that should not\n * be assumed\n *\n * options: {\n * hostname\n * protocol\n * path\n * port\n * method\n * }\n *\n * params is an object containing key/value pairs. These\n * will be appended to the path as 'key=value&key=value'\n *\n * payload is an unserialized object\n */\nfunction Transport(truncation) {\n this.truncation = truncation;\n}\n\nTransport.prototype.get = function(accessToken, options, params, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n _.addParamsAndAccessTokenToPath(accessToken, options, params);\n\n var method = 'GET';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, null, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.post = function(accessToken, options, payload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!payload) {\n return callback(new Error('Cannot send empty request'));\n }\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n if (stringifyResult.error) {\n return callback(stringifyResult.error);\n }\n\n var writeData = stringifyResult.value;\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, writeData, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.postJsonPayload = function (accessToken, options, jsonPayload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, jsonPayload, callback, requestFactory, options.timeout);\n}\n\n\n// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope\n// so Angular change detection isn't triggered on each API call.\n// This is the equivalent of runOutsideAngular().\n//\nfunction _makeZoneRequest() {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;\n var args = Array.prototype.slice.call(arguments);\n\n if (currentZone && currentZone._name === 'angular') {\n var rootZone = currentZone._parent;\n rootZone.run(function () {\n _makeRequest.apply(undefined, args);\n });\n } else {\n _makeRequest.apply(undefined, args);\n }\n}\n\n/* global RollbarProxy */\nfunction _proxyRequest(json, callback) {\n var rollbarProxy = new RollbarProxy();\n rollbarProxy.sendJsonPayload(\n json,\n function(_msg) { /* do nothing */ }, // eslint-disable-line no-unused-vars\n function(err) {\n callback(new Error(err));\n }\n );\n}\n\nfunction _makeRequest(accessToken, url, method, data, callback, requestFactory, timeout) {\n if (typeof RollbarProxy !== 'undefined') {\n return _proxyRequest(data, callback);\n }\n\n var request;\n if (requestFactory) {\n request = requestFactory();\n } else {\n request = _createXMLHTTPObject();\n }\n if (!request) {\n // Give up, no way to send requests\n return callback(new Error('No way to send a request'));\n }\n try {\n try {\n var onreadystatechange = function() {\n try {\n if (onreadystatechange && request.readyState === 4) {\n onreadystatechange = undefined;\n\n var parseResponse = _.jsonParse(request.responseText);\n if (_isSuccess(request)) {\n callback(parseResponse.error, parseResponse.value);\n return;\n } else if (_isNormalFailure(request)) {\n if (request.status === 403) {\n // likely caused by using a server access token\n var message = parseResponse.value && parseResponse.value.message;\n logger.error(message);\n }\n // return valid http status codes\n callback(new Error(String(request.status)));\n } else {\n // IE will return a status 12000+ on some sort of connection failure,\n // so we return a blank error\n // http://msdn.microsoft.com/en-us/library/aa383770%28VS.85%29.aspx\n var msg = 'XHR response had no status code (likely connection failure)';\n callback(_newRetriableError(msg));\n }\n }\n } catch (ex) {\n //jquery source mentions firefox may error out while accessing the\n //request members if there is a network error\n //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111\n var exc;\n if (ex && ex.stack) {\n exc = ex;\n } else {\n exc = new Error(ex);\n }\n callback(exc);\n }\n };\n\n request.open(method, url, true);\n if (request.setRequestHeader) {\n request.setRequestHeader('Content-Type', 'application/json');\n request.setRequestHeader('X-Rollbar-Access-Token', accessToken);\n }\n\n if(_.isFiniteNumber(timeout)) {\n request.timeout = timeout;\n }\n\n request.onreadystatechange = onreadystatechange;\n request.send(data);\n } catch (e1) {\n // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest\n if (typeof XDomainRequest !== 'undefined') {\n\n // Assume we are in a really old browser which has a bunch of limitations:\n // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx\n\n // Extreme paranoia: if we have XDomainRequest then we have a window, but just in case\n if (!window || !window.location) {\n return callback(new Error('No window available during request, unknown environment'));\n }\n\n // If the current page is http, try and send over http\n if (window.location.href.substring(0, 5) === 'http:' && url.substring(0, 5) === 'https') {\n url = 'http' + url.substring(5);\n }\n\n var xdomainrequest = new XDomainRequest();\n xdomainrequest.onprogress = function() {};\n xdomainrequest.ontimeout = function() {\n var msg = 'Request timed out';\n var code = 'ETIMEDOUT';\n callback(_newRetriableError(msg, code));\n };\n xdomainrequest.onerror = function() {\n callback(new Error('Error during request'));\n };\n xdomainrequest.onload = function() {\n var parseResponse = _.jsonParse(xdomainrequest.responseText);\n callback(parseResponse.error, parseResponse.value);\n };\n xdomainrequest.open(method, url, true);\n xdomainrequest.send(data);\n } else {\n callback(new Error('Cannot find a method to transport a request'));\n }\n }\n } catch (e2) {\n callback(e2);\n }\n}\n\nfunction _createXMLHTTPObject() {\n /* global ActiveXObject:false */\n\n var factories = [\n function () {\n return new XMLHttpRequest();\n },\n function () {\n return new ActiveXObject('Msxml2.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Msxml3.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Microsoft.XMLHTTP');\n }\n ];\n var xmlhttp;\n var i;\n var numFactories = factories.length;\n for (i = 0; i < numFactories; i++) {\n /* eslint-disable no-empty */\n try {\n xmlhttp = factories[i]();\n break;\n } catch (e) {\n // pass\n }\n /* eslint-enable no-empty */\n }\n return xmlhttp;\n}\n\nfunction _isSuccess(r) {\n return r && r.status && r.status === 200;\n}\n\nfunction _isNormalFailure(r) {\n return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;\n}\n\nfunction _newRetriableError(message, code) {\n var err = new Error(message);\n err.code = code || 'ENOTFOUND';\n return err;\n}\n\nmodule.exports = Transport;\n","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('../errorParser');\nvar logger = require('./logger');\n\nfunction handleDomException(item, options, callback) {\n if(item.err && errorParser.Stack(item.err).name === 'DOMException') {\n var originalError = new Error();\n originalError.name = item.err.name;\n originalError.message = item.err.message;\n originalError.stack = item.err.stack;\n originalError.nested = item.err;\n item.err = originalError;\n }\n callback(null, item);\n}\n\nfunction handleItemWithError(item, options, callback) {\n item.data = item.data || {};\n if (item.err) {\n try {\n item.stackInfo = item.err._savedStackTrace || errorParser.parse(item.err, item.skipFrames);\n\n if (options.addErrorContext) {\n addErrorContext(item);\n }\n } catch (e) {\n logger.error('Error while parsing the error object.', e);\n try {\n item.message = item.err.message || item.err.description || item.message || String(item.err);\n } catch (e2) {\n item.message = String(item.err) || String(e2);\n }\n delete item.err;\n }\n }\n callback(null, item);\n}\n\nfunction addErrorContext(item) {\n var chain = [];\n var err = item.err;\n\n chain.push(err);\n\n while (err.nested) {\n err = err.nested;\n chain.push(err);\n }\n\n _.addErrorContext(item, chain);\n}\n\nfunction ensureItemHasSomethingToSay(item, options, callback) {\n if (!item.message && !item.stackInfo && !item.custom) {\n callback(new Error('No message, stack info, or custom data'), null);\n }\n callback(null, item);\n}\n\nfunction addBaseInfo(item, options, callback) {\n var environment = (options.payload && options.payload.environment) || options.environment;\n item.data = _.merge(item.data, {\n environment: environment,\n level: item.level,\n endpoint: options.endpoint,\n platform: 'browser',\n framework: 'browser-js',\n language: 'javascript',\n server: {},\n uuid: item.uuid,\n notifier: {\n name: 'rollbar-browser-js',\n version: options.version\n },\n custom: item.custom\n });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.location) {\n return callback(null, item);\n }\n var remoteString = '$remote_ip';\n if (!options.captureIp) {\n remoteString = null;\n } else if (options.captureIp !== true) {\n remoteString += '_anonymize';\n }\n _.set(item, 'data.request', {\n url: window.location.href,\n query_string: window.location.search,\n user_ip: remoteString\n });\n callback(null, item);\n };\n}\n\nfunction addClientInfo(window) {\n return function(item, options, callback) {\n if (!window) {\n return callback(null, item);\n }\n var nav = window.navigator || {};\n var scr = window.screen || {};\n _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: nav.userAgent,\n language: nav.language,\n cookie_enabled: nav.cookieEnabled,\n screen: {\n width: scr.width,\n height: scr.height\n }\n }\n });\n callback(null, item);\n };\n}\n\nfunction addPluginInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.navigator) {\n return callback(null, item);\n }\n var plugins = [];\n var navPlugins = window.navigator.plugins || [];\n var cur;\n for (var i=0, l=navPlugins.length; i < l; ++i) {\n cur = navPlugins[i];\n plugins.push({name: cur.name, description: cur.description});\n }\n _.set(item, 'data.client.javascript.plugins', plugins);\n callback(null, item);\n };\n}\n\nfunction addBody(item, options, callback) {\n if (item.stackInfo) {\n if (item.stackInfo.traceChain) {\n addBodyTraceChain(item, options, callback);\n } else {\n addBodyTrace(item, options, callback);\n }\n } else {\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction addBodyMessage(item, options, callback) {\n var message = item.message;\n var custom = item.custom;\n\n if (!message) {\n message = 'Item sent with null or missing arguments.';\n }\n var result = {\n body: message\n };\n\n if (custom) {\n result.extra = _.merge(custom);\n }\n\n _.set(item, 'data.body', {message: result});\n callback(null, item);\n}\n\nfunction stackFromItem(item) {\n // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = item.stackInfo.stack;\n if (stack && stack.length === 0 && item._unhandledStackInfo && item._unhandledStackInfo.stack) {\n stack = item._unhandledStackInfo.stack;\n }\n return stack;\n}\n\nfunction addBodyTraceChain(item, options, callback) {\n var traceChain = item.stackInfo.traceChain;\n var traces = [];\n\n var traceChainLength = traceChain.length;\n for (var i = 0; i < traceChainLength; i++) {\n var trace = buildTrace(item, traceChain[i], options);\n traces.push(trace);\n }\n\n _.set(item, 'data.body', {trace_chain: traces});\n callback(null, item);\n}\n\nfunction addBodyTrace(item, options, callback) {\n var stack = stackFromItem(item);\n\n if (stack) {\n var trace = buildTrace(item, item.stackInfo, options);\n _.set(item, 'data.body', {trace: trace});\n callback(null, item);\n } else {\n var stackInfo = item.stackInfo;\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction buildTrace(item, stackInfo, options) {\n var description = item && item.data.description;\n var custom = item && item.custom;\n var stack = stackFromItem(item);\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n var trace = {\n exception: {\n 'class': className,\n message: message\n }\n };\n\n if (description) {\n trace.exception.description = description;\n }\n\n if (stack) {\n if (stack.length === 0) {\n trace.exception.stack = stackInfo.rawStack;\n trace.exception.raw = String(stackInfo.rawException);\n }\n var stackFrame;\n var frame;\n var code;\n var pre;\n var post;\n var contextLength;\n var i, mid;\n\n trace.frames = [];\n for (i = 0; i < stack.length; ++i) {\n stackFrame = stack[i];\n frame = {\n filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',\n lineno: stackFrame.line || null,\n method: (!stackFrame.func || stackFrame.func === '?') ? '[anonymous]' : stackFrame.func,\n colno: stackFrame.column\n };\n if (options.sendFrameUrl) {\n frame.url = stackFrame.url;\n }\n if (frame.method && frame.method.endsWith && frame.method.endsWith('_rollbar_wrapped')) {\n continue;\n }\n\n code = pre = post = null;\n contextLength = stackFrame.context ? stackFrame.context.length : 0;\n if (contextLength) {\n mid = Math.floor(contextLength / 2);\n pre = stackFrame.context.slice(0, mid);\n code = stackFrame.context[mid];\n post = stackFrame.context.slice(mid);\n }\n\n if (code) {\n frame.code = code;\n }\n\n if (pre || post) {\n frame.context = {};\n if (pre && pre.length) {\n frame.context.pre = pre;\n }\n if (post && post.length) {\n frame.context.post = post;\n }\n }\n\n if (stackFrame.args) {\n frame.args = stackFrame.args;\n }\n\n trace.frames.push(frame);\n }\n\n // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last\n trace.frames.reverse();\n\n if (custom) {\n trace.extra = _.merge(custom);\n }\n }\n\n return trace;\n}\n\nfunction errorClass(stackInfo, guess, options) {\n if (stackInfo.name) {\n return stackInfo.name;\n } else if (options.guessErrorClass) {\n return guess;\n } else {\n return '(unknown)';\n }\n}\n\nfunction addScrubber(scrubFn) {\n return function (item, options, callback) {\n if (scrubFn) {\n var scrubFields = options.scrubFields || [];\n var scrubPaths = options.scrubPaths || [];\n item.data = scrubFn(item.data, scrubFields, scrubPaths);\n }\n callback(null, item);\n }\n}\n\nmodule.exports = {\n handleDomException: handleDomException,\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n addScrubber: addScrubber\n};\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('error-stack-parser', ['stackframe'], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory(require('stackframe'));\n } else {\n root.ErrorStackParser = factory(root.StackFrame);\n }\n}(this, function ErrorStackParser(StackFrame) {\n 'use strict';\n\n var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\\S+:\\d+/;\n var CHROME_IE_STACK_REGEXP = /^\\s*at .*(\\S+:\\d+|\\(native\\))/m;\n var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\\[native code])?$/;\n\n return {\n /**\n * Given an Error object, extract the most information from it.\n *\n * @param {Error} error object\n * @return {Array} of StackFrames\n */\n parse: function ErrorStackParser$$parse(error) {\n if (typeof error.stacktrace !== 'undefined' || typeof error['opera#sourceloc'] !== 'undefined') {\n return this.parseOpera(error);\n } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {\n return this.parseV8OrIE(error);\n } else if (error.stack) {\n return this.parseFFOrSafari(error);\n } else {\n throw new Error('Cannot parse given Error object');\n }\n },\n\n // Separate line and column numbers from a string of the form: (URI:Line:Column)\n extractLocation: function ErrorStackParser$$extractLocation(urlLike) {\n // Fail-fast but return locations like \"(native)\"\n if (urlLike.indexOf(':') === -1) {\n return [urlLike];\n }\n\n var regExp = /(.+?)(?::(\\d+))?(?::(\\d+))?$/;\n var parts = regExp.exec(urlLike.replace(/[()]/g, ''));\n return [parts[1], parts[2] || undefined, parts[3] || undefined];\n },\n\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(CHROME_IE_STACK_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n if (line.indexOf('(eval ') > -1) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n line = line.replace(/eval code/g, 'eval').replace(/(\\(eval at [^()]*)|(\\),.*$)/g, '');\n }\n var sanitizedLine = line.replace(/^\\s+/, '').replace(/\\(eval code/g, '(');\n\n // capture and preseve the parenthesized location \"(/foo/my bar.js:12:87)\" in\n // case it has spaces in it, as the string is split on \\s+ later on\n var location = sanitizedLine.match(/ (\\((.+):(\\d+):(\\d+)\\)$)/);\n\n // remove the parenthesized location from the line, if it was matched\n sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;\n\n var tokens = sanitizedLine.split(/\\s+/).slice(1);\n // if a location was matched, pass it to extractLocation() otherwise pop the last token\n var locationParts = this.extractLocation(location ? location[1] : tokens.pop());\n var functionName = tokens.join(' ') || undefined;\n var fileName = ['eval', ''].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];\n\n return new StackFrame({\n functionName: functionName,\n fileName: fileName,\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n },\n\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n if (line.indexOf(' > eval') > -1) {\n line = line.replace(/ line (\\d+)(?: > eval line \\d+)* > eval:\\d+:\\d+/g, ':$1');\n }\n\n if (line.indexOf('@') === -1 && line.indexOf(':') === -1) {\n // Safari eval frames only have function names and nothing else\n return new StackFrame({\n functionName: line\n });\n } else {\n var functionNameRegex = /((.*\".+\"[^@]*)?[^@]*)(?:@)/;\n var matches = line.match(functionNameRegex);\n var functionName = matches && matches[1] ? matches[1] : undefined;\n var locationParts = this.extractLocation(line.replace(functionNameRegex, ''));\n\n return new StackFrame({\n functionName: functionName,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }\n }, this);\n },\n\n parseOpera: function ErrorStackParser$$parseOpera(e) {\n if (!e.stacktrace || (e.message.indexOf('\\n') > -1 &&\n e.message.split('\\n').length > e.stacktrace.split('\\n').length)) {\n return this.parseOpera9(e);\n } else if (!e.stack) {\n return this.parseOpera10(e);\n } else {\n return this.parseOpera11(e);\n }\n },\n\n parseOpera9: function ErrorStackParser$$parseOpera9(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)/i;\n var lines = e.message.split('\\n');\n var result = [];\n\n for (var i = 2, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(new StackFrame({\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n }));\n }\n }\n\n return result;\n },\n\n parseOpera10: function ErrorStackParser$$parseOpera10(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)(?:: In function (\\S+))?$/i;\n var lines = e.stacktrace.split('\\n');\n var result = [];\n\n for (var i = 0, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(\n new StackFrame({\n functionName: match[3] || undefined,\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n })\n );\n }\n }\n\n return result;\n },\n\n // Opera 10.65+ Error.stack very similar to FF/Safari\n parseOpera11: function ErrorStackParser$$parseOpera11(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);\n }, this);\n\n return filtered.map(function(line) {\n var tokens = line.split('@');\n var locationParts = this.extractLocation(tokens.pop());\n var functionCall = (tokens.shift() || '');\n var functionName = functionCall\n .replace(//, '$2')\n .replace(/\\([^)]*\\)/g, '') || undefined;\n var argsRaw;\n if (functionCall.match(/\\(([^)]*)\\)/)) {\n argsRaw = functionCall.replace(/^[^(]+\\(([^)]*)\\)$/, '$1');\n }\n var args = (argsRaw === undefined || argsRaw === '[arguments not available]') ?\n undefined : argsRaw.split(',');\n\n return new StackFrame({\n functionName: functionName,\n args: args,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n }\n };\n}));\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('stackframe', [], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.StackFrame = factory();\n }\n}(this, function() {\n 'use strict';\n function _isNumber(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n }\n\n function _capitalize(str) {\n return str.charAt(0).toUpperCase() + str.substring(1);\n }\n\n function _getter(p) {\n return function() {\n return this[p];\n };\n }\n\n var booleanProps = ['isConstructor', 'isEval', 'isNative', 'isToplevel'];\n var numericProps = ['columnNumber', 'lineNumber'];\n var stringProps = ['fileName', 'functionName', 'source'];\n var arrayProps = ['args'];\n var objectProps = ['evalOrigin'];\n\n var props = booleanProps.concat(numericProps, stringProps, arrayProps, objectProps);\n\n function StackFrame(obj) {\n if (!obj) return;\n for (var i = 0; i < props.length; i++) {\n if (obj[props[i]] !== undefined) {\n this['set' + _capitalize(props[i])](obj[props[i]]);\n }\n }\n }\n\n StackFrame.prototype = {\n getArgs: function() {\n return this.args;\n },\n setArgs: function(v) {\n if (Object.prototype.toString.call(v) !== '[object Array]') {\n throw new TypeError('Args must be an Array');\n }\n this.args = v;\n },\n\n getEvalOrigin: function() {\n return this.evalOrigin;\n },\n setEvalOrigin: function(v) {\n if (v instanceof StackFrame) {\n this.evalOrigin = v;\n } else if (v instanceof Object) {\n this.evalOrigin = new StackFrame(v);\n } else {\n throw new TypeError('Eval Origin must be an Object or StackFrame');\n }\n },\n\n toString: function() {\n var fileName = this.getFileName() || '';\n var lineNumber = this.getLineNumber() || '';\n var columnNumber = this.getColumnNumber() || '';\n var functionName = this.getFunctionName() || '';\n if (this.getIsEval()) {\n if (fileName) {\n return '[eval] (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return '[eval]:' + lineNumber + ':' + columnNumber;\n }\n if (functionName) {\n return functionName + ' (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return fileName + ':' + lineNumber + ':' + columnNumber;\n }\n };\n\n StackFrame.fromString = function StackFrame$$fromString(str) {\n var argsStartIndex = str.indexOf('(');\n var argsEndIndex = str.lastIndexOf(')');\n\n var functionName = str.substring(0, argsStartIndex);\n var args = str.substring(argsStartIndex + 1, argsEndIndex).split(',');\n var locationString = str.substring(argsEndIndex + 1);\n\n if (locationString.indexOf('@') === 0) {\n var parts = /@(.+?)(?::(\\d+))?(?::(\\d+))?$/.exec(locationString, '');\n var fileName = parts[1];\n var lineNumber = parts[2];\n var columnNumber = parts[3];\n }\n\n return new StackFrame({\n functionName: functionName,\n args: args || undefined,\n fileName: fileName,\n lineNumber: lineNumber || undefined,\n columnNumber: columnNumber || undefined\n });\n };\n\n for (var i = 0; i < booleanProps.length; i++) {\n StackFrame.prototype['get' + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);\n StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function(p) {\n return function(v) {\n this[p] = Boolean(v);\n };\n })(booleanProps[i]);\n }\n\n for (var j = 0; j < numericProps.length; j++) {\n StackFrame.prototype['get' + _capitalize(numericProps[j])] = _getter(numericProps[j]);\n StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function(p) {\n return function(v) {\n if (!_isNumber(v)) {\n throw new TypeError(p + ' must be a Number');\n }\n this[p] = Number(v);\n };\n })(numericProps[j]);\n }\n\n for (var k = 0; k < stringProps.length; k++) {\n StackFrame.prototype['get' + _capitalize(stringProps[k])] = _getter(stringProps[k]);\n StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function(p) {\n return function(v) {\n this[p] = String(v);\n };\n })(stringProps[k]);\n }\n\n return StackFrame;\n}));\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction itemToPayload(item, options, callback) {\n var payloadOptions = options.payload || {};\n if (payloadOptions.body) {\n delete payloadOptions.body;\n }\n\n var data = _.merge(item.data, payloadOptions);\n if (item._isUncaught) {\n data._isUncaught = true;\n }\n if (item._originalArgs) {\n data._originalArgs = item._originalArgs;\n }\n callback(null, data);\n}\n\nfunction addTelemetryData(item, options, callback) {\n if (item.telemetryEvents) {\n _.set(item, 'data.body.telemetry', item.telemetryEvents);\n }\n callback(null, item);\n}\n\nfunction addMessageWithError(item, options, callback) {\n if (!item.message) {\n callback(null, item);\n return;\n }\n var tracePath = 'data.body.trace_chain.0';\n var trace = _.get(item, tracePath);\n if (!trace) {\n tracePath = 'data.body.trace';\n trace = _.get(item, tracePath);\n }\n if (trace) {\n if (!(trace.exception && trace.exception.description)) {\n _.set(item, tracePath+'.exception.description', item.message);\n callback(null, item);\n return;\n }\n var extra = _.get(item, tracePath+'.extra') || {};\n var newExtra = _.merge(extra, {message: item.message});\n _.set(item, tracePath+'.extra', newExtra);\n }\n callback(null, item);\n}\n\nfunction userTransform(logger) {\n return function(item, options, callback) {\n var newItem = _.merge(item);\n var response = null;\n try {\n if (_.isFunction(options.transform)) {\n response = options.transform(newItem.data, item);\n }\n } catch (e) {\n options.transform = null;\n logger.error('Error while calling custom transform() function. Removing custom transform().', e);\n callback(null, item);\n return;\n }\n if(_.isPromise(response)) {\n response.then(function (promisedItem) {\n if(promisedItem) {\n newItem.data = promisedItem;\n }\n callback(null, newItem);\n }, function (error) {\n callback(error, item);\n });\n } else {\n callback(null, newItem);\n }\n }\n}\n\nfunction addConfigToPayload(item, options, callback) {\n if (!options.sendConfig) {\n return callback(null, item);\n }\n var configKey = '_rollbarConfig';\n var custom = _.get(item, 'data.custom') || {};\n custom[configKey] = options;\n item.data.custom = custom;\n callback(null, item);\n}\n\nfunction addFunctionOption(options, name) {\n if(_.isFunction(options[name])) {\n options[name] = options[name].toString();\n }\n}\n\nfunction addConfiguredOptions(item, options, callback) {\n var configuredOptions = options._configuredOptions;\n\n // These must be stringified or they'll get dropped during serialization.\n addFunctionOption(configuredOptions, 'transform');\n addFunctionOption(configuredOptions, 'checkIgnore');\n addFunctionOption(configuredOptions, 'onSendCallback');\n\n delete configuredOptions.accessToken;\n item.data.notifier.configured_options = configuredOptions;\n callback(null, item);\n}\n\nfunction addDiagnosticKeys(item, options, callback) {\n var diagnostic = _.merge(item.notifier.client.notifier.diagnostic, item.diagnostic);\n\n if (_.get(item, 'err._isAnonymous')) {\n diagnostic.is_anonymous = true;\n }\n\n if (item._isUncaught) {\n diagnostic.is_uncaught = item._isUncaught;\n }\n\n if (item.err) {\n try {\n diagnostic.raw_error = {\n message: item.err.message,\n name: item.err.name,\n constructor_name: item.err.constructor && item.err.constructor.name,\n filename: item.err.fileName,\n line: item.err.lineNumber,\n column: item.err.columnNumber,\n stack: item.err.stack\n };\n } catch (e) {\n diagnostic.raw_error = { failed: String(e) };\n }\n }\n\n item.data.notifier.diagnostic = _.merge(item.data.notifier.diagnostic, diagnostic);\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError,\n userTransform: userTransform,\n addConfigToPayload: addConfigToPayload,\n addConfiguredOptions: addConfiguredOptions,\n addDiagnosticKeys: addDiagnosticKeys\n};\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction checkIgnore(item, settings) {\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore\n};\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction checkLevel(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = settings.reportLevel;\n var reportLevelVal = _.LEVELS[reportLevel] || 0;\n\n if (levelVal < reportLevelVal) {\n return false;\n }\n return true;\n}\n\nfunction userCheckIgnore(logger) {\n return function(item, settings) {\n var isUncaught = !!item._isUncaught;\n delete item._isUncaught;\n var args = item._originalArgs;\n delete item._originalArgs;\n try {\n if (_.isFunction(settings.onSendCallback)) {\n settings.onSendCallback(isUncaught, args, item);\n }\n } catch (e) {\n settings.onSendCallback = null;\n logger.error('Error while calling onSendCallback, removing', e);\n }\n try {\n if (_.isFunction(settings.checkIgnore) && settings.checkIgnore(isUncaught, args, item)) {\n return false;\n }\n } catch (e) {\n settings.checkIgnore = null;\n logger.error('Error while calling custom checkIgnore(), removing', e);\n }\n return true;\n }\n}\n\nfunction urlIsNotBlockListed(logger) {\n return function(item, settings) {\n return !urlIsOnAList(item, settings, 'blocklist', logger);\n }\n}\n\nfunction urlIsSafeListed(logger) {\n return function(item, settings) {\n return urlIsOnAList(item, settings, 'safelist', logger);\n }\n}\n\nfunction matchFrames(trace, list, block) {\n if (!trace) { return !block }\n\n var frames = trace.frames;\n\n if (!frames || frames.length === 0) { return !block; }\n\n var frame, filename, url, urlRegex;\n var listLength = list.length;\n var frameLength = frames.length;\n for (var i = 0; i < frameLength; i++) {\n frame = frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) { return !block; }\n\n for (var j = 0; j < listLength; j++) {\n url = list[j];\n urlRegex = new RegExp(url);\n\n if (urlRegex.test(filename)) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction urlIsOnAList(item, settings, safeOrBlock, logger) {\n // safelist is the default\n var block = false;\n if (safeOrBlock === 'blocklist') {\n block = true;\n }\n\n var list, traces;\n try {\n list = block ? settings.hostBlockList : settings.hostSafeList;\n traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];\n\n // These two checks are important to come first as they are defaults\n // in case the list is missing or the trace is missing or not well-formed\n if (!list || list.length === 0) {\n return !block;\n }\n if (traces.length === 0 || !traces[0]) {\n return !block;\n }\n\n var tracesLength = traces.length;\n for (var i = 0; i < tracesLength; i++) {\n if(matchFrames(traces[i], list, block)) {\n return true;\n }\n }\n } catch (e)\n /* istanbul ignore next */\n {\n if (block) {\n settings.hostBlockList = null;\n } else {\n settings.hostSafeList = null;\n }\n var listName = block ? 'hostBlockList' : 'hostSafeList';\n logger.error('Error while reading your configuration\\'s ' + listName + ' option. Removing custom ' + listName + '.', e);\n return !block;\n }\n return false;\n}\n\nfunction messageIsIgnored(logger) {\n return function(item, settings) {\n var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n messages = messagesFromItem(item);\n\n if (messages.length === 0){\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n\n for (j = 0; j < messages.length; j++) {\n messageIsIgnored = rIgnoredMessage.test(messages[j]);\n\n if (messageIsIgnored) {\n return false;\n }\n }\n }\n } catch(e)\n /* istanbul ignore next */\n {\n settings.ignoredMessages = null;\n logger.error('Error while reading your configuration\\'s ignoredMessages option. Removing custom ignoredMessages.');\n }\n\n return true;\n }\n}\n\nfunction messagesFromItem(item) {\n var body = item.body;\n var messages = [];\n\n // The payload schema only allows one of trace_chain, message, or trace.\n // However, existing test cases are based on having both trace and message present.\n // So here we preserve the ability to collect strings from any combination of these keys.\n if (body.trace_chain) {\n var traceChain = body.trace_chain;\n for (var i = 0; i < traceChain.length; i++) {\n var trace = traceChain[i];\n messages.push(_.get(trace, 'exception.message'));\n }\n }\n if (body.trace) {\n messages.push(_.get(body, 'trace.exception.message'));\n }\n if (body.message) {\n messages.push(_.get(body, 'message.body'));\n }\n return messages;\n}\n\nmodule.exports = {\n checkLevel: checkLevel,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlockListed: urlIsNotBlockListed,\n urlIsSafeListed: urlIsSafeListed,\n messageIsIgnored: messageIsIgnored\n};\n","'use strict';\n\nmodule.exports = {\n version: '2.24.0',\n endpoint: 'api.rollbar.com/api/1/item/',\n logLevel: 'debug',\n reportLevel: 'debug',\n uncaughtErrorLevel: 'error',\n maxItems: 0,\n itemsPerMin: 60\n}\n","'use strict';\n\nmodule.exports = {\n scrubFields: [\n 'pw',\n 'pass',\n 'passwd',\n 'password',\n 'secret',\n 'confirm_password',\n 'confirmPassword',\n 'password_confirmation',\n 'passwordConfirmation',\n 'access_token',\n 'accessToken',\n 'X-Rollbar-Access-Token',\n 'secret_key',\n 'secretKey',\n 'secretToken',\n 'cc-number',\n 'card number',\n 'cardnumber',\n 'cardnum',\n 'ccnum',\n 'ccnumber',\n 'cc num',\n 'creditcardnumber',\n 'credit card number',\n 'newcreditcardnumber',\n 'new credit card',\n 'creditcardno',\n 'credit card no',\n 'card#',\n 'card #',\n 'cc-csc',\n 'cvc',\n 'cvc2',\n 'cvv2',\n 'ccv2',\n 'security code',\n 'card verification',\n 'name on credit card',\n 'name on card',\n 'nameoncard',\n 'cardholder',\n 'card holder',\n 'name des karteninhabers',\n 'ccname',\n 'card type',\n 'cardtype',\n 'cc type',\n 'cctype',\n 'payment type',\n 'expiration date',\n 'expirationdate',\n 'expdate',\n 'cc-exp',\n 'ccmonth',\n 'ccyear'\n ]\n}\n","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.merge(options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n}\n\nTelemeter.prototype.configure = function(options) {\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n var deleteCount = 0;\n if (this.maxQueueSize > newMaxEvents) {\n deleteCount = this.maxQueueSize - newMaxEvents;\n }\n this.maxQueueSize = newMaxEvents;\n this.queue.splice(0, deleteCount);\n};\n\nTelemeter.prototype.copyEvents = function() {\n var events = Array.prototype.slice.call(this.queue, 0);\n if (_.isFunction(this.options.filterTelemetry)) {\n try {\n var i = events.length;\n while (i--) {\n if (this.options.filterTelemetry(events[i])) {\n events.splice(i, 1);\n }\n }\n } catch (e) {\n this.options.filterTelemetry = null;\n }\n }\n return events;\n};\n\nTelemeter.prototype.capture = function(type, metadata, level, rollbarUUID, timestamp) {\n var e = {\n level: getLevel(type, level),\n type: type,\n timestamp_ms: timestamp || _.now(),\n body: metadata,\n source: 'client'\n };\n if (rollbarUUID) {\n e.uuid = rollbarUUID;\n }\n\n try {\n if (_.isFunction(this.options.filterTelemetry) && this.options.filterTelemetry(e)) {\n return false;\n }\n } catch (exc) {\n this.options.filterTelemetry = null;\n }\n\n this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function(type, metadata, level, rollbarUUID) {\n return this.capture(type, metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.captureError = function(err, level, rollbarUUID, timestamp) {\n var metadata = {\n message: err.message || String(err)\n };\n if (err.stack) {\n metadata.stack = err.stack;\n }\n return this.capture('error', metadata, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureLog = function(message, level, rollbarUUID, timestamp) {\n return this.capture('log', {\n message: message\n }, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID, requestData) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\n if (requestData) {\n metadata.request = requestData;\n }\n var level = this.levelFromStatus(metadata.status_code);\n return this.capture('network', metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.levelFromStatus = function(statusCode) {\n if (statusCode >= 200 && statusCode < 400) {\n return 'info';\n }\n if (statusCode === 0 || statusCode >= 400) {\n return 'error';\n }\n return 'info';\n};\n\nTelemeter.prototype.captureDom = function(subtype, element, value, checked, rollbarUUID) {\n var metadata = {\n subtype: subtype,\n element: element\n };\n if (value !== undefined) {\n metadata.value = value;\n }\n if (checked !== undefined) {\n metadata.checked = checked;\n }\n return this.capture('dom', metadata, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureNavigation = function(from, to, rollbarUUID) {\n return this.capture('navigation', {from: from, to: to}, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureDomContentLoaded = function(ts) {\n return this.capture('navigation', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n */\n};\nTelemeter.prototype.captureLoad = function(ts) {\n return this.capture('navigation', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n */\n};\n\nTelemeter.prototype.captureConnectivityChange = function(type, rollbarUUID) {\n return this.captureNetwork({change: type}, 'connectivity', rollbarUUID);\n};\n\n// Only intended to be used internally by the notifier\nTelemeter.prototype._captureRollbarItem = function(item) {\n if (!this.options.includeItemsInTelemetry) {\n return;\n }\n if (item.err) {\n return this.captureError(item.err, item.level, item.uuid, item.timestamp);\n }\n if (item.message) {\n return this.captureLog(item.message, item.level, item.uuid, item.timestamp);\n }\n if (item.custom) {\n return this.capture('log', item.custom, item.level, item.uuid, item.timestamp);\n }\n};\n\nTelemeter.prototype.push = function(e) {\n this.queue.push(e);\n if (this.queue.length > this.maxQueueSize) {\n this.queue.shift();\n }\n};\n\nfunction getLevel(type, level) {\n if (level) {\n return level;\n }\n var defaultLevel = {\n error: 'error',\n manual: 'info'\n };\n return defaultLevel[type] || 'info';\n}\n\nmodule.exports = Telemeter;\n","'use strict';\n\nvar _ = require('../utility');\nvar scrub = require('../scrub');\nvar urlparser = require('./url');\nvar domUtil = require('./domUtility');\n\nvar defaults = {\n network: true,\n networkResponseHeaders: false,\n networkResponseBody: false,\n networkRequestHeaders: false,\n networkRequestBody: false,\n networkErrorOnHttp5xx: false,\n networkErrorOnHttp4xx: false,\n networkErrorOnHttp0: false,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true,\n contentSecurityPolicy: true,\n errorOnContentSecurityPolicy: false\n};\n\nfunction replace(obj, name, replacement, replacements, type) {\n var orig = obj[name];\n obj[name] = replacement(orig);\n if (replacements) {\n replacements[type].push([obj, name, orig]);\n }\n}\n\nfunction restore(replacements, type) {\n var b;\n while (replacements[type].length) {\n b = replacements[type].shift();\n b[0][b[1]] = b[2];\n }\n}\n\nfunction nameFromDescription(description) {\n if (!description || !description.attributes) { return null; }\n var attrs = description.attributes;\n for (var a = 0; a < attrs.length; ++a) {\n if (attrs[a].key === 'name') {\n return attrs[a].value;\n }\n }\n return null;\n}\n\nfunction defaultValueScrubber(scrubFields) {\n var patterns = [];\n for (var i = 0; i < scrubFields.length; ++i) {\n patterns.push(new RegExp(scrubFields[i], 'i'));\n }\n return function(description) {\n var name = nameFromDescription(description);\n if (!name) { return false; }\n for (var i = 0; i < patterns.length; ++i) {\n if (patterns[i].test(name)) {\n return true;\n }\n }\n return false;\n };\n}\n\nfunction Instrumenter(options, telemeter, rollbar, _window, _document) {\n this.options = options;\n var autoInstrument = options.autoInstrument;\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);\n this.telemeter = telemeter;\n this.rollbar = rollbar;\n this.diagnostic = rollbar.client.notifier.diagnostic;\n this._window = _window || {};\n this._document = _document || {};\n this.replacements = {\n network: [],\n log: [],\n navigation: [],\n connectivity: []\n };\n this.eventRemovers = {\n dom: [],\n connectivity: [],\n contentsecuritypolicy: []\n };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function(options) {\n this.options = _.merge(this.options, options);\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.merge(this.autoInstrument);\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n if (options.scrubTelemetryInputs !== undefined) {\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n }\n if (options.telemetryScrubber !== undefined) {\n this.telemetryScrubber = options.telemetryScrubber;\n }\n};\n\n// eslint-disable-next-line complexity\nInstrumenter.prototype.instrument = function(oldSettings) {\n if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {\n this.instrumentNetwork();\n } else if (!this.autoInstrument.network && oldSettings && oldSettings.network) {\n this.deinstrumentNetwork();\n }\n\n if (this.autoInstrument.log && !(oldSettings && oldSettings.log)) {\n this.instrumentConsole();\n } else if (!this.autoInstrument.log && oldSettings && oldSettings.log) {\n this.deinstrumentConsole();\n }\n\n if (this.autoInstrument.dom && !(oldSettings && oldSettings.dom)) {\n this.instrumentDom();\n } else if (!this.autoInstrument.dom && oldSettings && oldSettings.dom) {\n this.deinstrumentDom();\n }\n\n if (this.autoInstrument.navigation && !(oldSettings && oldSettings.navigation)) {\n this.instrumentNavigation();\n } else if (!this.autoInstrument.navigation && oldSettings && oldSettings.navigation) {\n this.deinstrumentNavigation();\n }\n\n if (this.autoInstrument.connectivity && !(oldSettings && oldSettings.connectivity)) {\n this.instrumentConnectivity();\n } else if (!this.autoInstrument.connectivity && oldSettings && oldSettings.connectivity) {\n this.deinstrumentConnectivity();\n }\n\n if (this.autoInstrument.contentSecurityPolicy && !(oldSettings && oldSettings.contentSecurityPolicy)) {\n this.instrumentContentSecurityPolicy();\n } else if (!this.autoInstrument.contentSecurityPolicy && oldSettings && oldSettings.contentSecurityPolicy) {\n this.deinstrumentContentSecurityPolicy();\n }\n};\n\nInstrumenter.prototype.deinstrumentNetwork = function() {\n restore(this.replacements, 'network');\n};\n\nInstrumenter.prototype.instrumentNetwork = function() {\n var self = this;\n\n function wrapProp(prop, xhr) {\n if (prop in xhr && _.isFunction(xhr[prop])) {\n replace(xhr, prop, function(orig) {\n return self.rollbar.wrap(orig);\n });\n }\n }\n\n if ('XMLHttpRequest' in this._window) {\n var xhrp = this._window.XMLHttpRequest.prototype;\n replace(xhrp, 'open', function(orig) {\n return function(method, url) {\n if (_.isType(url, 'string')) {\n if (this.__rollbar_xhr) {\n this.__rollbar_xhr.method = method;\n this.__rollbar_xhr.url = url;\n this.__rollbar_xhr.status_code = null;\n this.__rollbar_xhr.start_time_ms = _.now();\n this.__rollbar_xhr.end_time_ms = null;\n } else {\n this.__rollbar_xhr = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'setRequestHeader', function(orig) {\n return function(header, value) {\n // If xhr.open is async, __rollbar_xhr may not be initialized yet.\n if (!this.__rollbar_xhr) {\n this.__rollbar_xhr = {};\n }\n if (_.isType(header, 'string') && _.isType(value, 'string')) {\n if (self.autoInstrument.networkRequestHeaders) {\n if (!this.__rollbar_xhr.request_headers) {\n this.__rollbar_xhr.request_headers = {};\n }\n this.__rollbar_xhr.request_headers[header] = value;\n }\n // We want the content type even if request header telemetry is off.\n if (header.toLowerCase() === 'content-type') {\n this.__rollbar_xhr.request_content_type = value;\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'send', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(data) {\n /* eslint-enable no-unused-vars */\n var xhr = this;\n\n function onreadystatechangeHandler() {\n if (xhr.__rollbar_xhr) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n if (self.autoInstrument.networkRequestBody) {\n xhr.__rollbar_xhr.request = data;\n }\n xhr.__rollbar_event = self.captureNetwork(xhr.__rollbar_xhr, 'xhr', undefined);\n }\n if (xhr.readyState < 2) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n }\n if (xhr.readyState > 3) {\n xhr.__rollbar_xhr.end_time_ms = _.now();\n\n var headers = null;\n xhr.__rollbar_xhr.response_content_type = xhr.getResponseHeader('Content-Type');\n if (self.autoInstrument.networkResponseHeaders) {\n var headersConfig = self.autoInstrument.networkResponseHeaders;\n headers = {};\n try {\n var header, i;\n if (headersConfig === true) {\n var allHeaders = xhr.getAllResponseHeaders();\n if (allHeaders) {\n var arr = allHeaders.trim().split(/[\\r\\n]+/);\n var parts, value;\n for (i=0; i < arr.length; i++) {\n parts = arr[i].split(': ');\n header = parts.shift();\n value = parts.join(': ');\n headers[header] = value;\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n header = headersConfig[i];\n headers[header] = xhr.getResponseHeader(header);\n }\n }\n } catch (e) {\n /* we ignore the errors here that could come from different\n * browser issues with the xhr methods */\n }\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n try {\n body = xhr.responseText;\n } catch (e) {\n /* ignore errors from reading responseText */\n }\n }\n var response = null;\n if (body || headers) {\n response = {};\n if (body) {\n if (self.isJsonContentType(xhr.__rollbar_xhr.response_content_type)) {\n response.body = self.scrubJson(body);\n } else {\n response.body = body;\n }\n }\n if (headers) {\n response.headers = headers;\n }\n }\n if (response) {\n xhr.__rollbar_xhr.response = response;\n }\n try {\n var code = xhr.status;\n code = code === 1223 ? 204 : code;\n xhr.__rollbar_xhr.status_code = code;\n xhr.__rollbar_event.level = self.telemeter.levelFromStatus(code);\n self.errorOnHttpStatus(xhr.__rollbar_xhr);\n } catch (e) {\n /* ignore possible exception from xhr.status */\n }\n }\n }\n }\n\n wrapProp('onload', xhr);\n wrapProp('onerror', xhr);\n wrapProp('onprogress', xhr);\n\n if ('onreadystatechange' in xhr && _.isFunction(xhr.onreadystatechange)) {\n replace(xhr, 'onreadystatechange', function(orig) {\n return self.rollbar.wrap(orig, undefined, onreadystatechangeHandler);\n });\n } else {\n xhr.onreadystatechange = onreadystatechangeHandler;\n }\n if (xhr.__rollbar_xhr && self.trackHttpErrors()) {\n xhr.__rollbar_xhr.stack = (new Error()).stack;\n }\n return orig.apply(this, arguments);\n }\n }, this.replacements, 'network');\n }\n\n if ('fetch' in this._window) {\n replace(this._window, 'fetch', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(fn, t) {\n /* eslint-enable no-unused-vars */\n var args = new Array(arguments.length);\n for (var i=0, len=args.length; i < len; i++) {\n args[i] = arguments[i];\n }\n var input = args[0];\n var method = 'GET';\n var url;\n if (_.isType(input, 'string')) {\n url = input;\n } else if (input) {\n url = input.url;\n if (input.method) {\n method = input.method;\n }\n }\n if (args[1] && args[1].method) {\n method = args[1].method;\n }\n var metadata = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n if (args[1] && args[1].headers) {\n // Argument may be a Headers object, or plain object. Ensure here that\n // we are working with a Headers object with case-insensitive keys.\n var reqHeaders = new Headers(args[1].headers);\n\n metadata.request_content_type = reqHeaders.get('Content-Type');\n\n if (self.autoInstrument.networkRequestHeaders) {\n metadata.request_headers = self.fetchHeaders(reqHeaders, self.autoInstrument.networkRequestHeaders)\n }\n }\n\n if (self.autoInstrument.networkRequestBody) {\n if (args[1] && args[1].body) {\n metadata.request = args[1].body;\n } else if (args[0] && !_.isType(args[0], 'string') && args[0].body) {\n metadata.request = args[0].body;\n }\n }\n self.captureNetwork(metadata, 'fetch', undefined);\n if (self.trackHttpErrors()) {\n metadata.stack = (new Error()).stack;\n }\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n metadata.response_content_type = resp.headers.get('Content-Type');\n var headers = null;\n if (self.autoInstrument.networkResponseHeaders) {\n headers = self.fetchHeaders(resp.headers, self.autoInstrument.networkResponseHeaders);\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n if (typeof resp.text === 'function') { // Response.text() is not implemented on some platforms\n // The response must be cloned to prevent reading (and locking) the original stream.\n body = resp.clone().text(); //returns a Promise\n }\n }\n if (headers || body) {\n metadata.response = {};\n if (body) {\n // Test to ensure body is a Promise, which it should always be.\n if (typeof body.then === 'function') {\n body.then(function (text) {\n if (self.isJsonContentType(metadata.response_content_type)) {\n metadata.response.body = self.scrubJson(text);\n }\n });\n } else {\n metadata.response.body = body;\n }\n }\n if (headers) {\n metadata.response.headers = headers;\n }\n }\n self.errorOnHttpStatus(metadata);\n return resp;\n });\n };\n }, this.replacements, 'network');\n }\n};\n\nInstrumenter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID) {\n if (metadata.request && this.isJsonContentType(metadata.request_content_type)) {\n metadata.request = this.scrubJson(metadata.request);\n }\n return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);\n};\n\nInstrumenter.prototype.isJsonContentType = function(contentType) {\n return (contentType && _.isType(contentType, 'string') && contentType.toLowerCase().includes('json')) ? true : false;\n}\n\nInstrumenter.prototype.scrubJson = function(json) {\n return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));\n}\n\nInstrumenter.prototype.fetchHeaders = function(inHeaders, headersConfig) {\n var outHeaders = {};\n try {\n var i;\n if (headersConfig === true) {\n if (typeof inHeaders.entries === 'function') { // Headers.entries() is not implemented in IE\n var allHeaders = inHeaders.entries();\n var currentHeader = allHeaders.next();\n while (!currentHeader.done) {\n outHeaders[currentHeader.value[0]] = currentHeader.value[1];\n currentHeader = allHeaders.next();\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n var header = headersConfig[i];\n outHeaders[header] = inHeaders.get(header);\n }\n }\n } catch (e) {\n /* ignore probable IE errors */\n }\n return outHeaders;\n}\n\nInstrumenter.prototype.trackHttpErrors = function() {\n return this.autoInstrument.networkErrorOnHttp5xx ||\n this.autoInstrument.networkErrorOnHttp4xx ||\n this.autoInstrument.networkErrorOnHttp0;\n}\n\nInstrumenter.prototype.errorOnHttpStatus = function(metadata) {\n var status = metadata.status_code;\n\n if ((status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||\n (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||\n (status === 0 && this.autoInstrument.networkErrorOnHttp0)) {\n var error = new Error('HTTP request failed with Status ' + status);\n error.stack = metadata.stack;\n this.rollbar.error(error, { skipFrames: 1 });\n }\n}\n\nInstrumenter.prototype.deinstrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n var b;\n while (this.replacements['log'].length) {\n b = this.replacements['log'].shift();\n this._window.console[b[0]] = b[1];\n }\n};\n\nInstrumenter.prototype.instrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n\n var self = this;\n var c = this._window.console;\n\n function wrapConsole(method) {\n 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778\n\n var orig = c[method];\n var origConsole = c;\n var level = method === 'warn' ? 'warning' : method;\n c[method] = function() {\n var args = Array.prototype.slice.call(arguments);\n var message = _.formatArgsAsString(args);\n self.telemeter.captureLog(message, level);\n if (orig) {\n Function.prototype.apply.call(orig, origConsole, args);\n }\n };\n self.replacements['log'].push([method, orig]);\n }\n var methods = ['debug','info','warn','error','log'];\n try {\n for (var i=0, len=methods.length; i < len; i++) {\n wrapConsole(methods[i]);\n }\n } catch (e) {\n this.diagnostic.instrumentConsole = { error: e.message };\n }\n};\n\nInstrumenter.prototype.deinstrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n this.removeListeners('dom');\n};\n\nInstrumenter.prototype.instrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n var clickHandler = this.handleClick.bind(this);\n var blurHandler = this.handleBlur.bind(this);\n this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);\n this.addListener('dom', this._window, 'blur', 'onfocusout', blurHandler, true);\n};\n\nInstrumenter.prototype.handleClick = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n var hasTag = e && e.tagName;\n var anchorOrButton = domUtil.isDescribedElement(e, 'a') || domUtil.isDescribedElement(e, 'button');\n if (hasTag && (anchorOrButton || domUtil.isDescribedElement(e, 'input', ['button', 'submit']))) {\n this.captureDomEvent('click', e);\n } else if (domUtil.isDescribedElement(e, 'input', ['checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value, e.checked);\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleBlur = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n if (e && e.tagName) {\n if (domUtil.isDescribedElement(e, 'textarea')) {\n this.captureDomEvent('input', e, e.value);\n } else if (domUtil.isDescribedElement(e, 'select') && e.options && e.options.length) {\n this.handleSelectInputChanged(e);\n } else if (domUtil.isDescribedElement(e, 'input') && !domUtil.isDescribedElement(e, 'input', ['button', 'submit', 'hidden', 'checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value);\n }\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleSelectInputChanged = function(elem) {\n if (elem.multiple) {\n for (var i = 0; i < elem.options.length; i++) {\n if (elem.options[i].selected) {\n this.captureDomEvent('input', elem, elem.options[i].value);\n }\n }\n } else if (elem.selectedIndex >= 0 && elem.options[elem.selectedIndex]) {\n this.captureDomEvent('input', elem, elem.options[elem.selectedIndex].value);\n }\n};\n\nInstrumenter.prototype.captureDomEvent = function(subtype, element, value, isChecked) {\n if (value !== undefined) {\n if (this.scrubTelemetryInputs || (domUtil.getElementType(element) === 'password')) {\n value = '[scrubbed]';\n } else {\n var description = domUtil.describeElement(element);\n if (this.telemetryScrubber) {\n if (this.telemetryScrubber(description)) {\n value = '[scrubbed]';\n }\n } else if (this.defaultValueScrubber(description)) {\n value = '[scrubbed]';\n }\n }\n }\n var elementString = domUtil.elementArrayToString(domUtil.treeToArray(element));\n this.telemeter.captureDom(subtype, elementString, value, isChecked);\n};\n\nInstrumenter.prototype.deinstrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n restore(this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.instrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n var self = this;\n replace(this._window, 'onpopstate', function(orig) {\n return function() {\n var current = self._location.href;\n self.handleUrlChange(self._lastHref, current);\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n }, this.replacements, 'navigation');\n\n replace(this._window.history, 'pushState', function(orig) {\n return function() {\n var url = arguments.length > 2 ? arguments[2] : undefined;\n if (url) {\n self.handleUrlChange(self._lastHref, url + '');\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.handleUrlChange = function(from, to) {\n var parsedHref = urlparser.parse(this._location.href);\n var parsedTo = urlparser.parse(to);\n var parsedFrom = urlparser.parse(from);\n this._lastHref = to;\n if (parsedHref.protocol === parsedTo.protocol && parsedHref.host === parsedTo.host) {\n to = parsedTo.path + (parsedTo.hash || '');\n }\n if (parsedHref.protocol === parsedFrom.protocol && parsedHref.host === parsedFrom.host) {\n from = parsedFrom.path + (parsedFrom.hash || '');\n }\n this.telemeter.captureNavigation(from, to);\n};\n\nInstrumenter.prototype.deinstrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.removeListeners('connectivity');\n } else {\n restore(this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.instrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.addListener('connectivity', this._window, 'online', undefined, function() {\n this.telemeter.captureConnectivityChange('online');\n }.bind(this), true);\n this.addListener('connectivity', this._window, 'offline', undefined, function() {\n this.telemeter.captureConnectivityChange('offline');\n }.bind(this), true);\n } else {\n var self = this;\n replace(this._document.body, 'ononline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('online');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n replace(this._document.body, 'onoffline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('offline');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.handleCspEvent = function(cspEvent) {\n var message = 'Security Policy Violation: ' +\n 'blockedURI: ' + cspEvent.blockedURI + ', ' +\n 'violatedDirective: ' + cspEvent.violatedDirective + ', ' +\n 'effectiveDirective: ' + cspEvent.effectiveDirective + ', ';\n\n if (cspEvent.sourceFile) {\n message += 'location: ' + cspEvent.sourceFile + ', ' +\n 'line: ' + cspEvent.lineNumber + ', ' +\n 'col: ' + cspEvent.columnNumber + ', ';\n }\n\n message += 'originalPolicy: ' + cspEvent.originalPolicy;\n\n this.telemeter.captureLog(message, 'error');\n this.handleCspError(message);\n}\n\nInstrumenter.prototype.handleCspError = function(message) {\n if (this.autoInstrument.errorOnContentSecurityPolicy) {\n this.rollbar.error(message);\n }\n}\n\nInstrumenter.prototype.deinstrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._window)) { return; }\n\n this.removeListeners('contentsecuritypolicy');\n};\n\nInstrumenter.prototype.instrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._window)) { return; }\n\n var cspHandler = this.handleCspEvent.bind(this);\n this.addListener('contentsecuritypolicy', this._window, 'securitypolicyviolation', null, cspHandler, false);\n};\n\nInstrumenter.prototype.addListener = function(section, obj, type, altType, handler, capture) {\n if (obj.addEventListener) {\n obj.addEventListener(type, handler, capture);\n this.eventRemovers[section].push(function() {\n obj.removeEventListener(type, handler, capture);\n });\n } else if (altType) {\n obj.attachEvent(altType, handler);\n this.eventRemovers[section].push(function() {\n obj.detachEvent(altType, handler);\n });\n }\n};\n\nInstrumenter.prototype.removeListeners = function(section) {\n var r;\n while (this.eventRemovers[section].length) {\n r = this.eventRemovers[section].shift();\n r();\n }\n};\n\nmodule.exports = Instrumenter;\n","'use strict';\n\nfunction getElementType(e) {\n return (e.getAttribute('type') || '').toLowerCase();\n}\n\nfunction isDescribedElement(element, type, subtypes) {\n if (element.tagName.toLowerCase() !== type.toLowerCase()) {\n return false;\n }\n if (!subtypes) {\n return true;\n }\n element = getElementType(element);\n for (var i = 0; i < subtypes.length; i++) {\n if (subtypes[i] === element) {\n return true;\n }\n }\n return false;\n}\n\nfunction getElementFromEvent(evt, doc) {\n if (evt.target) {\n return evt.target;\n }\n if (doc && doc.elementFromPoint) {\n return doc.elementFromPoint(evt.clientX, evt.clientY);\n }\n return undefined;\n}\n\nfunction treeToArray(elem) {\n var MAX_HEIGHT = 5;\n var out = [];\n var nextDescription;\n for (var height = 0; elem && height < MAX_HEIGHT; height++) {\n nextDescription = describeElement(elem);\n if (nextDescription.tagName === 'html') {\n break;\n }\n out.unshift(nextDescription);\n elem = elem.parentNode;\n }\n return out;\n}\n\nfunction elementArrayToString(a) {\n var MAX_LENGTH = 80;\n var separator = ' > ', separatorLength = separator.length;\n var out = [], len = 0, nextStr, totalLength;\n\n for (var i = a.length - 1; i >= 0; i--) {\n nextStr = descriptionToString(a[i]);\n totalLength = len + (out.length * separatorLength) + nextStr.length;\n if (i < a.length - 1 && totalLength >= MAX_LENGTH + 3) {\n out.unshift('...');\n break;\n }\n out.unshift(nextStr);\n len += nextStr.length;\n }\n return out.join(separator);\n}\n\nfunction descriptionToString(desc) {\n if (!desc || !desc.tagName) {\n return '';\n }\n var out = [desc.tagName];\n if (desc.id) {\n out.push('#' + desc.id);\n }\n if (desc.classes) {\n out.push('.' + desc.classes.join('.'));\n }\n for (var i = 0; i < desc.attributes.length; i++) {\n out.push('[' + desc.attributes[i].key + '=\"' + desc.attributes[i].value + '\"]');\n }\n\n return out.join('');\n}\n\n/**\n * Input: a dom element\n * Output: null if tagName is falsey or input is falsey, else\n * {\n * tagName: String,\n * id: String | undefined,\n * classes: [String] | undefined,\n * attributes: [\n * {\n * key: OneOf(type, name, title, alt),\n * value: String\n * }\n * ]\n * }\n */\nfunction describeElement(elem) {\n if (!elem || !elem.tagName) {\n return null;\n }\n var out = {}, className, key, attr, i;\n out.tagName = elem.tagName.toLowerCase();\n if (elem.id) {\n out.id = elem.id;\n }\n className = elem.className;\n if (className && (typeof className === 'string')) {\n out.classes = className.split(/\\s+/);\n }\n var attributes = ['type', 'name', 'title', 'alt'];\n out.attributes = [];\n for (i = 0; i < attributes.length; i++) {\n key = attributes[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.attributes.push({key: key, value: attr});\n }\n }\n return out;\n}\n\nmodule.exports = {\n describeElement: describeElement,\n descriptionToString: descriptionToString,\n elementArrayToString: elementArrayToString,\n treeToArray: treeToArray,\n getElementFromEvent: getElementFromEvent,\n isDescribedElement: isDescribedElement,\n getElementType: getElementType\n};\n","'use strict';\n\nvar polyfillJSON = require('../../vendor/JSON-js/json3');\n\nmodule.exports = polyfillJSON;\n","// json3.js\n// 2017-02-21\n// Public Domain.\n// NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.\n// See http://www.JSON.org/js.html\n// This code should be minified before deployment.\n// See http://javascript.crockford.com/jsmin.html\n\n// USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO\n// NOT CONTROL.\n\n// This file creates a global JSON object containing two methods: stringify\n// and parse. This file provides the ES5 JSON capability to ES3 systems.\n// If a project might run on IE8 or earlier, then this file should be included.\n// This file does nothing on ES5 systems.\n\n// JSON.stringify(value, replacer, space)\n// value any JavaScript value, usually an object or array.\n// replacer an optional parameter that determines how object\n// values are stringified for objects. It can be a\n// function or an array of strings.\n// space an optional parameter that specifies the indentation\n// of nested structures. If it is omitted, the text will\n// be packed without extra whitespace. If it is a number,\n// it will specify the number of spaces to indent at each\n// level. If it is a string (such as \"\\t\" or \" \"),\n// it contains the characters used to indent at each level.\n// This method produces a JSON text from a JavaScript value.\n// When an object value is found, if the object contains a toJSON\n// method, its toJSON method will be called and the result will be\n// stringified. A toJSON method does not serialize: it returns the\n// value represented by the name/value pair that should be serialized,\n// or undefined if nothing should be serialized. The toJSON method\n// will be passed the key associated with the value, and this will be\n// bound to the value.\n\n// For example, this would serialize Dates as ISO strings.\n\n// Date.prototype.toJSON = function (key) {\n// function f(n) {\n// // Format integers to have at least two digits.\n// return (n < 10)\n// ? \"0\" + n\n// : n;\n// }\n// return this.getUTCFullYear() + \"-\" +\n// f(this.getUTCMonth() + 1) + \"-\" +\n// f(this.getUTCDate()) + \"T\" +\n// f(this.getUTCHours()) + \":\" +\n// f(this.getUTCMinutes()) + \":\" +\n// f(this.getUTCSeconds()) + \"Z\";\n// };\n\n// You can provide an optional replacer method. It will be passed the\n// key and value of each member, with this bound to the containing\n// object. The value that is returned from your method will be\n// serialized. If your method returns undefined, then the member will\n// be excluded from the serialization.\n\n// If the replacer parameter is an array of strings, then it will be\n// used to select the members to be serialized. It filters the results\n// such that only members with keys listed in the replacer array are\n// stringified.\n\n// Values that do not have JSON representations, such as undefined or\n// functions, will not be serialized. Such values in objects will be\n// dropped; in arrays they will be replaced with null. You can use\n// a replacer function to replace those with JSON values.\n\n// JSON.stringify(undefined) returns undefined.\n\n// The optional space parameter produces a stringification of the\n// value that is filled with line breaks and indentation to make it\n// easier to read.\n\n// If the space parameter is a non-empty string, then that string will\n// be used for indentation. If the space parameter is a number, then\n// the indentation will be that many spaces.\n\n// Example:\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}]);\n// // text is '[\"e\",{\"pluribus\":\"unum\"}]'\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}], null, \"\\t\");\n// // text is '[\\n\\t\"e\",\\n\\t{\\n\\t\\t\"pluribus\": \"unum\"\\n\\t}\\n]'\n\n// text = JSON.stringify([new Date()], function (key, value) {\n// return this[key] instanceof Date\n// ? \"Date(\" + this[key] + \")\"\n// : value;\n// });\n// // text is '[\"Date(---current time---)\"]'\n\n// JSON.parse(text, reviver)\n// This method parses a JSON text to produce an object or array.\n// It can throw a SyntaxError exception.\n// This has been modified to use JSON-js/json_parse_state.js as the\n// parser instead of the one built around eval found in JSON-js/json2.js\n\n// The optional reviver parameter is a function that can filter and\n// transform the results. It receives each of the keys and values,\n// and its return value is used instead of the original value.\n// If it returns what it received, then the structure is not modified.\n// If it returns undefined then the member is deleted.\n\n// Example:\n\n// // Parse the text. Values that look like ISO date strings will\n// // be converted to Date objects.\n\n// myData = JSON.parse(text, function (key, value) {\n// var a;\n// if (typeof value === \"string\") {\n// a =\n// /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2}(?:\\.\\d*)?)Z$/.exec(value);\n// if (a) {\n// return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],\n// +a[5], +a[6]));\n// }\n// }\n// return value;\n// });\n\n// myData = JSON.parse('[\"Date(09/09/2001)\"]', function (key, value) {\n// var d;\n// if (typeof value === \"string\" &&\n// value.slice(0, 5) === \"Date(\" &&\n// value.slice(-1) === \")\") {\n// d = new Date(value.slice(5, -1));\n// if (d) {\n// return d;\n// }\n// }\n// return value;\n// });\n\n// This is a reference implementation. You are free to copy, modify, or\n// redistribute.\n\n/*jslint\n for, this\n */\n\n/*property\n JSON, apply, call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,\n getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,\n lastIndex, length, parse, prototype, push, replace, slice, stringify,\n test, toJSON, toString, valueOf\n */\n\nvar setupCustomJSON = function(JSON) {\n\n var rx_one = /^[\\],:{}\\s]*$/;\n var rx_two = /\\\\(?:[\"\\\\\\/bfnrt]|u[0-9a-fA-F]{4})/g;\n var rx_three = /\"[^\"\\\\\\n\\r]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g;\n var rx_four = /(?:^|:|,)(?:\\s*\\[)+/g;\n var rx_escapable = /[\\\\\"\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n var rx_dangerous = /[\\u0000\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n\n function f(n) {\n // Format integers to have at least two digits.\n return n < 10\n ? \"0\" + n\n : n;\n }\n\n function this_value() {\n return this.valueOf();\n }\n\n if (typeof Date.prototype.toJSON !== \"function\") {\n\n Date.prototype.toJSON = function () {\n\n return isFinite(this.valueOf())\n ? this.getUTCFullYear() + \"-\" +\n f(this.getUTCMonth() + 1) + \"-\" +\n f(this.getUTCDate()) + \"T\" +\n f(this.getUTCHours()) + \":\" +\n f(this.getUTCMinutes()) + \":\" +\n f(this.getUTCSeconds()) + \"Z\"\n : null;\n };\n\n Boolean.prototype.toJSON = this_value;\n Number.prototype.toJSON = this_value;\n String.prototype.toJSON = this_value;\n }\n\n var gap;\n var indent;\n var meta;\n var rep;\n\n\n function quote(string) {\n\n // If the string contains no control characters, no quote characters, and no\n // backslash characters, then we can safely slap some quotes around it.\n // Otherwise we must also replace the offending characters with safe escape\n // sequences.\n\n rx_escapable.lastIndex = 0;\n return rx_escapable.test(string)\n ? \"\\\"\" + string.replace(rx_escapable, function (a) {\n var c = meta[a];\n return typeof c === \"string\"\n ? c\n : \"\\\\u\" + (\"0000\" + a.charCodeAt(0).toString(16)).slice(-4);\n }) + \"\\\"\"\n : \"\\\"\" + string + \"\\\"\";\n }\n\n\n function str(key, holder) {\n\n // Produce a string from holder[key].\n\n var i; // The loop counter.\n var k; // The member key.\n var v; // The member value.\n var length;\n var mind = gap;\n var partial;\n var value = holder[key];\n\n // If the value has a toJSON method, call it to obtain a replacement value.\n\n if (value && typeof value === \"object\" &&\n typeof value.toJSON === \"function\") {\n value = value.toJSON(key);\n }\n\n // If we were called with a replacer function, then call the replacer to\n // obtain a replacement value.\n\n if (typeof rep === \"function\") {\n value = rep.call(holder, key, value);\n }\n\n // What happens next depends on the value's type.\n\n switch (typeof value) {\n case \"string\":\n return quote(value);\n\n case \"number\":\n\n // JSON numbers must be finite. Encode non-finite numbers as null.\n\n return isFinite(value)\n ? String(value)\n : \"null\";\n\n case \"boolean\":\n case \"null\":\n\n // If the value is a boolean or null, convert it to a string. Note:\n // typeof null does not produce \"null\". The case is included here in\n // the remote chance that this gets fixed someday.\n\n return String(value);\n\n // If the type is \"object\", we might be dealing with an object or an array or\n // null.\n\n case \"object\":\n\n // Due to a specification blunder in ECMAScript, typeof null is \"object\",\n // so watch out for that case.\n\n if (!value) {\n return \"null\";\n }\n\n // Make an array to hold the partial results of stringifying this object value.\n\n gap += indent;\n partial = [];\n\n // Is the value an array?\n\n if (Object.prototype.toString.apply(value) === \"[object Array]\") {\n\n // The value is an array. Stringify every element. Use null as a placeholder\n // for non-JSON values.\n\n length = value.length;\n for (i = 0; i < length; i += 1) {\n partial[i] = str(i, value) || \"null\";\n }\n\n // Join all of the elements together, separated with commas, and wrap them in\n // brackets.\n\n v = partial.length === 0\n ? \"[]\"\n : gap\n ? \"[\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"]\"\n : \"[\" + partial.join(\",\") + \"]\";\n gap = mind;\n return v;\n }\n\n // If the replacer is an array, use it to select the members to be stringified.\n\n if (rep && typeof rep === \"object\") {\n length = rep.length;\n for (i = 0; i < length; i += 1) {\n if (typeof rep[i] === \"string\") {\n k = rep[i];\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n } else {\n\n // Otherwise, iterate through all of the keys in the object.\n\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(value, k)) {\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n }\n\n // Join all of the member texts together, separated with commas,\n // and wrap them in braces.\n\n v = partial.length === 0\n ? \"{}\"\n : gap\n ? \"{\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"}\"\n : \"{\" + partial.join(\",\") + \"}\";\n gap = mind;\n return v;\n }\n }\n\n // If the JSON object does not yet have a stringify method, give it one.\n\n if (typeof JSON.stringify !== \"function\") {\n meta = { // table of character substitutions\n \"\\b\": \"\\\\b\",\n \"\\t\": \"\\\\t\",\n \"\\n\": \"\\\\n\",\n \"\\f\": \"\\\\f\",\n \"\\r\": \"\\\\r\",\n \"\\\"\": \"\\\\\\\"\",\n \"\\\\\": \"\\\\\\\\\"\n };\n JSON.stringify = function (value, replacer, space) {\n\n // The stringify method takes a value and an optional replacer, and an optional\n // space parameter, and returns a JSON text. The replacer can be a function\n // that can replace values, or an array of strings that will select the keys.\n // A default replacer method can be provided. Use of the space parameter can\n // produce text that is more easily readable.\n\n var i;\n gap = \"\";\n indent = \"\";\n\n // If the space parameter is a number, make an indent string containing that\n // many spaces.\n\n if (typeof space === \"number\") {\n for (i = 0; i < space; i += 1) {\n indent += \" \";\n }\n\n // If the space parameter is a string, it will be used as the indent string.\n\n } else if (typeof space === \"string\") {\n indent = space;\n }\n\n // If there is a replacer, it must be a function or an array.\n // Otherwise, throw an error.\n\n rep = replacer;\n if (replacer && typeof replacer !== \"function\" &&\n (typeof replacer !== \"object\" ||\n typeof replacer.length !== \"number\")) {\n throw new Error(\"JSON.stringify\");\n }\n\n // Make a fake root object containing our value under the key of \"\".\n // Return the result of stringifying the value.\n\n return str(\"\", {\"\": value});\n };\n }\n\n\n // If the JSON object does not yet have a parse method, give it one.\n\n if (typeof JSON.parse !== \"function\") {\n JSON.parse = (function () {\n\n // This function creates a JSON parse function that uses a state machine rather\n // than the dangerous eval function to parse a JSON text.\n\n var state; // The state of the parser, one of\n // 'go' The starting state\n // 'ok' The final, accepting state\n // 'firstokey' Ready for the first key of the object or\n // the closing of an empty object\n // 'okey' Ready for the next key of the object\n // 'colon' Ready for the colon\n // 'ovalue' Ready for the value half of a key/value pair\n // 'ocomma' Ready for a comma or closing }\n // 'firstavalue' Ready for the first value of an array or\n // an empty array\n // 'avalue' Ready for the next value of an array\n // 'acomma' Ready for a comma or closing ]\n var stack; // The stack, for controlling nesting.\n var container; // The current container object or array\n var key; // The current key\n var value; // The current value\n var escapes = { // Escapement translation table\n \"\\\\\": \"\\\\\",\n \"\\\"\": \"\\\"\",\n \"/\": \"/\",\n \"t\": \"\\t\",\n \"n\": \"\\n\",\n \"r\": \"\\r\",\n \"f\": \"\\f\",\n \"b\": \"\\b\"\n };\n var string = { // The actions for string tokens\n go: function () {\n state = \"ok\";\n },\n firstokey: function () {\n key = value;\n state = \"colon\";\n },\n okey: function () {\n key = value;\n state = \"colon\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var number = { // The actions for number tokens\n go: function () {\n state = \"ok\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var action = {\n\n // The action table describes the behavior of the machine. It contains an\n // object for each token. Each object contains a method that is called when\n // a token is matched in a state. An object will lack a method for illegal\n // states.\n\n \"{\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = {};\n state = \"firstokey\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = {};\n state = \"firstokey\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n }\n },\n \"}\": {\n firstokey: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n ocomma: function () {\n var pop = stack.pop();\n container[key] = value;\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \"[\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = [];\n state = \"firstavalue\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = [];\n state = \"firstavalue\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n }\n },\n \"]\": {\n firstavalue: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n acomma: function () {\n var pop = stack.pop();\n container.push(value);\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \":\": {\n colon: function () {\n if (Object.hasOwnProperty.call(container, key)) {\n throw new SyntaxError(\"Duplicate key '\" + key + \"\\\"\");\n }\n state = \"ovalue\";\n }\n },\n \",\": {\n ocomma: function () {\n container[key] = value;\n state = \"okey\";\n },\n acomma: function () {\n container.push(value);\n state = \"avalue\";\n }\n },\n \"true\": {\n go: function () {\n value = true;\n state = \"ok\";\n },\n ovalue: function () {\n value = true;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = true;\n state = \"acomma\";\n },\n avalue: function () {\n value = true;\n state = \"acomma\";\n }\n },\n \"false\": {\n go: function () {\n value = false;\n state = \"ok\";\n },\n ovalue: function () {\n value = false;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = false;\n state = \"acomma\";\n },\n avalue: function () {\n value = false;\n state = \"acomma\";\n }\n },\n \"null\": {\n go: function () {\n value = null;\n state = \"ok\";\n },\n ovalue: function () {\n value = null;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = null;\n state = \"acomma\";\n },\n avalue: function () {\n value = null;\n state = \"acomma\";\n }\n }\n };\n\n function debackslashify(text) {\n\n // Remove and replace any backslash escapement.\n\n return text.replace(/\\\\(?:u(.{4})|([^u]))/g, function (ignore, b, c) {\n return b\n ? String.fromCharCode(parseInt(b, 16))\n : escapes[c];\n });\n }\n\n return function (source, reviver) {\n\n // A regular expression is used to extract tokens from the JSON text.\n // The extraction process is cautious.\n\n var result;\n var tx = /^[\\u0020\\t\\n\\r]*(?:([,:\\[\\]{}]|true|false|null)|(-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?)|\"((?:[^\\r\\n\\t\\\\\\\"]|\\\\(?:[\"\\\\\\/trnfb]|u[0-9a-fA-F]{4}))*)\")/;\n\n // Set the starting state.\n\n state = \"go\";\n\n // The stack records the container, key, and state for each object or array\n // that contains another object or array while processing nested structures.\n\n stack = [];\n\n // If any error occurs, we will catch it and ultimately throw a syntax error.\n\n try {\n\n // For each token...\n\n while (true) {\n result = tx.exec(source);\n if (!result) {\n break;\n }\n\n // result is the result array from matching the tokenizing regular expression.\n // result[0] contains everything that matched, including any initial whitespace.\n // result[1] contains any punctuation that was matched, or true, false, or null.\n // result[2] contains a matched number, still in string form.\n // result[3] contains a matched string, without quotes but with escapement.\n\n if (result[1]) {\n\n // Token: Execute the action for this state and token.\n\n action[result[1]][state]();\n\n } else if (result[2]) {\n\n // Number token: Convert the number string into a number value and execute\n // the action for this state and number.\n\n value = +result[2];\n number[state]();\n } else {\n\n // String token: Replace the escapement sequences and execute the action for\n // this state and string.\n\n value = debackslashify(result[3]);\n string[state]();\n }\n\n // Remove the token from the string. The loop will continue as long as there\n // are tokens. This is a slow process, but it allows the use of ^ matching,\n // which assures that no illegal tokens slip through.\n\n source = source.slice(result[0].length);\n }\n\n // If we find a state/token combination that is illegal, then the action will\n // cause an error. We handle the error by simply changing the state.\n\n } catch (e) {\n state = e;\n }\n\n // The parsing is finished. If we are not in the final \"ok\" state, or if the\n // remaining source contains anything except whitespace, then we did not have\n //a well-formed JSON text.\n\n if (state !== \"ok\" || (/[^\\u0020\\t\\n\\r]/.test(source))) {\n throw (state instanceof SyntaxError)\n ? state\n : new SyntaxError(\"JSON\");\n }\n\n // If there is a reviver function, we recursively walk the new structure,\n // passing each name/value pair to the reviver function for possible\n // transformation, starting with a temporary root object that holds the current\n // value in an empty key. If there is not a reviver function, we simply return\n // that value.\n\n return (typeof reviver === \"function\")\n ? (function walk(holder, key) {\n var k;\n var v;\n var val = holder[key];\n if (val && typeof val === \"object\") {\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(val, k)) {\n v = walk(val, k);\n if (v !== undefined) {\n val[k] = v;\n } else {\n delete val[k];\n }\n }\n }\n }\n return reviver.call(holder, key, val);\n }({\"\": value}, \"\"))\n : value;\n };\n }());\n }\n}\n\nmodule.exports = setupCustomJSON;\n","'use strict';\n\nfunction wrapGlobals(window, handler, shim) {\n if (!window) { return; }\n // Adapted from https://github.com/bugsnag/bugsnag-js\n var globals = 'EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload'.split(',');\n var i, global;\n for (i = 0; i < globals.length; ++i) {\n global = globals[i];\n\n if (window[global] && window[global].prototype) {\n _extendListenerPrototype(handler, window[global].prototype, shim);\n }\n }\n}\n\nfunction _extendListenerPrototype(handler, prototype, shim) {\n if (prototype.hasOwnProperty && prototype.hasOwnProperty('addEventListener')) {\n var oldAddEventListener = prototype.addEventListener;\n while (oldAddEventListener._rollbarOldAdd && oldAddEventListener.belongsToShim) {\n oldAddEventListener = oldAddEventListener._rollbarOldAdd;\n }\n var addFn = function(event, callback, bubble) {\n oldAddEventListener.call(this, event, handler.wrap(callback), bubble);\n };\n addFn._rollbarOldAdd = oldAddEventListener;\n addFn.belongsToShim = shim;\n prototype.addEventListener = addFn;\n\n var oldRemoveEventListener = prototype.removeEventListener;\n while (oldRemoveEventListener._rollbarOldRemove && oldRemoveEventListener.belongsToShim) {\n oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;\n }\n var removeFn = function(event, callback, bubble) {\n oldRemoveEventListener.call(this, event, callback && callback._rollbar_wrapped || callback, bubble);\n };\n removeFn._rollbarOldRemove = oldRemoveEventListener;\n removeFn.belongsToShim = shim;\n prototype.removeEventListener = removeFn;\n }\n}\n\nmodule.exports = wrapGlobals;\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction raw(payload, jsonBackup) {\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction selectFrames(frames, range) {\n var len = frames.length;\n if (len > range * 2) {\n return frames.slice(0, range).concat(frames.slice(len - range));\n }\n return frames;\n}\n\nfunction truncateFrames(payload, jsonBackup, range) {\n range = (typeof range === 'undefined') ? 30 : range;\n var body = payload.data.body;\n var frames;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n frames = chain[i].frames;\n frames = selectFrames(frames, range);\n chain[i].frames = frames;\n }\n } else if (body.trace) {\n frames = body.trace.frames;\n frames = selectFrames(frames, range);\n body.trace.frames = frames;\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction maybeTruncateValue(len, val) {\n if (!val) {\n return val;\n }\n if (val.length > len) {\n return val.slice(0, len - 3).concat('...');\n }\n return val;\n}\n\nfunction truncateStrings(len, payload, jsonBackup) {\n function truncator(k, v, seen) {\n switch (_.typeName(v)) {\n case 'string':\n return maybeTruncateValue(len, v);\n case 'object':\n case 'array':\n return traverse(v, truncator, seen);\n default:\n return v;\n }\n }\n payload = traverse(payload, truncator);\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction truncateTraceData(traceData) {\n if (traceData.exception) {\n delete traceData.exception.description;\n traceData.exception.message = maybeTruncateValue(255, traceData.exception.message);\n }\n traceData.frames = selectFrames(traceData.frames, 1);\n return traceData;\n}\n\nfunction minBody(payload, jsonBackup) {\n var body = payload.data.body;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n chain[i] = truncateTraceData(chain[i]);\n }\n } else if (body.trace) {\n body.trace = truncateTraceData(body.trace);\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction needsTruncation(payload, maxSize) {\n return _.maxByteSize(payload) > maxSize;\n}\n\nfunction truncate(payload, jsonBackup, maxSize) {\n maxSize = (typeof maxSize === 'undefined') ? (512 * 1024) : maxSize;\n var strategies = [\n raw,\n truncateFrames,\n truncateStrings.bind(null, 1024),\n truncateStrings.bind(null, 512),\n truncateStrings.bind(null, 256),\n minBody\n ];\n var strategy, results, result;\n\n while ((strategy = strategies.shift())) {\n results = strategy(payload, jsonBackup);\n payload = results[0];\n result = results[1];\n if (result.error || !needsTruncation(result.value, maxSize)) {\n return result;\n }\n }\n return result;\n}\n\nmodule.exports = {\n truncate: truncate,\n\n /* for testing */\n raw: raw,\n truncateFrames: truncateFrames,\n truncateStrings: truncateStrings,\n maybeTruncateValue: maybeTruncateValue\n};\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/utility.js","webpack:///./src/browser/logger.js","webpack:///./src/browser/url.js","webpack:///./src/errorParser.js","webpack:///./src/scrub.js","webpack:///./src/utility/traverse.js","webpack:///./src/browser/bundles/rollbar.js","webpack:///./src/browser/rollbar.js","webpack:///./src/browser/core.js","webpack:///./src/rollbar.js","webpack:///./src/rateLimiter.js","webpack:///./src/merge.js","webpack:///./src/queue.js","webpack:///./src/notifier.js","webpack:///./src/api.js","webpack:///./src/apiUtility.js","webpack:///./node_modules/console-polyfill/index.js","webpack:///./src/browser/detection.js","webpack:///./src/browser/globalSetup.js","webpack:///./src/browser/transport.js","webpack:///./src/browser/transforms.js","webpack:///./node_modules/error-stack-parser/error-stack-parser.js","webpack:///./node_modules/error-stack-parser/node_modules/stackframe/stackframe.js","webpack:///./src/transforms.js","webpack:///./src/browser/predicates.js","webpack:///./src/predicates.js","webpack:///./src/defaults.js","webpack:///./src/browser/defaults/scrubFields.js","webpack:///./src/telemetry.js","webpack:///./src/browser/telemetry.js","webpack:///./src/browser/domUtility.js","webpack:///./src/utility/polyfillJSON.js","webpack:///./vendor/JSON-js/json3.js","webpack:///./src/browser/wrapGlobals.js","webpack:///./src/truncation.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","merge","RollbarJSON","isType","x","typeName","Error","toString","match","toLowerCase","isFunction","f","isNativeFunction","funcMatchString","Function","replace","reIsNative","RegExp","isObject","test","type","uuid4","now","Math","random","floor","parseUriOptions","strictMode","q","parser","strict","loose","stringify","obj","backup","error","jsonError","backupError","wrapCallback","logger","err","resp","e","nonCircularClone","clone","seen","newSeen","result","includes","slice","push","message","TELEMETRY_TYPES","TELEMETRY_LEVELS","arrayIncludes","arr","val","k","length","Date","addParamsAndAccessTokenToPath","accessToken","options","params","access_token","paramsArray","join","query","sort","path","qs","indexOf","h","substring","createItem","args","notifier","requestKeys","lambdaContext","custom","callback","request","arg","extraArgs","argTypes","typ","DOMException","j","len","undefined","item","timestamp","diagnostic","uuid","level","skipFrames","setCustomItemKeys","_originalArgs","original_arg_types","addErrorContext","errors","data","contextAdded","rollbarContext","error_context","createTelemetryEvent","metadata","filterIp","requestData","captureIp","newIp","parts","split","pop","beginning","slashIdx","concat","formatArgsAsString","substr","formatUrl","u","protocol","port","hostname","keys","handleOptions","current","input","payload","hostWhiteList","hostSafeList","log","hostBlackList","hostBlockList","updateDeprecatedOptions","overwriteScrubFields","scrubFields","isError","isFiniteNumber","Number","isFinite","isIterable","isString","String","isPromise","then","jsonParse","parse","LEVELS","debug","info","warning","critical","makeUnhandledStackInfo","url","lineno","colno","backupMessage","errorParser","location","line","column","func","guessFunctionName","context","gatherContext","href","document","useragent","window","navigator","userAgent","redact","sanitizeUrl","baseUrlParts","str","exec","uri","$0","$1","$2","parseUri","anchor","source","set","temp","replacement","setupJSON","polyfillJSON","JSON","maxByteSize","string","count","code","charCodeAt","detection","_","Array","arguments","unshift","ieVersion","console","apply","last","auth","host","hash","pathname","search","parseInt","pathParts","ErrorStackParser","ERR_CLASS_REGEXP","Frame","stackFrame","_stackFrame","fileName","lineNumber","functionName","columnNumber","Stack","exception","skip","stack","parserStack","getStack","_mostSpecificErrorName","rawStack","rawException","constructorName","constructor","guessErrorClass","errMsg","errClassMatch","errClass","nested","traceChain","traverse","scrubPath","scrubPaths","paramRes","pat","ret","_getScrubFieldRegexs","queryRes","_getScrubQueryParamRegexs","redactQueryParam","dummy0","paramPart","scrubber","v","tmpV","valScrubber","paramScrubber","seenIndex","isObj","isArray","mapped","same","rollbar","_rollbarConfig","alias","globalAlias","shimRunning","shimId","_rollbarStartTime","getTime","Rollbar","_rollbarDidLoad","self","telemeter","instrumenter","wrapGlobals","scrub","truncation","setComponents","Client","API","globals","Transport","urllib","transforms","sharedTransforms","predicates","sharedPredicates","client","this","defaultOptions","_configuredOptions","Telemeter","components","Instrumenter","transport","api","gWindow","_gWindow","gDocument","isChrome","chrome","runtime","anonymousErrorsPending","addTransform","handleDomException","handleItemWithError","ensureItemHasSomethingToSay","addBaseInfo","addRequestInfo","addClientInfo","addPluginInfo","addBody","addMessageWithError","addTelemetryData","addConfigToPayload","addScrubber","userTransform","addConfiguredOptions","addDiagnosticKeys","itemToPayload","addTransformsToNotifier","queue","addPredicate","checkLevel","checkIgnore","userCheckIgnore","urlIsNotBlockListed","urlIsSafeListed","messageIsIgnored","setupUnhandledCapture","instrument","_instance","handleUninitialized","maybeCallback","_getFirstFunction","init","global","configure","payloadData","oldOptions","lastError","_createItem","warn","buildJsonPayload","sendJsonPayload","jsonPayload","unhandledExceptionsInitialized","captureUncaught","handleUncaughtExceptions","captureUncaughtExceptions","wrapGlobalEventHandlers","unhandledRejectionsInitialized","captureUnhandledRejections","handleUnhandledRejections","handleUncaughtException","inspectAnonymousErrors","stackInfo","_unhandledStackInfo","uncaughtErrorLevel","_isUncaught","handleAnonymousErrors","prepareStackTrace","_stack","_isAnonymous","handleUnhandledRejection","reason","promise","reasonResult","_rollbarContext","wrap","_before","ctxFn","_isWrap","_rollbar_wrapped","exc","_rollbarWrappedError","_wrappedSource","prop","captureEvent","event","captureDomContentLoaded","ts","captureLoad","loadFull","defaults","version","logLevel","reportLevel","endpoint","verbose","enabled","transmit","sendConfig","includeItemsInTelemetry","ignoreDuplicateErrors","RateLimiter","Queue","Notifier","platform","rateLimiter","configureGlobal","setPlatformOptions","tracer","validateTracer","setStackTraceLimit","lastErrorHash","stackTraceLimit","scope","active","maxItems","itemsPerMinute","_defaultLogLevel","_log","wait","postJsonPayload","defaultLevel","_sameAsLastError","_addTracingInfo","_captureRollbarItem","telemetryEvents","copyEvents","itemHash","generateItemHash","span","spanContext","toSpanId","toTraceId","validateSpan","setTag","opentracingSpanId","opentracingTraceId","opentracing_span_id","opentracing_trace_id","startTime","counter","perMinCounter","platformOptions","checkRate","limit","ignoreRateLimit","shouldSendValue","shouldSend","globalRateLimit","limitPerMin","perMinute","msg","environment","body","extra","language","framework","rateLimitPayload","globalSettings","elapsedTime","globalRateLimitPerMin","hasOwn","toStr","isPlainObject","hasOwnConstructor","hasIsPrototypeOf","src","copy","pendingItems","pendingRequests","retryQueue","retryHandle","waitCallback","waitIntervalID","predicate","addPendingItem","removePendingItem","idx","splice","addItem","originalError","originalItem","predicateResult","_applyPredicates","stop","_maybeLog","_makeApiRequest","_dequeuePendingRequest","_maybeCallWait","clearInterval","setInterval","rateLimitResponse","postItem","_maybeRetry","RETRIABLE_ERRORS","shouldRetry","retryInterval","maxRetries","retries","_retryApiRequest","retryObject","shift","transform","_applyTransforms","transformIndex","transformsLength","cb","helpers","Api","jsonBackup","transportOptions","_getTransport","getTransportFromOptions","buildPayload","post","stringifyResult","truncate","contextResult","timeout","proxy","opts","method","appendPathToPath","base","baseTrailingSlash","pathBeginningSlash","con","dummy","properties","methods","Detection","div","createElement","all","getElementsByTagName","innerHTML","undef","_rollbarWindowOnError","old","handler","shim","oldOnError","_rollbarOldOnError","onerror","fn","_rollbarURH","belongsToShim","removeEventListener","rejectionHandler","evt","detail","addEventListener","_makeZoneRequest","currentZone","Zone","_name","rootZone","_parent","run","_makeRequest","requestFactory","RollbarProxy","json","_msg","_proxyRequest","xmlhttp","factories","XMLHttpRequest","ActiveXObject","numFactories","_createXMLHTTPObject","onreadystatechange","readyState","parseResponse","responseText","status","_isNormalFailure","_newRetriableError","ex","open","setRequestHeader","send","e1","XDomainRequest","xdomainrequest","onprogress","ontimeout","onload","e2","writeData","addBodyMessage","stackFromItem","buildTrace","description","guess","trace","errorClass","frame","pre","contextLength","mid","raw","frames","filename","sendFrameUrl","endsWith","reverse","_savedStackTrace","chain","server","remoteString","query_string","user_ip","nav","scr","screen","runtime_ms","round","javascript","browser","cookie_enabled","cookieEnabled","width","height","cur","plugins","navPlugins","traces","traceChainLength","trace_chain","addBodyTraceChain","className","addBodyTrace","scrubFn","StackFrame","FIREFOX_SAFARI_STACK_REGEXP","CHROME_IE_STACK_REGEXP","SAFARI_NATIVE_CODE_REGEXP","stacktrace","parseOpera","parseV8OrIE","parseFFOrSafari","extractLocation","urlLike","filter","map","sanitizedLine","tokens","locationParts","functionNameRegex","matches","parseOpera9","parseOpera11","parseOpera10","lineRE","lines","argsRaw","functionCall","_capitalize","charAt","toUpperCase","_getter","booleanProps","numericProps","stringProps","props","getArgs","setArgs","TypeError","getEvalOrigin","evalOrigin","setEvalOrigin","getFileName","getLineNumber","getColumnNumber","getFunctionName","getIsEval","fromString","argsStartIndex","argsEndIndex","lastIndexOf","locationString","Boolean","isNaN","parseFloat","addFunctionOption","payloadOptions","tracePath","newExtra","newItem","response","promisedItem","configuredOptions","configured_options","is_anonymous","is_uncaught","raw_error","constructor_name","failed","settings","matchFrames","list","block","listLength","frameLength","urlIsOnAList","safeOrBlock","tracesLength","listName","levelVal","isUncaught","onSendCallback","ignoredMessages","rIgnoredMessage","messages","messagesFromItem","itemsPerMin","maxTelemetryEvents","maxQueueSize","max","min","getLevel","manual","newMaxEvents","deleteCount","events","filterTelemetry","capture","rollbarUUID","timestamp_ms","captureError","captureLog","captureNetwork","subtype","levelFromStatus","status_code","statusCode","captureDom","element","checked","captureNavigation","from","to","captureConnectivityChange","change","urlparser","domUtil","network","networkResponseHeaders","networkResponseBody","networkRequestHeaders","networkRequestBody","networkErrorOnHttp5xx","networkErrorOnHttp4xx","networkErrorOnHttp0","dom","navigation","connectivity","contentSecurityPolicy","errorOnContentSecurityPolicy","replacements","orig","restore","b","_window","_document","autoInstrument","scrubTelemetryInputs","telemetryScrubber","defaultValueScrubber","patterns","attributes","attrs","a","nameFromDescription","eventRemovers","contentsecuritypolicy","_location","_lastHref","oldSettings","deinstrumentNetwork","instrumentNetwork","deinstrumentConsole","instrumentConsole","deinstrumentDom","instrumentDom","deinstrumentNavigation","instrumentNavigation","deinstrumentConnectivity","instrumentConnectivity","deinstrumentContentSecurityPolicy","instrumentContentSecurityPolicy","wrapProp","xhr","xhrp","__rollbar_xhr","start_time_ms","end_time_ms","header","request_headers","request_content_type","onreadystatechangeHandler","__rollbar_event","headers","response_content_type","getResponseHeader","headersConfig","allHeaders","getAllResponseHeaders","trim","isJsonContentType","scrubJson","errorOnHttpStatus","trackHttpErrors","reqHeaders","Headers","fetchHeaders","text","contentType","inHeaders","outHeaders","entries","currentHeader","next","done","wrapConsole","origConsole","removeListeners","clickHandler","handleClick","blurHandler","handleBlur","addListener","getElementFromEvent","hasTag","tagName","anchorOrButton","isDescribedElement","captureDomEvent","handleSelectInputChanged","elem","multiple","selected","selectedIndex","isChecked","getElementType","describeElement","elementString","elementArrayToString","treeToArray","app","history","pushState","handleUrlChange","parsedHref","parsedTo","parsedFrom","handleCspEvent","cspEvent","blockedURI","violatedDirective","effectiveDirective","sourceFile","originalPolicy","handleCspError","cspHandler","section","altType","attachEvent","detachEvent","getAttribute","descriptionToString","desc","out","id","classes","attr","nextStr","totalLength","separatorLength","MAX_LENGTH","nextDescription","parentNode","doc","target","elementFromPoint","clientX","clientY","subtypes","gap","indent","meta","rep","state","container","escapes","number","action","rx_escapable","this_value","valueOf","quote","lastIndex","toJSON","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","\"","replacer","space","holder","partial","mind","go","firstokey","okey","ovalue","firstavalue","avalue","ocomma","acomma","colon","SyntaxError","reviver","tx","ignore","fromCharCode","walk","_extendListenerPrototype","oldAddEventListener","_rollbarOldAdd","addFn","bubble","oldRemoveEventListener","_rollbarOldRemove","removeFn","selectFrames","range","truncateFrames","maybeTruncateValue","truncateStrings","truncator","truncateTraceData","traceData","minBody","needsTruncation","maxSize","strategy","results","strategies"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAO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Q3J,EAAKgL,YACR5oB,EAAI,EAAGA,EAAIunB,EAAM9hB,OAAQzF,IAChCunB,EAAMvnB,GAAKw8B,EAAkBjV,EAAMvnB,SAE5B4d,EAAK8I,QACd9I,EAAK8I,MAAQ8V,EAAkB5e,EAAK8I,QAEtC,MAAO,CAAC3c,EAASoE,EAAEpK,UAAUgG,EAASqX,IAGxC,SAASub,EAAgB5yB,EAAS6yB,GAChC,OAAOzuB,EAAEN,YAAY9D,GAAW6yB,EA0BlC78B,EAAOD,QAAU,CACf6hB,SAxBF,SAAkB5X,EAASqX,EAAYwb,GACrCA,OAA8B,IAAZA,EAA2B,OAAeA,EAW5D,IAVA,IAQIC,EAAUC,EAASh4B,EARnBi4B,EAAa,CACf/V,EACAoV,EACAE,EAAgB96B,KAAK,KAAM,MAC3B86B,EAAgB96B,KAAK,KAAM,KAC3B86B,EAAgB96B,KAAK,KAAM,KAC3Bk7B,GAIMG,EAAWE,EAAWnc,SAI5B,GAFA7W,GADA+yB,EAAUD,EAAS9yB,EAASqX,IACV,IAClBtc,EAASg4B,EAAQ,IACN54B,QAAUy4B,EAAgB73B,EAAO7D,MAAO27B,GACjD,OAAO93B,EAGX,OAAOA,GAOPkiB,IAAKA,EACLoV,eAAgBA,EAChBE,gBAAiBA,EACjBD,mBAAoBA","file":"rollbar.min.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n","'use strict';\n\nvar merge = require('./merge');\n\nvar RollbarJSON = {};\nfunction setupJSON(polyfillJSON) {\n if (isFunction(RollbarJSON.stringify) && isFunction(RollbarJSON.parse)) {\n return;\n }\n\n if (isDefined(JSON)) {\n // If polyfill is provided, prefer it over existing non-native shims.\n if(polyfillJSON) {\n if (isNativeFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isNativeFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n } else { // else accept any interface that is present.\n if (isFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n }\n }\n if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {\n polyfillJSON && polyfillJSON(RollbarJSON);\n }\n}\n\n/*\n * isType - Given a Javascript value and a string, returns true if the type of the value matches the\n * given string.\n *\n * @param x - any value\n * @param t - a lowercase string containing one of the following type names:\n * - undefined\n * - null\n * - error\n * - number\n * - boolean\n * - string\n * - symbol\n * - function\n * - object\n * - array\n * @returns true if x is of type t, otherwise false\n */\nfunction isType(x, t) {\n return t === typeName(x);\n}\n\n/*\n * typeName - Given a Javascript value, returns the type of the object as a string\n */\nfunction typeName(x) {\n var name = typeof x;\n if (name !== 'object') {\n return name;\n }\n if (!x) {\n return 'null';\n }\n if (x instanceof Error) {\n return 'error';\n }\n return ({}).toString.call(x).match(/\\s([a-zA-Z]+)/)[1].toLowerCase();\n}\n\n/* isFunction - a convenience function for checking if a value is a function\n *\n * @param f - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isFunction(f) {\n return isType(f, 'function');\n}\n\n/* isNativeFunction - a convenience function for checking if a value is a native JS function\n *\n * @param f - any value\n * @returns true if f is a native JS function, otherwise false\n */\nfunction isNativeFunction(f) {\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n var funcMatchString = Function.prototype.toString.call(Object.prototype.hasOwnProperty)\n .replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?');\n var reIsNative = RegExp('^' + funcMatchString + '$');\n return isObject(f) && reIsNative.test(f);\n}\n\n/* isObject - Checks if the argument is an object\n *\n * @param value - any value\n * @returns true is value is an object function is an object)\n*/\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/* isString - Checks if the argument is a string\n *\n * @param value - any value\n * @returns true if value is a string\n*/\nfunction isString(value) {\n return typeof value === 'string' || value instanceof String\n}\n\n/**\n * isFiniteNumber - determines whether the passed value is a finite number\n *\n * @param {*} n - any value\n * @returns true if value is a finite number\n */\n function isFiniteNumber(n) {\n return Number.isFinite(n);\n}\n\n/*\n * isDefined - a convenience function for checking if a value is not equal to undefined\n *\n * @param u - any value\n * @returns true if u is anything other than undefined\n */\nfunction isDefined(u) {\n return !isType(u, 'undefined');\n}\n\n/*\n * isIterable - convenience function for checking if a value can be iterated, essentially\n * whether it is an object or an array.\n *\n * @param i - any value\n * @returns true if i is an object or an array as determined by `typeName`\n */\nfunction isIterable(i) {\n var type = typeName(i);\n return (type === 'object' || type === 'array');\n}\n\n/*\n * isError - convenience function for checking if a value is of an error type\n *\n * @param e - any value\n * @returns true if e is an error\n */\nfunction isError(e) {\n // Detect both Error and Firefox Exception type\n return isType(e, 'error') || isType(e, 'exception');\n}\n\n/* isPromise - a convenience function for checking if a value is a promise\n *\n * @param p - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isPromise(p) {\n return isObject(p) && isType(p.then, 'function');\n}\n\nfunction redact() {\n return '********';\n}\n\n// from http://stackoverflow.com/a/8809472/1138191\nfunction uuid4() {\n var d = now();\n var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n var r = (d + Math.random() * 16) % 16 | 0;\n d = Math.floor(d / 16);\n return (c === 'x' ? r : (r & 0x7 | 0x8)).toString(16);\n });\n return uuid;\n}\n\nvar LEVELS = {\n debug: 0,\n info: 1,\n warning: 2,\n error: 3,\n critical: 4\n};\n\nfunction sanitizeUrl(url) {\n var baseUrlParts = parseUri(url);\n if (!baseUrlParts) {\n return '(unknown)';\n }\n\n // remove a trailing # if there is no anchor\n if (baseUrlParts.anchor === '') {\n baseUrlParts.source = baseUrlParts.source.replace('#', '');\n }\n\n url = baseUrlParts.source.replace('?' + baseUrlParts.query, '');\n return url;\n}\n\nvar parseUriOptions = {\n strictMode: false,\n key: [\n 'source',\n 'protocol',\n 'authority',\n 'userInfo',\n 'user',\n 'password',\n 'host',\n 'port',\n 'relative',\n 'path',\n 'directory',\n 'file',\n 'query',\n 'anchor'\n ],\n q: {\n name: 'queryKey',\n parser: /(?:^|&)([^&=]*)=?([^&]*)/g\n },\n parser: {\n strict: /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n loose: /^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/\n }\n};\n\nfunction parseUri(str) {\n if (!isType(str, 'string')) {\n return undefined;\n }\n\n var o = parseUriOptions;\n var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);\n var uri = {};\n\n for (var i = 0, l = o.key.length; i < l; ++i) {\n uri[o.key[i]] = m[i] || '';\n }\n\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) {\n uri[o.q.name][$1] = $2;\n }\n });\n\n return uri;\n}\n\nfunction addParamsAndAccessTokenToPath(accessToken, options, params) {\n params = params || {};\n params.access_token = accessToken;\n var paramsArray = [];\n var k;\n for (k in params) {\n if (Object.prototype.hasOwnProperty.call(params, k)) {\n paramsArray.push([k, params[k]].join('='));\n }\n }\n var query = '?' + paramsArray.sort().join('&');\n\n options = options || {};\n options.path = options.path || '';\n var qs = options.path.indexOf('?');\n var h = options.path.indexOf('#');\n var p;\n if (qs !== -1 && (h === -1 || h > qs)) {\n p = options.path;\n options.path = p.substring(0,qs) + query + '&' + p.substring(qs+1);\n } else {\n if (h !== -1) {\n p = options.path;\n options.path = p.substring(0,h) + query + p.substring(h);\n } else {\n options.path = options.path + query;\n }\n }\n}\n\nfunction formatUrl(u, protocol) {\n protocol = protocol || u.protocol;\n if (!protocol && u.port) {\n if (u.port === 80) {\n protocol = 'http:';\n } else if (u.port === 443) {\n protocol = 'https:';\n }\n }\n protocol = protocol || 'https:';\n\n if (!u.hostname) {\n return null;\n }\n var result = protocol + '//' + u.hostname;\n if (u.port) {\n result = result + ':' + u.port;\n }\n if (u.path) {\n result = result + u.path;\n }\n return result;\n}\n\nfunction stringify(obj, backup) {\n var value, error;\n try {\n value = RollbarJSON.stringify(obj);\n } catch (jsonError) {\n if (backup && isFunction(backup)) {\n try {\n value = backup(obj);\n } catch (backupError) {\n error = backupError;\n }\n } else {\n error = jsonError;\n }\n }\n return {error: error, value: value};\n}\n\nfunction maxByteSize(string) {\n // The transport will use utf-8, so assume utf-8 encoding.\n //\n // This minimal implementation will accurately count bytes for all UCS-2 and\n // single code point UTF-16. If presented with multi code point UTF-16,\n // which should be rare, it will safely overcount, not undercount.\n //\n // While robust utf-8 encoders exist, this is far smaller and far more performant.\n // For quickly counting payload size for truncation, smaller is better.\n\n var count = 0;\n var length = string.length;\n\n for (var i = 0; i < length; i++) {\n var code = string.charCodeAt(i);\n if (code < 128) { // up to 7 bits\n count = count + 1;\n } else if (code < 2048) { // up to 11 bits\n count = count + 2;\n } else if (code < 65536) { // up to 16 bits\n count = count + 3;\n }\n }\n\n return count;\n}\n\nfunction jsonParse(s) {\n var value, error;\n try {\n value = RollbarJSON.parse(s);\n } catch (e) {\n error = e;\n }\n return {error: error, value: value};\n}\n\nfunction makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n mode,\n backupMessage,\n errorParser\n) {\n var location = {\n url: url || '',\n line: lineno,\n column: colno\n };\n location.func = errorParser.guessFunctionName(location.url, location.line);\n location.context = errorParser.gatherContext(location.url, location.line);\n var href = typeof document !== 'undefined' && document && document.location && document.location.href;\n var useragent = typeof window !== 'undefined' && window && window.navigator && window.navigator.userAgent;\n return {\n 'mode': mode,\n 'message': error ? String(error) : (message || backupMessage),\n 'url': href,\n 'stack': [location],\n 'useragent': useragent\n };\n}\n\nfunction wrapCallback(logger, f) {\n return function(err, resp) {\n try {\n f(err, resp);\n } catch (e) {\n logger.error(e);\n }\n };\n}\n\nfunction nonCircularClone(obj) {\n var seen = [obj];\n\n function clone(obj, seen) {\n var value, name, newSeen, result = {};\n\n try {\n for (name in obj) {\n value = obj[name];\n\n if (value && (isType(value, 'object') || isType(value, 'array'))) {\n if (seen.includes(value)) {\n result[name] = 'Removed circular reference: ' + typeName(value);\n } else {\n newSeen = seen.slice();\n newSeen.push(value);\n result[name] = clone(value, newSeen);\n }\n continue;\n }\n\n result[name] = value;\n }\n } catch (e) {\n result = 'Failed cloning custom data: ' + e.message;\n }\n return result;\n }\n return clone(obj, seen);\n}\n\nfunction createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\n var diagnostic = {};\n var argTypes = [];\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n argTypes.push(typ);\n switch (typ) {\n case 'undefined':\n break;\n case 'string':\n message ? extraArgs.push(arg) : message = arg;\n break;\n case 'function':\n callback = wrapCallback(logger, arg);\n break;\n case 'date':\n extraArgs.push(arg);\n break;\n case 'error':\n case 'domexception':\n case 'exception': // Firefox Exception type\n err ? extraArgs.push(arg) : err = arg;\n break;\n case 'object':\n case 'array':\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n if (requestKeys && typ === 'object' && !request) {\n for (var j = 0, len = requestKeys.length; j < len; ++j) {\n if (arg[requestKeys[j]] !== undefined) {\n request = arg;\n break;\n }\n }\n if (request) {\n break;\n }\n }\n custom ? extraArgs.push(arg) : custom = arg;\n break;\n default:\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n extraArgs.push(arg);\n }\n }\n\n // if custom is an array this turns it into an object with integer keys\n if (custom) custom = nonCircularClone(custom);\n\n if (extraArgs.length > 0) {\n if (!custom) custom = nonCircularClone({});\n custom.extraArgs = nonCircularClone(extraArgs);\n }\n\n var item = {\n message: message,\n err: err,\n custom: custom,\n timestamp: now(),\n callback: callback,\n notifier: notifier,\n diagnostic: diagnostic,\n uuid: uuid4()\n };\n\n setCustomItemKeys(item, custom);\n\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n item.diagnostic.original_arg_types = argTypes;\n return item;\n}\n\nfunction setCustomItemKeys(item, custom) {\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (custom && custom.skipFrames !== undefined) {\n item.skipFrames = custom.skipFrames;\n delete custom.skipFrames;\n }\n}\n\nfunction addErrorContext(item, errors) {\n var custom = item.data.custom || {};\n var contextAdded = false;\n\n try {\n for (var i = 0; i < errors.length; ++i) {\n if (errors[i].hasOwnProperty('rollbarContext')) {\n custom = merge(custom, nonCircularClone(errors[i].rollbarContext));\n contextAdded = true;\n }\n }\n\n // Avoid adding an empty object to the data.\n if (contextAdded) {\n item.data.custom = custom;\n }\n } catch (e) {\n item.diagnostic.error_context = 'Failed: ' + e.message;\n }\n}\n\nvar TELEMETRY_TYPES = ['log', 'network', 'dom', 'navigation', 'error', 'manual'];\nvar TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];\n\nfunction arrayIncludes(arr, val) {\n for (var k = 0; k < arr.length; ++k) {\n if (arr[k] === val) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction createTelemetryEvent(args) {\n var type, metadata, level;\n var arg;\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n switch (typ) {\n case 'string':\n if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {\n type = arg;\n } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {\n level = arg;\n }\n break;\n case 'object':\n metadata = arg;\n break;\n default:\n break;\n }\n }\n var event = {\n type: type || 'manual',\n metadata: metadata || {},\n level: level\n };\n\n return event;\n}\n\n/*\n * get - given an obj/array and a keypath, return the value at that keypath or\n * undefined if not possible.\n *\n * @param obj - an object or array\n * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'\n * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`\n */\nfunction get(obj, path) {\n if (!obj) {\n return undefined;\n }\n var keys = path.split('.');\n var result = obj;\n try {\n for (var i = 0, len = keys.length; i < len; ++i) {\n result = result[keys[i]];\n }\n } catch (e) {\n result = undefined;\n }\n return result;\n}\n\nfunction set(obj, path, value) {\n if (!obj) {\n return;\n }\n var keys = path.split('.');\n var len = keys.length;\n if (len < 1) {\n return;\n }\n if (len === 1) {\n obj[keys[0]] = value;\n return;\n }\n try {\n var temp = obj[keys[0]] || {};\n var replacement = temp;\n for (var i = 1; i < len - 1; ++i) {\n temp[keys[i]] = temp[keys[i]] || {};\n temp = temp[keys[i]];\n }\n temp[keys[len-1]] = value;\n obj[keys[0]] = replacement;\n } catch (e) {\n return;\n }\n}\n\nfunction formatArgsAsString(args) {\n var i, len, arg;\n var result = [];\n for (i = 0, len = args.length; i < len; ++i) {\n arg = args[i];\n switch (typeName(arg)) {\n case 'object':\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500) {\n arg = arg.substr(0, 497) + '...';\n }\n break;\n case 'null':\n arg = 'null';\n break;\n case 'undefined':\n arg = 'undefined';\n break;\n case 'symbol':\n arg = arg.toString();\n break;\n }\n result.push(arg);\n }\n return result.join(' ');\n}\n\nfunction now() {\n if (Date.now) {\n return +Date.now();\n }\n return +new Date();\n}\n\nfunction filterIp(requestData, captureIp) {\n if (!requestData || !requestData['user_ip'] || captureIp === true) {\n return;\n }\n var newIp = requestData['user_ip'];\n if (!captureIp) {\n newIp = null;\n } else {\n try {\n var parts;\n if (newIp.indexOf('.') !== -1) {\n parts = newIp.split('.');\n parts.pop();\n parts.push('0');\n newIp = parts.join('.');\n } else if (newIp.indexOf(':') !== -1) {\n parts = newIp.split(':');\n if (parts.length > 2) {\n var beginning = parts.slice(0, 3);\n var slashIdx = beginning[2].indexOf('/');\n if (slashIdx !== -1) {\n beginning[2] = beginning[2].substring(0, slashIdx);\n }\n var terminal = '0000:0000:0000:0000:0000';\n newIp = beginning.concat(terminal).join(':');\n }\n } else {\n newIp = null;\n }\n } catch (e) {\n newIp = null;\n }\n }\n requestData['user_ip'] = newIp;\n}\n\nfunction handleOptions(current, input, payload, logger) {\n var result = merge(current, input, payload);\n result = updateDeprecatedOptions(result, logger);\n if (!input || input.overwriteScrubFields) {\n return result;\n }\n if (input.scrubFields) {\n result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);\n }\n return result;\n}\n\nfunction updateDeprecatedOptions(options, logger) {\n if(options.hostWhiteList && !options.hostSafeList) {\n options.hostSafeList = options.hostWhiteList;\n options.hostWhiteList = undefined;\n logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');\n }\n if(options.hostBlackList && !options.hostBlockList) {\n options.hostBlockList = options.hostBlackList;\n options.hostBlackList = undefined;\n logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');\n }\n return options;\n}\n\nmodule.exports = {\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n createItem: createItem,\n addErrorContext: addErrorContext,\n createTelemetryEvent: createTelemetryEvent,\n filterIp: filterIp,\n formatArgsAsString: formatArgsAsString,\n formatUrl: formatUrl,\n get: get,\n handleOptions: handleOptions,\n isError: isError,\n isFiniteNumber: isFiniteNumber,\n isFunction: isFunction,\n isIterable: isIterable,\n isNativeFunction: isNativeFunction,\n isObject: isObject,\n isString: isString,\n isType: isType,\n isPromise: isPromise,\n jsonParse: jsonParse,\n LEVELS: LEVELS,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n merge: merge,\n now: now,\n redact: redact,\n RollbarJSON: RollbarJSON,\n sanitizeUrl: sanitizeUrl,\n set: set,\n setupJSON: setupJSON,\n stringify: stringify,\n maxByteSize: maxByteSize,\n typeName: typeName,\n uuid4: uuid4\n};\n","'use strict';\n\n/* eslint-disable no-console */\nrequire('console-polyfill');\nvar detection = require('./detection');\nvar _ = require('../utility');\n\nfunction error() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.error(_.formatArgsAsString(args));\n } else {\n console.error.apply(console, args);\n }\n}\n\nfunction info() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.info(_.formatArgsAsString(args));\n } else {\n console.info.apply(console, args);\n }\n}\n\nfunction log() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.log(_.formatArgsAsString(args));\n } else {\n console.log.apply(console, args);\n }\n}\n\n/* eslint-enable no-console */\n\nmodule.exports = {\n error: error,\n info: info,\n log: log\n};\n","'use strict';\n\n// See https://nodejs.org/docs/latest/api/url.html\nfunction parse(url) {\n var result = {\n protocol: null, auth: null, host: null, path: null,\n hash: null, href: url, hostname: null, port: null,\n pathname: null, search: null, query: null\n };\n\n var i, last;\n i = url.indexOf('//');\n if (i !== -1) {\n result.protocol = url.substring(0,i);\n last = i+2;\n } else {\n last = 0;\n }\n \n i = url.indexOf('@', last);\n if (i !== -1) {\n result.auth = url.substring(last, i);\n last = i+1;\n }\n\n i = url.indexOf('/', last);\n if (i === -1) {\n i = url.indexOf('?', last);\n if (i === -1) {\n i = url.indexOf('#', last);\n if (i === -1) {\n result.host = url.substring(last);\n } else {\n result.host = url.substring(last, i);\n result.hash = url.substring(i);\n }\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n return result;\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n\n i = url.indexOf('#', last);\n if (i === -1) {\n result.path = url.substring(last);\n } else {\n result.path = url.substring(last, i);\n result.hash = url.substring(i);\n }\n\n if (result.path) {\n var pathParts = result.path.split('?');\n result.pathname = pathParts[0];\n result.query = pathParts[1];\n result.search = result.query ? '?' + result.query : null;\n }\n return result;\n}\n\nmodule.exports = {\n parse: parse\n};\n","'use strict';\n\nvar ErrorStackParser = require('error-stack-parser');\n\nvar UNKNOWN_FUNCTION = '?';\nvar ERR_CLASS_REGEXP = new RegExp('^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ');\n\nfunction guessFunctionName() {\n return UNKNOWN_FUNCTION;\n}\n\n\nfunction gatherContext() {\n return null;\n}\n\n\nfunction Frame(stackFrame) {\n var data = {};\n\n data._stackFrame = stackFrame;\n\n data.url = stackFrame.fileName;\n data.line = stackFrame.lineNumber;\n data.func = stackFrame.functionName;\n data.column = stackFrame.columnNumber;\n data.args = stackFrame.args;\n\n data.context = gatherContext();\n\n return data;\n}\n\n\nfunction Stack(exception, skip) {\n function getStack() {\n var parserStack = [];\n\n skip = skip || 0;\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch(e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = skip; i < parserStack.length; i++) {\n stack.push(new Frame(parserStack[i]));\n }\n\n return stack;\n }\n\n return {\n stack: getStack(),\n message: exception.message,\n name: _mostSpecificErrorName(exception),\n rawStack: exception.stack,\n rawException: exception\n };\n}\n\n\nfunction parse(e, skip) {\n var err = e;\n\n if (err.nested) {\n var traceChain = [];\n while (err) {\n traceChain.push(new Stack(err, skip));\n err = err.nested;\n\n skip = 0; // Only apply skip value to primary error\n }\n\n // Return primary error with full trace chain attached.\n traceChain[0].traceChain = traceChain;\n return traceChain[0];\n } else {\n return new Stack(err, skip);\n }\n}\n\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg || !errMsg.match) {\n return ['Unknown error. There was no error message to display.', ''];\n }\n var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);\n var errClass = '(unknown)';\n\n if (errClassMatch) {\n errClass = errClassMatch[errClassMatch.length - 1];\n errMsg = errMsg.replace((errClassMatch[errClassMatch.length - 2] || '') + errClass + ':', '');\n errMsg = errMsg.replace(/(^[\\s]+|[\\s]+$)/g, '');\n }\n return [errClass, errMsg];\n}\n\n// * Prefers any value over an empty string\n// * Prefers any value over 'Error' where possible\n// * Prefers name over constructor.name when both are more specific than 'Error'\nfunction _mostSpecificErrorName(error) {\n var name = error.name && error.name.length && error.name;\n var constructorName = error.constructor.name && error.constructor.name.length && error.constructor.name;\n\n if (!name || !constructorName) {\n return name || constructorName;\n }\n\n if (name === 'Error') {\n return constructorName;\n }\n return name;\n}\n\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame\n};\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction scrub(data, scrubFields, scrubPaths) {\n scrubFields = scrubFields || [];\n\n if (scrubPaths) {\n for (var i = 0; i < scrubPaths.length; ++i) {\n scrubPath(data, scrubPaths[i]);\n }\n }\n\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart) {\n return paramPart + _.redact();\n }\n\n function paramScrubber(v) {\n var i;\n if (_.isType(v, 'string')) {\n for (i = 0; i < queryRes.length; ++i) {\n v = v.replace(queryRes[i], redactQueryParam);\n }\n }\n return v;\n }\n\n function valScrubber(k, v) {\n var i;\n for (i = 0; i < paramRes.length; ++i) {\n if (paramRes[i].test(k)) {\n v = _.redact();\n break;\n }\n }\n return v;\n }\n\n function scrubber(k, v, seen) {\n var tmpV = valScrubber(k, v);\n if (tmpV === v) {\n if (_.isType(v, 'object') || _.isType(v, 'array')) {\n return traverse(v, scrubber, seen);\n }\n return paramScrubber(tmpV);\n } else {\n return tmpV;\n }\n }\n\n return traverse(data, scrubber);\n}\n\nfunction scrubPath(obj, path) {\n var keys = path.split('.');\n var last = keys.length - 1;\n try {\n for (var i = 0; i <= last; ++i) {\n if (i < last) {\n obj = obj[keys[i]];\n } else {\n obj[keys[i]] = _.redact();\n }\n }\n } catch (e) {\n // Missing key is OK;\n }\n}\n\nfunction _getScrubFieldRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '^\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?$';\n ret.push(new RegExp(pat, 'i'));\n }\n return ret;\n}\n\n\nfunction _getScrubQueryParamRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?';\n ret.push(new RegExp('(' + pat + '=)([^&\\\\n]+)', 'igm'));\n }\n return ret;\n}\n\nmodule.exports = scrub;\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction traverse(obj, func, seen) {\n var k, v, i;\n var isObj = _.isType(obj, 'object');\n var isArray = _.isType(obj, 'array');\n var keys = [];\n var seenIndex;\n\n // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.\n seen = seen || { obj: [], mapped: []};\n\n if (isObj) {\n seenIndex = seen.obj.indexOf(obj);\n\n if (isObj && seenIndex !== -1) {\n // Prefer the mapped object if there is one.\n return seen.mapped[seenIndex] || seen.obj[seenIndex];\n }\n\n seen.obj.push(obj);\n seenIndex = seen.obj.length - 1;\n }\n\n if (isObj) {\n for (k in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, k)) {\n keys.push(k);\n }\n }\n } else if (isArray) {\n for (i = 0; i < obj.length; ++i) {\n keys.push(i);\n }\n }\n\n var result = isObj ? {} : [];\n var same = true;\n for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n result[k] = func(k, v, seen);\n same = same && result[k] === obj[k];\n }\n\n if (isObj && !same) {\n seen.mapped[seenIndex] = result;\n }\n\n return !same ? result : obj;\n}\n\nmodule.exports = traverse;\n","'use strict';\n\nvar rollbar = require('../rollbar');\n\nvar options = (typeof window !== 'undefined') && window._rollbarConfig;\nvar alias = options && options.globalAlias || 'Rollbar';\nvar shimRunning = (typeof window !== 'undefined') && window[alias] && typeof window[alias].shimId === 'function' && window[alias].shimId() !== undefined;\n\nif ((typeof window !== 'undefined') && !window._rollbarStartTime) {\n window._rollbarStartTime = (new Date()).getTime();\n}\n\nif (!shimRunning && options) {\n var Rollbar = new rollbar(options);\n window[alias] = Rollbar;\n} else if (typeof window !== 'undefined') {\n window.rollbar = rollbar;\n window._rollbarDidLoad = true;\n} else if (typeof self !== 'undefined') {\n self.rollbar = rollbar;\n self._rollbarDidLoad = true;\n}\n\nmodule.exports = rollbar;\n","'use strict';\n\nvar Rollbar = require('./core');\nvar telemeter = require('../telemetry');\nvar instrumenter = require('./telemetry');\nvar polyfillJSON = require('../utility/polyfillJSON');\nvar wrapGlobals = require('./wrapGlobals');\nvar scrub = require('../scrub');\nvar truncation = require('../truncation');\n\nRollbar.setComponents({\n telemeter: telemeter,\n instrumenter: instrumenter,\n polyfillJSON: polyfillJSON,\n wrapGlobals: wrapGlobals,\n scrub: scrub,\n truncation: truncation\n});\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar Client = require('../rollbar');\nvar _ = require('../utility');\nvar API = require('../api');\nvar logger = require('./logger');\nvar globals = require('./globalSetup');\n\nvar Transport = require('./transport');\nvar urllib = require('./url');\n\nvar transforms = require('./transforms');\nvar sharedTransforms = require('../transforms');\nvar predicates = require('./predicates');\nvar sharedPredicates = require('../predicates');\nvar errorParser = require('../errorParser');\n\nfunction Rollbar(options, client) {\n this.options = _.handleOptions(defaultOptions, options, null, logger);\n this.options._configuredOptions = options;\n var Telemeter = this.components.telemeter;\n var Instrumenter = this.components.instrumenter;\n var polyfillJSON = this.components.polyfillJSON;\n this.wrapGlobals = this.components.wrapGlobals;\n this.scrub = this.components.scrub;\n var truncation = this.components.truncation;\n\n var transport = new Transport(truncation);\n var api = new API(this.options, transport, urllib, truncation);\n if (Telemeter) {\n this.telemeter = new Telemeter(this.options);\n }\n this.client = client || new Client(this.options, api, logger, this.telemeter, 'browser');\n var gWindow = _gWindow();\n var gDocument = (typeof document != 'undefined') && document;\n this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers\n this.anonymousErrorsPending = 0;\n addTransformsToNotifier(this.client.notifier, this, gWindow);\n addPredicatesToQueue(this.client.queue);\n this.setupUnhandledCapture();\n if (Instrumenter) {\n this.instrumenter = new Instrumenter(this.options, this.client.telemeter, this, gWindow, gDocument);\n this.instrumenter.instrument();\n }\n _.setupJSON(polyfillJSON);\n}\n\nvar _instance = null;\nRollbar.init = function(options, client) {\n if (_instance) {\n return _instance.global(options).configure(options);\n }\n _instance = new Rollbar(options, client);\n return _instance;\n};\n\nRollbar.prototype.components = {};\n\nRollbar.setComponents = function(components) {\n Rollbar.prototype.components = components;\n}\n\nfunction handleUninitialized(maybeCallback) {\n var message = 'Rollbar is not initialized';\n logger.error(message);\n if (maybeCallback) {\n maybeCallback(new Error(message));\n }\n}\n\nRollbar.prototype.global = function(options) {\n this.client.global(options);\n return this;\n};\nRollbar.global = function(options) {\n if (_instance) {\n return _instance.global(options);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.configure = function(options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = {payload: payloadData};\n }\n this.options = _.handleOptions(oldOptions, options, payload, logger);\n this.options._configuredOptions = _.handleOptions(oldOptions._configuredOptions, options, payload);\n this.client.configure(this.options, payloadData);\n this.instrumenter && this.instrumenter.configure(this.options);\n this.setupUnhandledCapture();\n return this;\n};\nRollbar.configure = function(options, payloadData) {\n if (_instance) {\n return _instance.configure(options, payloadData);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.lastError = function() {\n return this.client.lastError;\n};\nRollbar.lastError = function() {\n if (_instance) {\n return _instance.lastError();\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.log = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.log(item);\n return {uuid: uuid};\n};\nRollbar.log = function() {\n if (_instance) {\n return _instance.log.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.debug = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.debug(item);\n return {uuid: uuid};\n};\nRollbar.debug = function() {\n if (_instance) {\n return _instance.debug.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.info = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.info(item);\n return {uuid: uuid};\n};\nRollbar.info = function() {\n if (_instance) {\n return _instance.info.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warn = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warn(item);\n return {uuid: uuid};\n};\nRollbar.warn = function() {\n if (_instance) {\n return _instance.warn.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warning = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warning(item);\n return {uuid: uuid};\n};\nRollbar.warning = function() {\n if (_instance) {\n return _instance.warning.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.error = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.error(item);\n return {uuid: uuid};\n};\nRollbar.error = function() {\n if (_instance) {\n return _instance.error.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.critical = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.critical(item);\n return {uuid: uuid};\n};\nRollbar.critical = function() {\n if (_instance) {\n return _instance.critical.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.buildJsonPayload = function(item) {\n return this.client.buildJsonPayload(item);\n};\nRollbar.buildJsonPayload = function() {\n if (_instance) {\n return _instance.buildJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.sendJsonPayload = function(jsonPayload) {\n return this.client.sendJsonPayload(jsonPayload);\n};\nRollbar.sendJsonPayload = function() {\n if (_instance) {\n return _instance.sendJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.setupUnhandledCapture = function() {\n var gWindow = _gWindow();\n\n if (!this.unhandledExceptionsInitialized) {\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(gWindow, this);\n if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {\n this.wrapGlobals(gWindow, this);\n }\n this.unhandledExceptionsInitialized = true;\n }\n }\n if (!this.unhandledRejectionsInitialized) {\n if (this.options.captureUnhandledRejections || this.options.handleUnhandledRejections) {\n globals.captureUnhandledRejections(gWindow, this);\n this.unhandledRejectionsInitialized = true;\n }\n }\n};\n\nRollbar.prototype.handleUncaughtException = function(message, url, lineno, colno, error, context) {\n if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {\n return;\n }\n\n // Chrome will always send 5+ arguments and error will be valid or null, not undefined.\n // If error is undefined, we have a different caller.\n // Chrome also sends errors from web workers with null error, but does not invoke\n // prepareStackTrace() for these. Test for empty url to skip them.\n if (this.options.inspectAnonymousErrors && this.isChrome && error === null && url === '') {\n return 'anonymous';\n }\n\n var item;\n var stackInfo = _.makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n 'onerror',\n 'uncaught exception',\n errorParser\n );\n if (_.isError(error)) {\n item = this._createItem([message, error, context]);\n item._unhandledStackInfo = stackInfo;\n } else if (_.isError(url)) {\n item = this._createItem([message, url, context]);\n item._unhandledStackInfo = stackInfo;\n } else {\n item = this._createItem([message, context]);\n item.stackInfo = stackInfo;\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n this.client.log(item);\n};\n\n/**\n * Chrome only. Other browsers will ignore.\n *\n * Use Error.prepareStackTrace to extract information about errors that\n * do not have a valid error object in onerror().\n *\n * In tested version of Chrome, onerror is called first but has no way\n * to communicate with prepareStackTrace. Use a counter to let this\n * handler know which errors to send to Rollbar.\n *\n * In config options, set inspectAnonymousErrors to enable.\n */\nRollbar.prototype.handleAnonymousErrors = function() {\n if (!this.options.inspectAnonymousErrors || !this.isChrome) {\n return;\n }\n\n var r = this;\n function prepareStackTrace(error, _stack) { // eslint-disable-line no-unused-vars\n if (r.options.inspectAnonymousErrors) {\n if (r.anonymousErrorsPending) {\n // This is the only known way to detect that onerror saw an anonymous error.\n // It depends on onerror reliably being called before Error.prepareStackTrace,\n // which so far holds true on tested versions of Chrome. If versions of Chrome\n // are tested that behave differently, this logic will need to be updated\n // accordingly.\n r.anonymousErrorsPending -= 1;\n\n if (!error) {\n // Not likely to get here, but calling handleUncaughtException from here\n // without an error object would throw off the anonymousErrorsPending counter,\n // so return now.\n return;\n }\n\n // Allow this to be tracked later.\n error._isAnonymous = true;\n\n // url, lineno, colno shouldn't be needed for these errors.\n // If that changes, update this accordingly, using the unused\n // _stack param as needed (rather than parse error.toString()).\n r.handleUncaughtException(error.message, null, null, null, error);\n }\n }\n\n // Workaround to ensure stack is preserved for normal errors.\n return error.stack;\n }\n\n // https://v8.dev/docs/stack-trace-api\n try {\n Error.prepareStackTrace = prepareStackTrace;\n } catch (e) {\n this.options.inspectAnonymousErrors = false;\n this.error('anonymous error handler failed', e);\n }\n}\n\nRollbar.prototype.handleUnhandledRejection = function(reason, promise) {\n if (!this.options.captureUnhandledRejections && !this.options.handleUnhandledRejections) {\n return;\n }\n\n var message = 'unhandled rejection was null or undefined!';\n if (reason) {\n if (reason.message) {\n message = reason.message;\n } else {\n var reasonResult = _.stringify(reason);\n if (reasonResult.value) {\n message = reasonResult.value;\n }\n }\n }\n var context = (reason && reason._rollbarContext) || (promise && promise._rollbarContext);\n\n var item;\n if (_.isError(reason)) {\n item = this._createItem([message, reason, context]);\n } else {\n item = this._createItem([message, reason, context]);\n item.stackInfo = _.makeUnhandledStackInfo(\n message,\n '',\n 0,\n 0,\n null,\n 'unhandledrejection',\n '',\n errorParser\n );\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n item._originalArgs = item._originalArgs || [];\n item._originalArgs.push(promise);\n this.client.log(item);\n};\n\nRollbar.prototype.wrap = function(f, context, _before) {\n try {\n var ctxFn;\n if(_.isFunction(context)) {\n ctxFn = context;\n } else {\n ctxFn = function() { return context || {}; };\n }\n\n if (!_.isFunction(f)) {\n return f;\n }\n\n if (f._isWrap) {\n return f;\n }\n\n if (!f._rollbar_wrapped) {\n f._rollbar_wrapped = function () {\n if (_before && _.isFunction(_before)) {\n _before.apply(this, arguments);\n }\n try {\n return f.apply(this, arguments);\n } catch(exc) {\n var e = exc;\n if (e && window._rollbarWrappedError !== e) {\n if (_.isType(e, 'string')) {\n e = new String(e);\n }\n e._rollbarContext = ctxFn() || {};\n e._rollbarContext._wrappedSource = f.toString();\n\n window._rollbarWrappedError = e;\n }\n throw e;\n }\n };\n\n f._rollbar_wrapped._isWrap = true;\n\n if (f.hasOwnProperty) {\n for (var prop in f) {\n if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {\n f._rollbar_wrapped[prop] = f[prop];\n }\n }\n }\n }\n\n return f._rollbar_wrapped;\n } catch (e) {\n // Return the original function if the wrap fails.\n return f;\n }\n};\nRollbar.wrap = function(f, context) {\n if (_instance) {\n return _instance.wrap(f, context);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.captureEvent = function() {\n var event = _.createTelemetryEvent(arguments);\n return this.client.captureEvent(event.type, event.metadata, event.level);\n};\nRollbar.captureEvent = function() {\n if (_instance) {\n return _instance.captureEvent.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\n// The following two methods are used internally and are not meant for public use\nRollbar.prototype.captureDomContentLoaded = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureLoad(ts);\n};\n\n/* Internal */\n\nfunction addTransformsToNotifier(notifier, rollbar, gWindow) {\n notifier\n .addTransform(transforms.handleDomException)\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(gWindow))\n .addTransform(transforms.addClientInfo(gWindow))\n .addTransform(transforms.addPluginInfo(gWindow))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(sharedTransforms.addConfigToPayload)\n .addTransform(transforms.addScrubber(rollbar.scrub))\n .addTransform(sharedTransforms.userTransform(logger))\n .addTransform(sharedTransforms.addConfiguredOptions)\n .addTransform(sharedTransforms.addDiagnosticKeys)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(sharedPredicates.checkLevel)\n .addPredicate(predicates.checkIgnore)\n .addPredicate(sharedPredicates.userCheckIgnore(logger))\n .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))\n .addPredicate(sharedPredicates.urlIsSafeListed(logger))\n .addPredicate(sharedPredicates.messageIsIgnored(logger));\n}\n\nRollbar.prototype.loadFull = function() {\n logger.info('Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.');\n};\n\nRollbar.prototype._createItem = function(args) {\n return _.createItem(args, logger, this);\n};\n\nfunction _getFirstFunction(args) {\n for (var i = 0, len = args.length; i < len; ++i) {\n if (_.isFunction(args[i])) {\n return args[i];\n }\n }\n return undefined;\n}\n\nfunction _gWindow() {\n return ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n}\n\nvar defaults = require('../defaults');\nvar scrubFields = require('./defaults/scrubFields');\n\nvar defaultOptions = {\n version: defaults.version,\n scrubFields: scrubFields.scrubFields,\n logLevel: defaults.logLevel,\n reportLevel: defaults.reportLevel,\n uncaughtErrorLevel: defaults.uncaughtErrorLevel,\n endpoint: defaults.endpoint,\n verbose: false,\n enabled: true,\n transmit: true,\n sendConfig: false,\n includeItemsInTelemetry: true,\n captureIp: true,\n inspectAnonymousErrors: true,\n ignoreDuplicateErrors: true,\n wrapGlobalEventHandlers: false\n};\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar _ = require('./utility');\n\n/*\n * Rollbar - the interface to Rollbar\n *\n * @param options\n * @param api\n * @param logger\n */\nfunction Rollbar(options, api, logger, telemeter, platform) {\n this.options = _.merge(options);\n this.logger = logger;\n Rollbar.rateLimiter.configureGlobal(this.options);\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.api = api;\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n\n // This must happen before the Notifier is created\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = telemeter;\n setStackTraceLimit(options);\n this.lastError = null;\n this.lastErrorHash = 'none';\n}\n\nvar defaultOptions = {\n maxItems: 0,\n itemsPerMinute: 60\n};\n\nRollbar.rateLimiter = new RateLimiter(defaultOptions);\n\nRollbar.prototype.global = function (options) {\n Rollbar.rateLimiter.configureGlobal(options);\n return this;\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n\n this.options = _.merge(oldOptions, options, payload);\n\n // This must happen before the Notifier is configured\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier && this.notifier.configure(this.options);\n this.telemeter && this.telemeter.configure(this.options);\n setStackTraceLimit(options);\n this.global(this.options);\n\n if (validateTracer(options.tracer)) {\n this.tracer = options.tracer\n }\n\n return this;\n};\n\nRollbar.prototype.log = function (item) {\n var level = this._defaultLogLevel();\n return this._log(level, item);\n};\n\nRollbar.prototype.debug = function (item) {\n this._log('debug', item);\n};\n\nRollbar.prototype.info = function (item) {\n this._log('info', item);\n};\n\nRollbar.prototype.warn = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.warning = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.error = function (item) {\n this._log('error', item);\n};\n\nRollbar.prototype.critical = function (item) {\n this._log('critical', item);\n};\n\nRollbar.prototype.wait = function (callback) {\n this.queue.wait(callback);\n};\n\nRollbar.prototype.captureEvent = function (type, metadata, level) {\n return this.telemeter && this.telemeter.captureEvent(type, metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function (ts) {\n return this.telemeter && this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (ts) {\n return this.telemeter && this.telemeter.captureLoad(ts);\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.api.buildJsonPayload(item);\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n this.api.postJsonPayload(jsonPayload);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function (defaultLevel, item) {\n var callback;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {\n if (callback) {\n var error = new Error('ignored identical item');\n error.item = item;\n callback(error);\n }\n return;\n }\n try {\n this._addTracingInfo(item);\n item.level = item.level || defaultLevel;\n this.telemeter && this.telemeter._captureRollbarItem(item);\n item.telemetryEvents = (this.telemeter && this.telemeter.copyEvents()) || [];\n this.notifier.log(item, callback);\n } catch (e) {\n if (callback) {\n callback(e);\n }\n this.logger.error(e);\n }\n};\n\nRollbar.prototype._defaultLogLevel = function () {\n return this.options.logLevel || 'debug';\n};\n\nRollbar.prototype._sameAsLastError = function (item) {\n if (!item._isUncaught) {\n return false;\n }\n var itemHash = generateItemHash(item);\n if (this.lastErrorHash === itemHash) {\n return true;\n }\n this.lastError = item.err;\n this.lastErrorHash = itemHash;\n return false;\n};\n\nRollbar.prototype._addTracingInfo = function (item) {\n // Tracer validation occurs in the constructor\n // or in the Rollbar.prototype.configure methods\n if (this.tracer) {\n // add rollbar occurrence uuid to span\n var span = this.tracer.scope().active();\n\n if (validateSpan(span)) {\n span.setTag('rollbar.error_uuid', item.uuid);\n span.setTag('rollbar.has_error', true);\n span.setTag('error', true);\n span.setTag('rollbar.item_url', `https://rollbar.com/item/uuid/?uuid=${item.uuid}`);\n span.setTag('rollbar.occurrence_url', `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`);\n\n // add span ID & trace ID to occurrence\n var opentracingSpanId = span.context().toSpanId();\n var opentracingTraceId = span.context().toTraceId();\n\n if (item.custom) {\n item.custom.opentracing_span_id = opentracingSpanId;\n item.custom.opentracing_trace_id = opentracingTraceId;\n } else {\n item.custom = {\n opentracing_span_id: opentracingSpanId,\n opentracing_trace_id: opentracingTraceId\n };\n }\n }\n }\n}\n\nfunction generateItemHash(item) {\n var message = item.message || '';\n var stack = (item.err || {}).stack || String(item.err);\n return message + '::' + stack;\n}\n\n// Node.js, Chrome, Safari, and some other browsers support this property\n// which globally sets the number of stack frames returned in an Error object.\n// If a browser can't use it, no harm done.\nfunction setStackTraceLimit(options) {\n if (options.stackTraceLimit) {\n Error.stackTraceLimit = options.stackTraceLimit;\n }\n}\n\n/**\n * Validate the Tracer object provided to the Client\n * is valid for our Opentracing use case.\n * @param {opentracer.Tracer} tracer\n */\nfunction validateTracer(tracer) {\n if (!tracer) {\n return false;\n }\n\n if (!tracer.scope || typeof tracer.scope !== 'function') {\n return false;\n }\n\n var scope = tracer.scope();\n\n if (!scope || !scope.active || typeof scope.active !== 'function') {\n return false;\n }\n\n return true;\n}\n\n/**\n * Validate the Span object provided\n * @param {opentracer.Span} span\n */\nfunction validateSpan(span) {\n if (!span || !span.context || typeof span.context !== 'function') {\n return false;\n }\n\n var spanContext = span.context();\n\n if (!spanContext\n || !spanContext.toSpanId\n || !spanContext.toTraceId\n || typeof spanContext.toSpanId !== 'function'\n || typeof spanContext.toTraceId !== 'function') {\n return false\n }\n\n return true;\n}\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar\n *\n * @param options - the same options that are accepted by configureGlobal offered as a convenience\n */\nfunction RateLimiter(options) {\n this.startTime = _.now();\n this.counter = 0;\n this.perMinCounter = 0;\n this.platform = null;\n this.platformOptions = {};\n this.configureGlobal(options);\n}\n\nRateLimiter.globalSettings = {\n startTime: _.now(),\n maxItems: undefined,\n itemsPerMinute: undefined\n};\n\n/*\n * configureGlobal - set the global rate limiter options\n *\n * @param options - Only the following values are recognized:\n * startTime: a timestamp of the form returned by (new Date()).getTime()\n * maxItems: the maximum items\n * itemsPerMinute: the max number of items to send in a given minute\n */\nRateLimiter.prototype.configureGlobal = function(options) {\n if (options.startTime !== undefined) {\n RateLimiter.globalSettings.startTime = options.startTime;\n }\n if (options.maxItems !== undefined) {\n RateLimiter.globalSettings.maxItems = options.maxItems;\n }\n if (options.itemsPerMinute !== undefined) {\n RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;\n }\n};\n\n/*\n * shouldSend - determine if we should send a given item based on rate limit settings\n *\n * @param item - the item we are about to send\n * @returns An object with the following structure:\n * error: (Error|null)\n * shouldSend: bool\n * payload: (Object|null)\n * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and\n * exactly one of error or payload will be non-null. If error is non-null, the returned Error will\n * describe the situation, but it means that we were already over a rate limit (either globally or\n * per minute) when this item was checked. If error is null, and therefore payload is non-null, it\n * means this item put us over the global rate limit and the payload should be sent to Rollbar in\n * place of the passed in item.\n */\nRateLimiter.prototype.shouldSend = function(item, now) {\n now = now || _.now();\n var elapsedTime = now - this.startTime;\n if (elapsedTime < 0 || elapsedTime >= 60000) {\n this.startTime = now;\n this.perMinCounter = 0;\n }\n\n var globalRateLimit = RateLimiter.globalSettings.maxItems;\n var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;\n\n if (checkRate(item, globalRateLimit, this.counter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimit + ' max items reached', false);\n } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimitPerMin + ' items per minute reached', false);\n }\n this.counter++;\n this.perMinCounter++;\n\n var shouldSend = !checkRate(item, globalRateLimit, this.counter);\n var perMinute = shouldSend;\n shouldSend = shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);\n return shouldSendValue(this.platform, this.platformOptions, null, shouldSend, globalRateLimit, globalRateLimitPerMin, perMinute);\n};\n\nRateLimiter.prototype.setPlatformOptions = function(platform, options) {\n this.platform = platform;\n this.platformOptions = options;\n};\n\n/* Helpers */\n\nfunction checkRate(item, limit, counter) {\n return !item.ignoreRateLimit && limit >= 1 && counter > limit;\n}\n\nfunction shouldSendValue(platform, options, error, shouldSend, globalRateLimit, limitPerMin, perMinute) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute);\n }\n return {error: error, shouldSend: shouldSend, payload: payload};\n}\n\nfunction rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute) {\n var environment = options.environment || (options.payload && options.payload.environment);\n var msg;\n if (perMinute) {\n msg = 'item per minute limit reached, ignoring errors until timeout';\n } else {\n msg = 'maxItems has been hit, ignoring errors until reset.';\n }\n var item = {\n body: {\n message: {\n body: msg,\n extra: {\n maxItems: globalRateLimit,\n itemsPerMinute: limitPerMin\n }\n }\n },\n language: 'javascript',\n environment: environment,\n notifier: {\n version: (options.notifier && options.notifier.version) || options.version\n }\n };\n if (platform === 'browser') {\n item.platform = 'browser';\n item.framework = 'browser-js';\n item.notifier.name = 'rollbar-browser-js';\n } else if (platform === 'server') {\n item.framework = options.framework || 'node-js';\n item.notifier.name = options.notifier.name;\n } else if (platform === 'react-native') {\n item.framework = options.framework || 'react-native';\n item.notifier.name = options.notifier.name;\n }\n return item;\n}\n\nmodule.exports = RateLimiter;\n","'use strict';\n\n'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isPlainObject = function isPlainObject(obj) {\n\tif (!obj || toStr.call(obj) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tvar hasOwnConstructor = hasOwn.call(obj, 'constructor');\n\tvar hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n\t// Not own constructor property must be Object\n\tif (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n\t\treturn false;\n\t}\n\n\t// Own properties are enumerated firstly, so to speed up,\n\t// if last one is own, then all properties are own.\n\tvar key;\n\tfor (key in obj) {/**/}\n\n\treturn typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\nfunction merge() {\n var i, src, copy, clone, name,\n result = {},\n current = null,\n length = arguments.length;\n\n for (i=0; i < length; i++) {\n current = arguments[i];\n if (current == null) {\n continue;\n }\n\n for (name in current) {\n src = result[name];\n copy = current[name];\n if (result !== copy) {\n if (copy && isPlainObject(copy)) {\n clone = src && isPlainObject(src) ? src : {};\n result[name] = merge(clone, copy);\n } else if (typeof copy !== 'undefined') {\n result[name] = copy;\n }\n }\n }\n }\n return result;\n}\n\nmodule.exports = merge;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Queue - an object which handles which handles a queue of items to be sent to Rollbar.\n * This object handles rate limiting via a passed in rate limiter, retries based on connection\n * errors, and filtering of items based on a set of configurable predicates. The communication to\n * the backend is performed via a given API object.\n *\n * @param rateLimiter - An object which conforms to the interface\n * rateLimiter.shouldSend(item) -> bool\n * @param api - An object which conforms to the interface\n * api.postItem(payload, function(err, response))\n * @param logger - An object used to log verbose messages if desired\n * @param options - see Queue.prototype.configure\n */\nfunction Queue(rateLimiter, api, logger, options) {\n this.rateLimiter = rateLimiter;\n this.api = api;\n this.logger = logger;\n this.options = options;\n this.predicates = [];\n this.pendingItems = [];\n this.pendingRequests = [];\n this.retryQueue = [];\n this.retryHandle = null;\n this.waitCallback = null;\n this.waitIntervalID = null;\n}\n\n/*\n * configure - updates the options this queue uses\n *\n * @param options\n */\nQueue.prototype.configure = function(options) {\n this.api && this.api.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addPredicate - adds a predicate to the end of the list of predicates for this queue\n *\n * @param predicate - function(item, options) -> (bool|{err: Error})\n * Returning true means that this predicate passes and the item is okay to go on the queue\n * Returning false means do not add the item to the queue, but it is not an error\n * Returning {err: Error} means do not add the item to the queue, and the given error explains why\n * Returning {err: undefined} is equivalent to returning true but don't do that\n */\nQueue.prototype.addPredicate = function(predicate) {\n if (_.isFunction(predicate)) {\n this.predicates.push(predicate);\n }\n return this;\n};\n\nQueue.prototype.addPendingItem = function(item) {\n this.pendingItems.push(item);\n};\n\nQueue.prototype.removePendingItem = function(item) {\n var idx = this.pendingItems.indexOf(item);\n if (idx !== -1) {\n this.pendingItems.splice(idx, 1);\n }\n};\n\n/*\n * addItem - Send an item to the Rollbar API if all of the predicates are satisfied\n *\n * @param item - The payload to send to the backend\n * @param callback - function(error, repsonse) which will be called with the response from the API\n * in the case of a success, otherwise response will be null and error will have a value. If both\n * error and response are null then the item was stopped by a predicate which did not consider this\n * to be an error condition, but nonetheless did not send the item to the API.\n * @param originalError - The original error before any transformations that is to be logged if any\n */\nQueue.prototype.addItem = function(item, callback, originalError, originalItem) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() { return; };\n }\n var predicateResult = this._applyPredicates(item);\n if (predicateResult.stop) {\n this.removePendingItem(originalItem);\n callback(predicateResult.err);\n return;\n }\n this._maybeLog(item, originalError);\n this.removePendingItem(originalItem);\n if (!this.options.transmit) {\n callback(new Error('Transmit disabled'));\n return;\n }\n this.pendingRequests.push(item);\n try {\n this._makeApiRequest(item, function(err, resp) {\n this._dequeuePendingRequest(item);\n callback(err, resp);\n }.bind(this));\n } catch (e) {\n this._dequeuePendingRequest(item);\n callback(e);\n }\n};\n\n/*\n * wait - Stop any further errors from being added to the queue, and get called back when all items\n * currently processing have finished sending to the backend.\n *\n * @param callback - function() called when all pending items have been sent\n */\nQueue.prototype.wait = function(callback) {\n if (!_.isFunction(callback)) {\n return;\n }\n this.waitCallback = callback;\n if (this._maybeCallWait()) {\n return;\n }\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitIntervalID = setInterval(function() {\n this._maybeCallWait();\n }.bind(this), 500);\n};\n\n/* _applyPredicates - Sequentially applies the predicates that have been added to the queue to the\n * given item with the currently configured options.\n *\n * @param item - An item in the queue\n * @returns {stop: bool, err: (Error|null)} - stop being true means do not add item to the queue,\n * the error value should be passed up to a callbak if we are stopping.\n */\nQueue.prototype._applyPredicates = function(item) {\n var p = null;\n for (var i = 0, len = this.predicates.length; i < len; i++) {\n p = this.predicates[i](item, this.options);\n if (!p || p.err !== undefined) {\n return {stop: true, err: p.err};\n }\n }\n return {stop: false, err: null};\n};\n\n/*\n * _makeApiRequest - Send an item to Rollbar, callback when done, if there is an error make an\n * effort to retry if we are configured to do so.\n *\n * @param item - an item ready to send to the backend\n * @param callback - function(err, response)\n */\nQueue.prototype._makeApiRequest = function(item, callback) {\n var rateLimitResponse = this.rateLimiter.shouldSend(item);\n if (rateLimitResponse.shouldSend) {\n this.api.postItem(item, function(err, resp) {\n if (err) {\n this._maybeRetry(err, item, callback);\n } else {\n callback(err, resp);\n }\n }.bind(this));\n } else if (rateLimitResponse.error) {\n callback(rateLimitResponse.error);\n } else {\n this.api.postItem(rateLimitResponse.payload, callback);\n }\n};\n\n// These are errors basically mean there is no internet connection\nvar RETRIABLE_ERRORS = ['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED', 'EHOSTUNREACH', 'EPIPE', 'EAI_AGAIN'];\n\n/*\n * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback\n * with the error.\n *\n * @param err - an error returned by the API transport\n * @param item - the item that was trying to be sent when this error occured\n * @param callback - function(err, response)\n */\nQueue.prototype._maybeRetry = function(err, item, callback) {\n var shouldRetry = false;\n if (this.options.retryInterval) {\n for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {\n if (err.code === RETRIABLE_ERRORS[i]) {\n shouldRetry = true;\n break;\n }\n }\n if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {\n item.retries = item.retries ? item.retries + 1 : 1;\n if (item.retries > this.options.maxRetries) {\n shouldRetry = false;\n }\n }\n }\n if (shouldRetry) {\n this._retryApiRequest(item, callback);\n } else {\n callback(err);\n }\n};\n\n/*\n * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process\n * that queue based on the retryInterval in the options for this queue.\n *\n * @param item - an item that failed to send due to an error we deem retriable\n * @param callback - function(err, response)\n */\nQueue.prototype._retryApiRequest = function(item, callback) {\n this.retryQueue.push({item: item, callback: callback});\n\n if (!this.retryHandle) {\n this.retryHandle = setInterval(function() {\n while (this.retryQueue.length) {\n var retryObject = this.retryQueue.shift();\n this._makeApiRequest(retryObject.item, retryObject.callback);\n }\n }.bind(this), this.options.retryInterval);\n }\n};\n\n/*\n * _dequeuePendingRequest - Removes the item from the pending request queue, this queue is used to\n * enable to functionality of providing a callback that clients can pass to `wait` to be notified\n * when the pending request queue has been emptied. This must be called when the API finishes\n * processing this item. If a `wait` callback is configured, it is called by this function.\n *\n * @param item - the item previously added to the pending request queue\n */\nQueue.prototype._dequeuePendingRequest = function(item) {\n var idx = this.pendingRequests.indexOf(item);\n if (idx !== -1) {\n this.pendingRequests.splice(idx, 1);\n this._maybeCallWait();\n }\n};\n\nQueue.prototype._maybeLog = function(data, originalError) {\n if (this.logger && this.options.verbose) {\n var message = originalError;\n message = message || _.get(data, 'body.trace.exception.message');\n message = message || _.get(data, 'body.trace_chain.0.exception.message');\n if (message) {\n this.logger.error(message);\n return;\n }\n message = _.get(data, 'body.message.body');\n if (message) {\n this.logger.log(message);\n }\n }\n};\n\nQueue.prototype._maybeCallWait = function() {\n if (_.isFunction(this.waitCallback) && this.pendingItems.length === 0 && this.pendingRequests.length === 0) {\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitCallback();\n return true;\n }\n return false;\n};\n\nmodule.exports = Queue;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Notifier - the internal object responsible for delegating between the client exposed API, the\n * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the\n * queue which handles the communcation with the Rollbar API servers.\n *\n * @param queue - an object that conforms to the interface: addItem(item, callback)\n * @param options - an object representing the options to be set for this notifier, this should have\n * any defaults already set by the caller\n */\nfunction Notifier(queue, options) {\n this.queue = queue;\n this.options = options;\n this.transforms = [];\n this.diagnostic = {};\n}\n\n/*\n * configure - updates the options for this notifier with the passed in object\n *\n * @param options - an object which gets merged with the current options set on this notifier\n * @returns this\n */\nNotifier.prototype.configure = function(options) {\n this.queue && this.queue.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addTransform - adds a transform onto the end of the queue of transforms for this notifier\n *\n * @param transform - a function which takes three arguments:\n * * item: An Object representing the data to eventually be sent to Rollbar\n * * options: The current value of the options for this notifier\n * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this\n * callback with a null value for error if it wants the processing chain to continue, otherwise\n * with an error to terminate the processing. The item should be the updated item after this\n * transform is finished modifying it.\n */\nNotifier.prototype.addTransform = function(transform) {\n if (_.isFunction(transform)) {\n this.transforms.push(transform);\n }\n return this;\n};\n\n/*\n * log - the internal log function which applies the configured transforms and then pushes onto the\n * queue to be sent to the backend.\n *\n * @param item - An object with the following structure:\n * message [String] - An optional string to be sent to rollbar\n * error [Error] - An optional error\n *\n * @param callback - A function of type function(err, resp) which will be called with exactly one\n * null argument and one non-null argument. The callback will be called once, either during the\n * transform stage if an error occurs inside a transform, or in response to the communication with\n * the backend. The second argument will be the response from the backend in case of success.\n */\nNotifier.prototype.log = function(item, callback) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!this.options.enabled) {\n return callback(new Error('Rollbar is not enabled'));\n }\n\n this.queue.addPendingItem(item);\n var originalError = item.err;\n this._applyTransforms(item, function(err, i) {\n if (err) {\n this.queue.removePendingItem(item);\n return callback(err, null);\n }\n this.queue.addItem(i, callback, originalError, item);\n }.bind(this));\n};\n\n/* Internal */\n\n/*\n * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See\n * `addTransform` for more information.\n *\n * @param item - An item to be transformed\n * @param callback - A function of type function(err, item) which will be called with a non-null\n * error and a null item in the case of a transform failure, or a null error and non-null item after\n * all transforms have been applied.\n */\nNotifier.prototype._applyTransforms = function(item, callback) {\n var transformIndex = -1;\n var transformsLength = this.transforms.length;\n var transforms = this.transforms;\n var options = this.options;\n\n var cb = function(err, i) {\n if (err) {\n callback(err, null);\n return;\n }\n\n transformIndex++;\n\n if (transformIndex === transformsLength) {\n callback(null, i);\n return;\n }\n\n transforms[transformIndex](i, options, cb);\n };\n\n cb(null, item);\n};\n\nmodule.exports = Notifier;\n","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1/item/',\n search: null,\n version: '1',\n protocol: 'https:',\n port: 443\n};\n\n/**\n * Api is an object that encapsulates methods of communicating with\n * the Rollbar API. It is a standard interface with some parts implemented\n * differently for server or browser contexts. It is an object that should\n * be instantiated when used so it can contain non-global options that may\n * be different for another instance of RollbarApi.\n *\n * @param options {\n * accessToken: the accessToken to use for posting items to rollbar\n * endpoint: an alternative endpoint to send errors to\n * must be a valid, fully qualified URL.\n * The default is: https://api.rollbar.com/api/1/item\n * proxy: if you wish to proxy requests provide an object\n * with the following keys:\n * host or hostname (required): foo.example.com\n * port (optional): 123\n * protocol (optional): https\n * }\n */\nfunction Api(options, transport, urllib, truncation, jsonBackup) {\n this.options = options;\n this.transport = transport;\n this.url = urllib;\n this.truncation = truncation;\n this.jsonBackup = jsonBackup;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, urllib);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function(data, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n this.transport.post(this.accessToken, transportOptions, payload, callback);\n};\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.buildJsonPayload = function(data, callback) {\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n\n if (stringifyResult.error) {\n if (callback) {\n callback(stringifyResult.error);\n }\n return null;\n }\n\n return stringifyResult.value;\n};\n\n/**\n *\n * @param jsonPayload\n * @param callback\n */\nApi.prototype.postJsonPayload = function(jsonPayload, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n this.transport.postJsonPayload(this.accessToken, transportOptions, jsonPayload, callback);\n};\n\nApi.prototype.configure = function(options) {\n var oldOptions = this.oldOptions;\n this.options = _.merge(oldOptions, options);\n this.transportOptions = _getTransport(this.options, this.url);\n if (this.options.accessToken !== undefined) {\n this.accessToken = this.options.accessToken;\n }\n return this;\n};\n\nfunction _getTransport(options, url) {\n return helpers.getTransportFromOptions(options, defaultOptions, url);\n}\n\nmodule.exports = Api;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (!_.isType(data.context, 'string')) {\n var contextResult = _.stringify(data.context, jsonBackup);\n if (contextResult.error) {\n data.context = 'Error: could not serialize \\'context\\'';\n } else {\n data.context = contextResult.value || '';\n }\n if (data.context.length > 255) {\n data.context = data.context.substr(0, 255);\n }\n }\n return {\n access_token: accessToken,\n data: data\n };\n}\n\nfunction getTransportFromOptions(options, defaults, url) {\n var hostname = defaults.hostname;\n var protocol = defaults.protocol;\n var port = defaults.port;\n var path = defaults.path;\n var search = defaults.search;\n var timeout = options.timeout;\n\n var proxy = options.proxy;\n if (options.endpoint) {\n var opts = url.parse(options.endpoint);\n hostname = opts.hostname;\n protocol = opts.protocol;\n port = opts.port;\n path = opts.pathname;\n search = opts.search;\n }\n return {\n timeout: timeout,\n hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy\n };\n}\n\nfunction transportOptions(transport, method) {\n var protocol = transport.protocol || 'https:';\n var port = transport.port || (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);\n var hostname = transport.hostname;\n var path = transport.path;\n var timeout = transport.timeout;\n if (transport.search) {\n path = path + transport.search;\n }\n if (transport.proxy) {\n path = protocol + '//' + hostname + path;\n hostname = transport.proxy.host || transport.proxy.hostname;\n port = transport.proxy.port;\n protocol = transport.proxy.protocol || protocol;\n }\n return {\n timeout: timeout,\n protocol: protocol,\n hostname: hostname,\n path: path,\n port: port,\n method: method\n };\n}\n\nfunction appendPathToPath(base, path) {\n var baseTrailingSlash = /\\/$/.test(base);\n var pathBeginningSlash = /^\\//.test(path);\n\n if (baseTrailingSlash && pathBeginningSlash) {\n path = path.substring(1);\n } else if (!baseTrailingSlash && !pathBeginningSlash) {\n path = '/' + path;\n }\n\n return base + path;\n}\n\nmodule.exports = {\n buildPayload: buildPayload,\n getTransportFromOptions: getTransportFromOptions,\n transportOptions: transportOptions,\n appendPathToPath: appendPathToPath\n};\n","// Console-polyfill. MIT license.\n// https://github.com/paulmillr/console-polyfill\n// Make it safe to do console.log() always.\n(function(global) {\n 'use strict';\n if (!global.console) {\n global.console = {};\n }\n var con = global.console;\n var prop, method;\n var dummy = function() {};\n var properties = ['memory'];\n var methods = ('assert,clear,count,debug,dir,dirxml,error,exception,group,' +\n 'groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,' +\n 'show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn').split(',');\n while (prop = properties.pop()) if (!con[prop]) con[prop] = {};\n while (method = methods.pop()) if (!con[method]) con[method] = dummy;\n // Using `this` for web workers & supports Browserify / Webpack.\n})(typeof window === 'undefined' ? this : window);\n","'use strict';\n\n// This detection.js module is used to encapsulate any ugly browser/feature\n// detection we may need to do.\n\n// Figure out which version of IE we're using, if any.\n// This is gleaned from http://stackoverflow.com/questions/5574842/best-way-to-check-for-ie-less-than-9-in-javascript-without-library\n// Will return an integer on IE (i.e. 8)\n// Will return undefined otherwise\nfunction getIEVersion() {\n\tvar undef;\n\tif (typeof document === 'undefined') {\n\t\treturn undef;\n\t}\n\n var v = 3,\n div = document.createElement('div'),\n all = div.getElementsByTagName('i');\n\n while (\n div.innerHTML = '',\n all[0]\n );\n\n return v > 4 ? v : undef;\n}\n\nvar Detection = {\n ieVersion: getIEVersion\n};\n\nmodule.exports = Detection;\n","'use strict';\n\nfunction captureUncaughtExceptions(window, handler, shim) {\n if (!window) { return; }\n var oldOnError;\n\n if (typeof handler._rollbarOldOnError === 'function') {\n oldOnError = handler._rollbarOldOnError;\n } else if (window.onerror) {\n oldOnError = window.onerror;\n while (oldOnError._rollbarOldOnError) {\n oldOnError = oldOnError._rollbarOldOnError;\n }\n handler._rollbarOldOnError = oldOnError;\n }\n\n handler.handleAnonymousErrors();\n\n var fn = function() {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n if (shim) {\n fn._rollbarOldOnError = oldOnError;\n }\n window.onerror = fn;\n}\n\nfunction _rollbarWindowOnError(window, r, old, args) {\n if (window._rollbarWrappedError) {\n if (!args[4]) {\n args[4] = window._rollbarWrappedError;\n }\n if (!args[5]) {\n args[5] = window._rollbarWrappedError._rollbarContext;\n }\n window._rollbarWrappedError = null;\n }\n\n var ret = r.handleUncaughtException.apply(r, args);\n\n if (old) {\n old.apply(window, args);\n }\n\n // Let other chained onerror handlers above run before setting this.\n // If an error is thrown and caught within a chained onerror handler,\n // Error.prepareStackTrace() will see that one before the one we want.\n if (ret === 'anonymous') {\n r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()\n }\n}\n\nfunction captureUnhandledRejections(window, handler, shim) {\n if (!window) { return; }\n\n if (typeof window._rollbarURH === 'function' && window._rollbarURH.belongsToShim) {\n window.removeEventListener('unhandledrejection', window._rollbarURH);\n }\n\n var rejectionHandler = function (evt) {\n var reason, promise, detail;\n try {\n reason = evt.reason;\n } catch (e) {\n reason = undefined;\n }\n try {\n promise = evt.promise;\n } catch (e) {\n promise = '[unhandledrejection] error getting `promise` from event';\n }\n try {\n detail = evt.detail;\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\n }\n } catch (e) {\n // Ignore\n }\n if (!reason) {\n reason = '[unhandledrejection] error getting `reason` from event';\n }\n\n if (handler && handler.handleUnhandledRejection) {\n handler.handleUnhandledRejection(reason, promise);\n }\n };\n rejectionHandler.belongsToShim = shim;\n window._rollbarURH = rejectionHandler;\n window.addEventListener('unhandledrejection', rejectionHandler);\n}\n\n\nmodule.exports = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections\n};\n","'use strict';\n\n/*global XDomainRequest*/\n\nvar _ = require('../utility');\nvar logger = require('./logger');\n\n/*\n * accessToken may be embedded in payload but that should not\n * be assumed\n *\n * options: {\n * hostname\n * protocol\n * path\n * port\n * method\n * }\n *\n * params is an object containing key/value pairs. These\n * will be appended to the path as 'key=value&key=value'\n *\n * payload is an unserialized object\n */\nfunction Transport(truncation) {\n this.truncation = truncation;\n}\n\nTransport.prototype.get = function(accessToken, options, params, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n _.addParamsAndAccessTokenToPath(accessToken, options, params);\n\n var method = 'GET';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, null, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.post = function(accessToken, options, payload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!payload) {\n return callback(new Error('Cannot send empty request'));\n }\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n if (stringifyResult.error) {\n return callback(stringifyResult.error);\n }\n\n var writeData = stringifyResult.value;\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, writeData, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.postJsonPayload = function (accessToken, options, jsonPayload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, jsonPayload, callback, requestFactory, options.timeout);\n}\n\n\n// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope\n// so Angular change detection isn't triggered on each API call.\n// This is the equivalent of runOutsideAngular().\n//\nfunction _makeZoneRequest() {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;\n var args = Array.prototype.slice.call(arguments);\n\n if (currentZone && currentZone._name === 'angular') {\n var rootZone = currentZone._parent;\n rootZone.run(function () {\n _makeRequest.apply(undefined, args);\n });\n } else {\n _makeRequest.apply(undefined, args);\n }\n}\n\n/* global RollbarProxy */\nfunction _proxyRequest(json, callback) {\n var rollbarProxy = new RollbarProxy();\n rollbarProxy.sendJsonPayload(\n json,\n function(_msg) { /* do nothing */ }, // eslint-disable-line no-unused-vars\n function(err) {\n callback(new Error(err));\n }\n );\n}\n\nfunction _makeRequest(accessToken, url, method, data, callback, requestFactory, timeout) {\n if (typeof RollbarProxy !== 'undefined') {\n return _proxyRequest(data, callback);\n }\n\n var request;\n if (requestFactory) {\n request = requestFactory();\n } else {\n request = _createXMLHTTPObject();\n }\n if (!request) {\n // Give up, no way to send requests\n return callback(new Error('No way to send a request'));\n }\n try {\n try {\n var onreadystatechange = function() {\n try {\n if (onreadystatechange && request.readyState === 4) {\n onreadystatechange = undefined;\n\n var parseResponse = _.jsonParse(request.responseText);\n if (_isSuccess(request)) {\n callback(parseResponse.error, parseResponse.value);\n return;\n } else if (_isNormalFailure(request)) {\n if (request.status === 403) {\n // likely caused by using a server access token\n var message = parseResponse.value && parseResponse.value.message;\n logger.error(message);\n }\n // return valid http status codes\n callback(new Error(String(request.status)));\n } else {\n // IE will return a status 12000+ on some sort of connection failure,\n // so we return a blank error\n // http://msdn.microsoft.com/en-us/library/aa383770%28VS.85%29.aspx\n var msg = 'XHR response had no status code (likely connection failure)';\n callback(_newRetriableError(msg));\n }\n }\n } catch (ex) {\n //jquery source mentions firefox may error out while accessing the\n //request members if there is a network error\n //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111\n var exc;\n if (ex && ex.stack) {\n exc = ex;\n } else {\n exc = new Error(ex);\n }\n callback(exc);\n }\n };\n\n request.open(method, url, true);\n if (request.setRequestHeader) {\n request.setRequestHeader('Content-Type', 'application/json');\n request.setRequestHeader('X-Rollbar-Access-Token', accessToken);\n }\n\n if(_.isFiniteNumber(timeout)) {\n request.timeout = timeout;\n }\n\n request.onreadystatechange = onreadystatechange;\n request.send(data);\n } catch (e1) {\n // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest\n if (typeof XDomainRequest !== 'undefined') {\n\n // Assume we are in a really old browser which has a bunch of limitations:\n // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx\n\n // Extreme paranoia: if we have XDomainRequest then we have a window, but just in case\n if (!window || !window.location) {\n return callback(new Error('No window available during request, unknown environment'));\n }\n\n // If the current page is http, try and send over http\n if (window.location.href.substring(0, 5) === 'http:' && url.substring(0, 5) === 'https') {\n url = 'http' + url.substring(5);\n }\n\n var xdomainrequest = new XDomainRequest();\n xdomainrequest.onprogress = function() {};\n xdomainrequest.ontimeout = function() {\n var msg = 'Request timed out';\n var code = 'ETIMEDOUT';\n callback(_newRetriableError(msg, code));\n };\n xdomainrequest.onerror = function() {\n callback(new Error('Error during request'));\n };\n xdomainrequest.onload = function() {\n var parseResponse = _.jsonParse(xdomainrequest.responseText);\n callback(parseResponse.error, parseResponse.value);\n };\n xdomainrequest.open(method, url, true);\n xdomainrequest.send(data);\n } else {\n callback(new Error('Cannot find a method to transport a request'));\n }\n }\n } catch (e2) {\n callback(e2);\n }\n}\n\nfunction _createXMLHTTPObject() {\n /* global ActiveXObject:false */\n\n var factories = [\n function () {\n return new XMLHttpRequest();\n },\n function () {\n return new ActiveXObject('Msxml2.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Msxml3.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Microsoft.XMLHTTP');\n }\n ];\n var xmlhttp;\n var i;\n var numFactories = factories.length;\n for (i = 0; i < numFactories; i++) {\n /* eslint-disable no-empty */\n try {\n xmlhttp = factories[i]();\n break;\n } catch (e) {\n // pass\n }\n /* eslint-enable no-empty */\n }\n return xmlhttp;\n}\n\nfunction _isSuccess(r) {\n return r && r.status && r.status === 200;\n}\n\nfunction _isNormalFailure(r) {\n return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;\n}\n\nfunction _newRetriableError(message, code) {\n var err = new Error(message);\n err.code = code || 'ENOTFOUND';\n return err;\n}\n\nmodule.exports = Transport;\n","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('../errorParser');\nvar logger = require('./logger');\n\nfunction handleDomException(item, options, callback) {\n if(item.err && errorParser.Stack(item.err).name === 'DOMException') {\n var originalError = new Error();\n originalError.name = item.err.name;\n originalError.message = item.err.message;\n originalError.stack = item.err.stack;\n originalError.nested = item.err;\n item.err = originalError;\n }\n callback(null, item);\n}\n\nfunction handleItemWithError(item, options, callback) {\n item.data = item.data || {};\n if (item.err) {\n try {\n item.stackInfo = item.err._savedStackTrace || errorParser.parse(item.err, item.skipFrames);\n\n if (options.addErrorContext) {\n addErrorContext(item);\n }\n } catch (e) {\n logger.error('Error while parsing the error object.', e);\n try {\n item.message = item.err.message || item.err.description || item.message || String(item.err);\n } catch (e2) {\n item.message = String(item.err) || String(e2);\n }\n delete item.err;\n }\n }\n callback(null, item);\n}\n\nfunction addErrorContext(item) {\n var chain = [];\n var err = item.err;\n\n chain.push(err);\n\n while (err.nested) {\n err = err.nested;\n chain.push(err);\n }\n\n _.addErrorContext(item, chain);\n}\n\nfunction ensureItemHasSomethingToSay(item, options, callback) {\n if (!item.message && !item.stackInfo && !item.custom) {\n callback(new Error('No message, stack info, or custom data'), null);\n }\n callback(null, item);\n}\n\nfunction addBaseInfo(item, options, callback) {\n var environment = (options.payload && options.payload.environment) || options.environment;\n item.data = _.merge(item.data, {\n environment: environment,\n level: item.level,\n endpoint: options.endpoint,\n platform: 'browser',\n framework: 'browser-js',\n language: 'javascript',\n server: {},\n uuid: item.uuid,\n notifier: {\n name: 'rollbar-browser-js',\n version: options.version\n },\n custom: item.custom\n });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.location) {\n return callback(null, item);\n }\n var remoteString = '$remote_ip';\n if (!options.captureIp) {\n remoteString = null;\n } else if (options.captureIp !== true) {\n remoteString += '_anonymize';\n }\n _.set(item, 'data.request', {\n url: window.location.href,\n query_string: window.location.search,\n user_ip: remoteString\n });\n callback(null, item);\n };\n}\n\nfunction addClientInfo(window) {\n return function(item, options, callback) {\n if (!window) {\n return callback(null, item);\n }\n var nav = window.navigator || {};\n var scr = window.screen || {};\n _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: nav.userAgent,\n language: nav.language,\n cookie_enabled: nav.cookieEnabled,\n screen: {\n width: scr.width,\n height: scr.height\n }\n }\n });\n callback(null, item);\n };\n}\n\nfunction addPluginInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.navigator) {\n return callback(null, item);\n }\n var plugins = [];\n var navPlugins = window.navigator.plugins || [];\n var cur;\n for (var i=0, l=navPlugins.length; i < l; ++i) {\n cur = navPlugins[i];\n plugins.push({name: cur.name, description: cur.description});\n }\n _.set(item, 'data.client.javascript.plugins', plugins);\n callback(null, item);\n };\n}\n\nfunction addBody(item, options, callback) {\n if (item.stackInfo) {\n if (item.stackInfo.traceChain) {\n addBodyTraceChain(item, options, callback);\n } else {\n addBodyTrace(item, options, callback);\n }\n } else {\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction addBodyMessage(item, options, callback) {\n var message = item.message;\n var custom = item.custom;\n\n if (!message) {\n message = 'Item sent with null or missing arguments.';\n }\n var result = {\n body: message\n };\n\n if (custom) {\n result.extra = _.merge(custom);\n }\n\n _.set(item, 'data.body', {message: result});\n callback(null, item);\n}\n\nfunction stackFromItem(item) {\n // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = item.stackInfo.stack;\n if (stack && stack.length === 0 && item._unhandledStackInfo && item._unhandledStackInfo.stack) {\n stack = item._unhandledStackInfo.stack;\n }\n return stack;\n}\n\nfunction addBodyTraceChain(item, options, callback) {\n var traceChain = item.stackInfo.traceChain;\n var traces = [];\n\n var traceChainLength = traceChain.length;\n for (var i = 0; i < traceChainLength; i++) {\n var trace = buildTrace(item, traceChain[i], options);\n traces.push(trace);\n }\n\n _.set(item, 'data.body', {trace_chain: traces});\n callback(null, item);\n}\n\nfunction addBodyTrace(item, options, callback) {\n var stack = stackFromItem(item);\n\n if (stack) {\n var trace = buildTrace(item, item.stackInfo, options);\n _.set(item, 'data.body', {trace: trace});\n callback(null, item);\n } else {\n var stackInfo = item.stackInfo;\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction buildTrace(item, stackInfo, options) {\n var description = item && item.data.description;\n var custom = item && item.custom;\n var stack = stackFromItem(item);\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n var trace = {\n exception: {\n 'class': className,\n message: message\n }\n };\n\n if (description) {\n trace.exception.description = description;\n }\n\n if (stack) {\n if (stack.length === 0) {\n trace.exception.stack = stackInfo.rawStack;\n trace.exception.raw = String(stackInfo.rawException);\n }\n var stackFrame;\n var frame;\n var code;\n var pre;\n var post;\n var contextLength;\n var i, mid;\n\n trace.frames = [];\n for (i = 0; i < stack.length; ++i) {\n stackFrame = stack[i];\n frame = {\n filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',\n lineno: stackFrame.line || null,\n method: (!stackFrame.func || stackFrame.func === '?') ? '[anonymous]' : stackFrame.func,\n colno: stackFrame.column\n };\n if (options.sendFrameUrl) {\n frame.url = stackFrame.url;\n }\n if (frame.method && frame.method.endsWith && frame.method.endsWith('_rollbar_wrapped')) {\n continue;\n }\n\n code = pre = post = null;\n contextLength = stackFrame.context ? stackFrame.context.length : 0;\n if (contextLength) {\n mid = Math.floor(contextLength / 2);\n pre = stackFrame.context.slice(0, mid);\n code = stackFrame.context[mid];\n post = stackFrame.context.slice(mid);\n }\n\n if (code) {\n frame.code = code;\n }\n\n if (pre || post) {\n frame.context = {};\n if (pre && pre.length) {\n frame.context.pre = pre;\n }\n if (post && post.length) {\n frame.context.post = post;\n }\n }\n\n if (stackFrame.args) {\n frame.args = stackFrame.args;\n }\n\n trace.frames.push(frame);\n }\n\n // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last\n trace.frames.reverse();\n\n if (custom) {\n trace.extra = _.merge(custom);\n }\n }\n\n return trace;\n}\n\nfunction errorClass(stackInfo, guess, options) {\n if (stackInfo.name) {\n return stackInfo.name;\n } else if (options.guessErrorClass) {\n return guess;\n } else {\n return '(unknown)';\n }\n}\n\nfunction addScrubber(scrubFn) {\n return function (item, options, callback) {\n if (scrubFn) {\n var scrubFields = options.scrubFields || [];\n var scrubPaths = options.scrubPaths || [];\n item.data = scrubFn(item.data, scrubFields, scrubPaths);\n }\n callback(null, item);\n }\n}\n\nmodule.exports = {\n handleDomException: handleDomException,\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n addScrubber: addScrubber\n};\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('error-stack-parser', ['stackframe'], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory(require('stackframe'));\n } else {\n root.ErrorStackParser = factory(root.StackFrame);\n }\n}(this, function ErrorStackParser(StackFrame) {\n 'use strict';\n\n var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\\S+:\\d+/;\n var CHROME_IE_STACK_REGEXP = /^\\s*at .*(\\S+:\\d+|\\(native\\))/m;\n var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\\[native code])?$/;\n\n return {\n /**\n * Given an Error object, extract the most information from it.\n *\n * @param {Error} error object\n * @return {Array} of StackFrames\n */\n parse: function ErrorStackParser$$parse(error) {\n if (typeof error.stacktrace !== 'undefined' || typeof error['opera#sourceloc'] !== 'undefined') {\n return this.parseOpera(error);\n } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {\n return this.parseV8OrIE(error);\n } else if (error.stack) {\n return this.parseFFOrSafari(error);\n } else {\n throw new Error('Cannot parse given Error object');\n }\n },\n\n // Separate line and column numbers from a string of the form: (URI:Line:Column)\n extractLocation: function ErrorStackParser$$extractLocation(urlLike) {\n // Fail-fast but return locations like \"(native)\"\n if (urlLike.indexOf(':') === -1) {\n return [urlLike];\n }\n\n var regExp = /(.+?)(?::(\\d+))?(?::(\\d+))?$/;\n var parts = regExp.exec(urlLike.replace(/[()]/g, ''));\n return [parts[1], parts[2] || undefined, parts[3] || undefined];\n },\n\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(CHROME_IE_STACK_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n if (line.indexOf('(eval ') > -1) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n line = line.replace(/eval code/g, 'eval').replace(/(\\(eval at [^()]*)|(\\),.*$)/g, '');\n }\n var sanitizedLine = line.replace(/^\\s+/, '').replace(/\\(eval code/g, '(');\n\n // capture and preseve the parenthesized location \"(/foo/my bar.js:12:87)\" in\n // case it has spaces in it, as the string is split on \\s+ later on\n var location = sanitizedLine.match(/ (\\((.+):(\\d+):(\\d+)\\)$)/);\n\n // remove the parenthesized location from the line, if it was matched\n sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;\n\n var tokens = sanitizedLine.split(/\\s+/).slice(1);\n // if a location was matched, pass it to extractLocation() otherwise pop the last token\n var locationParts = this.extractLocation(location ? location[1] : tokens.pop());\n var functionName = tokens.join(' ') || undefined;\n var fileName = ['eval', ''].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];\n\n return new StackFrame({\n functionName: functionName,\n fileName: fileName,\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n },\n\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n if (line.indexOf(' > eval') > -1) {\n line = line.replace(/ line (\\d+)(?: > eval line \\d+)* > eval:\\d+:\\d+/g, ':$1');\n }\n\n if (line.indexOf('@') === -1 && line.indexOf(':') === -1) {\n // Safari eval frames only have function names and nothing else\n return new StackFrame({\n functionName: line\n });\n } else {\n var functionNameRegex = /((.*\".+\"[^@]*)?[^@]*)(?:@)/;\n var matches = line.match(functionNameRegex);\n var functionName = matches && matches[1] ? matches[1] : undefined;\n var locationParts = this.extractLocation(line.replace(functionNameRegex, ''));\n\n return new StackFrame({\n functionName: functionName,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }\n }, this);\n },\n\n parseOpera: function ErrorStackParser$$parseOpera(e) {\n if (!e.stacktrace || (e.message.indexOf('\\n') > -1 &&\n e.message.split('\\n').length > e.stacktrace.split('\\n').length)) {\n return this.parseOpera9(e);\n } else if (!e.stack) {\n return this.parseOpera10(e);\n } else {\n return this.parseOpera11(e);\n }\n },\n\n parseOpera9: function ErrorStackParser$$parseOpera9(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)/i;\n var lines = e.message.split('\\n');\n var result = [];\n\n for (var i = 2, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(new StackFrame({\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n }));\n }\n }\n\n return result;\n },\n\n parseOpera10: function ErrorStackParser$$parseOpera10(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)(?:: In function (\\S+))?$/i;\n var lines = e.stacktrace.split('\\n');\n var result = [];\n\n for (var i = 0, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(\n new StackFrame({\n functionName: match[3] || undefined,\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n })\n );\n }\n }\n\n return result;\n },\n\n // Opera 10.65+ Error.stack very similar to FF/Safari\n parseOpera11: function ErrorStackParser$$parseOpera11(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);\n }, this);\n\n return filtered.map(function(line) {\n var tokens = line.split('@');\n var locationParts = this.extractLocation(tokens.pop());\n var functionCall = (tokens.shift() || '');\n var functionName = functionCall\n .replace(//, '$2')\n .replace(/\\([^)]*\\)/g, '') || undefined;\n var argsRaw;\n if (functionCall.match(/\\(([^)]*)\\)/)) {\n argsRaw = functionCall.replace(/^[^(]+\\(([^)]*)\\)$/, '$1');\n }\n var args = (argsRaw === undefined || argsRaw === '[arguments not available]') ?\n undefined : argsRaw.split(',');\n\n return new StackFrame({\n functionName: functionName,\n args: args,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n }\n };\n}));\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('stackframe', [], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.StackFrame = factory();\n }\n}(this, function() {\n 'use strict';\n function _isNumber(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n }\n\n function _capitalize(str) {\n return str.charAt(0).toUpperCase() + str.substring(1);\n }\n\n function _getter(p) {\n return function() {\n return this[p];\n };\n }\n\n var booleanProps = ['isConstructor', 'isEval', 'isNative', 'isToplevel'];\n var numericProps = ['columnNumber', 'lineNumber'];\n var stringProps = ['fileName', 'functionName', 'source'];\n var arrayProps = ['args'];\n var objectProps = ['evalOrigin'];\n\n var props = booleanProps.concat(numericProps, stringProps, arrayProps, objectProps);\n\n function StackFrame(obj) {\n if (!obj) return;\n for (var i = 0; i < props.length; i++) {\n if (obj[props[i]] !== undefined) {\n this['set' + _capitalize(props[i])](obj[props[i]]);\n }\n }\n }\n\n StackFrame.prototype = {\n getArgs: function() {\n return this.args;\n },\n setArgs: function(v) {\n if (Object.prototype.toString.call(v) !== '[object Array]') {\n throw new TypeError('Args must be an Array');\n }\n this.args = v;\n },\n\n getEvalOrigin: function() {\n return this.evalOrigin;\n },\n setEvalOrigin: function(v) {\n if (v instanceof StackFrame) {\n this.evalOrigin = v;\n } else if (v instanceof Object) {\n this.evalOrigin = new StackFrame(v);\n } else {\n throw new TypeError('Eval Origin must be an Object or StackFrame');\n }\n },\n\n toString: function() {\n var fileName = this.getFileName() || '';\n var lineNumber = this.getLineNumber() || '';\n var columnNumber = this.getColumnNumber() || '';\n var functionName = this.getFunctionName() || '';\n if (this.getIsEval()) {\n if (fileName) {\n return '[eval] (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return '[eval]:' + lineNumber + ':' + columnNumber;\n }\n if (functionName) {\n return functionName + ' (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return fileName + ':' + lineNumber + ':' + columnNumber;\n }\n };\n\n StackFrame.fromString = function StackFrame$$fromString(str) {\n var argsStartIndex = str.indexOf('(');\n var argsEndIndex = str.lastIndexOf(')');\n\n var functionName = str.substring(0, argsStartIndex);\n var args = str.substring(argsStartIndex + 1, argsEndIndex).split(',');\n var locationString = str.substring(argsEndIndex + 1);\n\n if (locationString.indexOf('@') === 0) {\n var parts = /@(.+?)(?::(\\d+))?(?::(\\d+))?$/.exec(locationString, '');\n var fileName = parts[1];\n var lineNumber = parts[2];\n var columnNumber = parts[3];\n }\n\n return new StackFrame({\n functionName: functionName,\n args: args || undefined,\n fileName: fileName,\n lineNumber: lineNumber || undefined,\n columnNumber: columnNumber || undefined\n });\n };\n\n for (var i = 0; i < booleanProps.length; i++) {\n StackFrame.prototype['get' + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);\n StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function(p) {\n return function(v) {\n this[p] = Boolean(v);\n };\n })(booleanProps[i]);\n }\n\n for (var j = 0; j < numericProps.length; j++) {\n StackFrame.prototype['get' + _capitalize(numericProps[j])] = _getter(numericProps[j]);\n StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function(p) {\n return function(v) {\n if (!_isNumber(v)) {\n throw new TypeError(p + ' must be a Number');\n }\n this[p] = Number(v);\n };\n })(numericProps[j]);\n }\n\n for (var k = 0; k < stringProps.length; k++) {\n StackFrame.prototype['get' + _capitalize(stringProps[k])] = _getter(stringProps[k]);\n StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function(p) {\n return function(v) {\n this[p] = String(v);\n };\n })(stringProps[k]);\n }\n\n return StackFrame;\n}));\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction itemToPayload(item, options, callback) {\n var payloadOptions = options.payload || {};\n if (payloadOptions.body) {\n delete payloadOptions.body;\n }\n\n var data = _.merge(item.data, payloadOptions);\n if (item._isUncaught) {\n data._isUncaught = true;\n }\n if (item._originalArgs) {\n data._originalArgs = item._originalArgs;\n }\n callback(null, data);\n}\n\nfunction addTelemetryData(item, options, callback) {\n if (item.telemetryEvents) {\n _.set(item, 'data.body.telemetry', item.telemetryEvents);\n }\n callback(null, item);\n}\n\nfunction addMessageWithError(item, options, callback) {\n if (!item.message) {\n callback(null, item);\n return;\n }\n var tracePath = 'data.body.trace_chain.0';\n var trace = _.get(item, tracePath);\n if (!trace) {\n tracePath = 'data.body.trace';\n trace = _.get(item, tracePath);\n }\n if (trace) {\n if (!(trace.exception && trace.exception.description)) {\n _.set(item, tracePath+'.exception.description', item.message);\n callback(null, item);\n return;\n }\n var extra = _.get(item, tracePath+'.extra') || {};\n var newExtra = _.merge(extra, {message: item.message});\n _.set(item, tracePath+'.extra', newExtra);\n }\n callback(null, item);\n}\n\nfunction userTransform(logger) {\n return function(item, options, callback) {\n var newItem = _.merge(item);\n var response = null;\n try {\n if (_.isFunction(options.transform)) {\n response = options.transform(newItem.data, item);\n }\n } catch (e) {\n options.transform = null;\n logger.error('Error while calling custom transform() function. Removing custom transform().', e);\n callback(null, item);\n return;\n }\n if(_.isPromise(response)) {\n response.then(function (promisedItem) {\n if(promisedItem) {\n newItem.data = promisedItem;\n }\n callback(null, newItem);\n }, function (error) {\n callback(error, item);\n });\n } else {\n callback(null, newItem);\n }\n }\n}\n\nfunction addConfigToPayload(item, options, callback) {\n if (!options.sendConfig) {\n return callback(null, item);\n }\n var configKey = '_rollbarConfig';\n var custom = _.get(item, 'data.custom') || {};\n custom[configKey] = options;\n item.data.custom = custom;\n callback(null, item);\n}\n\nfunction addFunctionOption(options, name) {\n if(_.isFunction(options[name])) {\n options[name] = options[name].toString();\n }\n}\n\nfunction addConfiguredOptions(item, options, callback) {\n var configuredOptions = options._configuredOptions;\n\n // These must be stringified or they'll get dropped during serialization.\n addFunctionOption(configuredOptions, 'transform');\n addFunctionOption(configuredOptions, 'checkIgnore');\n addFunctionOption(configuredOptions, 'onSendCallback');\n\n delete configuredOptions.accessToken;\n item.data.notifier.configured_options = configuredOptions;\n callback(null, item);\n}\n\nfunction addDiagnosticKeys(item, options, callback) {\n var diagnostic = _.merge(item.notifier.client.notifier.diagnostic, item.diagnostic);\n\n if (_.get(item, 'err._isAnonymous')) {\n diagnostic.is_anonymous = true;\n }\n\n if (item._isUncaught) {\n diagnostic.is_uncaught = item._isUncaught;\n }\n\n if (item.err) {\n try {\n diagnostic.raw_error = {\n message: item.err.message,\n name: item.err.name,\n constructor_name: item.err.constructor && item.err.constructor.name,\n filename: item.err.fileName,\n line: item.err.lineNumber,\n column: item.err.columnNumber,\n stack: item.err.stack\n };\n } catch (e) {\n diagnostic.raw_error = { failed: String(e) };\n }\n }\n\n item.data.notifier.diagnostic = _.merge(item.data.notifier.diagnostic, diagnostic);\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError,\n userTransform: userTransform,\n addConfigToPayload: addConfigToPayload,\n addConfiguredOptions: addConfiguredOptions,\n addDiagnosticKeys: addDiagnosticKeys\n};\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction checkIgnore(item, settings) {\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore\n};\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction checkLevel(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = settings.reportLevel;\n var reportLevelVal = _.LEVELS[reportLevel] || 0;\n\n if (levelVal < reportLevelVal) {\n return false;\n }\n return true;\n}\n\nfunction userCheckIgnore(logger) {\n return function(item, settings) {\n var isUncaught = !!item._isUncaught;\n delete item._isUncaught;\n var args = item._originalArgs;\n delete item._originalArgs;\n try {\n if (_.isFunction(settings.onSendCallback)) {\n settings.onSendCallback(isUncaught, args, item);\n }\n } catch (e) {\n settings.onSendCallback = null;\n logger.error('Error while calling onSendCallback, removing', e);\n }\n try {\n if (_.isFunction(settings.checkIgnore) && settings.checkIgnore(isUncaught, args, item)) {\n return false;\n }\n } catch (e) {\n settings.checkIgnore = null;\n logger.error('Error while calling custom checkIgnore(), removing', e);\n }\n return true;\n }\n}\n\nfunction urlIsNotBlockListed(logger) {\n return function(item, settings) {\n return !urlIsOnAList(item, settings, 'blocklist', logger);\n }\n}\n\nfunction urlIsSafeListed(logger) {\n return function(item, settings) {\n return urlIsOnAList(item, settings, 'safelist', logger);\n }\n}\n\nfunction matchFrames(trace, list, block) {\n if (!trace) { return !block }\n\n var frames = trace.frames;\n\n if (!frames || frames.length === 0) { return !block; }\n\n var frame, filename, url, urlRegex;\n var listLength = list.length;\n var frameLength = frames.length;\n for (var i = 0; i < frameLength; i++) {\n frame = frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) { return !block; }\n\n for (var j = 0; j < listLength; j++) {\n url = list[j];\n urlRegex = new RegExp(url);\n\n if (urlRegex.test(filename)) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction urlIsOnAList(item, settings, safeOrBlock, logger) {\n // safelist is the default\n var block = false;\n if (safeOrBlock === 'blocklist') {\n block = true;\n }\n\n var list, traces;\n try {\n list = block ? settings.hostBlockList : settings.hostSafeList;\n traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];\n\n // These two checks are important to come first as they are defaults\n // in case the list is missing or the trace is missing or not well-formed\n if (!list || list.length === 0) {\n return !block;\n }\n if (traces.length === 0 || !traces[0]) {\n return !block;\n }\n\n var tracesLength = traces.length;\n for (var i = 0; i < tracesLength; i++) {\n if(matchFrames(traces[i], list, block)) {\n return true;\n }\n }\n } catch (e)\n /* istanbul ignore next */\n {\n if (block) {\n settings.hostBlockList = null;\n } else {\n settings.hostSafeList = null;\n }\n var listName = block ? 'hostBlockList' : 'hostSafeList';\n logger.error('Error while reading your configuration\\'s ' + listName + ' option. Removing custom ' + listName + '.', e);\n return !block;\n }\n return false;\n}\n\nfunction messageIsIgnored(logger) {\n return function(item, settings) {\n var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n messages = messagesFromItem(item);\n\n if (messages.length === 0){\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n\n for (j = 0; j < messages.length; j++) {\n messageIsIgnored = rIgnoredMessage.test(messages[j]);\n\n if (messageIsIgnored) {\n return false;\n }\n }\n }\n } catch(e)\n /* istanbul ignore next */\n {\n settings.ignoredMessages = null;\n logger.error('Error while reading your configuration\\'s ignoredMessages option. Removing custom ignoredMessages.');\n }\n\n return true;\n }\n}\n\nfunction messagesFromItem(item) {\n var body = item.body;\n var messages = [];\n\n // The payload schema only allows one of trace_chain, message, or trace.\n // However, existing test cases are based on having both trace and message present.\n // So here we preserve the ability to collect strings from any combination of these keys.\n if (body.trace_chain) {\n var traceChain = body.trace_chain;\n for (var i = 0; i < traceChain.length; i++) {\n var trace = traceChain[i];\n messages.push(_.get(trace, 'exception.message'));\n }\n }\n if (body.trace) {\n messages.push(_.get(body, 'trace.exception.message'));\n }\n if (body.message) {\n messages.push(_.get(body, 'message.body'));\n }\n return messages;\n}\n\nmodule.exports = {\n checkLevel: checkLevel,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlockListed: urlIsNotBlockListed,\n urlIsSafeListed: urlIsSafeListed,\n messageIsIgnored: messageIsIgnored\n};\n","'use strict';\n\nmodule.exports = {\n version: '2.24.1',\n endpoint: 'api.rollbar.com/api/1/item/',\n logLevel: 'debug',\n reportLevel: 'debug',\n uncaughtErrorLevel: 'error',\n maxItems: 0,\n itemsPerMin: 60\n}\n","'use strict';\n\nmodule.exports = {\n scrubFields: [\n 'pw',\n 'pass',\n 'passwd',\n 'password',\n 'secret',\n 'confirm_password',\n 'confirmPassword',\n 'password_confirmation',\n 'passwordConfirmation',\n 'access_token',\n 'accessToken',\n 'X-Rollbar-Access-Token',\n 'secret_key',\n 'secretKey',\n 'secretToken',\n 'cc-number',\n 'card number',\n 'cardnumber',\n 'cardnum',\n 'ccnum',\n 'ccnumber',\n 'cc num',\n 'creditcardnumber',\n 'credit card number',\n 'newcreditcardnumber',\n 'new credit card',\n 'creditcardno',\n 'credit card no',\n 'card#',\n 'card #',\n 'cc-csc',\n 'cvc',\n 'cvc2',\n 'cvv2',\n 'ccv2',\n 'security code',\n 'card verification',\n 'name on credit card',\n 'name on card',\n 'nameoncard',\n 'cardholder',\n 'card holder',\n 'name des karteninhabers',\n 'ccname',\n 'card type',\n 'cardtype',\n 'cc type',\n 'cctype',\n 'payment type',\n 'expiration date',\n 'expirationdate',\n 'expdate',\n 'cc-exp',\n 'ccmonth',\n 'ccyear'\n ]\n}\n","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.merge(options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n}\n\nTelemeter.prototype.configure = function(options) {\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n var deleteCount = 0;\n if (this.maxQueueSize > newMaxEvents) {\n deleteCount = this.maxQueueSize - newMaxEvents;\n }\n this.maxQueueSize = newMaxEvents;\n this.queue.splice(0, deleteCount);\n};\n\nTelemeter.prototype.copyEvents = function() {\n var events = Array.prototype.slice.call(this.queue, 0);\n if (_.isFunction(this.options.filterTelemetry)) {\n try {\n var i = events.length;\n while (i--) {\n if (this.options.filterTelemetry(events[i])) {\n events.splice(i, 1);\n }\n }\n } catch (e) {\n this.options.filterTelemetry = null;\n }\n }\n return events;\n};\n\nTelemeter.prototype.capture = function(type, metadata, level, rollbarUUID, timestamp) {\n var e = {\n level: getLevel(type, level),\n type: type,\n timestamp_ms: timestamp || _.now(),\n body: metadata,\n source: 'client'\n };\n if (rollbarUUID) {\n e.uuid = rollbarUUID;\n }\n\n try {\n if (_.isFunction(this.options.filterTelemetry) && this.options.filterTelemetry(e)) {\n return false;\n }\n } catch (exc) {\n this.options.filterTelemetry = null;\n }\n\n this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function(type, metadata, level, rollbarUUID) {\n return this.capture(type, metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.captureError = function(err, level, rollbarUUID, timestamp) {\n var metadata = {\n message: err.message || String(err)\n };\n if (err.stack) {\n metadata.stack = err.stack;\n }\n return this.capture('error', metadata, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureLog = function(message, level, rollbarUUID, timestamp) {\n return this.capture('log', {\n message: message\n }, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID, requestData) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\n if (requestData) {\n metadata.request = requestData;\n }\n var level = this.levelFromStatus(metadata.status_code);\n return this.capture('network', metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.levelFromStatus = function(statusCode) {\n if (statusCode >= 200 && statusCode < 400) {\n return 'info';\n }\n if (statusCode === 0 || statusCode >= 400) {\n return 'error';\n }\n return 'info';\n};\n\nTelemeter.prototype.captureDom = function(subtype, element, value, checked, rollbarUUID) {\n var metadata = {\n subtype: subtype,\n element: element\n };\n if (value !== undefined) {\n metadata.value = value;\n }\n if (checked !== undefined) {\n metadata.checked = checked;\n }\n return this.capture('dom', metadata, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureNavigation = function(from, to, rollbarUUID) {\n return this.capture('navigation', {from: from, to: to}, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureDomContentLoaded = function(ts) {\n return this.capture('navigation', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n */\n};\nTelemeter.prototype.captureLoad = function(ts) {\n return this.capture('navigation', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n */\n};\n\nTelemeter.prototype.captureConnectivityChange = function(type, rollbarUUID) {\n return this.captureNetwork({change: type}, 'connectivity', rollbarUUID);\n};\n\n// Only intended to be used internally by the notifier\nTelemeter.prototype._captureRollbarItem = function(item) {\n if (!this.options.includeItemsInTelemetry) {\n return;\n }\n if (item.err) {\n return this.captureError(item.err, item.level, item.uuid, item.timestamp);\n }\n if (item.message) {\n return this.captureLog(item.message, item.level, item.uuid, item.timestamp);\n }\n if (item.custom) {\n return this.capture('log', item.custom, item.level, item.uuid, item.timestamp);\n }\n};\n\nTelemeter.prototype.push = function(e) {\n this.queue.push(e);\n if (this.queue.length > this.maxQueueSize) {\n this.queue.shift();\n }\n};\n\nfunction getLevel(type, level) {\n if (level) {\n return level;\n }\n var defaultLevel = {\n error: 'error',\n manual: 'info'\n };\n return defaultLevel[type] || 'info';\n}\n\nmodule.exports = Telemeter;\n","'use strict';\n\nvar _ = require('../utility');\nvar scrub = require('../scrub');\nvar urlparser = require('./url');\nvar domUtil = require('./domUtility');\n\nvar defaults = {\n network: true,\n networkResponseHeaders: false,\n networkResponseBody: false,\n networkRequestHeaders: false,\n networkRequestBody: false,\n networkErrorOnHttp5xx: false,\n networkErrorOnHttp4xx: false,\n networkErrorOnHttp0: false,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true,\n contentSecurityPolicy: true,\n errorOnContentSecurityPolicy: false\n};\n\nfunction replace(obj, name, replacement, replacements, type) {\n var orig = obj[name];\n obj[name] = replacement(orig);\n if (replacements) {\n replacements[type].push([obj, name, orig]);\n }\n}\n\nfunction restore(replacements, type) {\n var b;\n while (replacements[type].length) {\n b = replacements[type].shift();\n b[0][b[1]] = b[2];\n }\n}\n\nfunction nameFromDescription(description) {\n if (!description || !description.attributes) { return null; }\n var attrs = description.attributes;\n for (var a = 0; a < attrs.length; ++a) {\n if (attrs[a].key === 'name') {\n return attrs[a].value;\n }\n }\n return null;\n}\n\nfunction defaultValueScrubber(scrubFields) {\n var patterns = [];\n for (var i = 0; i < scrubFields.length; ++i) {\n patterns.push(new RegExp(scrubFields[i], 'i'));\n }\n return function(description) {\n var name = nameFromDescription(description);\n if (!name) { return false; }\n for (var i = 0; i < patterns.length; ++i) {\n if (patterns[i].test(name)) {\n return true;\n }\n }\n return false;\n };\n}\n\nfunction Instrumenter(options, telemeter, rollbar, _window, _document) {\n this.options = options;\n var autoInstrument = options.autoInstrument;\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);\n this.telemeter = telemeter;\n this.rollbar = rollbar;\n this.diagnostic = rollbar.client.notifier.diagnostic;\n this._window = _window || {};\n this._document = _document || {};\n this.replacements = {\n network: [],\n log: [],\n navigation: [],\n connectivity: []\n };\n this.eventRemovers = {\n dom: [],\n connectivity: [],\n contentsecuritypolicy: []\n };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function(options) {\n this.options = _.merge(this.options, options);\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.merge(this.autoInstrument);\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n if (options.scrubTelemetryInputs !== undefined) {\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n }\n if (options.telemetryScrubber !== undefined) {\n this.telemetryScrubber = options.telemetryScrubber;\n }\n};\n\n// eslint-disable-next-line complexity\nInstrumenter.prototype.instrument = function(oldSettings) {\n if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {\n this.instrumentNetwork();\n } else if (!this.autoInstrument.network && oldSettings && oldSettings.network) {\n this.deinstrumentNetwork();\n }\n\n if (this.autoInstrument.log && !(oldSettings && oldSettings.log)) {\n this.instrumentConsole();\n } else if (!this.autoInstrument.log && oldSettings && oldSettings.log) {\n this.deinstrumentConsole();\n }\n\n if (this.autoInstrument.dom && !(oldSettings && oldSettings.dom)) {\n this.instrumentDom();\n } else if (!this.autoInstrument.dom && oldSettings && oldSettings.dom) {\n this.deinstrumentDom();\n }\n\n if (this.autoInstrument.navigation && !(oldSettings && oldSettings.navigation)) {\n this.instrumentNavigation();\n } else if (!this.autoInstrument.navigation && oldSettings && oldSettings.navigation) {\n this.deinstrumentNavigation();\n }\n\n if (this.autoInstrument.connectivity && !(oldSettings && oldSettings.connectivity)) {\n this.instrumentConnectivity();\n } else if (!this.autoInstrument.connectivity && oldSettings && oldSettings.connectivity) {\n this.deinstrumentConnectivity();\n }\n\n if (this.autoInstrument.contentSecurityPolicy && !(oldSettings && oldSettings.contentSecurityPolicy)) {\n this.instrumentContentSecurityPolicy();\n } else if (!this.autoInstrument.contentSecurityPolicy && oldSettings && oldSettings.contentSecurityPolicy) {\n this.deinstrumentContentSecurityPolicy();\n }\n};\n\nInstrumenter.prototype.deinstrumentNetwork = function() {\n restore(this.replacements, 'network');\n};\n\nInstrumenter.prototype.instrumentNetwork = function() {\n var self = this;\n\n function wrapProp(prop, xhr) {\n if (prop in xhr && _.isFunction(xhr[prop])) {\n replace(xhr, prop, function(orig) {\n return self.rollbar.wrap(orig);\n });\n }\n }\n\n if ('XMLHttpRequest' in this._window) {\n var xhrp = this._window.XMLHttpRequest.prototype;\n replace(xhrp, 'open', function(orig) {\n return function(method, url) {\n if (_.isType(url, 'string')) {\n if (this.__rollbar_xhr) {\n this.__rollbar_xhr.method = method;\n this.__rollbar_xhr.url = url;\n this.__rollbar_xhr.status_code = null;\n this.__rollbar_xhr.start_time_ms = _.now();\n this.__rollbar_xhr.end_time_ms = null;\n } else {\n this.__rollbar_xhr = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'setRequestHeader', function(orig) {\n return function(header, value) {\n // If xhr.open is async, __rollbar_xhr may not be initialized yet.\n if (!this.__rollbar_xhr) {\n this.__rollbar_xhr = {};\n }\n if (_.isType(header, 'string') && _.isType(value, 'string')) {\n if (self.autoInstrument.networkRequestHeaders) {\n if (!this.__rollbar_xhr.request_headers) {\n this.__rollbar_xhr.request_headers = {};\n }\n this.__rollbar_xhr.request_headers[header] = value;\n }\n // We want the content type even if request header telemetry is off.\n if (header.toLowerCase() === 'content-type') {\n this.__rollbar_xhr.request_content_type = value;\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'send', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(data) {\n /* eslint-enable no-unused-vars */\n var xhr = this;\n\n function onreadystatechangeHandler() {\n if (xhr.__rollbar_xhr) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n if (self.autoInstrument.networkRequestBody) {\n xhr.__rollbar_xhr.request = data;\n }\n xhr.__rollbar_event = self.captureNetwork(xhr.__rollbar_xhr, 'xhr', undefined);\n }\n if (xhr.readyState < 2) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n }\n if (xhr.readyState > 3) {\n xhr.__rollbar_xhr.end_time_ms = _.now();\n\n var headers = null;\n xhr.__rollbar_xhr.response_content_type = xhr.getResponseHeader('Content-Type');\n if (self.autoInstrument.networkResponseHeaders) {\n var headersConfig = self.autoInstrument.networkResponseHeaders;\n headers = {};\n try {\n var header, i;\n if (headersConfig === true) {\n var allHeaders = xhr.getAllResponseHeaders();\n if (allHeaders) {\n var arr = allHeaders.trim().split(/[\\r\\n]+/);\n var parts, value;\n for (i=0; i < arr.length; i++) {\n parts = arr[i].split(': ');\n header = parts.shift();\n value = parts.join(': ');\n headers[header] = value;\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n header = headersConfig[i];\n headers[header] = xhr.getResponseHeader(header);\n }\n }\n } catch (e) {\n /* we ignore the errors here that could come from different\n * browser issues with the xhr methods */\n }\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n try {\n body = xhr.responseText;\n } catch (e) {\n /* ignore errors from reading responseText */\n }\n }\n var response = null;\n if (body || headers) {\n response = {};\n if (body) {\n if (self.isJsonContentType(xhr.__rollbar_xhr.response_content_type)) {\n response.body = self.scrubJson(body);\n } else {\n response.body = body;\n }\n }\n if (headers) {\n response.headers = headers;\n }\n }\n if (response) {\n xhr.__rollbar_xhr.response = response;\n }\n try {\n var code = xhr.status;\n code = code === 1223 ? 204 : code;\n xhr.__rollbar_xhr.status_code = code;\n xhr.__rollbar_event.level = self.telemeter.levelFromStatus(code);\n self.errorOnHttpStatus(xhr.__rollbar_xhr);\n } catch (e) {\n /* ignore possible exception from xhr.status */\n }\n }\n }\n }\n\n wrapProp('onload', xhr);\n wrapProp('onerror', xhr);\n wrapProp('onprogress', xhr);\n\n if ('onreadystatechange' in xhr && _.isFunction(xhr.onreadystatechange)) {\n replace(xhr, 'onreadystatechange', function(orig) {\n return self.rollbar.wrap(orig, undefined, onreadystatechangeHandler);\n });\n } else {\n xhr.onreadystatechange = onreadystatechangeHandler;\n }\n if (xhr.__rollbar_xhr && self.trackHttpErrors()) {\n xhr.__rollbar_xhr.stack = (new Error()).stack;\n }\n return orig.apply(this, arguments);\n }\n }, this.replacements, 'network');\n }\n\n if ('fetch' in this._window) {\n replace(this._window, 'fetch', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(fn, t) {\n /* eslint-enable no-unused-vars */\n var args = new Array(arguments.length);\n for (var i=0, len=args.length; i < len; i++) {\n args[i] = arguments[i];\n }\n var input = args[0];\n var method = 'GET';\n var url;\n if (_.isType(input, 'string')) {\n url = input;\n } else if (input) {\n url = input.url;\n if (input.method) {\n method = input.method;\n }\n }\n if (args[1] && args[1].method) {\n method = args[1].method;\n }\n var metadata = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n if (args[1] && args[1].headers) {\n // Argument may be a Headers object, or plain object. Ensure here that\n // we are working with a Headers object with case-insensitive keys.\n var reqHeaders = new Headers(args[1].headers);\n\n metadata.request_content_type = reqHeaders.get('Content-Type');\n\n if (self.autoInstrument.networkRequestHeaders) {\n metadata.request_headers = self.fetchHeaders(reqHeaders, self.autoInstrument.networkRequestHeaders)\n }\n }\n\n if (self.autoInstrument.networkRequestBody) {\n if (args[1] && args[1].body) {\n metadata.request = args[1].body;\n } else if (args[0] && !_.isType(args[0], 'string') && args[0].body) {\n metadata.request = args[0].body;\n }\n }\n self.captureNetwork(metadata, 'fetch', undefined);\n if (self.trackHttpErrors()) {\n metadata.stack = (new Error()).stack;\n }\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n metadata.response_content_type = resp.headers.get('Content-Type');\n var headers = null;\n if (self.autoInstrument.networkResponseHeaders) {\n headers = self.fetchHeaders(resp.headers, self.autoInstrument.networkResponseHeaders);\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n if (typeof resp.text === 'function') { // Response.text() is not implemented on some platforms\n // The response must be cloned to prevent reading (and locking) the original stream.\n body = resp.clone().text(); //returns a Promise\n }\n }\n if (headers || body) {\n metadata.response = {};\n if (body) {\n // Test to ensure body is a Promise, which it should always be.\n if (typeof body.then === 'function') {\n body.then(function (text) {\n if (self.isJsonContentType(metadata.response_content_type)) {\n metadata.response.body = self.scrubJson(text);\n }\n });\n } else {\n metadata.response.body = body;\n }\n }\n if (headers) {\n metadata.response.headers = headers;\n }\n }\n self.errorOnHttpStatus(metadata);\n return resp;\n });\n };\n }, this.replacements, 'network');\n }\n};\n\nInstrumenter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID) {\n if (metadata.request && this.isJsonContentType(metadata.request_content_type)) {\n metadata.request = this.scrubJson(metadata.request);\n }\n return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);\n};\n\nInstrumenter.prototype.isJsonContentType = function(contentType) {\n return (contentType && _.isType(contentType, 'string') && contentType.toLowerCase().includes('json')) ? true : false;\n}\n\nInstrumenter.prototype.scrubJson = function(json) {\n return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));\n}\n\nInstrumenter.prototype.fetchHeaders = function(inHeaders, headersConfig) {\n var outHeaders = {};\n try {\n var i;\n if (headersConfig === true) {\n if (typeof inHeaders.entries === 'function') { // Headers.entries() is not implemented in IE\n var allHeaders = inHeaders.entries();\n var currentHeader = allHeaders.next();\n while (!currentHeader.done) {\n outHeaders[currentHeader.value[0]] = currentHeader.value[1];\n currentHeader = allHeaders.next();\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n var header = headersConfig[i];\n outHeaders[header] = inHeaders.get(header);\n }\n }\n } catch (e) {\n /* ignore probable IE errors */\n }\n return outHeaders;\n}\n\nInstrumenter.prototype.trackHttpErrors = function() {\n return this.autoInstrument.networkErrorOnHttp5xx ||\n this.autoInstrument.networkErrorOnHttp4xx ||\n this.autoInstrument.networkErrorOnHttp0;\n}\n\nInstrumenter.prototype.errorOnHttpStatus = function(metadata) {\n var status = metadata.status_code;\n\n if ((status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||\n (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||\n (status === 0 && this.autoInstrument.networkErrorOnHttp0)) {\n var error = new Error('HTTP request failed with Status ' + status);\n error.stack = metadata.stack;\n this.rollbar.error(error, { skipFrames: 1 });\n }\n}\n\nInstrumenter.prototype.deinstrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n var b;\n while (this.replacements['log'].length) {\n b = this.replacements['log'].shift();\n this._window.console[b[0]] = b[1];\n }\n};\n\nInstrumenter.prototype.instrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n\n var self = this;\n var c = this._window.console;\n\n function wrapConsole(method) {\n 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778\n\n var orig = c[method];\n var origConsole = c;\n var level = method === 'warn' ? 'warning' : method;\n c[method] = function() {\n var args = Array.prototype.slice.call(arguments);\n var message = _.formatArgsAsString(args);\n self.telemeter.captureLog(message, level);\n if (orig) {\n Function.prototype.apply.call(orig, origConsole, args);\n }\n };\n self.replacements['log'].push([method, orig]);\n }\n var methods = ['debug','info','warn','error','log'];\n try {\n for (var i=0, len=methods.length; i < len; i++) {\n wrapConsole(methods[i]);\n }\n } catch (e) {\n this.diagnostic.instrumentConsole = { error: e.message };\n }\n};\n\nInstrumenter.prototype.deinstrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n this.removeListeners('dom');\n};\n\nInstrumenter.prototype.instrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n var clickHandler = this.handleClick.bind(this);\n var blurHandler = this.handleBlur.bind(this);\n this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);\n this.addListener('dom', this._window, 'blur', 'onfocusout', blurHandler, true);\n};\n\nInstrumenter.prototype.handleClick = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n var hasTag = e && e.tagName;\n var anchorOrButton = domUtil.isDescribedElement(e, 'a') || domUtil.isDescribedElement(e, 'button');\n if (hasTag && (anchorOrButton || domUtil.isDescribedElement(e, 'input', ['button', 'submit']))) {\n this.captureDomEvent('click', e);\n } else if (domUtil.isDescribedElement(e, 'input', ['checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value, e.checked);\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleBlur = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n if (e && e.tagName) {\n if (domUtil.isDescribedElement(e, 'textarea')) {\n this.captureDomEvent('input', e, e.value);\n } else if (domUtil.isDescribedElement(e, 'select') && e.options && e.options.length) {\n this.handleSelectInputChanged(e);\n } else if (domUtil.isDescribedElement(e, 'input') && !domUtil.isDescribedElement(e, 'input', ['button', 'submit', 'hidden', 'checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value);\n }\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleSelectInputChanged = function(elem) {\n if (elem.multiple) {\n for (var i = 0; i < elem.options.length; i++) {\n if (elem.options[i].selected) {\n this.captureDomEvent('input', elem, elem.options[i].value);\n }\n }\n } else if (elem.selectedIndex >= 0 && elem.options[elem.selectedIndex]) {\n this.captureDomEvent('input', elem, elem.options[elem.selectedIndex].value);\n }\n};\n\nInstrumenter.prototype.captureDomEvent = function(subtype, element, value, isChecked) {\n if (value !== undefined) {\n if (this.scrubTelemetryInputs || (domUtil.getElementType(element) === 'password')) {\n value = '[scrubbed]';\n } else {\n var description = domUtil.describeElement(element);\n if (this.telemetryScrubber) {\n if (this.telemetryScrubber(description)) {\n value = '[scrubbed]';\n }\n } else if (this.defaultValueScrubber(description)) {\n value = '[scrubbed]';\n }\n }\n }\n var elementString = domUtil.elementArrayToString(domUtil.treeToArray(element));\n this.telemeter.captureDom(subtype, elementString, value, isChecked);\n};\n\nInstrumenter.prototype.deinstrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n restore(this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.instrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n var self = this;\n replace(this._window, 'onpopstate', function(orig) {\n return function() {\n var current = self._location.href;\n self.handleUrlChange(self._lastHref, current);\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n }, this.replacements, 'navigation');\n\n replace(this._window.history, 'pushState', function(orig) {\n return function() {\n var url = arguments.length > 2 ? arguments[2] : undefined;\n if (url) {\n self.handleUrlChange(self._lastHref, url + '');\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.handleUrlChange = function(from, to) {\n var parsedHref = urlparser.parse(this._location.href);\n var parsedTo = urlparser.parse(to);\n var parsedFrom = urlparser.parse(from);\n this._lastHref = to;\n if (parsedHref.protocol === parsedTo.protocol && parsedHref.host === parsedTo.host) {\n to = parsedTo.path + (parsedTo.hash || '');\n }\n if (parsedHref.protocol === parsedFrom.protocol && parsedHref.host === parsedFrom.host) {\n from = parsedFrom.path + (parsedFrom.hash || '');\n }\n this.telemeter.captureNavigation(from, to);\n};\n\nInstrumenter.prototype.deinstrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.removeListeners('connectivity');\n } else {\n restore(this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.instrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.addListener('connectivity', this._window, 'online', undefined, function() {\n this.telemeter.captureConnectivityChange('online');\n }.bind(this), true);\n this.addListener('connectivity', this._window, 'offline', undefined, function() {\n this.telemeter.captureConnectivityChange('offline');\n }.bind(this), true);\n } else {\n var self = this;\n replace(this._document.body, 'ononline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('online');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n replace(this._document.body, 'onoffline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('offline');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.handleCspEvent = function(cspEvent) {\n var message = 'Security Policy Violation: ' +\n 'blockedURI: ' + cspEvent.blockedURI + ', ' +\n 'violatedDirective: ' + cspEvent.violatedDirective + ', ' +\n 'effectiveDirective: ' + cspEvent.effectiveDirective + ', ';\n\n if (cspEvent.sourceFile) {\n message += 'location: ' + cspEvent.sourceFile + ', ' +\n 'line: ' + cspEvent.lineNumber + ', ' +\n 'col: ' + cspEvent.columnNumber + ', ';\n }\n\n message += 'originalPolicy: ' + cspEvent.originalPolicy;\n\n this.telemeter.captureLog(message, 'error');\n this.handleCspError(message);\n}\n\nInstrumenter.prototype.handleCspError = function(message) {\n if (this.autoInstrument.errorOnContentSecurityPolicy) {\n this.rollbar.error(message);\n }\n}\n\nInstrumenter.prototype.deinstrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._window)) { return; }\n\n this.removeListeners('contentsecuritypolicy');\n};\n\nInstrumenter.prototype.instrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._window)) { return; }\n\n var cspHandler = this.handleCspEvent.bind(this);\n this.addListener('contentsecuritypolicy', this._window, 'securitypolicyviolation', null, cspHandler, false);\n};\n\nInstrumenter.prototype.addListener = function(section, obj, type, altType, handler, capture) {\n if (obj.addEventListener) {\n obj.addEventListener(type, handler, capture);\n this.eventRemovers[section].push(function() {\n obj.removeEventListener(type, handler, capture);\n });\n } else if (altType) {\n obj.attachEvent(altType, handler);\n this.eventRemovers[section].push(function() {\n obj.detachEvent(altType, handler);\n });\n }\n};\n\nInstrumenter.prototype.removeListeners = function(section) {\n var r;\n while (this.eventRemovers[section].length) {\n r = this.eventRemovers[section].shift();\n r();\n }\n};\n\nmodule.exports = Instrumenter;\n","'use strict';\n\nfunction getElementType(e) {\n return (e.getAttribute('type') || '').toLowerCase();\n}\n\nfunction isDescribedElement(element, type, subtypes) {\n if (element.tagName.toLowerCase() !== type.toLowerCase()) {\n return false;\n }\n if (!subtypes) {\n return true;\n }\n element = getElementType(element);\n for (var i = 0; i < subtypes.length; i++) {\n if (subtypes[i] === element) {\n return true;\n }\n }\n return false;\n}\n\nfunction getElementFromEvent(evt, doc) {\n if (evt.target) {\n return evt.target;\n }\n if (doc && doc.elementFromPoint) {\n return doc.elementFromPoint(evt.clientX, evt.clientY);\n }\n return undefined;\n}\n\nfunction treeToArray(elem) {\n var MAX_HEIGHT = 5;\n var out = [];\n var nextDescription;\n for (var height = 0; elem && height < MAX_HEIGHT; height++) {\n nextDescription = describeElement(elem);\n if (nextDescription.tagName === 'html') {\n break;\n }\n out.unshift(nextDescription);\n elem = elem.parentNode;\n }\n return out;\n}\n\nfunction elementArrayToString(a) {\n var MAX_LENGTH = 80;\n var separator = ' > ', separatorLength = separator.length;\n var out = [], len = 0, nextStr, totalLength;\n\n for (var i = a.length - 1; i >= 0; i--) {\n nextStr = descriptionToString(a[i]);\n totalLength = len + (out.length * separatorLength) + nextStr.length;\n if (i < a.length - 1 && totalLength >= MAX_LENGTH + 3) {\n out.unshift('...');\n break;\n }\n out.unshift(nextStr);\n len += nextStr.length;\n }\n return out.join(separator);\n}\n\nfunction descriptionToString(desc) {\n if (!desc || !desc.tagName) {\n return '';\n }\n var out = [desc.tagName];\n if (desc.id) {\n out.push('#' + desc.id);\n }\n if (desc.classes) {\n out.push('.' + desc.classes.join('.'));\n }\n for (var i = 0; i < desc.attributes.length; i++) {\n out.push('[' + desc.attributes[i].key + '=\"' + desc.attributes[i].value + '\"]');\n }\n\n return out.join('');\n}\n\n/**\n * Input: a dom element\n * Output: null if tagName is falsey or input is falsey, else\n * {\n * tagName: String,\n * id: String | undefined,\n * classes: [String] | undefined,\n * attributes: [\n * {\n * key: OneOf(type, name, title, alt),\n * value: String\n * }\n * ]\n * }\n */\nfunction describeElement(elem) {\n if (!elem || !elem.tagName) {\n return null;\n }\n var out = {}, className, key, attr, i;\n out.tagName = elem.tagName.toLowerCase();\n if (elem.id) {\n out.id = elem.id;\n }\n className = elem.className;\n if (className && (typeof className === 'string')) {\n out.classes = className.split(/\\s+/);\n }\n var attributes = ['type', 'name', 'title', 'alt'];\n out.attributes = [];\n for (i = 0; i < attributes.length; i++) {\n key = attributes[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.attributes.push({key: key, value: attr});\n }\n }\n return out;\n}\n\nmodule.exports = {\n describeElement: describeElement,\n descriptionToString: descriptionToString,\n elementArrayToString: elementArrayToString,\n treeToArray: treeToArray,\n getElementFromEvent: getElementFromEvent,\n isDescribedElement: isDescribedElement,\n getElementType: getElementType\n};\n","'use strict';\n\nvar polyfillJSON = require('../../vendor/JSON-js/json3');\n\nmodule.exports = polyfillJSON;\n","// json3.js\n// 2017-02-21\n// Public Domain.\n// NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.\n// See http://www.JSON.org/js.html\n// This code should be minified before deployment.\n// See http://javascript.crockford.com/jsmin.html\n\n// USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO\n// NOT CONTROL.\n\n// This file creates a global JSON object containing two methods: stringify\n// and parse. This file provides the ES5 JSON capability to ES3 systems.\n// If a project might run on IE8 or earlier, then this file should be included.\n// This file does nothing on ES5 systems.\n\n// JSON.stringify(value, replacer, space)\n// value any JavaScript value, usually an object or array.\n// replacer an optional parameter that determines how object\n// values are stringified for objects. It can be a\n// function or an array of strings.\n// space an optional parameter that specifies the indentation\n// of nested structures. If it is omitted, the text will\n// be packed without extra whitespace. If it is a number,\n// it will specify the number of spaces to indent at each\n// level. If it is a string (such as \"\\t\" or \" \"),\n// it contains the characters used to indent at each level.\n// This method produces a JSON text from a JavaScript value.\n// When an object value is found, if the object contains a toJSON\n// method, its toJSON method will be called and the result will be\n// stringified. A toJSON method does not serialize: it returns the\n// value represented by the name/value pair that should be serialized,\n// or undefined if nothing should be serialized. The toJSON method\n// will be passed the key associated with the value, and this will be\n// bound to the value.\n\n// For example, this would serialize Dates as ISO strings.\n\n// Date.prototype.toJSON = function (key) {\n// function f(n) {\n// // Format integers to have at least two digits.\n// return (n < 10)\n// ? \"0\" + n\n// : n;\n// }\n// return this.getUTCFullYear() + \"-\" +\n// f(this.getUTCMonth() + 1) + \"-\" +\n// f(this.getUTCDate()) + \"T\" +\n// f(this.getUTCHours()) + \":\" +\n// f(this.getUTCMinutes()) + \":\" +\n// f(this.getUTCSeconds()) + \"Z\";\n// };\n\n// You can provide an optional replacer method. It will be passed the\n// key and value of each member, with this bound to the containing\n// object. The value that is returned from your method will be\n// serialized. If your method returns undefined, then the member will\n// be excluded from the serialization.\n\n// If the replacer parameter is an array of strings, then it will be\n// used to select the members to be serialized. It filters the results\n// such that only members with keys listed in the replacer array are\n// stringified.\n\n// Values that do not have JSON representations, such as undefined or\n// functions, will not be serialized. Such values in objects will be\n// dropped; in arrays they will be replaced with null. You can use\n// a replacer function to replace those with JSON values.\n\n// JSON.stringify(undefined) returns undefined.\n\n// The optional space parameter produces a stringification of the\n// value that is filled with line breaks and indentation to make it\n// easier to read.\n\n// If the space parameter is a non-empty string, then that string will\n// be used for indentation. If the space parameter is a number, then\n// the indentation will be that many spaces.\n\n// Example:\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}]);\n// // text is '[\"e\",{\"pluribus\":\"unum\"}]'\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}], null, \"\\t\");\n// // text is '[\\n\\t\"e\",\\n\\t{\\n\\t\\t\"pluribus\": \"unum\"\\n\\t}\\n]'\n\n// text = JSON.stringify([new Date()], function (key, value) {\n// return this[key] instanceof Date\n// ? \"Date(\" + this[key] + \")\"\n// : value;\n// });\n// // text is '[\"Date(---current time---)\"]'\n\n// JSON.parse(text, reviver)\n// This method parses a JSON text to produce an object or array.\n// It can throw a SyntaxError exception.\n// This has been modified to use JSON-js/json_parse_state.js as the\n// parser instead of the one built around eval found in JSON-js/json2.js\n\n// The optional reviver parameter is a function that can filter and\n// transform the results. It receives each of the keys and values,\n// and its return value is used instead of the original value.\n// If it returns what it received, then the structure is not modified.\n// If it returns undefined then the member is deleted.\n\n// Example:\n\n// // Parse the text. Values that look like ISO date strings will\n// // be converted to Date objects.\n\n// myData = JSON.parse(text, function (key, value) {\n// var a;\n// if (typeof value === \"string\") {\n// a =\n// /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2}(?:\\.\\d*)?)Z$/.exec(value);\n// if (a) {\n// return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],\n// +a[5], +a[6]));\n// }\n// }\n// return value;\n// });\n\n// myData = JSON.parse('[\"Date(09/09/2001)\"]', function (key, value) {\n// var d;\n// if (typeof value === \"string\" &&\n// value.slice(0, 5) === \"Date(\" &&\n// value.slice(-1) === \")\") {\n// d = new Date(value.slice(5, -1));\n// if (d) {\n// return d;\n// }\n// }\n// return value;\n// });\n\n// This is a reference implementation. You are free to copy, modify, or\n// redistribute.\n\n/*jslint\n for, this\n */\n\n/*property\n JSON, apply, call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,\n getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,\n lastIndex, length, parse, prototype, push, replace, slice, stringify,\n test, toJSON, toString, valueOf\n */\n\nvar setupCustomJSON = function(JSON) {\n\n var rx_one = /^[\\],:{}\\s]*$/;\n var rx_two = /\\\\(?:[\"\\\\\\/bfnrt]|u[0-9a-fA-F]{4})/g;\n var rx_three = /\"[^\"\\\\\\n\\r]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g;\n var rx_four = /(?:^|:|,)(?:\\s*\\[)+/g;\n var rx_escapable = /[\\\\\"\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n var rx_dangerous = /[\\u0000\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n\n function f(n) {\n // Format integers to have at least two digits.\n return n < 10\n ? \"0\" + n\n : n;\n }\n\n function this_value() {\n return this.valueOf();\n }\n\n if (typeof Date.prototype.toJSON !== \"function\") {\n\n Date.prototype.toJSON = function () {\n\n return isFinite(this.valueOf())\n ? this.getUTCFullYear() + \"-\" +\n f(this.getUTCMonth() + 1) + \"-\" +\n f(this.getUTCDate()) + \"T\" +\n f(this.getUTCHours()) + \":\" +\n f(this.getUTCMinutes()) + \":\" +\n f(this.getUTCSeconds()) + \"Z\"\n : null;\n };\n\n Boolean.prototype.toJSON = this_value;\n Number.prototype.toJSON = this_value;\n String.prototype.toJSON = this_value;\n }\n\n var gap;\n var indent;\n var meta;\n var rep;\n\n\n function quote(string) {\n\n // If the string contains no control characters, no quote characters, and no\n // backslash characters, then we can safely slap some quotes around it.\n // Otherwise we must also replace the offending characters with safe escape\n // sequences.\n\n rx_escapable.lastIndex = 0;\n return rx_escapable.test(string)\n ? \"\\\"\" + string.replace(rx_escapable, function (a) {\n var c = meta[a];\n return typeof c === \"string\"\n ? c\n : \"\\\\u\" + (\"0000\" + a.charCodeAt(0).toString(16)).slice(-4);\n }) + \"\\\"\"\n : \"\\\"\" + string + \"\\\"\";\n }\n\n\n function str(key, holder) {\n\n // Produce a string from holder[key].\n\n var i; // The loop counter.\n var k; // The member key.\n var v; // The member value.\n var length;\n var mind = gap;\n var partial;\n var value = holder[key];\n\n // If the value has a toJSON method, call it to obtain a replacement value.\n\n if (value && typeof value === \"object\" &&\n typeof value.toJSON === \"function\") {\n value = value.toJSON(key);\n }\n\n // If we were called with a replacer function, then call the replacer to\n // obtain a replacement value.\n\n if (typeof rep === \"function\") {\n value = rep.call(holder, key, value);\n }\n\n // What happens next depends on the value's type.\n\n switch (typeof value) {\n case \"string\":\n return quote(value);\n\n case \"number\":\n\n // JSON numbers must be finite. Encode non-finite numbers as null.\n\n return isFinite(value)\n ? String(value)\n : \"null\";\n\n case \"boolean\":\n case \"null\":\n\n // If the value is a boolean or null, convert it to a string. Note:\n // typeof null does not produce \"null\". The case is included here in\n // the remote chance that this gets fixed someday.\n\n return String(value);\n\n // If the type is \"object\", we might be dealing with an object or an array or\n // null.\n\n case \"object\":\n\n // Due to a specification blunder in ECMAScript, typeof null is \"object\",\n // so watch out for that case.\n\n if (!value) {\n return \"null\";\n }\n\n // Make an array to hold the partial results of stringifying this object value.\n\n gap += indent;\n partial = [];\n\n // Is the value an array?\n\n if (Object.prototype.toString.apply(value) === \"[object Array]\") {\n\n // The value is an array. Stringify every element. Use null as a placeholder\n // for non-JSON values.\n\n length = value.length;\n for (i = 0; i < length; i += 1) {\n partial[i] = str(i, value) || \"null\";\n }\n\n // Join all of the elements together, separated with commas, and wrap them in\n // brackets.\n\n v = partial.length === 0\n ? \"[]\"\n : gap\n ? \"[\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"]\"\n : \"[\" + partial.join(\",\") + \"]\";\n gap = mind;\n return v;\n }\n\n // If the replacer is an array, use it to select the members to be stringified.\n\n if (rep && typeof rep === \"object\") {\n length = rep.length;\n for (i = 0; i < length; i += 1) {\n if (typeof rep[i] === \"string\") {\n k = rep[i];\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n } else {\n\n // Otherwise, iterate through all of the keys in the object.\n\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(value, k)) {\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n }\n\n // Join all of the member texts together, separated with commas,\n // and wrap them in braces.\n\n v = partial.length === 0\n ? \"{}\"\n : gap\n ? \"{\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"}\"\n : \"{\" + partial.join(\",\") + \"}\";\n gap = mind;\n return v;\n }\n }\n\n // If the JSON object does not yet have a stringify method, give it one.\n\n if (typeof JSON.stringify !== \"function\") {\n meta = { // table of character substitutions\n \"\\b\": \"\\\\b\",\n \"\\t\": \"\\\\t\",\n \"\\n\": \"\\\\n\",\n \"\\f\": \"\\\\f\",\n \"\\r\": \"\\\\r\",\n \"\\\"\": \"\\\\\\\"\",\n \"\\\\\": \"\\\\\\\\\"\n };\n JSON.stringify = function (value, replacer, space) {\n\n // The stringify method takes a value and an optional replacer, and an optional\n // space parameter, and returns a JSON text. The replacer can be a function\n // that can replace values, or an array of strings that will select the keys.\n // A default replacer method can be provided. Use of the space parameter can\n // produce text that is more easily readable.\n\n var i;\n gap = \"\";\n indent = \"\";\n\n // If the space parameter is a number, make an indent string containing that\n // many spaces.\n\n if (typeof space === \"number\") {\n for (i = 0; i < space; i += 1) {\n indent += \" \";\n }\n\n // If the space parameter is a string, it will be used as the indent string.\n\n } else if (typeof space === \"string\") {\n indent = space;\n }\n\n // If there is a replacer, it must be a function or an array.\n // Otherwise, throw an error.\n\n rep = replacer;\n if (replacer && typeof replacer !== \"function\" &&\n (typeof replacer !== \"object\" ||\n typeof replacer.length !== \"number\")) {\n throw new Error(\"JSON.stringify\");\n }\n\n // Make a fake root object containing our value under the key of \"\".\n // Return the result of stringifying the value.\n\n return str(\"\", {\"\": value});\n };\n }\n\n\n // If the JSON object does not yet have a parse method, give it one.\n\n if (typeof JSON.parse !== \"function\") {\n JSON.parse = (function () {\n\n // This function creates a JSON parse function that uses a state machine rather\n // than the dangerous eval function to parse a JSON text.\n\n var state; // The state of the parser, one of\n // 'go' The starting state\n // 'ok' The final, accepting state\n // 'firstokey' Ready for the first key of the object or\n // the closing of an empty object\n // 'okey' Ready for the next key of the object\n // 'colon' Ready for the colon\n // 'ovalue' Ready for the value half of a key/value pair\n // 'ocomma' Ready for a comma or closing }\n // 'firstavalue' Ready for the first value of an array or\n // an empty array\n // 'avalue' Ready for the next value of an array\n // 'acomma' Ready for a comma or closing ]\n var stack; // The stack, for controlling nesting.\n var container; // The current container object or array\n var key; // The current key\n var value; // The current value\n var escapes = { // Escapement translation table\n \"\\\\\": \"\\\\\",\n \"\\\"\": \"\\\"\",\n \"/\": \"/\",\n \"t\": \"\\t\",\n \"n\": \"\\n\",\n \"r\": \"\\r\",\n \"f\": \"\\f\",\n \"b\": \"\\b\"\n };\n var string = { // The actions for string tokens\n go: function () {\n state = \"ok\";\n },\n firstokey: function () {\n key = value;\n state = \"colon\";\n },\n okey: function () {\n key = value;\n state = \"colon\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var number = { // The actions for number tokens\n go: function () {\n state = \"ok\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var action = {\n\n // The action table describes the behavior of the machine. It contains an\n // object for each token. Each object contains a method that is called when\n // a token is matched in a state. An object will lack a method for illegal\n // states.\n\n \"{\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = {};\n state = \"firstokey\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = {};\n state = \"firstokey\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n }\n },\n \"}\": {\n firstokey: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n ocomma: function () {\n var pop = stack.pop();\n container[key] = value;\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \"[\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = [];\n state = \"firstavalue\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = [];\n state = \"firstavalue\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n }\n },\n \"]\": {\n firstavalue: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n acomma: function () {\n var pop = stack.pop();\n container.push(value);\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \":\": {\n colon: function () {\n if (Object.hasOwnProperty.call(container, key)) {\n throw new SyntaxError(\"Duplicate key '\" + key + \"\\\"\");\n }\n state = \"ovalue\";\n }\n },\n \",\": {\n ocomma: function () {\n container[key] = value;\n state = \"okey\";\n },\n acomma: function () {\n container.push(value);\n state = \"avalue\";\n }\n },\n \"true\": {\n go: function () {\n value = true;\n state = \"ok\";\n },\n ovalue: function () {\n value = true;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = true;\n state = \"acomma\";\n },\n avalue: function () {\n value = true;\n state = \"acomma\";\n }\n },\n \"false\": {\n go: function () {\n value = false;\n state = \"ok\";\n },\n ovalue: function () {\n value = false;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = false;\n state = \"acomma\";\n },\n avalue: function () {\n value = false;\n state = \"acomma\";\n }\n },\n \"null\": {\n go: function () {\n value = null;\n state = \"ok\";\n },\n ovalue: function () {\n value = null;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = null;\n state = \"acomma\";\n },\n avalue: function () {\n value = null;\n state = \"acomma\";\n }\n }\n };\n\n function debackslashify(text) {\n\n // Remove and replace any backslash escapement.\n\n return text.replace(/\\\\(?:u(.{4})|([^u]))/g, function (ignore, b, c) {\n return b\n ? String.fromCharCode(parseInt(b, 16))\n : escapes[c];\n });\n }\n\n return function (source, reviver) {\n\n // A regular expression is used to extract tokens from the JSON text.\n // The extraction process is cautious.\n\n var result;\n var tx = /^[\\u0020\\t\\n\\r]*(?:([,:\\[\\]{}]|true|false|null)|(-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?)|\"((?:[^\\r\\n\\t\\\\\\\"]|\\\\(?:[\"\\\\\\/trnfb]|u[0-9a-fA-F]{4}))*)\")/;\n\n // Set the starting state.\n\n state = \"go\";\n\n // The stack records the container, key, and state for each object or array\n // that contains another object or array while processing nested structures.\n\n stack = [];\n\n // If any error occurs, we will catch it and ultimately throw a syntax error.\n\n try {\n\n // For each token...\n\n while (true) {\n result = tx.exec(source);\n if (!result) {\n break;\n }\n\n // result is the result array from matching the tokenizing regular expression.\n // result[0] contains everything that matched, including any initial whitespace.\n // result[1] contains any punctuation that was matched, or true, false, or null.\n // result[2] contains a matched number, still in string form.\n // result[3] contains a matched string, without quotes but with escapement.\n\n if (result[1]) {\n\n // Token: Execute the action for this state and token.\n\n action[result[1]][state]();\n\n } else if (result[2]) {\n\n // Number token: Convert the number string into a number value and execute\n // the action for this state and number.\n\n value = +result[2];\n number[state]();\n } else {\n\n // String token: Replace the escapement sequences and execute the action for\n // this state and string.\n\n value = debackslashify(result[3]);\n string[state]();\n }\n\n // Remove the token from the string. The loop will continue as long as there\n // are tokens. This is a slow process, but it allows the use of ^ matching,\n // which assures that no illegal tokens slip through.\n\n source = source.slice(result[0].length);\n }\n\n // If we find a state/token combination that is illegal, then the action will\n // cause an error. We handle the error by simply changing the state.\n\n } catch (e) {\n state = e;\n }\n\n // The parsing is finished. If we are not in the final \"ok\" state, or if the\n // remaining source contains anything except whitespace, then we did not have\n //a well-formed JSON text.\n\n if (state !== \"ok\" || (/[^\\u0020\\t\\n\\r]/.test(source))) {\n throw (state instanceof SyntaxError)\n ? state\n : new SyntaxError(\"JSON\");\n }\n\n // If there is a reviver function, we recursively walk the new structure,\n // passing each name/value pair to the reviver function for possible\n // transformation, starting with a temporary root object that holds the current\n // value in an empty key. If there is not a reviver function, we simply return\n // that value.\n\n return (typeof reviver === \"function\")\n ? (function walk(holder, key) {\n var k;\n var v;\n var val = holder[key];\n if (val && typeof val === \"object\") {\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(val, k)) {\n v = walk(val, k);\n if (v !== undefined) {\n val[k] = v;\n } else {\n delete val[k];\n }\n }\n }\n }\n return reviver.call(holder, key, val);\n }({\"\": value}, \"\"))\n : value;\n };\n }());\n }\n}\n\nmodule.exports = setupCustomJSON;\n","'use strict';\n\nfunction wrapGlobals(window, handler, shim) {\n if (!window) { return; }\n // Adapted from https://github.com/bugsnag/bugsnag-js\n var globals = 'EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload'.split(',');\n var i, global;\n for (i = 0; i < globals.length; ++i) {\n global = globals[i];\n\n if (window[global] && window[global].prototype) {\n _extendListenerPrototype(handler, window[global].prototype, shim);\n }\n }\n}\n\nfunction _extendListenerPrototype(handler, prototype, shim) {\n if (prototype.hasOwnProperty && prototype.hasOwnProperty('addEventListener')) {\n var oldAddEventListener = prototype.addEventListener;\n while (oldAddEventListener._rollbarOldAdd && oldAddEventListener.belongsToShim) {\n oldAddEventListener = oldAddEventListener._rollbarOldAdd;\n }\n var addFn = function(event, callback, bubble) {\n oldAddEventListener.call(this, event, handler.wrap(callback), bubble);\n };\n addFn._rollbarOldAdd = oldAddEventListener;\n addFn.belongsToShim = shim;\n prototype.addEventListener = addFn;\n\n var oldRemoveEventListener = prototype.removeEventListener;\n while (oldRemoveEventListener._rollbarOldRemove && oldRemoveEventListener.belongsToShim) {\n oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;\n }\n var removeFn = function(event, callback, bubble) {\n oldRemoveEventListener.call(this, event, callback && callback._rollbar_wrapped || callback, bubble);\n };\n removeFn._rollbarOldRemove = oldRemoveEventListener;\n removeFn.belongsToShim = shim;\n prototype.removeEventListener = removeFn;\n }\n}\n\nmodule.exports = wrapGlobals;\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction raw(payload, jsonBackup) {\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction selectFrames(frames, range) {\n var len = frames.length;\n if (len > range * 2) {\n return frames.slice(0, range).concat(frames.slice(len - range));\n }\n return frames;\n}\n\nfunction truncateFrames(payload, jsonBackup, range) {\n range = (typeof range === 'undefined') ? 30 : range;\n var body = payload.data.body;\n var frames;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n frames = chain[i].frames;\n frames = selectFrames(frames, range);\n chain[i].frames = frames;\n }\n } else if (body.trace) {\n frames = body.trace.frames;\n frames = selectFrames(frames, range);\n body.trace.frames = frames;\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction maybeTruncateValue(len, val) {\n if (!val) {\n return val;\n }\n if (val.length > len) {\n return val.slice(0, len - 3).concat('...');\n }\n return val;\n}\n\nfunction truncateStrings(len, payload, jsonBackup) {\n function truncator(k, v, seen) {\n switch (_.typeName(v)) {\n case 'string':\n return maybeTruncateValue(len, v);\n case 'object':\n case 'array':\n return traverse(v, truncator, seen);\n default:\n return v;\n }\n }\n payload = traverse(payload, truncator);\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction truncateTraceData(traceData) {\n if (traceData.exception) {\n delete traceData.exception.description;\n traceData.exception.message = maybeTruncateValue(255, traceData.exception.message);\n }\n traceData.frames = selectFrames(traceData.frames, 1);\n return traceData;\n}\n\nfunction minBody(payload, jsonBackup) {\n var body = payload.data.body;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n chain[i] = truncateTraceData(chain[i]);\n }\n } else if (body.trace) {\n body.trace = truncateTraceData(body.trace);\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction needsTruncation(payload, maxSize) {\n return _.maxByteSize(payload) > maxSize;\n}\n\nfunction truncate(payload, jsonBackup, maxSize) {\n maxSize = (typeof maxSize === 'undefined') ? (512 * 1024) : maxSize;\n var strategies = [\n raw,\n truncateFrames,\n truncateStrings.bind(null, 1024),\n truncateStrings.bind(null, 512),\n truncateStrings.bind(null, 256),\n minBody\n ];\n var strategy, results, result;\n\n while ((strategy = strategies.shift())) {\n results = strategy(payload, jsonBackup);\n payload = results[0];\n result = results[1];\n if (result.error || !needsTruncation(result.value, maxSize)) {\n return result;\n }\n }\n return result;\n}\n\nmodule.exports = {\n truncate: truncate,\n\n /* for testing */\n raw: raw,\n truncateFrames: truncateFrames,\n truncateStrings: truncateStrings,\n maybeTruncateValue: maybeTruncateValue\n};\n"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/rollbar.named-amd.js b/dist/rollbar.named-amd.js index 97df1c1f7..73b01cde5 100644 --- a/dist/rollbar.named-amd.js +++ b/dist/rollbar.named-amd.js @@ -491,6 +491,37 @@ function wrapCallback(logger, f) { }; } +function nonCircularClone(obj) { + var seen = [obj]; + + function clone(obj, seen) { + var value, name, newSeen, result = {}; + + try { + for (name in obj) { + value = obj[name]; + + if (value && (isType(value, 'object') || isType(value, 'array'))) { + if (seen.includes(value)) { + result[name] = 'Removed circular reference: ' + typeName(value); + } else { + newSeen = seen.slice(); + newSeen.push(value); + result[name] = clone(value, newSeen); + } + continue; + } + + result[name] = value; + } + } catch (e) { + result = 'Failed cloning custom data: ' + e.message; + } + return result; + } + return clone(obj, seen); +} + function createItem(args, logger, notifier, requestKeys, lambdaContext) { var message, err, custom, callback, request; var arg; @@ -548,10 +579,12 @@ function createItem(args, logger, notifier, requestKeys, lambdaContext) { } } + // if custom is an array this turns it into an object with integer keys + if (custom) custom = nonCircularClone(custom); + if (extraArgs.length > 0) { - // if custom is an array this turns it into an object with integer keys - custom = merge(custom); - custom.extraArgs = extraArgs; + if (!custom) custom = nonCircularClone({}); + custom.extraArgs = nonCircularClone(extraArgs); } var item = { @@ -596,7 +629,7 @@ function addErrorContext(item, errors) { try { for (var i = 0; i < errors.length; ++i) { if (errors[i].hasOwnProperty('rollbarContext')) { - custom = merge(custom, errors[i].rollbarContext); + custom = merge(custom, nonCircularClone(errors[i].rollbarContext)); contextAdded = true; } } @@ -4553,7 +4586,7 @@ module.exports = { module.exports = { - version: '2.24.0', + version: '2.24.1', endpoint: 'api.rollbar.com/api/1/item/', logLevel: 'debug', reportLevel: 'debug', diff --git a/dist/rollbar.named-amd.js.map b/dist/rollbar.named-amd.js.map index 3f7d4b21d..a030465d7 100644 --- a/dist/rollbar.named-amd.js.map +++ b/dist/rollbar.named-amd.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://rollbar/webpack/bootstrap","webpack://rollbar/./src/utility.js","webpack://rollbar/./src/browser/logger.js","webpack://rollbar/./src/browser/url.js","webpack://rollbar/./src/errorParser.js","webpack://rollbar/./src/scrub.js","webpack://rollbar/./src/utility/traverse.js","webpack://rollbar/./src/browser/bundles/rollbar.js","webpack://rollbar/./src/browser/rollbar.js","webpack://rollbar/./src/browser/core.js","webpack://rollbar/./src/rollbar.js","webpack://rollbar/./src/rateLimiter.js","webpack://rollbar/./src/merge.js","webpack://rollbar/./src/queue.js","webpack://rollbar/./src/notifier.js","webpack://rollbar/./src/api.js","webpack://rollbar/./src/apiUtility.js","webpack://rollbar/./node_modules/console-polyfill/index.js","webpack://rollbar/./src/browser/detection.js","webpack://rollbar/./src/browser/globalSetup.js","webpack://rollbar/./src/browser/transport.js","webpack://rollbar/./src/browser/transforms.js","webpack://rollbar/./node_modules/error-stack-parser/error-stack-parser.js","webpack://rollbar/./node_modules/error-stack-parser/node_modules/stackframe/stackframe.js","webpack://rollbar/./src/transforms.js","webpack://rollbar/./src/browser/predicates.js","webpack://rollbar/./src/predicates.js","webpack://rollbar/./src/defaults.js","webpack://rollbar/./src/browser/defaults/scrubFields.js","webpack://rollbar/./src/telemetry.js","webpack://rollbar/./src/browser/telemetry.js","webpack://rollbar/./src/browser/domUtility.js","webpack://rollbar/./src/utility/polyfillJSON.js","webpack://rollbar/./vendor/JSON-js/json3.js","webpack://rollbar/./src/browser/wrapGlobals.js","webpack://rollbar/./src/truncation.js"],"names":[],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;AClFa;;AAEb,YAAY,mBAAO,CAAC,EAAS;;AAE7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,OAAO;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,EAAE;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,mCAAmC,OAAO;AAC1C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,iBAAiB,YAAY;AAC7B;AACA,qBAAqB;AACrB;AACA,KAAK,wBAAwB;AAC7B;AACA,KAAK,yBAAyB;AAC9B;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kCAAkC,OAAO;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,SAAS;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,kCAAkC,OAAO;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,SAAS,UAAU,YAAY,GAAG;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,aAAa;AAChC;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3uBa;;AAEb;AACA,mBAAO,CAAC,EAAkB;AAC1B,gBAAgB,mBAAO,CAAC,EAAa;AACrC,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;AC3Ca;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;AChFa;;AAEb,uBAAuB,mBAAO,CAAC,EAAoB;;AAEnD;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;;AAEA,sBAAsB,wBAAwB;AAC9C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,eAAe;AACf;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7Ha;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,eAAe,mBAAO,CAAC,CAAoB;;AAE3C;AACA;;AAEA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,WAAW;AAC9B;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC9Fa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,kBAAkB;;AAElB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,eAAe,gBAAgB;AAC/B;AACA;AACA;;AAEA,yBAAyB;AACzB;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;;;;ACtDa;;AAEb,cAAc,mBAAO,CAAC,CAAY;;AAElC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA;AACA;;AAEA;;;;;;;;ACvB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ACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,0BAA0B,sBAAsB;AAChD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,oCAAoC,SAAS;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,eAAe,mBAAO,CAAC,EAAa;AACpC,kBAAkB,mBAAO,CAAC,EAAwB;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACpjBa;;AAEb,kBAAkB,mBAAO,CAAC,EAAe;AACzC,YAAY,mBAAO,CAAC,EAAS;AAC7B,eAAe,mBAAO,CAAC,EAAY;AACnC,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,6EAA6E,UAAU;AACvF,yFAAyF,UAAU;;AAEnG;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,6BAA6B;AAC7B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACnRa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AChJa;;AAEb;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA,WAAW,YAAY;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACvDa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wDAAwD,WAAW;AACnE;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,QAAQ;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,aAAa,8BAA8B;AAC3C;AACA;AACA;AACA;AACA,+CAA+C,SAAS;AACxD;AACA;AACA,cAAc;AACd;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,SAAS;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,+BAA+B;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC7Qa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACxHa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,cAAc,mBAAO,CAAC,EAAc;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;ACvGa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC7FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;AClBY;;AAEb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;AC/Ba;;AAEb;AACA,gBAAgB,QAAQ;AACxB;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;;AAEA;AACA,gBAAgB,QAAQ;;AAExB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;;;;;;;AClGa;;AAEb;;AAEA,QAAQ,mBAAO,CAAC,CAAY;AAC5B,aAAa,mBAAO,CAAC,CAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACvQa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,kBAAkB,mBAAO,CAAC,CAAgB;AAC1C,aAAa,mBAAO,CAAC,CAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,OAAO;AAC7C;AACA,oBAAoB,6CAA6C;AACjE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,4BAA4B,gBAAgB;AAC5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,sBAAsB;AACvC;AACA;AACA;;AAEA,4BAA4B,oBAAoB;AAChD;AACA;;AAEA;AACA;;AAEA;AACA;AACA,8BAA8B,aAAa;AAC3C;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,kBAAkB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC9UA;AACA;AACA;;AAEA;AACA,QAAQ,IAA0C;AAClD,QAAQ,iCAA6B,CAAC,uBAAY,CAAC,oCAAE,OAAO;AAAA;AAAA;AAAA,oGAAC;AAC7D,KAAK,MAAM,EAIN;AACL,CAAC;AACD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,MAAM;AACzB,oBAAoB,MAAM;AAC1B;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA,CAAC;;;;;;;ACzMD;AACA;AACA;;AAEA;AACA,QAAQ,IAA0C;AAClD,QAAQ,iCAAqB,EAAE,oCAAE,OAAO;AAAA;AAAA;AAAA,oGAAC;AACzC,KAAK,MAAM,EAIN;AACL,CAAC;AACD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,wBAAwB;AAC3C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA,CAAC;;;;;;;;AC9IY;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,sBAAsB;AAC1D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,8BAA8B;AAC9B;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrJa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;ACba;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe;;AAEf;;AAEA,uCAAuC,eAAe;;AAEtD;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA;;AAEA,wCAAwC,eAAe;;AAEvD,mBAAmB,gBAAgB;AACnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,SAAS;AAC1B;;AAEA,mBAAmB,qBAAqB;AACxC;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClMa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACVa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5Da;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qCAAqC,mBAAmB;AACxD;;AAEA;AACA,qCAAqC,4BAA4B;AACjE;AACA;AACA,8BAA8B,4BAA4B;AAC1D;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD;AACA;AACA,8BAA8B,gBAAgB;AAC9C;AACA;;AAEA;AACA,8BAA8B,aAAa;AAC3C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AClLa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,YAAY,mBAAO,CAAC,CAAU;AAC9B,gBAAgB,mBAAO,CAAC,CAAO;AAC/B,cAAc,mBAAO,CAAC,EAAc;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gDAAgD,aAAa;AAC7D;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B,mBAAmB,qBAAqB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,6BAA6B,0BAA0B;AACvD;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,eAAe,0BAA0B;AACzC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB;;AAEjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,SAAS;AAC9C;AACA;AACA,GAAG;AACH,yCAAyC;AACzC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,8CAA8C,QAAQ;;AAEtD;AACA;;AAEA;AACA,8CAA8C,QAAQ;;AAEtD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC/vBa;;AAEb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,6BAA6B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,4BAA4B,QAAQ;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,4BAA4B;AAC7C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,uBAAuB;AACpC;AACA;AACA;AACA,2BAA2B,sBAAsB;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnIa;;AAEb,mBAAmB,mBAAO,CAAC,EAA4B;;AAEvD;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB;AACpB;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,yCAAyC,iBAAiB;AAC1D,8BAA8B,kBAAkB;;AAEhD,yCAAyC,iBAAiB;AAC1D,sCAAsC,6BAA6B;;AAEnE;AACA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,wBAAwB;AACxB,+CAA+C,EAAE;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;;AAGA;;AAEA;;AAEA,UAAU;AACV,UAAU;AACV,UAAU;AACV;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA,qBAAqB,YAAY;AACjC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,qBAAqB,YAAY;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,eAAe;AACf;AACA,cAAc,wDAAwD;AACtE,cAAc,0BAA0B;AACxC;AACA;AACA;AACA;;AAEA;;AAEA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,mBAAmB,WAAW;AAC9B;AACA;;AAEA;;AAEA,OAAO;AACP;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,sBAAsB,UAAU;AAChC;AACA;;;AAGA;;AAEA;AACA;;AAEA;AACA;;AAEA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB,oBAAoB;AACpB,cAAc;AACd,gBAAgB;AAChB,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,UAAU;AACV;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,WAAW;AACX;AACA,wBAAwB,gDAAgD;AACxE;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,SAAS;AACT,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,WAAW;AACX;AACA,wBAAwB,gDAAgD;AACxE;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,sCAAsC,EAAE;AACxC;AACA;AACA;AACA,SAAS;AACT;;AAEA;;AAEA;AACA;;AAEA;AACA,+CAA+C,yGAAyG,EAAE;;AAE1J;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,SAAS;AACT;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE,UAAU;AACvB;AACA;AACA,KAAK;AACL;AACA;;AAEA;;;;;;;;AC1vBa;;AAEb;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,aAAa,oBAAoB;AACjC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC1Ca;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,eAAe,mBAAO,CAAC,CAAoB;;AAE3C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA","file":"rollbar.named-amd.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n","'use strict';\n\nvar merge = require('./merge');\n\nvar RollbarJSON = {};\nfunction setupJSON(polyfillJSON) {\n if (isFunction(RollbarJSON.stringify) && isFunction(RollbarJSON.parse)) {\n return;\n }\n\n if (isDefined(JSON)) {\n // If polyfill is provided, prefer it over existing non-native shims.\n if(polyfillJSON) {\n if (isNativeFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isNativeFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n } else { // else accept any interface that is present.\n if (isFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n }\n }\n if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {\n polyfillJSON && polyfillJSON(RollbarJSON);\n }\n}\n\n/*\n * isType - Given a Javascript value and a string, returns true if the type of the value matches the\n * given string.\n *\n * @param x - any value\n * @param t - a lowercase string containing one of the following type names:\n * - undefined\n * - null\n * - error\n * - number\n * - boolean\n * - string\n * - symbol\n * - function\n * - object\n * - array\n * @returns true if x is of type t, otherwise false\n */\nfunction isType(x, t) {\n return t === typeName(x);\n}\n\n/*\n * typeName - Given a Javascript value, returns the type of the object as a string\n */\nfunction typeName(x) {\n var name = typeof x;\n if (name !== 'object') {\n return name;\n }\n if (!x) {\n return 'null';\n }\n if (x instanceof Error) {\n return 'error';\n }\n return ({}).toString.call(x).match(/\\s([a-zA-Z]+)/)[1].toLowerCase();\n}\n\n/* isFunction - a convenience function for checking if a value is a function\n *\n * @param f - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isFunction(f) {\n return isType(f, 'function');\n}\n\n/* isNativeFunction - a convenience function for checking if a value is a native JS function\n *\n * @param f - any value\n * @returns true if f is a native JS function, otherwise false\n */\nfunction isNativeFunction(f) {\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n var funcMatchString = Function.prototype.toString.call(Object.prototype.hasOwnProperty)\n .replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?');\n var reIsNative = RegExp('^' + funcMatchString + '$');\n return isObject(f) && reIsNative.test(f);\n}\n\n/* isObject - Checks if the argument is an object\n *\n * @param value - any value\n * @returns true is value is an object function is an object)\n*/\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/* isString - Checks if the argument is a string\n *\n * @param value - any value\n * @returns true if value is a string\n*/\nfunction isString(value) {\n return typeof value === 'string' || value instanceof String\n}\n\n/**\n * isFiniteNumber - determines whether the passed value is a finite number\n *\n * @param {*} n - any value\n * @returns true if value is a finite number\n */\n function isFiniteNumber(n) {\n return Number.isFinite(n);\n}\n\n/*\n * isDefined - a convenience function for checking if a value is not equal to undefined\n *\n * @param u - any value\n * @returns true if u is anything other than undefined\n */\nfunction isDefined(u) {\n return !isType(u, 'undefined');\n}\n\n/*\n * isIterable - convenience function for checking if a value can be iterated, essentially\n * whether it is an object or an array.\n *\n * @param i - any value\n * @returns true if i is an object or an array as determined by `typeName`\n */\nfunction isIterable(i) {\n var type = typeName(i);\n return (type === 'object' || type === 'array');\n}\n\n/*\n * isError - convenience function for checking if a value is of an error type\n *\n * @param e - any value\n * @returns true if e is an error\n */\nfunction isError(e) {\n // Detect both Error and Firefox Exception type\n return isType(e, 'error') || isType(e, 'exception');\n}\n\n/* isPromise - a convenience function for checking if a value is a promise\n *\n * @param p - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isPromise(p) {\n return isObject(p) && isType(p.then, 'function');\n}\n\nfunction redact() {\n return '********';\n}\n\n// from http://stackoverflow.com/a/8809472/1138191\nfunction uuid4() {\n var d = now();\n var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n var r = (d + Math.random() * 16) % 16 | 0;\n d = Math.floor(d / 16);\n return (c === 'x' ? r : (r & 0x7 | 0x8)).toString(16);\n });\n return uuid;\n}\n\nvar LEVELS = {\n debug: 0,\n info: 1,\n warning: 2,\n error: 3,\n critical: 4\n};\n\nfunction sanitizeUrl(url) {\n var baseUrlParts = parseUri(url);\n if (!baseUrlParts) {\n return '(unknown)';\n }\n\n // remove a trailing # if there is no anchor\n if (baseUrlParts.anchor === '') {\n baseUrlParts.source = baseUrlParts.source.replace('#', '');\n }\n\n url = baseUrlParts.source.replace('?' + baseUrlParts.query, '');\n return url;\n}\n\nvar parseUriOptions = {\n strictMode: false,\n key: [\n 'source',\n 'protocol',\n 'authority',\n 'userInfo',\n 'user',\n 'password',\n 'host',\n 'port',\n 'relative',\n 'path',\n 'directory',\n 'file',\n 'query',\n 'anchor'\n ],\n q: {\n name: 'queryKey',\n parser: /(?:^|&)([^&=]*)=?([^&]*)/g\n },\n parser: {\n strict: /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n loose: /^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/\n }\n};\n\nfunction parseUri(str) {\n if (!isType(str, 'string')) {\n return undefined;\n }\n\n var o = parseUriOptions;\n var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);\n var uri = {};\n\n for (var i = 0, l = o.key.length; i < l; ++i) {\n uri[o.key[i]] = m[i] || '';\n }\n\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) {\n uri[o.q.name][$1] = $2;\n }\n });\n\n return uri;\n}\n\nfunction addParamsAndAccessTokenToPath(accessToken, options, params) {\n params = params || {};\n params.access_token = accessToken;\n var paramsArray = [];\n var k;\n for (k in params) {\n if (Object.prototype.hasOwnProperty.call(params, k)) {\n paramsArray.push([k, params[k]].join('='));\n }\n }\n var query = '?' + paramsArray.sort().join('&');\n\n options = options || {};\n options.path = options.path || '';\n var qs = options.path.indexOf('?');\n var h = options.path.indexOf('#');\n var p;\n if (qs !== -1 && (h === -1 || h > qs)) {\n p = options.path;\n options.path = p.substring(0,qs) + query + '&' + p.substring(qs+1);\n } else {\n if (h !== -1) {\n p = options.path;\n options.path = p.substring(0,h) + query + p.substring(h);\n } else {\n options.path = options.path + query;\n }\n }\n}\n\nfunction formatUrl(u, protocol) {\n protocol = protocol || u.protocol;\n if (!protocol && u.port) {\n if (u.port === 80) {\n protocol = 'http:';\n } else if (u.port === 443) {\n protocol = 'https:';\n }\n }\n protocol = protocol || 'https:';\n\n if (!u.hostname) {\n return null;\n }\n var result = protocol + '//' + u.hostname;\n if (u.port) {\n result = result + ':' + u.port;\n }\n if (u.path) {\n result = result + u.path;\n }\n return result;\n}\n\nfunction stringify(obj, backup) {\n var value, error;\n try {\n value = RollbarJSON.stringify(obj);\n } catch (jsonError) {\n if (backup && isFunction(backup)) {\n try {\n value = backup(obj);\n } catch (backupError) {\n error = backupError;\n }\n } else {\n error = jsonError;\n }\n }\n return {error: error, value: value};\n}\n\nfunction maxByteSize(string) {\n // The transport will use utf-8, so assume utf-8 encoding.\n //\n // This minimal implementation will accurately count bytes for all UCS-2 and\n // single code point UTF-16. If presented with multi code point UTF-16,\n // which should be rare, it will safely overcount, not undercount.\n //\n // While robust utf-8 encoders exist, this is far smaller and far more performant.\n // For quickly counting payload size for truncation, smaller is better.\n\n var count = 0;\n var length = string.length;\n\n for (var i = 0; i < length; i++) {\n var code = string.charCodeAt(i);\n if (code < 128) { // up to 7 bits\n count = count + 1;\n } else if (code < 2048) { // up to 11 bits\n count = count + 2;\n } else if (code < 65536) { // up to 16 bits\n count = count + 3;\n }\n }\n\n return count;\n}\n\nfunction jsonParse(s) {\n var value, error;\n try {\n value = RollbarJSON.parse(s);\n } catch (e) {\n error = e;\n }\n return {error: error, value: value};\n}\n\nfunction makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n mode,\n backupMessage,\n errorParser\n) {\n var location = {\n url: url || '',\n line: lineno,\n column: colno\n };\n location.func = errorParser.guessFunctionName(location.url, location.line);\n location.context = errorParser.gatherContext(location.url, location.line);\n var href = typeof document !== 'undefined' && document && document.location && document.location.href;\n var useragent = typeof window !== 'undefined' && window && window.navigator && window.navigator.userAgent;\n return {\n 'mode': mode,\n 'message': error ? String(error) : (message || backupMessage),\n 'url': href,\n 'stack': [location],\n 'useragent': useragent\n };\n}\n\nfunction wrapCallback(logger, f) {\n return function(err, resp) {\n try {\n f(err, resp);\n } catch (e) {\n logger.error(e);\n }\n };\n}\n\nfunction createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\n var diagnostic = {};\n var argTypes = [];\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n argTypes.push(typ);\n switch (typ) {\n case 'undefined':\n break;\n case 'string':\n message ? extraArgs.push(arg) : message = arg;\n break;\n case 'function':\n callback = wrapCallback(logger, arg);\n break;\n case 'date':\n extraArgs.push(arg);\n break;\n case 'error':\n case 'domexception':\n case 'exception': // Firefox Exception type\n err ? extraArgs.push(arg) : err = arg;\n break;\n case 'object':\n case 'array':\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n if (requestKeys && typ === 'object' && !request) {\n for (var j = 0, len = requestKeys.length; j < len; ++j) {\n if (arg[requestKeys[j]] !== undefined) {\n request = arg;\n break;\n }\n }\n if (request) {\n break;\n }\n }\n custom ? extraArgs.push(arg) : custom = arg;\n break;\n default:\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n extraArgs.push(arg);\n }\n }\n\n if (extraArgs.length > 0) {\n // if custom is an array this turns it into an object with integer keys\n custom = merge(custom);\n custom.extraArgs = extraArgs;\n }\n\n var item = {\n message: message,\n err: err,\n custom: custom,\n timestamp: now(),\n callback: callback,\n notifier: notifier,\n diagnostic: diagnostic,\n uuid: uuid4()\n };\n\n setCustomItemKeys(item, custom);\n\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n item.diagnostic.original_arg_types = argTypes;\n return item;\n}\n\nfunction setCustomItemKeys(item, custom) {\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (custom && custom.skipFrames !== undefined) {\n item.skipFrames = custom.skipFrames;\n delete custom.skipFrames;\n }\n}\n\nfunction addErrorContext(item, errors) {\n var custom = item.data.custom || {};\n var contextAdded = false;\n\n try {\n for (var i = 0; i < errors.length; ++i) {\n if (errors[i].hasOwnProperty('rollbarContext')) {\n custom = merge(custom, errors[i].rollbarContext);\n contextAdded = true;\n }\n }\n\n // Avoid adding an empty object to the data.\n if (contextAdded) {\n item.data.custom = custom;\n }\n } catch (e) {\n item.diagnostic.error_context = 'Failed: ' + e.message;\n }\n}\n\nvar TELEMETRY_TYPES = ['log', 'network', 'dom', 'navigation', 'error', 'manual'];\nvar TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];\n\nfunction arrayIncludes(arr, val) {\n for (var k = 0; k < arr.length; ++k) {\n if (arr[k] === val) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction createTelemetryEvent(args) {\n var type, metadata, level;\n var arg;\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n switch (typ) {\n case 'string':\n if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {\n type = arg;\n } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {\n level = arg;\n }\n break;\n case 'object':\n metadata = arg;\n break;\n default:\n break;\n }\n }\n var event = {\n type: type || 'manual',\n metadata: metadata || {},\n level: level\n };\n\n return event;\n}\n\n/*\n * get - given an obj/array and a keypath, return the value at that keypath or\n * undefined if not possible.\n *\n * @param obj - an object or array\n * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'\n * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`\n */\nfunction get(obj, path) {\n if (!obj) {\n return undefined;\n }\n var keys = path.split('.');\n var result = obj;\n try {\n for (var i = 0, len = keys.length; i < len; ++i) {\n result = result[keys[i]];\n }\n } catch (e) {\n result = undefined;\n }\n return result;\n}\n\nfunction set(obj, path, value) {\n if (!obj) {\n return;\n }\n var keys = path.split('.');\n var len = keys.length;\n if (len < 1) {\n return;\n }\n if (len === 1) {\n obj[keys[0]] = value;\n return;\n }\n try {\n var temp = obj[keys[0]] || {};\n var replacement = temp;\n for (var i = 1; i < len - 1; ++i) {\n temp[keys[i]] = temp[keys[i]] || {};\n temp = temp[keys[i]];\n }\n temp[keys[len-1]] = value;\n obj[keys[0]] = replacement;\n } catch (e) {\n return;\n }\n}\n\nfunction formatArgsAsString(args) {\n var i, len, arg;\n var result = [];\n for (i = 0, len = args.length; i < len; ++i) {\n arg = args[i];\n switch (typeName(arg)) {\n case 'object':\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500) {\n arg = arg.substr(0, 497) + '...';\n }\n break;\n case 'null':\n arg = 'null';\n break;\n case 'undefined':\n arg = 'undefined';\n break;\n case 'symbol':\n arg = arg.toString();\n break;\n }\n result.push(arg);\n }\n return result.join(' ');\n}\n\nfunction now() {\n if (Date.now) {\n return +Date.now();\n }\n return +new Date();\n}\n\nfunction filterIp(requestData, captureIp) {\n if (!requestData || !requestData['user_ip'] || captureIp === true) {\n return;\n }\n var newIp = requestData['user_ip'];\n if (!captureIp) {\n newIp = null;\n } else {\n try {\n var parts;\n if (newIp.indexOf('.') !== -1) {\n parts = newIp.split('.');\n parts.pop();\n parts.push('0');\n newIp = parts.join('.');\n } else if (newIp.indexOf(':') !== -1) {\n parts = newIp.split(':');\n if (parts.length > 2) {\n var beginning = parts.slice(0, 3);\n var slashIdx = beginning[2].indexOf('/');\n if (slashIdx !== -1) {\n beginning[2] = beginning[2].substring(0, slashIdx);\n }\n var terminal = '0000:0000:0000:0000:0000';\n newIp = beginning.concat(terminal).join(':');\n }\n } else {\n newIp = null;\n }\n } catch (e) {\n newIp = null;\n }\n }\n requestData['user_ip'] = newIp;\n}\n\nfunction handleOptions(current, input, payload, logger) {\n var result = merge(current, input, payload);\n result = updateDeprecatedOptions(result, logger);\n if (!input || input.overwriteScrubFields) {\n return result;\n }\n if (input.scrubFields) {\n result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);\n }\n return result;\n}\n\nfunction updateDeprecatedOptions(options, logger) {\n if(options.hostWhiteList && !options.hostSafeList) {\n options.hostSafeList = options.hostWhiteList;\n options.hostWhiteList = undefined;\n logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');\n }\n if(options.hostBlackList && !options.hostBlockList) {\n options.hostBlockList = options.hostBlackList;\n options.hostBlackList = undefined;\n logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');\n }\n return options;\n}\n\nmodule.exports = {\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n createItem: createItem,\n addErrorContext: addErrorContext,\n createTelemetryEvent: createTelemetryEvent,\n filterIp: filterIp,\n formatArgsAsString: formatArgsAsString,\n formatUrl: formatUrl,\n get: get,\n handleOptions: handleOptions,\n isError: isError,\n isFiniteNumber: isFiniteNumber,\n isFunction: isFunction,\n isIterable: isIterable,\n isNativeFunction: isNativeFunction,\n isObject: isObject,\n isString: isString,\n isType: isType,\n isPromise: isPromise,\n jsonParse: jsonParse,\n LEVELS: LEVELS,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n merge: merge,\n now: now,\n redact: redact,\n RollbarJSON: RollbarJSON,\n sanitizeUrl: sanitizeUrl,\n set: set,\n setupJSON: setupJSON,\n stringify: stringify,\n maxByteSize: maxByteSize,\n typeName: typeName,\n uuid4: uuid4\n};\n","'use strict';\n\n/* eslint-disable no-console */\nrequire('console-polyfill');\nvar detection = require('./detection');\nvar _ = require('../utility');\n\nfunction error() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.error(_.formatArgsAsString(args));\n } else {\n console.error.apply(console, args);\n }\n}\n\nfunction info() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.info(_.formatArgsAsString(args));\n } else {\n console.info.apply(console, args);\n }\n}\n\nfunction log() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.log(_.formatArgsAsString(args));\n } else {\n console.log.apply(console, args);\n }\n}\n\n/* eslint-enable no-console */\n\nmodule.exports = {\n error: error,\n info: info,\n log: log\n};\n","'use strict';\n\n// See https://nodejs.org/docs/latest/api/url.html\nfunction parse(url) {\n var result = {\n protocol: null, auth: null, host: null, path: null,\n hash: null, href: url, hostname: null, port: null,\n pathname: null, search: null, query: null\n };\n\n var i, last;\n i = url.indexOf('//');\n if (i !== -1) {\n result.protocol = url.substring(0,i);\n last = i+2;\n } else {\n last = 0;\n }\n \n i = url.indexOf('@', last);\n if (i !== -1) {\n result.auth = url.substring(last, i);\n last = i+1;\n }\n\n i = url.indexOf('/', last);\n if (i === -1) {\n i = url.indexOf('?', last);\n if (i === -1) {\n i = url.indexOf('#', last);\n if (i === -1) {\n result.host = url.substring(last);\n } else {\n result.host = url.substring(last, i);\n result.hash = url.substring(i);\n }\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n return result;\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n\n i = url.indexOf('#', last);\n if (i === -1) {\n result.path = url.substring(last);\n } else {\n result.path = url.substring(last, i);\n result.hash = url.substring(i);\n }\n\n if (result.path) {\n var pathParts = result.path.split('?');\n result.pathname = pathParts[0];\n result.query = pathParts[1];\n result.search = result.query ? '?' + result.query : null;\n }\n return result;\n}\n\nmodule.exports = {\n parse: parse\n};\n","'use strict';\n\nvar ErrorStackParser = require('error-stack-parser');\n\nvar UNKNOWN_FUNCTION = '?';\nvar ERR_CLASS_REGEXP = new RegExp('^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ');\n\nfunction guessFunctionName() {\n return UNKNOWN_FUNCTION;\n}\n\n\nfunction gatherContext() {\n return null;\n}\n\n\nfunction Frame(stackFrame) {\n var data = {};\n\n data._stackFrame = stackFrame;\n\n data.url = stackFrame.fileName;\n data.line = stackFrame.lineNumber;\n data.func = stackFrame.functionName;\n data.column = stackFrame.columnNumber;\n data.args = stackFrame.args;\n\n data.context = gatherContext();\n\n return data;\n}\n\n\nfunction Stack(exception, skip) {\n function getStack() {\n var parserStack = [];\n\n skip = skip || 0;\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch(e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = skip; i < parserStack.length; i++) {\n stack.push(new Frame(parserStack[i]));\n }\n\n return stack;\n }\n\n return {\n stack: getStack(),\n message: exception.message,\n name: _mostSpecificErrorName(exception),\n rawStack: exception.stack,\n rawException: exception\n };\n}\n\n\nfunction parse(e, skip) {\n var err = e;\n\n if (err.nested) {\n var traceChain = [];\n while (err) {\n traceChain.push(new Stack(err, skip));\n err = err.nested;\n\n skip = 0; // Only apply skip value to primary error\n }\n\n // Return primary error with full trace chain attached.\n traceChain[0].traceChain = traceChain;\n return traceChain[0];\n } else {\n return new Stack(err, skip);\n }\n}\n\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg || !errMsg.match) {\n return ['Unknown error. There was no error message to display.', ''];\n }\n var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);\n var errClass = '(unknown)';\n\n if (errClassMatch) {\n errClass = errClassMatch[errClassMatch.length - 1];\n errMsg = errMsg.replace((errClassMatch[errClassMatch.length - 2] || '') + errClass + ':', '');\n errMsg = errMsg.replace(/(^[\\s]+|[\\s]+$)/g, '');\n }\n return [errClass, errMsg];\n}\n\n// * Prefers any value over an empty string\n// * Prefers any value over 'Error' where possible\n// * Prefers name over constructor.name when both are more specific than 'Error'\nfunction _mostSpecificErrorName(error) {\n var name = error.name && error.name.length && error.name;\n var constructorName = error.constructor.name && error.constructor.name.length && error.constructor.name;\n\n if (!name || !constructorName) {\n return name || constructorName;\n }\n\n if (name === 'Error') {\n return constructorName;\n }\n return name;\n}\n\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame\n};\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction scrub(data, scrubFields, scrubPaths) {\n scrubFields = scrubFields || [];\n\n if (scrubPaths) {\n for (var i = 0; i < scrubPaths.length; ++i) {\n scrubPath(data, scrubPaths[i]);\n }\n }\n\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart) {\n return paramPart + _.redact();\n }\n\n function paramScrubber(v) {\n var i;\n if (_.isType(v, 'string')) {\n for (i = 0; i < queryRes.length; ++i) {\n v = v.replace(queryRes[i], redactQueryParam);\n }\n }\n return v;\n }\n\n function valScrubber(k, v) {\n var i;\n for (i = 0; i < paramRes.length; ++i) {\n if (paramRes[i].test(k)) {\n v = _.redact();\n break;\n }\n }\n return v;\n }\n\n function scrubber(k, v, seen) {\n var tmpV = valScrubber(k, v);\n if (tmpV === v) {\n if (_.isType(v, 'object') || _.isType(v, 'array')) {\n return traverse(v, scrubber, seen);\n }\n return paramScrubber(tmpV);\n } else {\n return tmpV;\n }\n }\n\n return traverse(data, scrubber);\n}\n\nfunction scrubPath(obj, path) {\n var keys = path.split('.');\n var last = keys.length - 1;\n try {\n for (var i = 0; i <= last; ++i) {\n if (i < last) {\n obj = obj[keys[i]];\n } else {\n obj[keys[i]] = _.redact();\n }\n }\n } catch (e) {\n // Missing key is OK;\n }\n}\n\nfunction _getScrubFieldRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '^\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?$';\n ret.push(new RegExp(pat, 'i'));\n }\n return ret;\n}\n\n\nfunction _getScrubQueryParamRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?';\n ret.push(new RegExp('(' + pat + '=)([^&\\\\n]+)', 'igm'));\n }\n return ret;\n}\n\nmodule.exports = scrub;\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction traverse(obj, func, seen) {\n var k, v, i;\n var isObj = _.isType(obj, 'object');\n var isArray = _.isType(obj, 'array');\n var keys = [];\n var seenIndex;\n\n // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.\n seen = seen || { obj: [], mapped: []};\n\n if (isObj) {\n seenIndex = seen.obj.indexOf(obj);\n\n if (isObj && seenIndex !== -1) {\n // Prefer the mapped object if there is one.\n return seen.mapped[seenIndex] || seen.obj[seenIndex];\n }\n\n seen.obj.push(obj);\n seenIndex = seen.obj.length - 1;\n }\n\n if (isObj) {\n for (k in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, k)) {\n keys.push(k);\n }\n }\n } else if (isArray) {\n for (i = 0; i < obj.length; ++i) {\n keys.push(i);\n }\n }\n\n var result = isObj ? {} : [];\n var same = true;\n for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n result[k] = func(k, v, seen);\n same = same && result[k] === obj[k];\n }\n\n if (isObj && !same) {\n seen.mapped[seenIndex] = result;\n }\n\n return !same ? result : obj;\n}\n\nmodule.exports = traverse;\n","'use strict';\n\nvar rollbar = require('../rollbar');\n\nvar options = (typeof window !== 'undefined') && window._rollbarConfig;\nvar alias = options && options.globalAlias || 'Rollbar';\nvar shimRunning = (typeof window !== 'undefined') && window[alias] && typeof window[alias].shimId === 'function' && window[alias].shimId() !== undefined;\n\nif ((typeof window !== 'undefined') && !window._rollbarStartTime) {\n window._rollbarStartTime = (new Date()).getTime();\n}\n\nif (!shimRunning && options) {\n var Rollbar = new rollbar(options);\n window[alias] = Rollbar;\n} else if (typeof window !== 'undefined') {\n window.rollbar = rollbar;\n window._rollbarDidLoad = true;\n} else if (typeof self !== 'undefined') {\n self.rollbar = rollbar;\n self._rollbarDidLoad = true;\n}\n\nmodule.exports = rollbar;\n","'use strict';\n\nvar Rollbar = require('./core');\nvar telemeter = require('../telemetry');\nvar instrumenter = require('./telemetry');\nvar polyfillJSON = require('../utility/polyfillJSON');\nvar wrapGlobals = require('./wrapGlobals');\nvar scrub = require('../scrub');\nvar truncation = require('../truncation');\n\nRollbar.setComponents({\n telemeter: telemeter,\n instrumenter: instrumenter,\n polyfillJSON: polyfillJSON,\n wrapGlobals: wrapGlobals,\n scrub: scrub,\n truncation: truncation\n});\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar Client = require('../rollbar');\nvar _ = require('../utility');\nvar API = require('../api');\nvar logger = require('./logger');\nvar globals = require('./globalSetup');\n\nvar Transport = require('./transport');\nvar urllib = require('./url');\n\nvar transforms = require('./transforms');\nvar sharedTransforms = require('../transforms');\nvar predicates = require('./predicates');\nvar sharedPredicates = require('../predicates');\nvar errorParser = require('../errorParser');\n\nfunction Rollbar(options, client) {\n this.options = _.handleOptions(defaultOptions, options, null, logger);\n this.options._configuredOptions = options;\n var Telemeter = this.components.telemeter;\n var Instrumenter = this.components.instrumenter;\n var polyfillJSON = this.components.polyfillJSON;\n this.wrapGlobals = this.components.wrapGlobals;\n this.scrub = this.components.scrub;\n var truncation = this.components.truncation;\n\n var transport = new Transport(truncation);\n var api = new API(this.options, transport, urllib, truncation);\n if (Telemeter) {\n this.telemeter = new Telemeter(this.options);\n }\n this.client = client || new Client(this.options, api, logger, this.telemeter, 'browser');\n var gWindow = _gWindow();\n var gDocument = (typeof document != 'undefined') && document;\n this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers\n this.anonymousErrorsPending = 0;\n addTransformsToNotifier(this.client.notifier, this, gWindow);\n addPredicatesToQueue(this.client.queue);\n this.setupUnhandledCapture();\n if (Instrumenter) {\n this.instrumenter = new Instrumenter(this.options, this.client.telemeter, this, gWindow, gDocument);\n this.instrumenter.instrument();\n }\n _.setupJSON(polyfillJSON);\n}\n\nvar _instance = null;\nRollbar.init = function(options, client) {\n if (_instance) {\n return _instance.global(options).configure(options);\n }\n _instance = new Rollbar(options, client);\n return _instance;\n};\n\nRollbar.prototype.components = {};\n\nRollbar.setComponents = function(components) {\n Rollbar.prototype.components = components;\n}\n\nfunction handleUninitialized(maybeCallback) {\n var message = 'Rollbar is not initialized';\n logger.error(message);\n if (maybeCallback) {\n maybeCallback(new Error(message));\n }\n}\n\nRollbar.prototype.global = function(options) {\n this.client.global(options);\n return this;\n};\nRollbar.global = function(options) {\n if (_instance) {\n return _instance.global(options);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.configure = function(options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = {payload: payloadData};\n }\n this.options = _.handleOptions(oldOptions, options, payload, logger);\n this.options._configuredOptions = _.handleOptions(oldOptions._configuredOptions, options, payload);\n this.client.configure(this.options, payloadData);\n this.instrumenter && this.instrumenter.configure(this.options);\n this.setupUnhandledCapture();\n return this;\n};\nRollbar.configure = function(options, payloadData) {\n if (_instance) {\n return _instance.configure(options, payloadData);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.lastError = function() {\n return this.client.lastError;\n};\nRollbar.lastError = function() {\n if (_instance) {\n return _instance.lastError();\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.log = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.log(item);\n return {uuid: uuid};\n};\nRollbar.log = function() {\n if (_instance) {\n return _instance.log.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.debug = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.debug(item);\n return {uuid: uuid};\n};\nRollbar.debug = function() {\n if (_instance) {\n return _instance.debug.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.info = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.info(item);\n return {uuid: uuid};\n};\nRollbar.info = function() {\n if (_instance) {\n return _instance.info.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warn = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warn(item);\n return {uuid: uuid};\n};\nRollbar.warn = function() {\n if (_instance) {\n return _instance.warn.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warning = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warning(item);\n return {uuid: uuid};\n};\nRollbar.warning = function() {\n if (_instance) {\n return _instance.warning.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.error = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.error(item);\n return {uuid: uuid};\n};\nRollbar.error = function() {\n if (_instance) {\n return _instance.error.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.critical = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.critical(item);\n return {uuid: uuid};\n};\nRollbar.critical = function() {\n if (_instance) {\n return _instance.critical.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.buildJsonPayload = function(item) {\n return this.client.buildJsonPayload(item);\n};\nRollbar.buildJsonPayload = function() {\n if (_instance) {\n return _instance.buildJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.sendJsonPayload = function(jsonPayload) {\n return this.client.sendJsonPayload(jsonPayload);\n};\nRollbar.sendJsonPayload = function() {\n if (_instance) {\n return _instance.sendJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.setupUnhandledCapture = function() {\n var gWindow = _gWindow();\n\n if (!this.unhandledExceptionsInitialized) {\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(gWindow, this);\n if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {\n this.wrapGlobals(gWindow, this);\n }\n this.unhandledExceptionsInitialized = true;\n }\n }\n if (!this.unhandledRejectionsInitialized) {\n if (this.options.captureUnhandledRejections || this.options.handleUnhandledRejections) {\n globals.captureUnhandledRejections(gWindow, this);\n this.unhandledRejectionsInitialized = true;\n }\n }\n};\n\nRollbar.prototype.handleUncaughtException = function(message, url, lineno, colno, error, context) {\n if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {\n return;\n }\n\n // Chrome will always send 5+ arguments and error will be valid or null, not undefined.\n // If error is undefined, we have a different caller.\n // Chrome also sends errors from web workers with null error, but does not invoke\n // prepareStackTrace() for these. Test for empty url to skip them.\n if (this.options.inspectAnonymousErrors && this.isChrome && error === null && url === '') {\n return 'anonymous';\n }\n\n var item;\n var stackInfo = _.makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n 'onerror',\n 'uncaught exception',\n errorParser\n );\n if (_.isError(error)) {\n item = this._createItem([message, error, context]);\n item._unhandledStackInfo = stackInfo;\n } else if (_.isError(url)) {\n item = this._createItem([message, url, context]);\n item._unhandledStackInfo = stackInfo;\n } else {\n item = this._createItem([message, context]);\n item.stackInfo = stackInfo;\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n this.client.log(item);\n};\n\n/**\n * Chrome only. Other browsers will ignore.\n *\n * Use Error.prepareStackTrace to extract information about errors that\n * do not have a valid error object in onerror().\n *\n * In tested version of Chrome, onerror is called first but has no way\n * to communicate with prepareStackTrace. Use a counter to let this\n * handler know which errors to send to Rollbar.\n *\n * In config options, set inspectAnonymousErrors to enable.\n */\nRollbar.prototype.handleAnonymousErrors = function() {\n if (!this.options.inspectAnonymousErrors || !this.isChrome) {\n return;\n }\n\n var r = this;\n function prepareStackTrace(error, _stack) { // eslint-disable-line no-unused-vars\n if (r.options.inspectAnonymousErrors) {\n if (r.anonymousErrorsPending) {\n // This is the only known way to detect that onerror saw an anonymous error.\n // It depends on onerror reliably being called before Error.prepareStackTrace,\n // which so far holds true on tested versions of Chrome. If versions of Chrome\n // are tested that behave differently, this logic will need to be updated\n // accordingly.\n r.anonymousErrorsPending -= 1;\n\n if (!error) {\n // Not likely to get here, but calling handleUncaughtException from here\n // without an error object would throw off the anonymousErrorsPending counter,\n // so return now.\n return;\n }\n\n // Allow this to be tracked later.\n error._isAnonymous = true;\n\n // url, lineno, colno shouldn't be needed for these errors.\n // If that changes, update this accordingly, using the unused\n // _stack param as needed (rather than parse error.toString()).\n r.handleUncaughtException(error.message, null, null, null, error);\n }\n }\n\n // Workaround to ensure stack is preserved for normal errors.\n return error.stack;\n }\n\n // https://v8.dev/docs/stack-trace-api\n try {\n Error.prepareStackTrace = prepareStackTrace;\n } catch (e) {\n this.options.inspectAnonymousErrors = false;\n this.error('anonymous error handler failed', e);\n }\n}\n\nRollbar.prototype.handleUnhandledRejection = function(reason, promise) {\n if (!this.options.captureUnhandledRejections && !this.options.handleUnhandledRejections) {\n return;\n }\n\n var message = 'unhandled rejection was null or undefined!';\n if (reason) {\n if (reason.message) {\n message = reason.message;\n } else {\n var reasonResult = _.stringify(reason);\n if (reasonResult.value) {\n message = reasonResult.value;\n }\n }\n }\n var context = (reason && reason._rollbarContext) || (promise && promise._rollbarContext);\n\n var item;\n if (_.isError(reason)) {\n item = this._createItem([message, reason, context]);\n } else {\n item = this._createItem([message, reason, context]);\n item.stackInfo = _.makeUnhandledStackInfo(\n message,\n '',\n 0,\n 0,\n null,\n 'unhandledrejection',\n '',\n errorParser\n );\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n item._originalArgs = item._originalArgs || [];\n item._originalArgs.push(promise);\n this.client.log(item);\n};\n\nRollbar.prototype.wrap = function(f, context, _before) {\n try {\n var ctxFn;\n if(_.isFunction(context)) {\n ctxFn = context;\n } else {\n ctxFn = function() { return context || {}; };\n }\n\n if (!_.isFunction(f)) {\n return f;\n }\n\n if (f._isWrap) {\n return f;\n }\n\n if (!f._rollbar_wrapped) {\n f._rollbar_wrapped = function () {\n if (_before && _.isFunction(_before)) {\n _before.apply(this, arguments);\n }\n try {\n return f.apply(this, arguments);\n } catch(exc) {\n var e = exc;\n if (e && window._rollbarWrappedError !== e) {\n if (_.isType(e, 'string')) {\n e = new String(e);\n }\n e._rollbarContext = ctxFn() || {};\n e._rollbarContext._wrappedSource = f.toString();\n\n window._rollbarWrappedError = e;\n }\n throw e;\n }\n };\n\n f._rollbar_wrapped._isWrap = true;\n\n if (f.hasOwnProperty) {\n for (var prop in f) {\n if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {\n f._rollbar_wrapped[prop] = f[prop];\n }\n }\n }\n }\n\n return f._rollbar_wrapped;\n } catch (e) {\n // Return the original function if the wrap fails.\n return f;\n }\n};\nRollbar.wrap = function(f, context) {\n if (_instance) {\n return _instance.wrap(f, context);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.captureEvent = function() {\n var event = _.createTelemetryEvent(arguments);\n return this.client.captureEvent(event.type, event.metadata, event.level);\n};\nRollbar.captureEvent = function() {\n if (_instance) {\n return _instance.captureEvent.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\n// The following two methods are used internally and are not meant for public use\nRollbar.prototype.captureDomContentLoaded = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureLoad(ts);\n};\n\n/* Internal */\n\nfunction addTransformsToNotifier(notifier, rollbar, gWindow) {\n notifier\n .addTransform(transforms.handleDomException)\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(gWindow))\n .addTransform(transforms.addClientInfo(gWindow))\n .addTransform(transforms.addPluginInfo(gWindow))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(sharedTransforms.addConfigToPayload)\n .addTransform(transforms.addScrubber(rollbar.scrub))\n .addTransform(sharedTransforms.userTransform(logger))\n .addTransform(sharedTransforms.addConfiguredOptions)\n .addTransform(sharedTransforms.addDiagnosticKeys)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(sharedPredicates.checkLevel)\n .addPredicate(predicates.checkIgnore)\n .addPredicate(sharedPredicates.userCheckIgnore(logger))\n .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))\n .addPredicate(sharedPredicates.urlIsSafeListed(logger))\n .addPredicate(sharedPredicates.messageIsIgnored(logger));\n}\n\nRollbar.prototype.loadFull = function() {\n logger.info('Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.');\n};\n\nRollbar.prototype._createItem = function(args) {\n return _.createItem(args, logger, this);\n};\n\nfunction _getFirstFunction(args) {\n for (var i = 0, len = args.length; i < len; ++i) {\n if (_.isFunction(args[i])) {\n return args[i];\n }\n }\n return undefined;\n}\n\nfunction _gWindow() {\n return ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n}\n\nvar defaults = require('../defaults');\nvar scrubFields = require('./defaults/scrubFields');\n\nvar defaultOptions = {\n version: defaults.version,\n scrubFields: scrubFields.scrubFields,\n logLevel: defaults.logLevel,\n reportLevel: defaults.reportLevel,\n uncaughtErrorLevel: defaults.uncaughtErrorLevel,\n endpoint: defaults.endpoint,\n verbose: false,\n enabled: true,\n transmit: true,\n sendConfig: false,\n includeItemsInTelemetry: true,\n captureIp: true,\n inspectAnonymousErrors: true,\n ignoreDuplicateErrors: true,\n wrapGlobalEventHandlers: false\n};\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar _ = require('./utility');\n\n/*\n * Rollbar - the interface to Rollbar\n *\n * @param options\n * @param api\n * @param logger\n */\nfunction Rollbar(options, api, logger, telemeter, platform) {\n this.options = _.merge(options);\n this.logger = logger;\n Rollbar.rateLimiter.configureGlobal(this.options);\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.api = api;\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n\n // This must happen before the Notifier is created\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = telemeter;\n setStackTraceLimit(options);\n this.lastError = null;\n this.lastErrorHash = 'none';\n}\n\nvar defaultOptions = {\n maxItems: 0,\n itemsPerMinute: 60\n};\n\nRollbar.rateLimiter = new RateLimiter(defaultOptions);\n\nRollbar.prototype.global = function (options) {\n Rollbar.rateLimiter.configureGlobal(options);\n return this;\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n\n this.options = _.merge(oldOptions, options, payload);\n\n // This must happen before the Notifier is configured\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier && this.notifier.configure(this.options);\n this.telemeter && this.telemeter.configure(this.options);\n setStackTraceLimit(options);\n this.global(this.options);\n\n if (validateTracer(options.tracer)) {\n this.tracer = options.tracer\n }\n\n return this;\n};\n\nRollbar.prototype.log = function (item) {\n var level = this._defaultLogLevel();\n return this._log(level, item);\n};\n\nRollbar.prototype.debug = function (item) {\n this._log('debug', item);\n};\n\nRollbar.prototype.info = function (item) {\n this._log('info', item);\n};\n\nRollbar.prototype.warn = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.warning = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.error = function (item) {\n this._log('error', item);\n};\n\nRollbar.prototype.critical = function (item) {\n this._log('critical', item);\n};\n\nRollbar.prototype.wait = function (callback) {\n this.queue.wait(callback);\n};\n\nRollbar.prototype.captureEvent = function (type, metadata, level) {\n return this.telemeter && this.telemeter.captureEvent(type, metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function (ts) {\n return this.telemeter && this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (ts) {\n return this.telemeter && this.telemeter.captureLoad(ts);\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.api.buildJsonPayload(item);\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n this.api.postJsonPayload(jsonPayload);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function (defaultLevel, item) {\n var callback;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {\n if (callback) {\n var error = new Error('ignored identical item');\n error.item = item;\n callback(error);\n }\n return;\n }\n try {\n this._addTracingInfo(item);\n item.level = item.level || defaultLevel;\n this.telemeter && this.telemeter._captureRollbarItem(item);\n item.telemetryEvents = (this.telemeter && this.telemeter.copyEvents()) || [];\n this.notifier.log(item, callback);\n } catch (e) {\n if (callback) {\n callback(e);\n }\n this.logger.error(e);\n }\n};\n\nRollbar.prototype._defaultLogLevel = function () {\n return this.options.logLevel || 'debug';\n};\n\nRollbar.prototype._sameAsLastError = function (item) {\n if (!item._isUncaught) {\n return false;\n }\n var itemHash = generateItemHash(item);\n if (this.lastErrorHash === itemHash) {\n return true;\n }\n this.lastError = item.err;\n this.lastErrorHash = itemHash;\n return false;\n};\n\nRollbar.prototype._addTracingInfo = function (item) {\n // Tracer validation occurs in the constructor\n // or in the Rollbar.prototype.configure methods\n if (this.tracer) {\n // add rollbar occurrence uuid to span\n var span = this.tracer.scope().active();\n\n if (validateSpan(span)) {\n span.setTag('rollbar.error_uuid', item.uuid);\n span.setTag('rollbar.has_error', true);\n span.setTag('error', true);\n span.setTag('rollbar.item_url', `https://rollbar.com/item/uuid/?uuid=${item.uuid}`);\n span.setTag('rollbar.occurrence_url', `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`);\n\n // add span ID & trace ID to occurrence\n var opentracingSpanId = span.context().toSpanId();\n var opentracingTraceId = span.context().toTraceId();\n\n if (item.custom) {\n item.custom.opentracing_span_id = opentracingSpanId;\n item.custom.opentracing_trace_id = opentracingTraceId;\n } else {\n item.custom = {\n opentracing_span_id: opentracingSpanId,\n opentracing_trace_id: opentracingTraceId\n };\n }\n }\n }\n}\n\nfunction generateItemHash(item) {\n var message = item.message || '';\n var stack = (item.err || {}).stack || String(item.err);\n return message + '::' + stack;\n}\n\n// Node.js, Chrome, Safari, and some other browsers support this property\n// which globally sets the number of stack frames returned in an Error object.\n// If a browser can't use it, no harm done.\nfunction setStackTraceLimit(options) {\n if (options.stackTraceLimit) {\n Error.stackTraceLimit = options.stackTraceLimit;\n }\n}\n\n/**\n * Validate the Tracer object provided to the Client\n * is valid for our Opentracing use case.\n * @param {opentracer.Tracer} tracer\n */\nfunction validateTracer(tracer) {\n if (!tracer) {\n return false;\n }\n\n if (!tracer.scope || typeof tracer.scope !== 'function') {\n return false;\n }\n\n var scope = tracer.scope();\n\n if (!scope || !scope.active || typeof scope.active !== 'function') {\n return false;\n }\n\n return true;\n}\n\n/**\n * Validate the Span object provided\n * @param {opentracer.Span} span\n */\nfunction validateSpan(span) {\n if (!span || !span.context || typeof span.context !== 'function') {\n return false;\n }\n\n var spanContext = span.context();\n\n if (!spanContext\n || !spanContext.toSpanId\n || !spanContext.toTraceId\n || typeof spanContext.toSpanId !== 'function'\n || typeof spanContext.toTraceId !== 'function') {\n return false\n }\n\n return true;\n}\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar\n *\n * @param options - the same options that are accepted by configureGlobal offered as a convenience\n */\nfunction RateLimiter(options) {\n this.startTime = _.now();\n this.counter = 0;\n this.perMinCounter = 0;\n this.platform = null;\n this.platformOptions = {};\n this.configureGlobal(options);\n}\n\nRateLimiter.globalSettings = {\n startTime: _.now(),\n maxItems: undefined,\n itemsPerMinute: undefined\n};\n\n/*\n * configureGlobal - set the global rate limiter options\n *\n * @param options - Only the following values are recognized:\n * startTime: a timestamp of the form returned by (new Date()).getTime()\n * maxItems: the maximum items\n * itemsPerMinute: the max number of items to send in a given minute\n */\nRateLimiter.prototype.configureGlobal = function(options) {\n if (options.startTime !== undefined) {\n RateLimiter.globalSettings.startTime = options.startTime;\n }\n if (options.maxItems !== undefined) {\n RateLimiter.globalSettings.maxItems = options.maxItems;\n }\n if (options.itemsPerMinute !== undefined) {\n RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;\n }\n};\n\n/*\n * shouldSend - determine if we should send a given item based on rate limit settings\n *\n * @param item - the item we are about to send\n * @returns An object with the following structure:\n * error: (Error|null)\n * shouldSend: bool\n * payload: (Object|null)\n * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and\n * exactly one of error or payload will be non-null. If error is non-null, the returned Error will\n * describe the situation, but it means that we were already over a rate limit (either globally or\n * per minute) when this item was checked. If error is null, and therefore payload is non-null, it\n * means this item put us over the global rate limit and the payload should be sent to Rollbar in\n * place of the passed in item.\n */\nRateLimiter.prototype.shouldSend = function(item, now) {\n now = now || _.now();\n var elapsedTime = now - this.startTime;\n if (elapsedTime < 0 || elapsedTime >= 60000) {\n this.startTime = now;\n this.perMinCounter = 0;\n }\n\n var globalRateLimit = RateLimiter.globalSettings.maxItems;\n var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;\n\n if (checkRate(item, globalRateLimit, this.counter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimit + ' max items reached', false);\n } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimitPerMin + ' items per minute reached', false);\n }\n this.counter++;\n this.perMinCounter++;\n\n var shouldSend = !checkRate(item, globalRateLimit, this.counter);\n var perMinute = shouldSend;\n shouldSend = shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);\n return shouldSendValue(this.platform, this.platformOptions, null, shouldSend, globalRateLimit, globalRateLimitPerMin, perMinute);\n};\n\nRateLimiter.prototype.setPlatformOptions = function(platform, options) {\n this.platform = platform;\n this.platformOptions = options;\n};\n\n/* Helpers */\n\nfunction checkRate(item, limit, counter) {\n return !item.ignoreRateLimit && limit >= 1 && counter > limit;\n}\n\nfunction shouldSendValue(platform, options, error, shouldSend, globalRateLimit, limitPerMin, perMinute) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute);\n }\n return {error: error, shouldSend: shouldSend, payload: payload};\n}\n\nfunction rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute) {\n var environment = options.environment || (options.payload && options.payload.environment);\n var msg;\n if (perMinute) {\n msg = 'item per minute limit reached, ignoring errors until timeout';\n } else {\n msg = 'maxItems has been hit, ignoring errors until reset.';\n }\n var item = {\n body: {\n message: {\n body: msg,\n extra: {\n maxItems: globalRateLimit,\n itemsPerMinute: limitPerMin\n }\n }\n },\n language: 'javascript',\n environment: environment,\n notifier: {\n version: (options.notifier && options.notifier.version) || options.version\n }\n };\n if (platform === 'browser') {\n item.platform = 'browser';\n item.framework = 'browser-js';\n item.notifier.name = 'rollbar-browser-js';\n } else if (platform === 'server') {\n item.framework = options.framework || 'node-js';\n item.notifier.name = options.notifier.name;\n } else if (platform === 'react-native') {\n item.framework = options.framework || 'react-native';\n item.notifier.name = options.notifier.name;\n }\n return item;\n}\n\nmodule.exports = RateLimiter;\n","'use strict';\n\n'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isPlainObject = function isPlainObject(obj) {\n\tif (!obj || toStr.call(obj) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tvar hasOwnConstructor = hasOwn.call(obj, 'constructor');\n\tvar hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n\t// Not own constructor property must be Object\n\tif (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n\t\treturn false;\n\t}\n\n\t// Own properties are enumerated firstly, so to speed up,\n\t// if last one is own, then all properties are own.\n\tvar key;\n\tfor (key in obj) {/**/}\n\n\treturn typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\nfunction merge() {\n var i, src, copy, clone, name,\n result = {},\n current = null,\n length = arguments.length;\n\n for (i=0; i < length; i++) {\n current = arguments[i];\n if (current == null) {\n continue;\n }\n\n for (name in current) {\n src = result[name];\n copy = current[name];\n if (result !== copy) {\n if (copy && isPlainObject(copy)) {\n clone = src && isPlainObject(src) ? src : {};\n result[name] = merge(clone, copy);\n } else if (typeof copy !== 'undefined') {\n result[name] = copy;\n }\n }\n }\n }\n return result;\n}\n\nmodule.exports = merge;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Queue - an object which handles which handles a queue of items to be sent to Rollbar.\n * This object handles rate limiting via a passed in rate limiter, retries based on connection\n * errors, and filtering of items based on a set of configurable predicates. The communication to\n * the backend is performed via a given API object.\n *\n * @param rateLimiter - An object which conforms to the interface\n * rateLimiter.shouldSend(item) -> bool\n * @param api - An object which conforms to the interface\n * api.postItem(payload, function(err, response))\n * @param logger - An object used to log verbose messages if desired\n * @param options - see Queue.prototype.configure\n */\nfunction Queue(rateLimiter, api, logger, options) {\n this.rateLimiter = rateLimiter;\n this.api = api;\n this.logger = logger;\n this.options = options;\n this.predicates = [];\n this.pendingItems = [];\n this.pendingRequests = [];\n this.retryQueue = [];\n this.retryHandle = null;\n this.waitCallback = null;\n this.waitIntervalID = null;\n}\n\n/*\n * configure - updates the options this queue uses\n *\n * @param options\n */\nQueue.prototype.configure = function(options) {\n this.api && this.api.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addPredicate - adds a predicate to the end of the list of predicates for this queue\n *\n * @param predicate - function(item, options) -> (bool|{err: Error})\n * Returning true means that this predicate passes and the item is okay to go on the queue\n * Returning false means do not add the item to the queue, but it is not an error\n * Returning {err: Error} means do not add the item to the queue, and the given error explains why\n * Returning {err: undefined} is equivalent to returning true but don't do that\n */\nQueue.prototype.addPredicate = function(predicate) {\n if (_.isFunction(predicate)) {\n this.predicates.push(predicate);\n }\n return this;\n};\n\nQueue.prototype.addPendingItem = function(item) {\n this.pendingItems.push(item);\n};\n\nQueue.prototype.removePendingItem = function(item) {\n var idx = this.pendingItems.indexOf(item);\n if (idx !== -1) {\n this.pendingItems.splice(idx, 1);\n }\n};\n\n/*\n * addItem - Send an item to the Rollbar API if all of the predicates are satisfied\n *\n * @param item - The payload to send to the backend\n * @param callback - function(error, repsonse) which will be called with the response from the API\n * in the case of a success, otherwise response will be null and error will have a value. If both\n * error and response are null then the item was stopped by a predicate which did not consider this\n * to be an error condition, but nonetheless did not send the item to the API.\n * @param originalError - The original error before any transformations that is to be logged if any\n */\nQueue.prototype.addItem = function(item, callback, originalError, originalItem) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() { return; };\n }\n var predicateResult = this._applyPredicates(item);\n if (predicateResult.stop) {\n this.removePendingItem(originalItem);\n callback(predicateResult.err);\n return;\n }\n this._maybeLog(item, originalError);\n this.removePendingItem(originalItem);\n if (!this.options.transmit) {\n callback(new Error('Transmit disabled'));\n return;\n }\n this.pendingRequests.push(item);\n try {\n this._makeApiRequest(item, function(err, resp) {\n this._dequeuePendingRequest(item);\n callback(err, resp);\n }.bind(this));\n } catch (e) {\n this._dequeuePendingRequest(item);\n callback(e);\n }\n};\n\n/*\n * wait - Stop any further errors from being added to the queue, and get called back when all items\n * currently processing have finished sending to the backend.\n *\n * @param callback - function() called when all pending items have been sent\n */\nQueue.prototype.wait = function(callback) {\n if (!_.isFunction(callback)) {\n return;\n }\n this.waitCallback = callback;\n if (this._maybeCallWait()) {\n return;\n }\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitIntervalID = setInterval(function() {\n this._maybeCallWait();\n }.bind(this), 500);\n};\n\n/* _applyPredicates - Sequentially applies the predicates that have been added to the queue to the\n * given item with the currently configured options.\n *\n * @param item - An item in the queue\n * @returns {stop: bool, err: (Error|null)} - stop being true means do not add item to the queue,\n * the error value should be passed up to a callbak if we are stopping.\n */\nQueue.prototype._applyPredicates = function(item) {\n var p = null;\n for (var i = 0, len = this.predicates.length; i < len; i++) {\n p = this.predicates[i](item, this.options);\n if (!p || p.err !== undefined) {\n return {stop: true, err: p.err};\n }\n }\n return {stop: false, err: null};\n};\n\n/*\n * _makeApiRequest - Send an item to Rollbar, callback when done, if there is an error make an\n * effort to retry if we are configured to do so.\n *\n * @param item - an item ready to send to the backend\n * @param callback - function(err, response)\n */\nQueue.prototype._makeApiRequest = function(item, callback) {\n var rateLimitResponse = this.rateLimiter.shouldSend(item);\n if (rateLimitResponse.shouldSend) {\n this.api.postItem(item, function(err, resp) {\n if (err) {\n this._maybeRetry(err, item, callback);\n } else {\n callback(err, resp);\n }\n }.bind(this));\n } else if (rateLimitResponse.error) {\n callback(rateLimitResponse.error);\n } else {\n this.api.postItem(rateLimitResponse.payload, callback);\n }\n};\n\n// These are errors basically mean there is no internet connection\nvar RETRIABLE_ERRORS = ['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED', 'EHOSTUNREACH', 'EPIPE', 'EAI_AGAIN'];\n\n/*\n * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback\n * with the error.\n *\n * @param err - an error returned by the API transport\n * @param item - the item that was trying to be sent when this error occured\n * @param callback - function(err, response)\n */\nQueue.prototype._maybeRetry = function(err, item, callback) {\n var shouldRetry = false;\n if (this.options.retryInterval) {\n for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {\n if (err.code === RETRIABLE_ERRORS[i]) {\n shouldRetry = true;\n break;\n }\n }\n if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {\n item.retries = item.retries ? item.retries + 1 : 1;\n if (item.retries > this.options.maxRetries) {\n shouldRetry = false;\n }\n }\n }\n if (shouldRetry) {\n this._retryApiRequest(item, callback);\n } else {\n callback(err);\n }\n};\n\n/*\n * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process\n * that queue based on the retryInterval in the options for this queue.\n *\n * @param item - an item that failed to send due to an error we deem retriable\n * @param callback - function(err, response)\n */\nQueue.prototype._retryApiRequest = function(item, callback) {\n this.retryQueue.push({item: item, callback: callback});\n\n if (!this.retryHandle) {\n this.retryHandle = setInterval(function() {\n while (this.retryQueue.length) {\n var retryObject = this.retryQueue.shift();\n this._makeApiRequest(retryObject.item, retryObject.callback);\n }\n }.bind(this), this.options.retryInterval);\n }\n};\n\n/*\n * _dequeuePendingRequest - Removes the item from the pending request queue, this queue is used to\n * enable to functionality of providing a callback that clients can pass to `wait` to be notified\n * when the pending request queue has been emptied. This must be called when the API finishes\n * processing this item. If a `wait` callback is configured, it is called by this function.\n *\n * @param item - the item previously added to the pending request queue\n */\nQueue.prototype._dequeuePendingRequest = function(item) {\n var idx = this.pendingRequests.indexOf(item);\n if (idx !== -1) {\n this.pendingRequests.splice(idx, 1);\n this._maybeCallWait();\n }\n};\n\nQueue.prototype._maybeLog = function(data, originalError) {\n if (this.logger && this.options.verbose) {\n var message = originalError;\n message = message || _.get(data, 'body.trace.exception.message');\n message = message || _.get(data, 'body.trace_chain.0.exception.message');\n if (message) {\n this.logger.error(message);\n return;\n }\n message = _.get(data, 'body.message.body');\n if (message) {\n this.logger.log(message);\n }\n }\n};\n\nQueue.prototype._maybeCallWait = function() {\n if (_.isFunction(this.waitCallback) && this.pendingItems.length === 0 && this.pendingRequests.length === 0) {\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitCallback();\n return true;\n }\n return false;\n};\n\nmodule.exports = Queue;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Notifier - the internal object responsible for delegating between the client exposed API, the\n * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the\n * queue which handles the communcation with the Rollbar API servers.\n *\n * @param queue - an object that conforms to the interface: addItem(item, callback)\n * @param options - an object representing the options to be set for this notifier, this should have\n * any defaults already set by the caller\n */\nfunction Notifier(queue, options) {\n this.queue = queue;\n this.options = options;\n this.transforms = [];\n this.diagnostic = {};\n}\n\n/*\n * configure - updates the options for this notifier with the passed in object\n *\n * @param options - an object which gets merged with the current options set on this notifier\n * @returns this\n */\nNotifier.prototype.configure = function(options) {\n this.queue && this.queue.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addTransform - adds a transform onto the end of the queue of transforms for this notifier\n *\n * @param transform - a function which takes three arguments:\n * * item: An Object representing the data to eventually be sent to Rollbar\n * * options: The current value of the options for this notifier\n * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this\n * callback with a null value for error if it wants the processing chain to continue, otherwise\n * with an error to terminate the processing. The item should be the updated item after this\n * transform is finished modifying it.\n */\nNotifier.prototype.addTransform = function(transform) {\n if (_.isFunction(transform)) {\n this.transforms.push(transform);\n }\n return this;\n};\n\n/*\n * log - the internal log function which applies the configured transforms and then pushes onto the\n * queue to be sent to the backend.\n *\n * @param item - An object with the following structure:\n * message [String] - An optional string to be sent to rollbar\n * error [Error] - An optional error\n *\n * @param callback - A function of type function(err, resp) which will be called with exactly one\n * null argument and one non-null argument. The callback will be called once, either during the\n * transform stage if an error occurs inside a transform, or in response to the communication with\n * the backend. The second argument will be the response from the backend in case of success.\n */\nNotifier.prototype.log = function(item, callback) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!this.options.enabled) {\n return callback(new Error('Rollbar is not enabled'));\n }\n\n this.queue.addPendingItem(item);\n var originalError = item.err;\n this._applyTransforms(item, function(err, i) {\n if (err) {\n this.queue.removePendingItem(item);\n return callback(err, null);\n }\n this.queue.addItem(i, callback, originalError, item);\n }.bind(this));\n};\n\n/* Internal */\n\n/*\n * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See\n * `addTransform` for more information.\n *\n * @param item - An item to be transformed\n * @param callback - A function of type function(err, item) which will be called with a non-null\n * error and a null item in the case of a transform failure, or a null error and non-null item after\n * all transforms have been applied.\n */\nNotifier.prototype._applyTransforms = function(item, callback) {\n var transformIndex = -1;\n var transformsLength = this.transforms.length;\n var transforms = this.transforms;\n var options = this.options;\n\n var cb = function(err, i) {\n if (err) {\n callback(err, null);\n return;\n }\n\n transformIndex++;\n\n if (transformIndex === transformsLength) {\n callback(null, i);\n return;\n }\n\n transforms[transformIndex](i, options, cb);\n };\n\n cb(null, item);\n};\n\nmodule.exports = Notifier;\n","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1/item/',\n search: null,\n version: '1',\n protocol: 'https:',\n port: 443\n};\n\n/**\n * Api is an object that encapsulates methods of communicating with\n * the Rollbar API. It is a standard interface with some parts implemented\n * differently for server or browser contexts. It is an object that should\n * be instantiated when used so it can contain non-global options that may\n * be different for another instance of RollbarApi.\n *\n * @param options {\n * accessToken: the accessToken to use for posting items to rollbar\n * endpoint: an alternative endpoint to send errors to\n * must be a valid, fully qualified URL.\n * The default is: https://api.rollbar.com/api/1/item\n * proxy: if you wish to proxy requests provide an object\n * with the following keys:\n * host or hostname (required): foo.example.com\n * port (optional): 123\n * protocol (optional): https\n * }\n */\nfunction Api(options, transport, urllib, truncation, jsonBackup) {\n this.options = options;\n this.transport = transport;\n this.url = urllib;\n this.truncation = truncation;\n this.jsonBackup = jsonBackup;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, urllib);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function(data, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n this.transport.post(this.accessToken, transportOptions, payload, callback);\n};\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.buildJsonPayload = function(data, callback) {\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n\n if (stringifyResult.error) {\n if (callback) {\n callback(stringifyResult.error);\n }\n return null;\n }\n\n return stringifyResult.value;\n};\n\n/**\n *\n * @param jsonPayload\n * @param callback\n */\nApi.prototype.postJsonPayload = function(jsonPayload, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n this.transport.postJsonPayload(this.accessToken, transportOptions, jsonPayload, callback);\n};\n\nApi.prototype.configure = function(options) {\n var oldOptions = this.oldOptions;\n this.options = _.merge(oldOptions, options);\n this.transportOptions = _getTransport(this.options, this.url);\n if (this.options.accessToken !== undefined) {\n this.accessToken = this.options.accessToken;\n }\n return this;\n};\n\nfunction _getTransport(options, url) {\n return helpers.getTransportFromOptions(options, defaultOptions, url);\n}\n\nmodule.exports = Api;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (!_.isType(data.context, 'string')) {\n var contextResult = _.stringify(data.context, jsonBackup);\n if (contextResult.error) {\n data.context = 'Error: could not serialize \\'context\\'';\n } else {\n data.context = contextResult.value || '';\n }\n if (data.context.length > 255) {\n data.context = data.context.substr(0, 255);\n }\n }\n return {\n access_token: accessToken,\n data: data\n };\n}\n\nfunction getTransportFromOptions(options, defaults, url) {\n var hostname = defaults.hostname;\n var protocol = defaults.protocol;\n var port = defaults.port;\n var path = defaults.path;\n var search = defaults.search;\n var timeout = options.timeout;\n\n var proxy = options.proxy;\n if (options.endpoint) {\n var opts = url.parse(options.endpoint);\n hostname = opts.hostname;\n protocol = opts.protocol;\n port = opts.port;\n path = opts.pathname;\n search = opts.search;\n }\n return {\n timeout: timeout,\n hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy\n };\n}\n\nfunction transportOptions(transport, method) {\n var protocol = transport.protocol || 'https:';\n var port = transport.port || (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);\n var hostname = transport.hostname;\n var path = transport.path;\n var timeout = transport.timeout;\n if (transport.search) {\n path = path + transport.search;\n }\n if (transport.proxy) {\n path = protocol + '//' + hostname + path;\n hostname = transport.proxy.host || transport.proxy.hostname;\n port = transport.proxy.port;\n protocol = transport.proxy.protocol || protocol;\n }\n return {\n timeout: timeout,\n protocol: protocol,\n hostname: hostname,\n path: path,\n port: port,\n method: method\n };\n}\n\nfunction appendPathToPath(base, path) {\n var baseTrailingSlash = /\\/$/.test(base);\n var pathBeginningSlash = /^\\//.test(path);\n\n if (baseTrailingSlash && pathBeginningSlash) {\n path = path.substring(1);\n } else if (!baseTrailingSlash && !pathBeginningSlash) {\n path = '/' + path;\n }\n\n return base + path;\n}\n\nmodule.exports = {\n buildPayload: buildPayload,\n getTransportFromOptions: getTransportFromOptions,\n transportOptions: transportOptions,\n appendPathToPath: appendPathToPath\n};\n","// Console-polyfill. MIT license.\n// https://github.com/paulmillr/console-polyfill\n// Make it safe to do console.log() always.\n(function(global) {\n 'use strict';\n if (!global.console) {\n global.console = {};\n }\n var con = global.console;\n var prop, method;\n var dummy = function() {};\n var properties = ['memory'];\n var methods = ('assert,clear,count,debug,dir,dirxml,error,exception,group,' +\n 'groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,' +\n 'show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn').split(',');\n while (prop = properties.pop()) if (!con[prop]) con[prop] = {};\n while (method = methods.pop()) if (!con[method]) con[method] = dummy;\n // Using `this` for web workers & supports Browserify / Webpack.\n})(typeof window === 'undefined' ? this : window);\n","'use strict';\n\n// This detection.js module is used to encapsulate any ugly browser/feature\n// detection we may need to do.\n\n// Figure out which version of IE we're using, if any.\n// This is gleaned from http://stackoverflow.com/questions/5574842/best-way-to-check-for-ie-less-than-9-in-javascript-without-library\n// Will return an integer on IE (i.e. 8)\n// Will return undefined otherwise\nfunction getIEVersion() {\n\tvar undef;\n\tif (typeof document === 'undefined') {\n\t\treturn undef;\n\t}\n\n var v = 3,\n div = document.createElement('div'),\n all = div.getElementsByTagName('i');\n\n while (\n div.innerHTML = '',\n all[0]\n );\n\n return v > 4 ? v : undef;\n}\n\nvar Detection = {\n ieVersion: getIEVersion\n};\n\nmodule.exports = Detection;\n","'use strict';\n\nfunction captureUncaughtExceptions(window, handler, shim) {\n if (!window) { return; }\n var oldOnError;\n\n if (typeof handler._rollbarOldOnError === 'function') {\n oldOnError = handler._rollbarOldOnError;\n } else if (window.onerror) {\n oldOnError = window.onerror;\n while (oldOnError._rollbarOldOnError) {\n oldOnError = oldOnError._rollbarOldOnError;\n }\n handler._rollbarOldOnError = oldOnError;\n }\n\n handler.handleAnonymousErrors();\n\n var fn = function() {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n if (shim) {\n fn._rollbarOldOnError = oldOnError;\n }\n window.onerror = fn;\n}\n\nfunction _rollbarWindowOnError(window, r, old, args) {\n if (window._rollbarWrappedError) {\n if (!args[4]) {\n args[4] = window._rollbarWrappedError;\n }\n if (!args[5]) {\n args[5] = window._rollbarWrappedError._rollbarContext;\n }\n window._rollbarWrappedError = null;\n }\n\n var ret = r.handleUncaughtException.apply(r, args);\n\n if (old) {\n old.apply(window, args);\n }\n\n // Let other chained onerror handlers above run before setting this.\n // If an error is thrown and caught within a chained onerror handler,\n // Error.prepareStackTrace() will see that one before the one we want.\n if (ret === 'anonymous') {\n r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()\n }\n}\n\nfunction captureUnhandledRejections(window, handler, shim) {\n if (!window) { return; }\n\n if (typeof window._rollbarURH === 'function' && window._rollbarURH.belongsToShim) {\n window.removeEventListener('unhandledrejection', window._rollbarURH);\n }\n\n var rejectionHandler = function (evt) {\n var reason, promise, detail;\n try {\n reason = evt.reason;\n } catch (e) {\n reason = undefined;\n }\n try {\n promise = evt.promise;\n } catch (e) {\n promise = '[unhandledrejection] error getting `promise` from event';\n }\n try {\n detail = evt.detail;\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\n }\n } catch (e) {\n // Ignore\n }\n if (!reason) {\n reason = '[unhandledrejection] error getting `reason` from event';\n }\n\n if (handler && handler.handleUnhandledRejection) {\n handler.handleUnhandledRejection(reason, promise);\n }\n };\n rejectionHandler.belongsToShim = shim;\n window._rollbarURH = rejectionHandler;\n window.addEventListener('unhandledrejection', rejectionHandler);\n}\n\n\nmodule.exports = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections\n};\n","'use strict';\n\n/*global XDomainRequest*/\n\nvar _ = require('../utility');\nvar logger = require('./logger');\n\n/*\n * accessToken may be embedded in payload but that should not\n * be assumed\n *\n * options: {\n * hostname\n * protocol\n * path\n * port\n * method\n * }\n *\n * params is an object containing key/value pairs. These\n * will be appended to the path as 'key=value&key=value'\n *\n * payload is an unserialized object\n */\nfunction Transport(truncation) {\n this.truncation = truncation;\n}\n\nTransport.prototype.get = function(accessToken, options, params, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n _.addParamsAndAccessTokenToPath(accessToken, options, params);\n\n var method = 'GET';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, null, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.post = function(accessToken, options, payload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!payload) {\n return callback(new Error('Cannot send empty request'));\n }\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n if (stringifyResult.error) {\n return callback(stringifyResult.error);\n }\n\n var writeData = stringifyResult.value;\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, writeData, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.postJsonPayload = function (accessToken, options, jsonPayload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, jsonPayload, callback, requestFactory, options.timeout);\n}\n\n\n// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope\n// so Angular change detection isn't triggered on each API call.\n// This is the equivalent of runOutsideAngular().\n//\nfunction _makeZoneRequest() {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;\n var args = Array.prototype.slice.call(arguments);\n\n if (currentZone && currentZone._name === 'angular') {\n var rootZone = currentZone._parent;\n rootZone.run(function () {\n _makeRequest.apply(undefined, args);\n });\n } else {\n _makeRequest.apply(undefined, args);\n }\n}\n\n/* global RollbarProxy */\nfunction _proxyRequest(json, callback) {\n var rollbarProxy = new RollbarProxy();\n rollbarProxy.sendJsonPayload(\n json,\n function(_msg) { /* do nothing */ }, // eslint-disable-line no-unused-vars\n function(err) {\n callback(new Error(err));\n }\n );\n}\n\nfunction _makeRequest(accessToken, url, method, data, callback, requestFactory, timeout) {\n if (typeof RollbarProxy !== 'undefined') {\n return _proxyRequest(data, callback);\n }\n\n var request;\n if (requestFactory) {\n request = requestFactory();\n } else {\n request = _createXMLHTTPObject();\n }\n if (!request) {\n // Give up, no way to send requests\n return callback(new Error('No way to send a request'));\n }\n try {\n try {\n var onreadystatechange = function() {\n try {\n if (onreadystatechange && request.readyState === 4) {\n onreadystatechange = undefined;\n\n var parseResponse = _.jsonParse(request.responseText);\n if (_isSuccess(request)) {\n callback(parseResponse.error, parseResponse.value);\n return;\n } else if (_isNormalFailure(request)) {\n if (request.status === 403) {\n // likely caused by using a server access token\n var message = parseResponse.value && parseResponse.value.message;\n logger.error(message);\n }\n // return valid http status codes\n callback(new Error(String(request.status)));\n } else {\n // IE will return a status 12000+ on some sort of connection failure,\n // so we return a blank error\n // http://msdn.microsoft.com/en-us/library/aa383770%28VS.85%29.aspx\n var msg = 'XHR response had no status code (likely connection failure)';\n callback(_newRetriableError(msg));\n }\n }\n } catch (ex) {\n //jquery source mentions firefox may error out while accessing the\n //request members if there is a network error\n //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111\n var exc;\n if (ex && ex.stack) {\n exc = ex;\n } else {\n exc = new Error(ex);\n }\n callback(exc);\n }\n };\n\n request.open(method, url, true);\n if (request.setRequestHeader) {\n request.setRequestHeader('Content-Type', 'application/json');\n request.setRequestHeader('X-Rollbar-Access-Token', accessToken);\n }\n\n if(_.isFiniteNumber(timeout)) {\n request.timeout = timeout;\n }\n\n request.onreadystatechange = onreadystatechange;\n request.send(data);\n } catch (e1) {\n // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest\n if (typeof XDomainRequest !== 'undefined') {\n\n // Assume we are in a really old browser which has a bunch of limitations:\n // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx\n\n // Extreme paranoia: if we have XDomainRequest then we have a window, but just in case\n if (!window || !window.location) {\n return callback(new Error('No window available during request, unknown environment'));\n }\n\n // If the current page is http, try and send over http\n if (window.location.href.substring(0, 5) === 'http:' && url.substring(0, 5) === 'https') {\n url = 'http' + url.substring(5);\n }\n\n var xdomainrequest = new XDomainRequest();\n xdomainrequest.onprogress = function() {};\n xdomainrequest.ontimeout = function() {\n var msg = 'Request timed out';\n var code = 'ETIMEDOUT';\n callback(_newRetriableError(msg, code));\n };\n xdomainrequest.onerror = function() {\n callback(new Error('Error during request'));\n };\n xdomainrequest.onload = function() {\n var parseResponse = _.jsonParse(xdomainrequest.responseText);\n callback(parseResponse.error, parseResponse.value);\n };\n xdomainrequest.open(method, url, true);\n xdomainrequest.send(data);\n } else {\n callback(new Error('Cannot find a method to transport a request'));\n }\n }\n } catch (e2) {\n callback(e2);\n }\n}\n\nfunction _createXMLHTTPObject() {\n /* global ActiveXObject:false */\n\n var factories = [\n function () {\n return new XMLHttpRequest();\n },\n function () {\n return new ActiveXObject('Msxml2.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Msxml3.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Microsoft.XMLHTTP');\n }\n ];\n var xmlhttp;\n var i;\n var numFactories = factories.length;\n for (i = 0; i < numFactories; i++) {\n /* eslint-disable no-empty */\n try {\n xmlhttp = factories[i]();\n break;\n } catch (e) {\n // pass\n }\n /* eslint-enable no-empty */\n }\n return xmlhttp;\n}\n\nfunction _isSuccess(r) {\n return r && r.status && r.status === 200;\n}\n\nfunction _isNormalFailure(r) {\n return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;\n}\n\nfunction _newRetriableError(message, code) {\n var err = new Error(message);\n err.code = code || 'ENOTFOUND';\n return err;\n}\n\nmodule.exports = Transport;\n","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('../errorParser');\nvar logger = require('./logger');\n\nfunction handleDomException(item, options, callback) {\n if(item.err && errorParser.Stack(item.err).name === 'DOMException') {\n var originalError = new Error();\n originalError.name = item.err.name;\n originalError.message = item.err.message;\n originalError.stack = item.err.stack;\n originalError.nested = item.err;\n item.err = originalError;\n }\n callback(null, item);\n}\n\nfunction handleItemWithError(item, options, callback) {\n item.data = item.data || {};\n if (item.err) {\n try {\n item.stackInfo = item.err._savedStackTrace || errorParser.parse(item.err, item.skipFrames);\n\n if (options.addErrorContext) {\n addErrorContext(item);\n }\n } catch (e) {\n logger.error('Error while parsing the error object.', e);\n try {\n item.message = item.err.message || item.err.description || item.message || String(item.err);\n } catch (e2) {\n item.message = String(item.err) || String(e2);\n }\n delete item.err;\n }\n }\n callback(null, item);\n}\n\nfunction addErrorContext(item) {\n var chain = [];\n var err = item.err;\n\n chain.push(err);\n\n while (err.nested) {\n err = err.nested;\n chain.push(err);\n }\n\n _.addErrorContext(item, chain);\n}\n\nfunction ensureItemHasSomethingToSay(item, options, callback) {\n if (!item.message && !item.stackInfo && !item.custom) {\n callback(new Error('No message, stack info, or custom data'), null);\n }\n callback(null, item);\n}\n\nfunction addBaseInfo(item, options, callback) {\n var environment = (options.payload && options.payload.environment) || options.environment;\n item.data = _.merge(item.data, {\n environment: environment,\n level: item.level,\n endpoint: options.endpoint,\n platform: 'browser',\n framework: 'browser-js',\n language: 'javascript',\n server: {},\n uuid: item.uuid,\n notifier: {\n name: 'rollbar-browser-js',\n version: options.version\n },\n custom: item.custom\n });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.location) {\n return callback(null, item);\n }\n var remoteString = '$remote_ip';\n if (!options.captureIp) {\n remoteString = null;\n } else if (options.captureIp !== true) {\n remoteString += '_anonymize';\n }\n _.set(item, 'data.request', {\n url: window.location.href,\n query_string: window.location.search,\n user_ip: remoteString\n });\n callback(null, item);\n };\n}\n\nfunction addClientInfo(window) {\n return function(item, options, callback) {\n if (!window) {\n return callback(null, item);\n }\n var nav = window.navigator || {};\n var scr = window.screen || {};\n _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: nav.userAgent,\n language: nav.language,\n cookie_enabled: nav.cookieEnabled,\n screen: {\n width: scr.width,\n height: scr.height\n }\n }\n });\n callback(null, item);\n };\n}\n\nfunction addPluginInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.navigator) {\n return callback(null, item);\n }\n var plugins = [];\n var navPlugins = window.navigator.plugins || [];\n var cur;\n for (var i=0, l=navPlugins.length; i < l; ++i) {\n cur = navPlugins[i];\n plugins.push({name: cur.name, description: cur.description});\n }\n _.set(item, 'data.client.javascript.plugins', plugins);\n callback(null, item);\n };\n}\n\nfunction addBody(item, options, callback) {\n if (item.stackInfo) {\n if (item.stackInfo.traceChain) {\n addBodyTraceChain(item, options, callback);\n } else {\n addBodyTrace(item, options, callback);\n }\n } else {\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction addBodyMessage(item, options, callback) {\n var message = item.message;\n var custom = item.custom;\n\n if (!message) {\n message = 'Item sent with null or missing arguments.';\n }\n var result = {\n body: message\n };\n\n if (custom) {\n result.extra = _.merge(custom);\n }\n\n _.set(item, 'data.body', {message: result});\n callback(null, item);\n}\n\nfunction stackFromItem(item) {\n // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = item.stackInfo.stack;\n if (stack && stack.length === 0 && item._unhandledStackInfo && item._unhandledStackInfo.stack) {\n stack = item._unhandledStackInfo.stack;\n }\n return stack;\n}\n\nfunction addBodyTraceChain(item, options, callback) {\n var traceChain = item.stackInfo.traceChain;\n var traces = [];\n\n var traceChainLength = traceChain.length;\n for (var i = 0; i < traceChainLength; i++) {\n var trace = buildTrace(item, traceChain[i], options);\n traces.push(trace);\n }\n\n _.set(item, 'data.body', {trace_chain: traces});\n callback(null, item);\n}\n\nfunction addBodyTrace(item, options, callback) {\n var stack = stackFromItem(item);\n\n if (stack) {\n var trace = buildTrace(item, item.stackInfo, options);\n _.set(item, 'data.body', {trace: trace});\n callback(null, item);\n } else {\n var stackInfo = item.stackInfo;\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction buildTrace(item, stackInfo, options) {\n var description = item && item.data.description;\n var custom = item && item.custom;\n var stack = stackFromItem(item);\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n var trace = {\n exception: {\n 'class': className,\n message: message\n }\n };\n\n if (description) {\n trace.exception.description = description;\n }\n\n if (stack) {\n if (stack.length === 0) {\n trace.exception.stack = stackInfo.rawStack;\n trace.exception.raw = String(stackInfo.rawException);\n }\n var stackFrame;\n var frame;\n var code;\n var pre;\n var post;\n var contextLength;\n var i, mid;\n\n trace.frames = [];\n for (i = 0; i < stack.length; ++i) {\n stackFrame = stack[i];\n frame = {\n filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',\n lineno: stackFrame.line || null,\n method: (!stackFrame.func || stackFrame.func === '?') ? '[anonymous]' : stackFrame.func,\n colno: stackFrame.column\n };\n if (options.sendFrameUrl) {\n frame.url = stackFrame.url;\n }\n if (frame.method && frame.method.endsWith && frame.method.endsWith('_rollbar_wrapped')) {\n continue;\n }\n\n code = pre = post = null;\n contextLength = stackFrame.context ? stackFrame.context.length : 0;\n if (contextLength) {\n mid = Math.floor(contextLength / 2);\n pre = stackFrame.context.slice(0, mid);\n code = stackFrame.context[mid];\n post = stackFrame.context.slice(mid);\n }\n\n if (code) {\n frame.code = code;\n }\n\n if (pre || post) {\n frame.context = {};\n if (pre && pre.length) {\n frame.context.pre = pre;\n }\n if (post && post.length) {\n frame.context.post = post;\n }\n }\n\n if (stackFrame.args) {\n frame.args = stackFrame.args;\n }\n\n trace.frames.push(frame);\n }\n\n // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last\n trace.frames.reverse();\n\n if (custom) {\n trace.extra = _.merge(custom);\n }\n }\n\n return trace;\n}\n\nfunction errorClass(stackInfo, guess, options) {\n if (stackInfo.name) {\n return stackInfo.name;\n } else if (options.guessErrorClass) {\n return guess;\n } else {\n return '(unknown)';\n }\n}\n\nfunction addScrubber(scrubFn) {\n return function (item, options, callback) {\n if (scrubFn) {\n var scrubFields = options.scrubFields || [];\n var scrubPaths = options.scrubPaths || [];\n item.data = scrubFn(item.data, scrubFields, scrubPaths);\n }\n callback(null, item);\n }\n}\n\nmodule.exports = {\n handleDomException: handleDomException,\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n addScrubber: addScrubber\n};\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('error-stack-parser', ['stackframe'], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory(require('stackframe'));\n } else {\n root.ErrorStackParser = factory(root.StackFrame);\n }\n}(this, function ErrorStackParser(StackFrame) {\n 'use strict';\n\n var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\\S+:\\d+/;\n var CHROME_IE_STACK_REGEXP = /^\\s*at .*(\\S+:\\d+|\\(native\\))/m;\n var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\\[native code])?$/;\n\n return {\n /**\n * Given an Error object, extract the most information from it.\n *\n * @param {Error} error object\n * @return {Array} of StackFrames\n */\n parse: function ErrorStackParser$$parse(error) {\n if (typeof error.stacktrace !== 'undefined' || typeof error['opera#sourceloc'] !== 'undefined') {\n return this.parseOpera(error);\n } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {\n return this.parseV8OrIE(error);\n } else if (error.stack) {\n return this.parseFFOrSafari(error);\n } else {\n throw new Error('Cannot parse given Error object');\n }\n },\n\n // Separate line and column numbers from a string of the form: (URI:Line:Column)\n extractLocation: function ErrorStackParser$$extractLocation(urlLike) {\n // Fail-fast but return locations like \"(native)\"\n if (urlLike.indexOf(':') === -1) {\n return [urlLike];\n }\n\n var regExp = /(.+?)(?::(\\d+))?(?::(\\d+))?$/;\n var parts = regExp.exec(urlLike.replace(/[()]/g, ''));\n return [parts[1], parts[2] || undefined, parts[3] || undefined];\n },\n\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(CHROME_IE_STACK_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n if (line.indexOf('(eval ') > -1) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n line = line.replace(/eval code/g, 'eval').replace(/(\\(eval at [^()]*)|(\\),.*$)/g, '');\n }\n var sanitizedLine = line.replace(/^\\s+/, '').replace(/\\(eval code/g, '(');\n\n // capture and preseve the parenthesized location \"(/foo/my bar.js:12:87)\" in\n // case it has spaces in it, as the string is split on \\s+ later on\n var location = sanitizedLine.match(/ (\\((.+):(\\d+):(\\d+)\\)$)/);\n\n // remove the parenthesized location from the line, if it was matched\n sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;\n\n var tokens = sanitizedLine.split(/\\s+/).slice(1);\n // if a location was matched, pass it to extractLocation() otherwise pop the last token\n var locationParts = this.extractLocation(location ? location[1] : tokens.pop());\n var functionName = tokens.join(' ') || undefined;\n var fileName = ['eval', ''].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];\n\n return new StackFrame({\n functionName: functionName,\n fileName: fileName,\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n },\n\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n if (line.indexOf(' > eval') > -1) {\n line = line.replace(/ line (\\d+)(?: > eval line \\d+)* > eval:\\d+:\\d+/g, ':$1');\n }\n\n if (line.indexOf('@') === -1 && line.indexOf(':') === -1) {\n // Safari eval frames only have function names and nothing else\n return new StackFrame({\n functionName: line\n });\n } else {\n var functionNameRegex = /((.*\".+\"[^@]*)?[^@]*)(?:@)/;\n var matches = line.match(functionNameRegex);\n var functionName = matches && matches[1] ? matches[1] : undefined;\n var locationParts = this.extractLocation(line.replace(functionNameRegex, ''));\n\n return new StackFrame({\n functionName: functionName,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }\n }, this);\n },\n\n parseOpera: function ErrorStackParser$$parseOpera(e) {\n if (!e.stacktrace || (e.message.indexOf('\\n') > -1 &&\n e.message.split('\\n').length > e.stacktrace.split('\\n').length)) {\n return this.parseOpera9(e);\n } else if (!e.stack) {\n return this.parseOpera10(e);\n } else {\n return this.parseOpera11(e);\n }\n },\n\n parseOpera9: function ErrorStackParser$$parseOpera9(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)/i;\n var lines = e.message.split('\\n');\n var result = [];\n\n for (var i = 2, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(new StackFrame({\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n }));\n }\n }\n\n return result;\n },\n\n parseOpera10: function ErrorStackParser$$parseOpera10(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)(?:: In function (\\S+))?$/i;\n var lines = e.stacktrace.split('\\n');\n var result = [];\n\n for (var i = 0, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(\n new StackFrame({\n functionName: match[3] || undefined,\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n })\n );\n }\n }\n\n return result;\n },\n\n // Opera 10.65+ Error.stack very similar to FF/Safari\n parseOpera11: function ErrorStackParser$$parseOpera11(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);\n }, this);\n\n return filtered.map(function(line) {\n var tokens = line.split('@');\n var locationParts = this.extractLocation(tokens.pop());\n var functionCall = (tokens.shift() || '');\n var functionName = functionCall\n .replace(//, '$2')\n .replace(/\\([^)]*\\)/g, '') || undefined;\n var argsRaw;\n if (functionCall.match(/\\(([^)]*)\\)/)) {\n argsRaw = functionCall.replace(/^[^(]+\\(([^)]*)\\)$/, '$1');\n }\n var args = (argsRaw === undefined || argsRaw === '[arguments not available]') ?\n undefined : argsRaw.split(',');\n\n return new StackFrame({\n functionName: functionName,\n args: args,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n }\n };\n}));\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('stackframe', [], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.StackFrame = factory();\n }\n}(this, function() {\n 'use strict';\n function _isNumber(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n }\n\n function _capitalize(str) {\n return str.charAt(0).toUpperCase() + str.substring(1);\n }\n\n function _getter(p) {\n return function() {\n return this[p];\n };\n }\n\n var booleanProps = ['isConstructor', 'isEval', 'isNative', 'isToplevel'];\n var numericProps = ['columnNumber', 'lineNumber'];\n var stringProps = ['fileName', 'functionName', 'source'];\n var arrayProps = ['args'];\n var objectProps = ['evalOrigin'];\n\n var props = booleanProps.concat(numericProps, stringProps, arrayProps, objectProps);\n\n function StackFrame(obj) {\n if (!obj) return;\n for (var i = 0; i < props.length; i++) {\n if (obj[props[i]] !== undefined) {\n this['set' + _capitalize(props[i])](obj[props[i]]);\n }\n }\n }\n\n StackFrame.prototype = {\n getArgs: function() {\n return this.args;\n },\n setArgs: function(v) {\n if (Object.prototype.toString.call(v) !== '[object Array]') {\n throw new TypeError('Args must be an Array');\n }\n this.args = v;\n },\n\n getEvalOrigin: function() {\n return this.evalOrigin;\n },\n setEvalOrigin: function(v) {\n if (v instanceof StackFrame) {\n this.evalOrigin = v;\n } else if (v instanceof Object) {\n this.evalOrigin = new StackFrame(v);\n } else {\n throw new TypeError('Eval Origin must be an Object or StackFrame');\n }\n },\n\n toString: function() {\n var fileName = this.getFileName() || '';\n var lineNumber = this.getLineNumber() || '';\n var columnNumber = this.getColumnNumber() || '';\n var functionName = this.getFunctionName() || '';\n if (this.getIsEval()) {\n if (fileName) {\n return '[eval] (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return '[eval]:' + lineNumber + ':' + columnNumber;\n }\n if (functionName) {\n return functionName + ' (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return fileName + ':' + lineNumber + ':' + columnNumber;\n }\n };\n\n StackFrame.fromString = function StackFrame$$fromString(str) {\n var argsStartIndex = str.indexOf('(');\n var argsEndIndex = str.lastIndexOf(')');\n\n var functionName = str.substring(0, argsStartIndex);\n var args = str.substring(argsStartIndex + 1, argsEndIndex).split(',');\n var locationString = str.substring(argsEndIndex + 1);\n\n if (locationString.indexOf('@') === 0) {\n var parts = /@(.+?)(?::(\\d+))?(?::(\\d+))?$/.exec(locationString, '');\n var fileName = parts[1];\n var lineNumber = parts[2];\n var columnNumber = parts[3];\n }\n\n return new StackFrame({\n functionName: functionName,\n args: args || undefined,\n fileName: fileName,\n lineNumber: lineNumber || undefined,\n columnNumber: columnNumber || undefined\n });\n };\n\n for (var i = 0; i < booleanProps.length; i++) {\n StackFrame.prototype['get' + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);\n StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function(p) {\n return function(v) {\n this[p] = Boolean(v);\n };\n })(booleanProps[i]);\n }\n\n for (var j = 0; j < numericProps.length; j++) {\n StackFrame.prototype['get' + _capitalize(numericProps[j])] = _getter(numericProps[j]);\n StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function(p) {\n return function(v) {\n if (!_isNumber(v)) {\n throw new TypeError(p + ' must be a Number');\n }\n this[p] = Number(v);\n };\n })(numericProps[j]);\n }\n\n for (var k = 0; k < stringProps.length; k++) {\n StackFrame.prototype['get' + _capitalize(stringProps[k])] = _getter(stringProps[k]);\n StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function(p) {\n return function(v) {\n this[p] = String(v);\n };\n })(stringProps[k]);\n }\n\n return StackFrame;\n}));\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction itemToPayload(item, options, callback) {\n var payloadOptions = options.payload || {};\n if (payloadOptions.body) {\n delete payloadOptions.body;\n }\n\n var data = _.merge(item.data, payloadOptions);\n if (item._isUncaught) {\n data._isUncaught = true;\n }\n if (item._originalArgs) {\n data._originalArgs = item._originalArgs;\n }\n callback(null, data);\n}\n\nfunction addTelemetryData(item, options, callback) {\n if (item.telemetryEvents) {\n _.set(item, 'data.body.telemetry', item.telemetryEvents);\n }\n callback(null, item);\n}\n\nfunction addMessageWithError(item, options, callback) {\n if (!item.message) {\n callback(null, item);\n return;\n }\n var tracePath = 'data.body.trace_chain.0';\n var trace = _.get(item, tracePath);\n if (!trace) {\n tracePath = 'data.body.trace';\n trace = _.get(item, tracePath);\n }\n if (trace) {\n if (!(trace.exception && trace.exception.description)) {\n _.set(item, tracePath+'.exception.description', item.message);\n callback(null, item);\n return;\n }\n var extra = _.get(item, tracePath+'.extra') || {};\n var newExtra = _.merge(extra, {message: item.message});\n _.set(item, tracePath+'.extra', newExtra);\n }\n callback(null, item);\n}\n\nfunction userTransform(logger) {\n return function(item, options, callback) {\n var newItem = _.merge(item);\n var response = null;\n try {\n if (_.isFunction(options.transform)) {\n response = options.transform(newItem.data, item);\n }\n } catch (e) {\n options.transform = null;\n logger.error('Error while calling custom transform() function. Removing custom transform().', e);\n callback(null, item);\n return;\n }\n if(_.isPromise(response)) {\n response.then(function (promisedItem) {\n if(promisedItem) {\n newItem.data = promisedItem;\n }\n callback(null, newItem);\n }, function (error) {\n callback(error, item);\n });\n } else {\n callback(null, newItem);\n }\n }\n}\n\nfunction addConfigToPayload(item, options, callback) {\n if (!options.sendConfig) {\n return callback(null, item);\n }\n var configKey = '_rollbarConfig';\n var custom = _.get(item, 'data.custom') || {};\n custom[configKey] = options;\n item.data.custom = custom;\n callback(null, item);\n}\n\nfunction addFunctionOption(options, name) {\n if(_.isFunction(options[name])) {\n options[name] = options[name].toString();\n }\n}\n\nfunction addConfiguredOptions(item, options, callback) {\n var configuredOptions = options._configuredOptions;\n\n // These must be stringified or they'll get dropped during serialization.\n addFunctionOption(configuredOptions, 'transform');\n addFunctionOption(configuredOptions, 'checkIgnore');\n addFunctionOption(configuredOptions, 'onSendCallback');\n\n delete configuredOptions.accessToken;\n item.data.notifier.configured_options = configuredOptions;\n callback(null, item);\n}\n\nfunction addDiagnosticKeys(item, options, callback) {\n var diagnostic = _.merge(item.notifier.client.notifier.diagnostic, item.diagnostic);\n\n if (_.get(item, 'err._isAnonymous')) {\n diagnostic.is_anonymous = true;\n }\n\n if (item._isUncaught) {\n diagnostic.is_uncaught = item._isUncaught;\n }\n\n if (item.err) {\n try {\n diagnostic.raw_error = {\n message: item.err.message,\n name: item.err.name,\n constructor_name: item.err.constructor && item.err.constructor.name,\n filename: item.err.fileName,\n line: item.err.lineNumber,\n column: item.err.columnNumber,\n stack: item.err.stack\n };\n } catch (e) {\n diagnostic.raw_error = { failed: String(e) };\n }\n }\n\n item.data.notifier.diagnostic = _.merge(item.data.notifier.diagnostic, diagnostic);\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError,\n userTransform: userTransform,\n addConfigToPayload: addConfigToPayload,\n addConfiguredOptions: addConfiguredOptions,\n addDiagnosticKeys: addDiagnosticKeys\n};\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction checkIgnore(item, settings) {\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore\n};\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction checkLevel(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = settings.reportLevel;\n var reportLevelVal = _.LEVELS[reportLevel] || 0;\n\n if (levelVal < reportLevelVal) {\n return false;\n }\n return true;\n}\n\nfunction userCheckIgnore(logger) {\n return function(item, settings) {\n var isUncaught = !!item._isUncaught;\n delete item._isUncaught;\n var args = item._originalArgs;\n delete item._originalArgs;\n try {\n if (_.isFunction(settings.onSendCallback)) {\n settings.onSendCallback(isUncaught, args, item);\n }\n } catch (e) {\n settings.onSendCallback = null;\n logger.error('Error while calling onSendCallback, removing', e);\n }\n try {\n if (_.isFunction(settings.checkIgnore) && settings.checkIgnore(isUncaught, args, item)) {\n return false;\n }\n } catch (e) {\n settings.checkIgnore = null;\n logger.error('Error while calling custom checkIgnore(), removing', e);\n }\n return true;\n }\n}\n\nfunction urlIsNotBlockListed(logger) {\n return function(item, settings) {\n return !urlIsOnAList(item, settings, 'blocklist', logger);\n }\n}\n\nfunction urlIsSafeListed(logger) {\n return function(item, settings) {\n return urlIsOnAList(item, settings, 'safelist', logger);\n }\n}\n\nfunction matchFrames(trace, list, block) {\n if (!trace) { return !block }\n\n var frames = trace.frames;\n\n if (!frames || frames.length === 0) { return !block; }\n\n var frame, filename, url, urlRegex;\n var listLength = list.length;\n var frameLength = frames.length;\n for (var i = 0; i < frameLength; i++) {\n frame = frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) { return !block; }\n\n for (var j = 0; j < listLength; j++) {\n url = list[j];\n urlRegex = new RegExp(url);\n\n if (urlRegex.test(filename)) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction urlIsOnAList(item, settings, safeOrBlock, logger) {\n // safelist is the default\n var block = false;\n if (safeOrBlock === 'blocklist') {\n block = true;\n }\n\n var list, traces;\n try {\n list = block ? settings.hostBlockList : settings.hostSafeList;\n traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];\n\n // These two checks are important to come first as they are defaults\n // in case the list is missing or the trace is missing or not well-formed\n if (!list || list.length === 0) {\n return !block;\n }\n if (traces.length === 0 || !traces[0]) {\n return !block;\n }\n\n var tracesLength = traces.length;\n for (var i = 0; i < tracesLength; i++) {\n if(matchFrames(traces[i], list, block)) {\n return true;\n }\n }\n } catch (e)\n /* istanbul ignore next */\n {\n if (block) {\n settings.hostBlockList = null;\n } else {\n settings.hostSafeList = null;\n }\n var listName = block ? 'hostBlockList' : 'hostSafeList';\n logger.error('Error while reading your configuration\\'s ' + listName + ' option. Removing custom ' + listName + '.', e);\n return !block;\n }\n return false;\n}\n\nfunction messageIsIgnored(logger) {\n return function(item, settings) {\n var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n messages = messagesFromItem(item);\n\n if (messages.length === 0){\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n\n for (j = 0; j < messages.length; j++) {\n messageIsIgnored = rIgnoredMessage.test(messages[j]);\n\n if (messageIsIgnored) {\n return false;\n }\n }\n }\n } catch(e)\n /* istanbul ignore next */\n {\n settings.ignoredMessages = null;\n logger.error('Error while reading your configuration\\'s ignoredMessages option. Removing custom ignoredMessages.');\n }\n\n return true;\n }\n}\n\nfunction messagesFromItem(item) {\n var body = item.body;\n var messages = [];\n\n // The payload schema only allows one of trace_chain, message, or trace.\n // However, existing test cases are based on having both trace and message present.\n // So here we preserve the ability to collect strings from any combination of these keys.\n if (body.trace_chain) {\n var traceChain = body.trace_chain;\n for (var i = 0; i < traceChain.length; i++) {\n var trace = traceChain[i];\n messages.push(_.get(trace, 'exception.message'));\n }\n }\n if (body.trace) {\n messages.push(_.get(body, 'trace.exception.message'));\n }\n if (body.message) {\n messages.push(_.get(body, 'message.body'));\n }\n return messages;\n}\n\nmodule.exports = {\n checkLevel: checkLevel,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlockListed: urlIsNotBlockListed,\n urlIsSafeListed: urlIsSafeListed,\n messageIsIgnored: messageIsIgnored\n};\n","'use strict';\n\nmodule.exports = {\n version: '2.24.0',\n endpoint: 'api.rollbar.com/api/1/item/',\n logLevel: 'debug',\n reportLevel: 'debug',\n uncaughtErrorLevel: 'error',\n maxItems: 0,\n itemsPerMin: 60\n}\n","'use strict';\n\nmodule.exports = {\n scrubFields: [\n 'pw',\n 'pass',\n 'passwd',\n 'password',\n 'secret',\n 'confirm_password',\n 'confirmPassword',\n 'password_confirmation',\n 'passwordConfirmation',\n 'access_token',\n 'accessToken',\n 'X-Rollbar-Access-Token',\n 'secret_key',\n 'secretKey',\n 'secretToken',\n 'cc-number',\n 'card number',\n 'cardnumber',\n 'cardnum',\n 'ccnum',\n 'ccnumber',\n 'cc num',\n 'creditcardnumber',\n 'credit card number',\n 'newcreditcardnumber',\n 'new credit card',\n 'creditcardno',\n 'credit card no',\n 'card#',\n 'card #',\n 'cc-csc',\n 'cvc',\n 'cvc2',\n 'cvv2',\n 'ccv2',\n 'security code',\n 'card verification',\n 'name on credit card',\n 'name on card',\n 'nameoncard',\n 'cardholder',\n 'card holder',\n 'name des karteninhabers',\n 'ccname',\n 'card type',\n 'cardtype',\n 'cc type',\n 'cctype',\n 'payment type',\n 'expiration date',\n 'expirationdate',\n 'expdate',\n 'cc-exp',\n 'ccmonth',\n 'ccyear'\n ]\n}\n","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.merge(options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n}\n\nTelemeter.prototype.configure = function(options) {\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n var deleteCount = 0;\n if (this.maxQueueSize > newMaxEvents) {\n deleteCount = this.maxQueueSize - newMaxEvents;\n }\n this.maxQueueSize = newMaxEvents;\n this.queue.splice(0, deleteCount);\n};\n\nTelemeter.prototype.copyEvents = function() {\n var events = Array.prototype.slice.call(this.queue, 0);\n if (_.isFunction(this.options.filterTelemetry)) {\n try {\n var i = events.length;\n while (i--) {\n if (this.options.filterTelemetry(events[i])) {\n events.splice(i, 1);\n }\n }\n } catch (e) {\n this.options.filterTelemetry = null;\n }\n }\n return events;\n};\n\nTelemeter.prototype.capture = function(type, metadata, level, rollbarUUID, timestamp) {\n var e = {\n level: getLevel(type, level),\n type: type,\n timestamp_ms: timestamp || _.now(),\n body: metadata,\n source: 'client'\n };\n if (rollbarUUID) {\n e.uuid = rollbarUUID;\n }\n\n try {\n if (_.isFunction(this.options.filterTelemetry) && this.options.filterTelemetry(e)) {\n return false;\n }\n } catch (exc) {\n this.options.filterTelemetry = null;\n }\n\n this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function(type, metadata, level, rollbarUUID) {\n return this.capture(type, metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.captureError = function(err, level, rollbarUUID, timestamp) {\n var metadata = {\n message: err.message || String(err)\n };\n if (err.stack) {\n metadata.stack = err.stack;\n }\n return this.capture('error', metadata, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureLog = function(message, level, rollbarUUID, timestamp) {\n return this.capture('log', {\n message: message\n }, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID, requestData) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\n if (requestData) {\n metadata.request = requestData;\n }\n var level = this.levelFromStatus(metadata.status_code);\n return this.capture('network', metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.levelFromStatus = function(statusCode) {\n if (statusCode >= 200 && statusCode < 400) {\n return 'info';\n }\n if (statusCode === 0 || statusCode >= 400) {\n return 'error';\n }\n return 'info';\n};\n\nTelemeter.prototype.captureDom = function(subtype, element, value, checked, rollbarUUID) {\n var metadata = {\n subtype: subtype,\n element: element\n };\n if (value !== undefined) {\n metadata.value = value;\n }\n if (checked !== undefined) {\n metadata.checked = checked;\n }\n return this.capture('dom', metadata, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureNavigation = function(from, to, rollbarUUID) {\n return this.capture('navigation', {from: from, to: to}, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureDomContentLoaded = function(ts) {\n return this.capture('navigation', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n */\n};\nTelemeter.prototype.captureLoad = function(ts) {\n return this.capture('navigation', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n */\n};\n\nTelemeter.prototype.captureConnectivityChange = function(type, rollbarUUID) {\n return this.captureNetwork({change: type}, 'connectivity', rollbarUUID);\n};\n\n// Only intended to be used internally by the notifier\nTelemeter.prototype._captureRollbarItem = function(item) {\n if (!this.options.includeItemsInTelemetry) {\n return;\n }\n if (item.err) {\n return this.captureError(item.err, item.level, item.uuid, item.timestamp);\n }\n if (item.message) {\n return this.captureLog(item.message, item.level, item.uuid, item.timestamp);\n }\n if (item.custom) {\n return this.capture('log', item.custom, item.level, item.uuid, item.timestamp);\n }\n};\n\nTelemeter.prototype.push = function(e) {\n this.queue.push(e);\n if (this.queue.length > this.maxQueueSize) {\n this.queue.shift();\n }\n};\n\nfunction getLevel(type, level) {\n if (level) {\n return level;\n }\n var defaultLevel = {\n error: 'error',\n manual: 'info'\n };\n return defaultLevel[type] || 'info';\n}\n\nmodule.exports = Telemeter;\n","'use strict';\n\nvar _ = require('../utility');\nvar scrub = require('../scrub');\nvar urlparser = require('./url');\nvar domUtil = require('./domUtility');\n\nvar defaults = {\n network: true,\n networkResponseHeaders: false,\n networkResponseBody: false,\n networkRequestHeaders: false,\n networkRequestBody: false,\n networkErrorOnHttp5xx: false,\n networkErrorOnHttp4xx: false,\n networkErrorOnHttp0: false,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true,\n contentSecurityPolicy: true,\n errorOnContentSecurityPolicy: false\n};\n\nfunction replace(obj, name, replacement, replacements, type) {\n var orig = obj[name];\n obj[name] = replacement(orig);\n if (replacements) {\n replacements[type].push([obj, name, orig]);\n }\n}\n\nfunction restore(replacements, type) {\n var b;\n while (replacements[type].length) {\n b = replacements[type].shift();\n b[0][b[1]] = b[2];\n }\n}\n\nfunction nameFromDescription(description) {\n if (!description || !description.attributes) { return null; }\n var attrs = description.attributes;\n for (var a = 0; a < attrs.length; ++a) {\n if (attrs[a].key === 'name') {\n return attrs[a].value;\n }\n }\n return null;\n}\n\nfunction defaultValueScrubber(scrubFields) {\n var patterns = [];\n for (var i = 0; i < scrubFields.length; ++i) {\n patterns.push(new RegExp(scrubFields[i], 'i'));\n }\n return function(description) {\n var name = nameFromDescription(description);\n if (!name) { return false; }\n for (var i = 0; i < patterns.length; ++i) {\n if (patterns[i].test(name)) {\n return true;\n }\n }\n return false;\n };\n}\n\nfunction Instrumenter(options, telemeter, rollbar, _window, _document) {\n this.options = options;\n var autoInstrument = options.autoInstrument;\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);\n this.telemeter = telemeter;\n this.rollbar = rollbar;\n this.diagnostic = rollbar.client.notifier.diagnostic;\n this._window = _window || {};\n this._document = _document || {};\n this.replacements = {\n network: [],\n log: [],\n navigation: [],\n connectivity: []\n };\n this.eventRemovers = {\n dom: [],\n connectivity: [],\n contentsecuritypolicy: []\n };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function(options) {\n this.options = _.merge(this.options, options);\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.merge(this.autoInstrument);\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n if (options.scrubTelemetryInputs !== undefined) {\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n }\n if (options.telemetryScrubber !== undefined) {\n this.telemetryScrubber = options.telemetryScrubber;\n }\n};\n\n// eslint-disable-next-line complexity\nInstrumenter.prototype.instrument = function(oldSettings) {\n if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {\n this.instrumentNetwork();\n } else if (!this.autoInstrument.network && oldSettings && oldSettings.network) {\n this.deinstrumentNetwork();\n }\n\n if (this.autoInstrument.log && !(oldSettings && oldSettings.log)) {\n this.instrumentConsole();\n } else if (!this.autoInstrument.log && oldSettings && oldSettings.log) {\n this.deinstrumentConsole();\n }\n\n if (this.autoInstrument.dom && !(oldSettings && oldSettings.dom)) {\n this.instrumentDom();\n } else if (!this.autoInstrument.dom && oldSettings && oldSettings.dom) {\n this.deinstrumentDom();\n }\n\n if (this.autoInstrument.navigation && !(oldSettings && oldSettings.navigation)) {\n this.instrumentNavigation();\n } else if (!this.autoInstrument.navigation && oldSettings && oldSettings.navigation) {\n this.deinstrumentNavigation();\n }\n\n if (this.autoInstrument.connectivity && !(oldSettings && oldSettings.connectivity)) {\n this.instrumentConnectivity();\n } else if (!this.autoInstrument.connectivity && oldSettings && oldSettings.connectivity) {\n this.deinstrumentConnectivity();\n }\n\n if (this.autoInstrument.contentSecurityPolicy && !(oldSettings && oldSettings.contentSecurityPolicy)) {\n this.instrumentContentSecurityPolicy();\n } else if (!this.autoInstrument.contentSecurityPolicy && oldSettings && oldSettings.contentSecurityPolicy) {\n this.deinstrumentContentSecurityPolicy();\n }\n};\n\nInstrumenter.prototype.deinstrumentNetwork = function() {\n restore(this.replacements, 'network');\n};\n\nInstrumenter.prototype.instrumentNetwork = function() {\n var self = this;\n\n function wrapProp(prop, xhr) {\n if (prop in xhr && _.isFunction(xhr[prop])) {\n replace(xhr, prop, function(orig) {\n return self.rollbar.wrap(orig);\n });\n }\n }\n\n if ('XMLHttpRequest' in this._window) {\n var xhrp = this._window.XMLHttpRequest.prototype;\n replace(xhrp, 'open', function(orig) {\n return function(method, url) {\n if (_.isType(url, 'string')) {\n if (this.__rollbar_xhr) {\n this.__rollbar_xhr.method = method;\n this.__rollbar_xhr.url = url;\n this.__rollbar_xhr.status_code = null;\n this.__rollbar_xhr.start_time_ms = _.now();\n this.__rollbar_xhr.end_time_ms = null;\n } else {\n this.__rollbar_xhr = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'setRequestHeader', function(orig) {\n return function(header, value) {\n // If xhr.open is async, __rollbar_xhr may not be initialized yet.\n if (!this.__rollbar_xhr) {\n this.__rollbar_xhr = {};\n }\n if (_.isType(header, 'string') && _.isType(value, 'string')) {\n if (self.autoInstrument.networkRequestHeaders) {\n if (!this.__rollbar_xhr.request_headers) {\n this.__rollbar_xhr.request_headers = {};\n }\n this.__rollbar_xhr.request_headers[header] = value;\n }\n // We want the content type even if request header telemetry is off.\n if (header.toLowerCase() === 'content-type') {\n this.__rollbar_xhr.request_content_type = value;\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'send', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(data) {\n /* eslint-enable no-unused-vars */\n var xhr = this;\n\n function onreadystatechangeHandler() {\n if (xhr.__rollbar_xhr) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n if (self.autoInstrument.networkRequestBody) {\n xhr.__rollbar_xhr.request = data;\n }\n xhr.__rollbar_event = self.captureNetwork(xhr.__rollbar_xhr, 'xhr', undefined);\n }\n if (xhr.readyState < 2) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n }\n if (xhr.readyState > 3) {\n xhr.__rollbar_xhr.end_time_ms = _.now();\n\n var headers = null;\n xhr.__rollbar_xhr.response_content_type = xhr.getResponseHeader('Content-Type');\n if (self.autoInstrument.networkResponseHeaders) {\n var headersConfig = self.autoInstrument.networkResponseHeaders;\n headers = {};\n try {\n var header, i;\n if (headersConfig === true) {\n var allHeaders = xhr.getAllResponseHeaders();\n if (allHeaders) {\n var arr = allHeaders.trim().split(/[\\r\\n]+/);\n var parts, value;\n for (i=0; i < arr.length; i++) {\n parts = arr[i].split(': ');\n header = parts.shift();\n value = parts.join(': ');\n headers[header] = value;\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n header = headersConfig[i];\n headers[header] = xhr.getResponseHeader(header);\n }\n }\n } catch (e) {\n /* we ignore the errors here that could come from different\n * browser issues with the xhr methods */\n }\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n try {\n body = xhr.responseText;\n } catch (e) {\n /* ignore errors from reading responseText */\n }\n }\n var response = null;\n if (body || headers) {\n response = {};\n if (body) {\n if (self.isJsonContentType(xhr.__rollbar_xhr.response_content_type)) {\n response.body = self.scrubJson(body);\n } else {\n response.body = body;\n }\n }\n if (headers) {\n response.headers = headers;\n }\n }\n if (response) {\n xhr.__rollbar_xhr.response = response;\n }\n try {\n var code = xhr.status;\n code = code === 1223 ? 204 : code;\n xhr.__rollbar_xhr.status_code = code;\n xhr.__rollbar_event.level = self.telemeter.levelFromStatus(code);\n self.errorOnHttpStatus(xhr.__rollbar_xhr);\n } catch (e) {\n /* ignore possible exception from xhr.status */\n }\n }\n }\n }\n\n wrapProp('onload', xhr);\n wrapProp('onerror', xhr);\n wrapProp('onprogress', xhr);\n\n if ('onreadystatechange' in xhr && _.isFunction(xhr.onreadystatechange)) {\n replace(xhr, 'onreadystatechange', function(orig) {\n return self.rollbar.wrap(orig, undefined, onreadystatechangeHandler);\n });\n } else {\n xhr.onreadystatechange = onreadystatechangeHandler;\n }\n if (xhr.__rollbar_xhr && self.trackHttpErrors()) {\n xhr.__rollbar_xhr.stack = (new Error()).stack;\n }\n return orig.apply(this, arguments);\n }\n }, this.replacements, 'network');\n }\n\n if ('fetch' in this._window) {\n replace(this._window, 'fetch', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(fn, t) {\n /* eslint-enable no-unused-vars */\n var args = new Array(arguments.length);\n for (var i=0, len=args.length; i < len; i++) {\n args[i] = arguments[i];\n }\n var input = args[0];\n var method = 'GET';\n var url;\n if (_.isType(input, 'string')) {\n url = input;\n } else if (input) {\n url = input.url;\n if (input.method) {\n method = input.method;\n }\n }\n if (args[1] && args[1].method) {\n method = args[1].method;\n }\n var metadata = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n if (args[1] && args[1].headers) {\n // Argument may be a Headers object, or plain object. Ensure here that\n // we are working with a Headers object with case-insensitive keys.\n var reqHeaders = new Headers(args[1].headers);\n\n metadata.request_content_type = reqHeaders.get('Content-Type');\n\n if (self.autoInstrument.networkRequestHeaders) {\n metadata.request_headers = self.fetchHeaders(reqHeaders, self.autoInstrument.networkRequestHeaders)\n }\n }\n\n if (self.autoInstrument.networkRequestBody) {\n if (args[1] && args[1].body) {\n metadata.request = args[1].body;\n } else if (args[0] && !_.isType(args[0], 'string') && args[0].body) {\n metadata.request = args[0].body;\n }\n }\n self.captureNetwork(metadata, 'fetch', undefined);\n if (self.trackHttpErrors()) {\n metadata.stack = (new Error()).stack;\n }\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n metadata.response_content_type = resp.headers.get('Content-Type');\n var headers = null;\n if (self.autoInstrument.networkResponseHeaders) {\n headers = self.fetchHeaders(resp.headers, self.autoInstrument.networkResponseHeaders);\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n if (typeof resp.text === 'function') { // Response.text() is not implemented on some platforms\n // The response must be cloned to prevent reading (and locking) the original stream.\n body = resp.clone().text(); //returns a Promise\n }\n }\n if (headers || body) {\n metadata.response = {};\n if (body) {\n // Test to ensure body is a Promise, which it should always be.\n if (typeof body.then === 'function') {\n body.then(function (text) {\n if (self.isJsonContentType(metadata.response_content_type)) {\n metadata.response.body = self.scrubJson(text);\n }\n });\n } else {\n metadata.response.body = body;\n }\n }\n if (headers) {\n metadata.response.headers = headers;\n }\n }\n self.errorOnHttpStatus(metadata);\n return resp;\n });\n };\n }, this.replacements, 'network');\n }\n};\n\nInstrumenter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID) {\n if (metadata.request && this.isJsonContentType(metadata.request_content_type)) {\n metadata.request = this.scrubJson(metadata.request);\n }\n return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);\n};\n\nInstrumenter.prototype.isJsonContentType = function(contentType) {\n return (contentType && _.isType(contentType, 'string') && contentType.toLowerCase().includes('json')) ? true : false;\n}\n\nInstrumenter.prototype.scrubJson = function(json) {\n return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));\n}\n\nInstrumenter.prototype.fetchHeaders = function(inHeaders, headersConfig) {\n var outHeaders = {};\n try {\n var i;\n if (headersConfig === true) {\n if (typeof inHeaders.entries === 'function') { // Headers.entries() is not implemented in IE\n var allHeaders = inHeaders.entries();\n var currentHeader = allHeaders.next();\n while (!currentHeader.done) {\n outHeaders[currentHeader.value[0]] = currentHeader.value[1];\n currentHeader = allHeaders.next();\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n var header = headersConfig[i];\n outHeaders[header] = inHeaders.get(header);\n }\n }\n } catch (e) {\n /* ignore probable IE errors */\n }\n return outHeaders;\n}\n\nInstrumenter.prototype.trackHttpErrors = function() {\n return this.autoInstrument.networkErrorOnHttp5xx ||\n this.autoInstrument.networkErrorOnHttp4xx ||\n this.autoInstrument.networkErrorOnHttp0;\n}\n\nInstrumenter.prototype.errorOnHttpStatus = function(metadata) {\n var status = metadata.status_code;\n\n if ((status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||\n (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||\n (status === 0 && this.autoInstrument.networkErrorOnHttp0)) {\n var error = new Error('HTTP request failed with Status ' + status);\n error.stack = metadata.stack;\n this.rollbar.error(error, { skipFrames: 1 });\n }\n}\n\nInstrumenter.prototype.deinstrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n var b;\n while (this.replacements['log'].length) {\n b = this.replacements['log'].shift();\n this._window.console[b[0]] = b[1];\n }\n};\n\nInstrumenter.prototype.instrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n\n var self = this;\n var c = this._window.console;\n\n function wrapConsole(method) {\n 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778\n\n var orig = c[method];\n var origConsole = c;\n var level = method === 'warn' ? 'warning' : method;\n c[method] = function() {\n var args = Array.prototype.slice.call(arguments);\n var message = _.formatArgsAsString(args);\n self.telemeter.captureLog(message, level);\n if (orig) {\n Function.prototype.apply.call(orig, origConsole, args);\n }\n };\n self.replacements['log'].push([method, orig]);\n }\n var methods = ['debug','info','warn','error','log'];\n try {\n for (var i=0, len=methods.length; i < len; i++) {\n wrapConsole(methods[i]);\n }\n } catch (e) {\n this.diagnostic.instrumentConsole = { error: e.message };\n }\n};\n\nInstrumenter.prototype.deinstrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n this.removeListeners('dom');\n};\n\nInstrumenter.prototype.instrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n var clickHandler = this.handleClick.bind(this);\n var blurHandler = this.handleBlur.bind(this);\n this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);\n this.addListener('dom', this._window, 'blur', 'onfocusout', blurHandler, true);\n};\n\nInstrumenter.prototype.handleClick = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n var hasTag = e && e.tagName;\n var anchorOrButton = domUtil.isDescribedElement(e, 'a') || domUtil.isDescribedElement(e, 'button');\n if (hasTag && (anchorOrButton || domUtil.isDescribedElement(e, 'input', ['button', 'submit']))) {\n this.captureDomEvent('click', e);\n } else if (domUtil.isDescribedElement(e, 'input', ['checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value, e.checked);\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleBlur = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n if (e && e.tagName) {\n if (domUtil.isDescribedElement(e, 'textarea')) {\n this.captureDomEvent('input', e, e.value);\n } else if (domUtil.isDescribedElement(e, 'select') && e.options && e.options.length) {\n this.handleSelectInputChanged(e);\n } else if (domUtil.isDescribedElement(e, 'input') && !domUtil.isDescribedElement(e, 'input', ['button', 'submit', 'hidden', 'checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value);\n }\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleSelectInputChanged = function(elem) {\n if (elem.multiple) {\n for (var i = 0; i < elem.options.length; i++) {\n if (elem.options[i].selected) {\n this.captureDomEvent('input', elem, elem.options[i].value);\n }\n }\n } else if (elem.selectedIndex >= 0 && elem.options[elem.selectedIndex]) {\n this.captureDomEvent('input', elem, elem.options[elem.selectedIndex].value);\n }\n};\n\nInstrumenter.prototype.captureDomEvent = function(subtype, element, value, isChecked) {\n if (value !== undefined) {\n if (this.scrubTelemetryInputs || (domUtil.getElementType(element) === 'password')) {\n value = '[scrubbed]';\n } else {\n var description = domUtil.describeElement(element);\n if (this.telemetryScrubber) {\n if (this.telemetryScrubber(description)) {\n value = '[scrubbed]';\n }\n } else if (this.defaultValueScrubber(description)) {\n value = '[scrubbed]';\n }\n }\n }\n var elementString = domUtil.elementArrayToString(domUtil.treeToArray(element));\n this.telemeter.captureDom(subtype, elementString, value, isChecked);\n};\n\nInstrumenter.prototype.deinstrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n restore(this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.instrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n var self = this;\n replace(this._window, 'onpopstate', function(orig) {\n return function() {\n var current = self._location.href;\n self.handleUrlChange(self._lastHref, current);\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n }, this.replacements, 'navigation');\n\n replace(this._window.history, 'pushState', function(orig) {\n return function() {\n var url = arguments.length > 2 ? arguments[2] : undefined;\n if (url) {\n self.handleUrlChange(self._lastHref, url + '');\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.handleUrlChange = function(from, to) {\n var parsedHref = urlparser.parse(this._location.href);\n var parsedTo = urlparser.parse(to);\n var parsedFrom = urlparser.parse(from);\n this._lastHref = to;\n if (parsedHref.protocol === parsedTo.protocol && parsedHref.host === parsedTo.host) {\n to = parsedTo.path + (parsedTo.hash || '');\n }\n if (parsedHref.protocol === parsedFrom.protocol && parsedHref.host === parsedFrom.host) {\n from = parsedFrom.path + (parsedFrom.hash || '');\n }\n this.telemeter.captureNavigation(from, to);\n};\n\nInstrumenter.prototype.deinstrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.removeListeners('connectivity');\n } else {\n restore(this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.instrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.addListener('connectivity', this._window, 'online', undefined, function() {\n this.telemeter.captureConnectivityChange('online');\n }.bind(this), true);\n this.addListener('connectivity', this._window, 'offline', undefined, function() {\n this.telemeter.captureConnectivityChange('offline');\n }.bind(this), true);\n } else {\n var self = this;\n replace(this._document.body, 'ononline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('online');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n replace(this._document.body, 'onoffline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('offline');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.handleCspEvent = function(cspEvent) {\n var message = 'Security Policy Violation: ' +\n 'blockedURI: ' + cspEvent.blockedURI + ', ' +\n 'violatedDirective: ' + cspEvent.violatedDirective + ', ' +\n 'effectiveDirective: ' + cspEvent.effectiveDirective + ', ';\n\n if (cspEvent.sourceFile) {\n message += 'location: ' + cspEvent.sourceFile + ', ' +\n 'line: ' + cspEvent.lineNumber + ', ' +\n 'col: ' + cspEvent.columnNumber + ', ';\n }\n\n message += 'originalPolicy: ' + cspEvent.originalPolicy;\n\n this.telemeter.captureLog(message, 'error');\n this.handleCspError(message);\n}\n\nInstrumenter.prototype.handleCspError = function(message) {\n if (this.autoInstrument.errorOnContentSecurityPolicy) {\n this.rollbar.error(message);\n }\n}\n\nInstrumenter.prototype.deinstrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._window)) { return; }\n\n this.removeListeners('contentsecuritypolicy');\n};\n\nInstrumenter.prototype.instrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._window)) { return; }\n\n var cspHandler = this.handleCspEvent.bind(this);\n this.addListener('contentsecuritypolicy', this._window, 'securitypolicyviolation', null, cspHandler, false);\n};\n\nInstrumenter.prototype.addListener = function(section, obj, type, altType, handler, capture) {\n if (obj.addEventListener) {\n obj.addEventListener(type, handler, capture);\n this.eventRemovers[section].push(function() {\n obj.removeEventListener(type, handler, capture);\n });\n } else if (altType) {\n obj.attachEvent(altType, handler);\n this.eventRemovers[section].push(function() {\n obj.detachEvent(altType, handler);\n });\n }\n};\n\nInstrumenter.prototype.removeListeners = function(section) {\n var r;\n while (this.eventRemovers[section].length) {\n r = this.eventRemovers[section].shift();\n r();\n }\n};\n\nmodule.exports = Instrumenter;\n","'use strict';\n\nfunction getElementType(e) {\n return (e.getAttribute('type') || '').toLowerCase();\n}\n\nfunction isDescribedElement(element, type, subtypes) {\n if (element.tagName.toLowerCase() !== type.toLowerCase()) {\n return false;\n }\n if (!subtypes) {\n return true;\n }\n element = getElementType(element);\n for (var i = 0; i < subtypes.length; i++) {\n if (subtypes[i] === element) {\n return true;\n }\n }\n return false;\n}\n\nfunction getElementFromEvent(evt, doc) {\n if (evt.target) {\n return evt.target;\n }\n if (doc && doc.elementFromPoint) {\n return doc.elementFromPoint(evt.clientX, evt.clientY);\n }\n return undefined;\n}\n\nfunction treeToArray(elem) {\n var MAX_HEIGHT = 5;\n var out = [];\n var nextDescription;\n for (var height = 0; elem && height < MAX_HEIGHT; height++) {\n nextDescription = describeElement(elem);\n if (nextDescription.tagName === 'html') {\n break;\n }\n out.unshift(nextDescription);\n elem = elem.parentNode;\n }\n return out;\n}\n\nfunction elementArrayToString(a) {\n var MAX_LENGTH = 80;\n var separator = ' > ', separatorLength = separator.length;\n var out = [], len = 0, nextStr, totalLength;\n\n for (var i = a.length - 1; i >= 0; i--) {\n nextStr = descriptionToString(a[i]);\n totalLength = len + (out.length * separatorLength) + nextStr.length;\n if (i < a.length - 1 && totalLength >= MAX_LENGTH + 3) {\n out.unshift('...');\n break;\n }\n out.unshift(nextStr);\n len += nextStr.length;\n }\n return out.join(separator);\n}\n\nfunction descriptionToString(desc) {\n if (!desc || !desc.tagName) {\n return '';\n }\n var out = [desc.tagName];\n if (desc.id) {\n out.push('#' + desc.id);\n }\n if (desc.classes) {\n out.push('.' + desc.classes.join('.'));\n }\n for (var i = 0; i < desc.attributes.length; i++) {\n out.push('[' + desc.attributes[i].key + '=\"' + desc.attributes[i].value + '\"]');\n }\n\n return out.join('');\n}\n\n/**\n * Input: a dom element\n * Output: null if tagName is falsey or input is falsey, else\n * {\n * tagName: String,\n * id: String | undefined,\n * classes: [String] | undefined,\n * attributes: [\n * {\n * key: OneOf(type, name, title, alt),\n * value: String\n * }\n * ]\n * }\n */\nfunction describeElement(elem) {\n if (!elem || !elem.tagName) {\n return null;\n }\n var out = {}, className, key, attr, i;\n out.tagName = elem.tagName.toLowerCase();\n if (elem.id) {\n out.id = elem.id;\n }\n className = elem.className;\n if (className && (typeof className === 'string')) {\n out.classes = className.split(/\\s+/);\n }\n var attributes = ['type', 'name', 'title', 'alt'];\n out.attributes = [];\n for (i = 0; i < attributes.length; i++) {\n key = attributes[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.attributes.push({key: key, value: attr});\n }\n }\n return out;\n}\n\nmodule.exports = {\n describeElement: describeElement,\n descriptionToString: descriptionToString,\n elementArrayToString: elementArrayToString,\n treeToArray: treeToArray,\n getElementFromEvent: getElementFromEvent,\n isDescribedElement: isDescribedElement,\n getElementType: getElementType\n};\n","'use strict';\n\nvar polyfillJSON = require('../../vendor/JSON-js/json3');\n\nmodule.exports = polyfillJSON;\n","// json3.js\n// 2017-02-21\n// Public Domain.\n// NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.\n// See http://www.JSON.org/js.html\n// This code should be minified before deployment.\n// See http://javascript.crockford.com/jsmin.html\n\n// USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO\n// NOT CONTROL.\n\n// This file creates a global JSON object containing two methods: stringify\n// and parse. This file provides the ES5 JSON capability to ES3 systems.\n// If a project might run on IE8 or earlier, then this file should be included.\n// This file does nothing on ES5 systems.\n\n// JSON.stringify(value, replacer, space)\n// value any JavaScript value, usually an object or array.\n// replacer an optional parameter that determines how object\n// values are stringified for objects. It can be a\n// function or an array of strings.\n// space an optional parameter that specifies the indentation\n// of nested structures. If it is omitted, the text will\n// be packed without extra whitespace. If it is a number,\n// it will specify the number of spaces to indent at each\n// level. If it is a string (such as \"\\t\" or \" \"),\n// it contains the characters used to indent at each level.\n// This method produces a JSON text from a JavaScript value.\n// When an object value is found, if the object contains a toJSON\n// method, its toJSON method will be called and the result will be\n// stringified. A toJSON method does not serialize: it returns the\n// value represented by the name/value pair that should be serialized,\n// or undefined if nothing should be serialized. The toJSON method\n// will be passed the key associated with the value, and this will be\n// bound to the value.\n\n// For example, this would serialize Dates as ISO strings.\n\n// Date.prototype.toJSON = function (key) {\n// function f(n) {\n// // Format integers to have at least two digits.\n// return (n < 10)\n// ? \"0\" + n\n// : n;\n// }\n// return this.getUTCFullYear() + \"-\" +\n// f(this.getUTCMonth() + 1) + \"-\" +\n// f(this.getUTCDate()) + \"T\" +\n// f(this.getUTCHours()) + \":\" +\n// f(this.getUTCMinutes()) + \":\" +\n// f(this.getUTCSeconds()) + \"Z\";\n// };\n\n// You can provide an optional replacer method. It will be passed the\n// key and value of each member, with this bound to the containing\n// object. The value that is returned from your method will be\n// serialized. If your method returns undefined, then the member will\n// be excluded from the serialization.\n\n// If the replacer parameter is an array of strings, then it will be\n// used to select the members to be serialized. It filters the results\n// such that only members with keys listed in the replacer array are\n// stringified.\n\n// Values that do not have JSON representations, such as undefined or\n// functions, will not be serialized. Such values in objects will be\n// dropped; in arrays they will be replaced with null. You can use\n// a replacer function to replace those with JSON values.\n\n// JSON.stringify(undefined) returns undefined.\n\n// The optional space parameter produces a stringification of the\n// value that is filled with line breaks and indentation to make it\n// easier to read.\n\n// If the space parameter is a non-empty string, then that string will\n// be used for indentation. If the space parameter is a number, then\n// the indentation will be that many spaces.\n\n// Example:\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}]);\n// // text is '[\"e\",{\"pluribus\":\"unum\"}]'\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}], null, \"\\t\");\n// // text is '[\\n\\t\"e\",\\n\\t{\\n\\t\\t\"pluribus\": \"unum\"\\n\\t}\\n]'\n\n// text = JSON.stringify([new Date()], function (key, value) {\n// return this[key] instanceof Date\n// ? \"Date(\" + this[key] + \")\"\n// : value;\n// });\n// // text is '[\"Date(---current time---)\"]'\n\n// JSON.parse(text, reviver)\n// This method parses a JSON text to produce an object or array.\n// It can throw a SyntaxError exception.\n// This has been modified to use JSON-js/json_parse_state.js as the\n// parser instead of the one built around eval found in JSON-js/json2.js\n\n// The optional reviver parameter is a function that can filter and\n// transform the results. It receives each of the keys and values,\n// and its return value is used instead of the original value.\n// If it returns what it received, then the structure is not modified.\n// If it returns undefined then the member is deleted.\n\n// Example:\n\n// // Parse the text. Values that look like ISO date strings will\n// // be converted to Date objects.\n\n// myData = JSON.parse(text, function (key, value) {\n// var a;\n// if (typeof value === \"string\") {\n// a =\n// /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2}(?:\\.\\d*)?)Z$/.exec(value);\n// if (a) {\n// return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],\n// +a[5], +a[6]));\n// }\n// }\n// return value;\n// });\n\n// myData = JSON.parse('[\"Date(09/09/2001)\"]', function (key, value) {\n// var d;\n// if (typeof value === \"string\" &&\n// value.slice(0, 5) === \"Date(\" &&\n// value.slice(-1) === \")\") {\n// d = new Date(value.slice(5, -1));\n// if (d) {\n// return d;\n// }\n// }\n// return value;\n// });\n\n// This is a reference implementation. You are free to copy, modify, or\n// redistribute.\n\n/*jslint\n for, this\n */\n\n/*property\n JSON, apply, call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,\n getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,\n lastIndex, length, parse, prototype, push, replace, slice, stringify,\n test, toJSON, toString, valueOf\n */\n\nvar setupCustomJSON = function(JSON) {\n\n var rx_one = /^[\\],:{}\\s]*$/;\n var rx_two = /\\\\(?:[\"\\\\\\/bfnrt]|u[0-9a-fA-F]{4})/g;\n var rx_three = /\"[^\"\\\\\\n\\r]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g;\n var rx_four = /(?:^|:|,)(?:\\s*\\[)+/g;\n var rx_escapable = /[\\\\\"\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n var rx_dangerous = /[\\u0000\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n\n function f(n) {\n // Format integers to have at least two digits.\n return n < 10\n ? \"0\" + n\n : n;\n }\n\n function this_value() {\n return this.valueOf();\n }\n\n if (typeof Date.prototype.toJSON !== \"function\") {\n\n Date.prototype.toJSON = function () {\n\n return isFinite(this.valueOf())\n ? this.getUTCFullYear() + \"-\" +\n f(this.getUTCMonth() + 1) + \"-\" +\n f(this.getUTCDate()) + \"T\" +\n f(this.getUTCHours()) + \":\" +\n f(this.getUTCMinutes()) + \":\" +\n f(this.getUTCSeconds()) + \"Z\"\n : null;\n };\n\n Boolean.prototype.toJSON = this_value;\n Number.prototype.toJSON = this_value;\n String.prototype.toJSON = this_value;\n }\n\n var gap;\n var indent;\n var meta;\n var rep;\n\n\n function quote(string) {\n\n // If the string contains no control characters, no quote characters, and no\n // backslash characters, then we can safely slap some quotes around it.\n // Otherwise we must also replace the offending characters with safe escape\n // sequences.\n\n rx_escapable.lastIndex = 0;\n return rx_escapable.test(string)\n ? \"\\\"\" + string.replace(rx_escapable, function (a) {\n var c = meta[a];\n return typeof c === \"string\"\n ? c\n : \"\\\\u\" + (\"0000\" + a.charCodeAt(0).toString(16)).slice(-4);\n }) + \"\\\"\"\n : \"\\\"\" + string + \"\\\"\";\n }\n\n\n function str(key, holder) {\n\n // Produce a string from holder[key].\n\n var i; // The loop counter.\n var k; // The member key.\n var v; // The member value.\n var length;\n var mind = gap;\n var partial;\n var value = holder[key];\n\n // If the value has a toJSON method, call it to obtain a replacement value.\n\n if (value && typeof value === \"object\" &&\n typeof value.toJSON === \"function\") {\n value = value.toJSON(key);\n }\n\n // If we were called with a replacer function, then call the replacer to\n // obtain a replacement value.\n\n if (typeof rep === \"function\") {\n value = rep.call(holder, key, value);\n }\n\n // What happens next depends on the value's type.\n\n switch (typeof value) {\n case \"string\":\n return quote(value);\n\n case \"number\":\n\n // JSON numbers must be finite. Encode non-finite numbers as null.\n\n return isFinite(value)\n ? String(value)\n : \"null\";\n\n case \"boolean\":\n case \"null\":\n\n // If the value is a boolean or null, convert it to a string. Note:\n // typeof null does not produce \"null\". The case is included here in\n // the remote chance that this gets fixed someday.\n\n return String(value);\n\n // If the type is \"object\", we might be dealing with an object or an array or\n // null.\n\n case \"object\":\n\n // Due to a specification blunder in ECMAScript, typeof null is \"object\",\n // so watch out for that case.\n\n if (!value) {\n return \"null\";\n }\n\n // Make an array to hold the partial results of stringifying this object value.\n\n gap += indent;\n partial = [];\n\n // Is the value an array?\n\n if (Object.prototype.toString.apply(value) === \"[object Array]\") {\n\n // The value is an array. Stringify every element. Use null as a placeholder\n // for non-JSON values.\n\n length = value.length;\n for (i = 0; i < length; i += 1) {\n partial[i] = str(i, value) || \"null\";\n }\n\n // Join all of the elements together, separated with commas, and wrap them in\n // brackets.\n\n v = partial.length === 0\n ? \"[]\"\n : gap\n ? \"[\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"]\"\n : \"[\" + partial.join(\",\") + \"]\";\n gap = mind;\n return v;\n }\n\n // If the replacer is an array, use it to select the members to be stringified.\n\n if (rep && typeof rep === \"object\") {\n length = rep.length;\n for (i = 0; i < length; i += 1) {\n if (typeof rep[i] === \"string\") {\n k = rep[i];\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n } else {\n\n // Otherwise, iterate through all of the keys in the object.\n\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(value, k)) {\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n }\n\n // Join all of the member texts together, separated with commas,\n // and wrap them in braces.\n\n v = partial.length === 0\n ? \"{}\"\n : gap\n ? \"{\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"}\"\n : \"{\" + partial.join(\",\") + \"}\";\n gap = mind;\n return v;\n }\n }\n\n // If the JSON object does not yet have a stringify method, give it one.\n\n if (typeof JSON.stringify !== \"function\") {\n meta = { // table of character substitutions\n \"\\b\": \"\\\\b\",\n \"\\t\": \"\\\\t\",\n \"\\n\": \"\\\\n\",\n \"\\f\": \"\\\\f\",\n \"\\r\": \"\\\\r\",\n \"\\\"\": \"\\\\\\\"\",\n \"\\\\\": \"\\\\\\\\\"\n };\n JSON.stringify = function (value, replacer, space) {\n\n // The stringify method takes a value and an optional replacer, and an optional\n // space parameter, and returns a JSON text. The replacer can be a function\n // that can replace values, or an array of strings that will select the keys.\n // A default replacer method can be provided. Use of the space parameter can\n // produce text that is more easily readable.\n\n var i;\n gap = \"\";\n indent = \"\";\n\n // If the space parameter is a number, make an indent string containing that\n // many spaces.\n\n if (typeof space === \"number\") {\n for (i = 0; i < space; i += 1) {\n indent += \" \";\n }\n\n // If the space parameter is a string, it will be used as the indent string.\n\n } else if (typeof space === \"string\") {\n indent = space;\n }\n\n // If there is a replacer, it must be a function or an array.\n // Otherwise, throw an error.\n\n rep = replacer;\n if (replacer && typeof replacer !== \"function\" &&\n (typeof replacer !== \"object\" ||\n typeof replacer.length !== \"number\")) {\n throw new Error(\"JSON.stringify\");\n }\n\n // Make a fake root object containing our value under the key of \"\".\n // Return the result of stringifying the value.\n\n return str(\"\", {\"\": value});\n };\n }\n\n\n // If the JSON object does not yet have a parse method, give it one.\n\n if (typeof JSON.parse !== \"function\") {\n JSON.parse = (function () {\n\n // This function creates a JSON parse function that uses a state machine rather\n // than the dangerous eval function to parse a JSON text.\n\n var state; // The state of the parser, one of\n // 'go' The starting state\n // 'ok' The final, accepting state\n // 'firstokey' Ready for the first key of the object or\n // the closing of an empty object\n // 'okey' Ready for the next key of the object\n // 'colon' Ready for the colon\n // 'ovalue' Ready for the value half of a key/value pair\n // 'ocomma' Ready for a comma or closing }\n // 'firstavalue' Ready for the first value of an array or\n // an empty array\n // 'avalue' Ready for the next value of an array\n // 'acomma' Ready for a comma or closing ]\n var stack; // The stack, for controlling nesting.\n var container; // The current container object or array\n var key; // The current key\n var value; // The current value\n var escapes = { // Escapement translation table\n \"\\\\\": \"\\\\\",\n \"\\\"\": \"\\\"\",\n \"/\": \"/\",\n \"t\": \"\\t\",\n \"n\": \"\\n\",\n \"r\": \"\\r\",\n \"f\": \"\\f\",\n \"b\": \"\\b\"\n };\n var string = { // The actions for string tokens\n go: function () {\n state = \"ok\";\n },\n firstokey: function () {\n key = value;\n state = \"colon\";\n },\n okey: function () {\n key = value;\n state = \"colon\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var number = { // The actions for number tokens\n go: function () {\n state = \"ok\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var action = {\n\n // The action table describes the behavior of the machine. It contains an\n // object for each token. Each object contains a method that is called when\n // a token is matched in a state. An object will lack a method for illegal\n // states.\n\n \"{\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = {};\n state = \"firstokey\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = {};\n state = \"firstokey\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n }\n },\n \"}\": {\n firstokey: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n ocomma: function () {\n var pop = stack.pop();\n container[key] = value;\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \"[\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = [];\n state = \"firstavalue\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = [];\n state = \"firstavalue\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n }\n },\n \"]\": {\n firstavalue: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n acomma: function () {\n var pop = stack.pop();\n container.push(value);\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \":\": {\n colon: function () {\n if (Object.hasOwnProperty.call(container, key)) {\n throw new SyntaxError(\"Duplicate key '\" + key + \"\\\"\");\n }\n state = \"ovalue\";\n }\n },\n \",\": {\n ocomma: function () {\n container[key] = value;\n state = \"okey\";\n },\n acomma: function () {\n container.push(value);\n state = \"avalue\";\n }\n },\n \"true\": {\n go: function () {\n value = true;\n state = \"ok\";\n },\n ovalue: function () {\n value = true;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = true;\n state = \"acomma\";\n },\n avalue: function () {\n value = true;\n state = \"acomma\";\n }\n },\n \"false\": {\n go: function () {\n value = false;\n state = \"ok\";\n },\n ovalue: function () {\n value = false;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = false;\n state = \"acomma\";\n },\n avalue: function () {\n value = false;\n state = \"acomma\";\n }\n },\n \"null\": {\n go: function () {\n value = null;\n state = \"ok\";\n },\n ovalue: function () {\n value = null;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = null;\n state = \"acomma\";\n },\n avalue: function () {\n value = null;\n state = \"acomma\";\n }\n }\n };\n\n function debackslashify(text) {\n\n // Remove and replace any backslash escapement.\n\n return text.replace(/\\\\(?:u(.{4})|([^u]))/g, function (ignore, b, c) {\n return b\n ? String.fromCharCode(parseInt(b, 16))\n : escapes[c];\n });\n }\n\n return function (source, reviver) {\n\n // A regular expression is used to extract tokens from the JSON text.\n // The extraction process is cautious.\n\n var result;\n var tx = /^[\\u0020\\t\\n\\r]*(?:([,:\\[\\]{}]|true|false|null)|(-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?)|\"((?:[^\\r\\n\\t\\\\\\\"]|\\\\(?:[\"\\\\\\/trnfb]|u[0-9a-fA-F]{4}))*)\")/;\n\n // Set the starting state.\n\n state = \"go\";\n\n // The stack records the container, key, and state for each object or array\n // that contains another object or array while processing nested structures.\n\n stack = [];\n\n // If any error occurs, we will catch it and ultimately throw a syntax error.\n\n try {\n\n // For each token...\n\n while (true) {\n result = tx.exec(source);\n if (!result) {\n break;\n }\n\n // result is the result array from matching the tokenizing regular expression.\n // result[0] contains everything that matched, including any initial whitespace.\n // result[1] contains any punctuation that was matched, or true, false, or null.\n // result[2] contains a matched number, still in string form.\n // result[3] contains a matched string, without quotes but with escapement.\n\n if (result[1]) {\n\n // Token: Execute the action for this state and token.\n\n action[result[1]][state]();\n\n } else if (result[2]) {\n\n // Number token: Convert the number string into a number value and execute\n // the action for this state and number.\n\n value = +result[2];\n number[state]();\n } else {\n\n // String token: Replace the escapement sequences and execute the action for\n // this state and string.\n\n value = debackslashify(result[3]);\n string[state]();\n }\n\n // Remove the token from the string. The loop will continue as long as there\n // are tokens. This is a slow process, but it allows the use of ^ matching,\n // which assures that no illegal tokens slip through.\n\n source = source.slice(result[0].length);\n }\n\n // If we find a state/token combination that is illegal, then the action will\n // cause an error. We handle the error by simply changing the state.\n\n } catch (e) {\n state = e;\n }\n\n // The parsing is finished. If we are not in the final \"ok\" state, or if the\n // remaining source contains anything except whitespace, then we did not have\n //a well-formed JSON text.\n\n if (state !== \"ok\" || (/[^\\u0020\\t\\n\\r]/.test(source))) {\n throw (state instanceof SyntaxError)\n ? state\n : new SyntaxError(\"JSON\");\n }\n\n // If there is a reviver function, we recursively walk the new structure,\n // passing each name/value pair to the reviver function for possible\n // transformation, starting with a temporary root object that holds the current\n // value in an empty key. If there is not a reviver function, we simply return\n // that value.\n\n return (typeof reviver === \"function\")\n ? (function walk(holder, key) {\n var k;\n var v;\n var val = holder[key];\n if (val && typeof val === \"object\") {\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(val, k)) {\n v = walk(val, k);\n if (v !== undefined) {\n val[k] = v;\n } else {\n delete val[k];\n }\n }\n }\n }\n return reviver.call(holder, key, val);\n }({\"\": value}, \"\"))\n : value;\n };\n }());\n }\n}\n\nmodule.exports = setupCustomJSON;\n","'use strict';\n\nfunction wrapGlobals(window, handler, shim) {\n if (!window) { return; }\n // Adapted from https://github.com/bugsnag/bugsnag-js\n var globals = 'EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload'.split(',');\n var i, global;\n for (i = 0; i < globals.length; ++i) {\n global = globals[i];\n\n if (window[global] && window[global].prototype) {\n _extendListenerPrototype(handler, window[global].prototype, shim);\n }\n }\n}\n\nfunction _extendListenerPrototype(handler, prototype, shim) {\n if (prototype.hasOwnProperty && prototype.hasOwnProperty('addEventListener')) {\n var oldAddEventListener = prototype.addEventListener;\n while (oldAddEventListener._rollbarOldAdd && oldAddEventListener.belongsToShim) {\n oldAddEventListener = oldAddEventListener._rollbarOldAdd;\n }\n var addFn = function(event, callback, bubble) {\n oldAddEventListener.call(this, event, handler.wrap(callback), bubble);\n };\n addFn._rollbarOldAdd = oldAddEventListener;\n addFn.belongsToShim = shim;\n prototype.addEventListener = addFn;\n\n var oldRemoveEventListener = prototype.removeEventListener;\n while (oldRemoveEventListener._rollbarOldRemove && oldRemoveEventListener.belongsToShim) {\n oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;\n }\n var removeFn = function(event, callback, bubble) {\n oldRemoveEventListener.call(this, event, callback && callback._rollbar_wrapped || callback, bubble);\n };\n removeFn._rollbarOldRemove = oldRemoveEventListener;\n removeFn.belongsToShim = shim;\n prototype.removeEventListener = removeFn;\n }\n}\n\nmodule.exports = wrapGlobals;\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction raw(payload, jsonBackup) {\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction selectFrames(frames, range) {\n var len = frames.length;\n if (len > range * 2) {\n return frames.slice(0, range).concat(frames.slice(len - range));\n }\n return frames;\n}\n\nfunction truncateFrames(payload, jsonBackup, range) {\n range = (typeof range === 'undefined') ? 30 : range;\n var body = payload.data.body;\n var frames;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n frames = chain[i].frames;\n frames = selectFrames(frames, range);\n chain[i].frames = frames;\n }\n } else if (body.trace) {\n frames = body.trace.frames;\n frames = selectFrames(frames, range);\n body.trace.frames = frames;\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction maybeTruncateValue(len, val) {\n if (!val) {\n return val;\n }\n if (val.length > len) {\n return val.slice(0, len - 3).concat('...');\n }\n return val;\n}\n\nfunction truncateStrings(len, payload, jsonBackup) {\n function truncator(k, v, seen) {\n switch (_.typeName(v)) {\n case 'string':\n return maybeTruncateValue(len, v);\n case 'object':\n case 'array':\n return traverse(v, truncator, seen);\n default:\n return v;\n }\n }\n payload = traverse(payload, truncator);\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction truncateTraceData(traceData) {\n if (traceData.exception) {\n delete traceData.exception.description;\n traceData.exception.message = maybeTruncateValue(255, traceData.exception.message);\n }\n traceData.frames = selectFrames(traceData.frames, 1);\n return traceData;\n}\n\nfunction minBody(payload, jsonBackup) {\n var body = payload.data.body;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n chain[i] = truncateTraceData(chain[i]);\n }\n } else if (body.trace) {\n body.trace = truncateTraceData(body.trace);\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction needsTruncation(payload, maxSize) {\n return _.maxByteSize(payload) > maxSize;\n}\n\nfunction truncate(payload, jsonBackup, maxSize) {\n maxSize = (typeof maxSize === 'undefined') ? (512 * 1024) : maxSize;\n var strategies = [\n raw,\n truncateFrames,\n truncateStrings.bind(null, 1024),\n truncateStrings.bind(null, 512),\n truncateStrings.bind(null, 256),\n minBody\n ];\n var strategy, results, result;\n\n while ((strategy = strategies.shift())) {\n results = strategy(payload, jsonBackup);\n payload = results[0];\n result = results[1];\n if (result.error || !needsTruncation(result.value, maxSize)) {\n return result;\n }\n }\n return result;\n}\n\nmodule.exports = {\n truncate: truncate,\n\n /* for testing */\n raw: raw,\n truncateFrames: truncateFrames,\n truncateStrings: truncateStrings,\n maybeTruncateValue: maybeTruncateValue\n};\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://rollbar/webpack/bootstrap","webpack://rollbar/./src/utility.js","webpack://rollbar/./src/browser/logger.js","webpack://rollbar/./src/browser/url.js","webpack://rollbar/./src/errorParser.js","webpack://rollbar/./src/scrub.js","webpack://rollbar/./src/utility/traverse.js","webpack://rollbar/./src/browser/bundles/rollbar.js","webpack://rollbar/./src/browser/rollbar.js","webpack://rollbar/./src/browser/core.js","webpack://rollbar/./src/rollbar.js","webpack://rollbar/./src/rateLimiter.js","webpack://rollbar/./src/merge.js","webpack://rollbar/./src/queue.js","webpack://rollbar/./src/notifier.js","webpack://rollbar/./src/api.js","webpack://rollbar/./src/apiUtility.js","webpack://rollbar/./node_modules/console-polyfill/index.js","webpack://rollbar/./src/browser/detection.js","webpack://rollbar/./src/browser/globalSetup.js","webpack://rollbar/./src/browser/transport.js","webpack://rollbar/./src/browser/transforms.js","webpack://rollbar/./node_modules/error-stack-parser/error-stack-parser.js","webpack://rollbar/./node_modules/error-stack-parser/node_modules/stackframe/stackframe.js","webpack://rollbar/./src/transforms.js","webpack://rollbar/./src/browser/predicates.js","webpack://rollbar/./src/predicates.js","webpack://rollbar/./src/defaults.js","webpack://rollbar/./src/browser/defaults/scrubFields.js","webpack://rollbar/./src/telemetry.js","webpack://rollbar/./src/browser/telemetry.js","webpack://rollbar/./src/browser/domUtility.js","webpack://rollbar/./src/utility/polyfillJSON.js","webpack://rollbar/./vendor/JSON-js/json3.js","webpack://rollbar/./src/browser/wrapGlobals.js","webpack://rollbar/./src/truncation.js"],"names":[],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;AClFa;;AAEb,YAAY,mBAAO,CAAC,EAAS;;AAE7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,OAAO;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,EAAE;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,mCAAmC,OAAO;AAC1C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,iBAAiB,YAAY;AAC7B;AACA,qBAAqB;AACrB;AACA,KAAK,wBAAwB;AAC7B;AACA,KAAK,yBAAyB;AAC9B;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kCAAkC,OAAO;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,SAAS;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,kCAAkC,OAAO;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,SAAS,UAAU,YAAY,GAAG;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,aAAa;AAChC;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5wBa;;AAEb;AACA,mBAAO,CAAC,EAAkB;AAC1B,gBAAgB,mBAAO,CAAC,EAAa;AACrC,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;AC3Ca;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;AChFa;;AAEb,uBAAuB,mBAAO,CAAC,EAAoB;;AAEnD;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;;AAEA,sBAAsB,wBAAwB;AAC9C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,eAAe;AACf;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7Ha;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,eAAe,mBAAO,CAAC,CAAoB;;AAE3C;AACA;;AAEA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,WAAW;AAC9B;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG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c;AACvC,uBAAuB,mBAAO,CAAC,EAAe;AAC9C,iBAAiB,mBAAO,CAAC,EAAc;AACvC,uBAAuB,mBAAO,CAAC,EAAe;AAC9C,kBAAkB,mBAAO,CAAC,CAAgB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,0BAA0B,sBAAsB;AAChD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,oCAAoC,SAAS;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,eAAe,mBAAO,CAAC,EAAa;AACpC,kBAAkB,mBAAO,CAAC,EAAwB;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACpjBa;;AAEb,kBAAkB,mBAAO,CAAC,EAAe;AACzC,YAAY,mBAAO,CAAC,EAAS;AAC7B,eAAe,mBAAO,CAAC,EAAY;AACnC,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,6EAA6E,UAAU;AACvF,yFAAyF,UAAU;;AAEnG;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,6BAA6B;AAC7B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACnRa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AChJa;;AAEb;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA,WAAW,YAAY;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACvDa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wDAAwD,WAAW;AACnE;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,QAAQ;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,aAAa,8BAA8B;AAC3C;AACA;AACA;AACA;AACA,+CAA+C,SAAS;AACxD;AACA;AACA,cAAc;AACd;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,SAAS;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,+BAA+B;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC7Qa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACxHa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,cAAc,mBAAO,CAAC,EAAc;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;ACvGa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC7FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;AClBY;;AAEb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;AC/Ba;;AAEb;AACA,gBAAgB,QAAQ;AACxB;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;;AAEA;AACA,gBAAgB,QAAQ;;AAExB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;;;;;;;AClGa;;AAEb;;AAEA,QAAQ,mBAAO,CAAC,CAAY;AAC5B,aAAa,mBAAO,CAAC,CAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACvQa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,kBAAkB,mBAAO,CAAC,CAAgB;AAC1C,aAAa,mBAAO,CAAC,CAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,OAAO;AAC7C;AACA,oBAAoB,6CAA6C;AACjE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,4BAA4B,gBAAgB;AAC5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,sBAAsB;AACvC;AACA;AACA;;AAEA,4BAA4B,oBAAoB;AAChD;AACA;;AAEA;AACA;;AAEA;AACA;AACA,8BAA8B,aAAa;AAC3C;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,kBAAkB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC9UA;AACA;AACA;;AAEA;AACA,QAAQ,IAA0C;AAClD,QAAQ,iCAA6B,CAAC,uBAAY,CAAC,oCAAE,OAAO;AAAA;AAAA;AAAA,oGAAC;AAC7D,KAAK,MAAM,EAIN;AACL,CAAC;AACD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,MAAM;AACzB,oBAAoB,MAAM;AAC1B;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA,CAAC;;;;;;;ACzMD;AACA;AACA;;AAEA;AACA,QAAQ,IAA0C;AAClD,QAAQ,iCAAqB,EAAE,oCAAE,OAAO;AAAA;AAAA;AAAA,oGAAC;AACzC,KAAK,MAAM,EAIN;AACL,CAAC;AACD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,wBAAwB;AAC3C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA,CAAC;;;;;;;;AC9IY;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,sBAAsB;AAC1D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,8BAA8B;AAC9B;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrJa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;ACba;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe;;AAEf;;AAEA,uCAAuC,eAAe;;AAEtD;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA;;AAEA,wCAAwC,eAAe;;AAEvD,mBAAmB,gBAAgB;AACnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,SAAS;AAC1B;;AAEA,mBAAmB,qBAAqB;AACxC;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClMa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACVa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5Da;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qCAAqC,mBAAmB;AACxD;;AAEA;AACA,qCAAqC,4BAA4B;AACjE;AACA;AACA,8BAA8B,4BAA4B;AAC1D;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD;AACA;AACA,8BAA8B,gBAAgB;AAC9C;AACA;;AAEA;AACA,8BAA8B,aAAa;AAC3C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AClLa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,YAAY,mBAAO,CAAC,CAAU;AAC9B,gBAAgB,mBAAO,CAAC,CAAO;AAC/B,cAAc,mBAAO,CAAC,EAAc;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gDAAgD,aAAa;AAC7D;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B,mBAAmB,qBAAqB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,6BAA6B,0BAA0B;AACvD;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,eAAe,0BAA0B;AACzC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB;;AAEjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,SAAS;AAC9C;AACA;AACA,GAAG;AACH,yCAAyC;AACzC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,8CAA8C,QAAQ;;AAEtD;AACA;;AAEA;AACA,8CAA8C,QAAQ;;AAEtD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC/vBa;;AAEb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,6BAA6B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,4BAA4B,QAAQ;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,4BAA4B;AAC7C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,uBAAuB;AACpC;AACA;AACA;AACA,2BAA2B,sBAAsB;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnIa;;AAEb,mBAAmB,mBAAO,CAAC,EAA4B;;AAEvD;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB;AACpB;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,yCAAyC,iBAAiB;AAC1D,8BAA8B,kBAAkB;;AAEhD,yCAAyC,iBAAiB;AAC1D,sCAAsC,6BAA6B;;AAEnE;AACA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,wBAAwB;AACxB,+CAA+C,EAAE;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;;AAGA;;AAEA;;AAEA,UAAU;AACV,UAAU;AACV,UAAU;AACV;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA,qBAAqB,YAAY;AACjC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,qBAAqB,YAAY;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,eAAe;AACf;AACA,cAAc,wDAAwD;AACtE,cAAc,0BAA0B;AACxC;AACA;AACA;AACA;;AAEA;;AAEA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,mBAAmB,WAAW;AAC9B;AACA;;AAEA;;AAEA,OAAO;AACP;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,sBAAsB,UAAU;AAChC;AACA;;;AAGA;;AAEA;AACA;;AAEA;AACA;;AAEA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB,oBAAoB;AACpB,cAAc;AACd,gBAAgB;AAChB,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,UAAU;AACV;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,WAAW;AACX;AACA,wBAAwB,gDAAgD;AACxE;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,SAAS;AACT,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,WAAW;AACX;AACA,wBAAwB,gDAAgD;AACxE;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,sCAAsC,EAAE;AACxC;AACA;AACA;AACA,SAAS;AACT;;AAEA;;AAEA;AACA;;AAEA;AACA,+CAA+C,yGAAyG,EAAE;;AAE1J;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,SAAS;AACT;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE,UAAU;AACvB;AACA;AACA,KAAK;AACL;AACA;;AAEA;;;;;;;;AC1vBa;;AAEb;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,aAAa,oBAAoB;AACjC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC1Ca;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,eAAe,mBAAO,CAAC,CAAoB;;AAE3C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA","file":"rollbar.named-amd.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n","'use strict';\n\nvar merge = require('./merge');\n\nvar RollbarJSON = {};\nfunction setupJSON(polyfillJSON) {\n if (isFunction(RollbarJSON.stringify) && isFunction(RollbarJSON.parse)) {\n return;\n }\n\n if (isDefined(JSON)) {\n // If polyfill is provided, prefer it over existing non-native shims.\n if(polyfillJSON) {\n if (isNativeFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isNativeFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n } else { // else accept any interface that is present.\n if (isFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n }\n }\n if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {\n polyfillJSON && polyfillJSON(RollbarJSON);\n }\n}\n\n/*\n * isType - Given a Javascript value and a string, returns true if the type of the value matches the\n * given string.\n *\n * @param x - any value\n * @param t - a lowercase string containing one of the following type names:\n * - undefined\n * - null\n * - error\n * - number\n * - boolean\n * - string\n * - symbol\n * - function\n * - object\n * - array\n * @returns true if x is of type t, otherwise false\n */\nfunction isType(x, t) {\n return t === typeName(x);\n}\n\n/*\n * typeName - Given a Javascript value, returns the type of the object as a string\n */\nfunction typeName(x) {\n var name = typeof x;\n if (name !== 'object') {\n return name;\n }\n if (!x) {\n return 'null';\n }\n if (x instanceof Error) {\n return 'error';\n }\n return ({}).toString.call(x).match(/\\s([a-zA-Z]+)/)[1].toLowerCase();\n}\n\n/* isFunction - a convenience function for checking if a value is a function\n *\n * @param f - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isFunction(f) {\n return isType(f, 'function');\n}\n\n/* isNativeFunction - a convenience function for checking if a value is a native JS function\n *\n * @param f - any value\n * @returns true if f is a native JS function, otherwise false\n */\nfunction isNativeFunction(f) {\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n var funcMatchString = Function.prototype.toString.call(Object.prototype.hasOwnProperty)\n .replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?');\n var reIsNative = RegExp('^' + funcMatchString + '$');\n return isObject(f) && reIsNative.test(f);\n}\n\n/* isObject - Checks if the argument is an object\n *\n * @param value - any value\n * @returns true is value is an object function is an object)\n*/\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/* isString - Checks if the argument is a string\n *\n * @param value - any value\n * @returns true if value is a string\n*/\nfunction isString(value) {\n return typeof value === 'string' || value instanceof String\n}\n\n/**\n * isFiniteNumber - determines whether the passed value is a finite number\n *\n * @param {*} n - any value\n * @returns true if value is a finite number\n */\n function isFiniteNumber(n) {\n return Number.isFinite(n);\n}\n\n/*\n * isDefined - a convenience function for checking if a value is not equal to undefined\n *\n * @param u - any value\n * @returns true if u is anything other than undefined\n */\nfunction isDefined(u) {\n return !isType(u, 'undefined');\n}\n\n/*\n * isIterable - convenience function for checking if a value can be iterated, essentially\n * whether it is an object or an array.\n *\n * @param i - any value\n * @returns true if i is an object or an array as determined by `typeName`\n */\nfunction isIterable(i) {\n var type = typeName(i);\n return (type === 'object' || type === 'array');\n}\n\n/*\n * isError - convenience function for checking if a value is of an error type\n *\n * @param e - any value\n * @returns true if e is an error\n */\nfunction isError(e) {\n // Detect both Error and Firefox Exception type\n return isType(e, 'error') || isType(e, 'exception');\n}\n\n/* isPromise - a convenience function for checking if a value is a promise\n *\n * @param p - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isPromise(p) {\n return isObject(p) && isType(p.then, 'function');\n}\n\nfunction redact() {\n return '********';\n}\n\n// from http://stackoverflow.com/a/8809472/1138191\nfunction uuid4() {\n var d = now();\n var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n var r = (d + Math.random() * 16) % 16 | 0;\n d = Math.floor(d / 16);\n return (c === 'x' ? r : (r & 0x7 | 0x8)).toString(16);\n });\n return uuid;\n}\n\nvar LEVELS = {\n debug: 0,\n info: 1,\n warning: 2,\n error: 3,\n critical: 4\n};\n\nfunction sanitizeUrl(url) {\n var baseUrlParts = parseUri(url);\n if (!baseUrlParts) {\n return '(unknown)';\n }\n\n // remove a trailing # if there is no anchor\n if (baseUrlParts.anchor === '') {\n baseUrlParts.source = baseUrlParts.source.replace('#', '');\n }\n\n url = baseUrlParts.source.replace('?' + baseUrlParts.query, '');\n return url;\n}\n\nvar parseUriOptions = {\n strictMode: false,\n key: [\n 'source',\n 'protocol',\n 'authority',\n 'userInfo',\n 'user',\n 'password',\n 'host',\n 'port',\n 'relative',\n 'path',\n 'directory',\n 'file',\n 'query',\n 'anchor'\n ],\n q: {\n name: 'queryKey',\n parser: /(?:^|&)([^&=]*)=?([^&]*)/g\n },\n parser: {\n strict: /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n loose: /^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/\n }\n};\n\nfunction parseUri(str) {\n if (!isType(str, 'string')) {\n return undefined;\n }\n\n var o = parseUriOptions;\n var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);\n var uri = {};\n\n for (var i = 0, l = o.key.length; i < l; ++i) {\n uri[o.key[i]] = m[i] || '';\n }\n\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) {\n uri[o.q.name][$1] = $2;\n }\n });\n\n return uri;\n}\n\nfunction addParamsAndAccessTokenToPath(accessToken, options, params) {\n params = params || {};\n params.access_token = accessToken;\n var paramsArray = [];\n var k;\n for (k in params) {\n if (Object.prototype.hasOwnProperty.call(params, k)) {\n paramsArray.push([k, params[k]].join('='));\n }\n }\n var query = '?' + paramsArray.sort().join('&');\n\n options = options || {};\n options.path = options.path || '';\n var qs = options.path.indexOf('?');\n var h = options.path.indexOf('#');\n var p;\n if (qs !== -1 && (h === -1 || h > qs)) {\n p = options.path;\n options.path = p.substring(0,qs) + query + '&' + p.substring(qs+1);\n } else {\n if (h !== -1) {\n p = options.path;\n options.path = p.substring(0,h) + query + p.substring(h);\n } else {\n options.path = options.path + query;\n }\n }\n}\n\nfunction formatUrl(u, protocol) {\n protocol = protocol || u.protocol;\n if (!protocol && u.port) {\n if (u.port === 80) {\n protocol = 'http:';\n } else if (u.port === 443) {\n protocol = 'https:';\n }\n }\n protocol = protocol || 'https:';\n\n if (!u.hostname) {\n return null;\n }\n var result = protocol + '//' + u.hostname;\n if (u.port) {\n result = result + ':' + u.port;\n }\n if (u.path) {\n result = result + u.path;\n }\n return result;\n}\n\nfunction stringify(obj, backup) {\n var value, error;\n try {\n value = RollbarJSON.stringify(obj);\n } catch (jsonError) {\n if (backup && isFunction(backup)) {\n try {\n value = backup(obj);\n } catch (backupError) {\n error = backupError;\n }\n } else {\n error = jsonError;\n }\n }\n return {error: error, value: value};\n}\n\nfunction maxByteSize(string) {\n // The transport will use utf-8, so assume utf-8 encoding.\n //\n // This minimal implementation will accurately count bytes for all UCS-2 and\n // single code point UTF-16. If presented with multi code point UTF-16,\n // which should be rare, it will safely overcount, not undercount.\n //\n // While robust utf-8 encoders exist, this is far smaller and far more performant.\n // For quickly counting payload size for truncation, smaller is better.\n\n var count = 0;\n var length = string.length;\n\n for (var i = 0; i < length; i++) {\n var code = string.charCodeAt(i);\n if (code < 128) { // up to 7 bits\n count = count + 1;\n } else if (code < 2048) { // up to 11 bits\n count = count + 2;\n } else if (code < 65536) { // up to 16 bits\n count = count + 3;\n }\n }\n\n return count;\n}\n\nfunction jsonParse(s) {\n var value, error;\n try {\n value = RollbarJSON.parse(s);\n } catch (e) {\n error = e;\n }\n return {error: error, value: value};\n}\n\nfunction makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n mode,\n backupMessage,\n errorParser\n) {\n var location = {\n url: url || '',\n line: lineno,\n column: colno\n };\n location.func = errorParser.guessFunctionName(location.url, location.line);\n location.context = errorParser.gatherContext(location.url, location.line);\n var href = typeof document !== 'undefined' && document && document.location && document.location.href;\n var useragent = typeof window !== 'undefined' && window && window.navigator && window.navigator.userAgent;\n return {\n 'mode': mode,\n 'message': error ? String(error) : (message || backupMessage),\n 'url': href,\n 'stack': [location],\n 'useragent': useragent\n };\n}\n\nfunction wrapCallback(logger, f) {\n return function(err, resp) {\n try {\n f(err, resp);\n } catch (e) {\n logger.error(e);\n }\n };\n}\n\nfunction nonCircularClone(obj) {\n var seen = [obj];\n\n function clone(obj, seen) {\n var value, name, newSeen, result = {};\n\n try {\n for (name in obj) {\n value = obj[name];\n\n if (value && (isType(value, 'object') || isType(value, 'array'))) {\n if (seen.includes(value)) {\n result[name] = 'Removed circular reference: ' + typeName(value);\n } else {\n newSeen = seen.slice();\n newSeen.push(value);\n result[name] = clone(value, newSeen);\n }\n continue;\n }\n\n result[name] = value;\n }\n } catch (e) {\n result = 'Failed cloning custom data: ' + e.message;\n }\n return result;\n }\n return clone(obj, seen);\n}\n\nfunction createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\n var diagnostic = {};\n var argTypes = [];\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n argTypes.push(typ);\n switch (typ) {\n case 'undefined':\n break;\n case 'string':\n message ? extraArgs.push(arg) : message = arg;\n break;\n case 'function':\n callback = wrapCallback(logger, arg);\n break;\n case 'date':\n extraArgs.push(arg);\n break;\n case 'error':\n case 'domexception':\n case 'exception': // Firefox Exception type\n err ? extraArgs.push(arg) : err = arg;\n break;\n case 'object':\n case 'array':\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n if (requestKeys && typ === 'object' && !request) {\n for (var j = 0, len = requestKeys.length; j < len; ++j) {\n if (arg[requestKeys[j]] !== undefined) {\n request = arg;\n break;\n }\n }\n if (request) {\n break;\n }\n }\n custom ? extraArgs.push(arg) : custom = arg;\n break;\n default:\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n extraArgs.push(arg);\n }\n }\n\n // if custom is an array this turns it into an object with integer keys\n if (custom) custom = nonCircularClone(custom);\n\n if (extraArgs.length > 0) {\n if (!custom) custom = nonCircularClone({});\n custom.extraArgs = nonCircularClone(extraArgs);\n }\n\n var item = {\n message: message,\n err: err,\n custom: custom,\n timestamp: now(),\n callback: callback,\n notifier: notifier,\n diagnostic: diagnostic,\n uuid: uuid4()\n };\n\n setCustomItemKeys(item, custom);\n\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n item.diagnostic.original_arg_types = argTypes;\n return item;\n}\n\nfunction setCustomItemKeys(item, custom) {\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (custom && custom.skipFrames !== undefined) {\n item.skipFrames = custom.skipFrames;\n delete custom.skipFrames;\n }\n}\n\nfunction addErrorContext(item, errors) {\n var custom = item.data.custom || {};\n var contextAdded = false;\n\n try {\n for (var i = 0; i < errors.length; ++i) {\n if (errors[i].hasOwnProperty('rollbarContext')) {\n custom = merge(custom, nonCircularClone(errors[i].rollbarContext));\n contextAdded = true;\n }\n }\n\n // Avoid adding an empty object to the data.\n if (contextAdded) {\n item.data.custom = custom;\n }\n } catch (e) {\n item.diagnostic.error_context = 'Failed: ' + e.message;\n }\n}\n\nvar TELEMETRY_TYPES = ['log', 'network', 'dom', 'navigation', 'error', 'manual'];\nvar TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];\n\nfunction arrayIncludes(arr, val) {\n for (var k = 0; k < arr.length; ++k) {\n if (arr[k] === val) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction createTelemetryEvent(args) {\n var type, metadata, level;\n var arg;\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n switch (typ) {\n case 'string':\n if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {\n type = arg;\n } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {\n level = arg;\n }\n break;\n case 'object':\n metadata = arg;\n break;\n default:\n break;\n }\n }\n var event = {\n type: type || 'manual',\n metadata: metadata || {},\n level: level\n };\n\n return event;\n}\n\n/*\n * get - given an obj/array and a keypath, return the value at that keypath or\n * undefined if not possible.\n *\n * @param obj - an object or array\n * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'\n * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`\n */\nfunction get(obj, path) {\n if (!obj) {\n return undefined;\n }\n var keys = path.split('.');\n var result = obj;\n try {\n for (var i = 0, len = keys.length; i < len; ++i) {\n result = result[keys[i]];\n }\n } catch (e) {\n result = undefined;\n }\n return result;\n}\n\nfunction set(obj, path, value) {\n if (!obj) {\n return;\n }\n var keys = path.split('.');\n var len = keys.length;\n if (len < 1) {\n return;\n }\n if (len === 1) {\n obj[keys[0]] = value;\n return;\n }\n try {\n var temp = obj[keys[0]] || {};\n var replacement = temp;\n for (var i = 1; i < len - 1; ++i) {\n temp[keys[i]] = temp[keys[i]] || {};\n temp = temp[keys[i]];\n }\n temp[keys[len-1]] = value;\n obj[keys[0]] = replacement;\n } catch (e) {\n return;\n }\n}\n\nfunction formatArgsAsString(args) {\n var i, len, arg;\n var result = [];\n for (i = 0, len = args.length; i < len; ++i) {\n arg = args[i];\n switch (typeName(arg)) {\n case 'object':\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500) {\n arg = arg.substr(0, 497) + '...';\n }\n break;\n case 'null':\n arg = 'null';\n break;\n case 'undefined':\n arg = 'undefined';\n break;\n case 'symbol':\n arg = arg.toString();\n break;\n }\n result.push(arg);\n }\n return result.join(' ');\n}\n\nfunction now() {\n if (Date.now) {\n return +Date.now();\n }\n return +new Date();\n}\n\nfunction filterIp(requestData, captureIp) {\n if (!requestData || !requestData['user_ip'] || captureIp === true) {\n return;\n }\n var newIp = requestData['user_ip'];\n if (!captureIp) {\n newIp = null;\n } else {\n try {\n var parts;\n if (newIp.indexOf('.') !== -1) {\n parts = newIp.split('.');\n parts.pop();\n parts.push('0');\n newIp = parts.join('.');\n } else if (newIp.indexOf(':') !== -1) {\n parts = newIp.split(':');\n if (parts.length > 2) {\n var beginning = parts.slice(0, 3);\n var slashIdx = beginning[2].indexOf('/');\n if (slashIdx !== -1) {\n beginning[2] = beginning[2].substring(0, slashIdx);\n }\n var terminal = '0000:0000:0000:0000:0000';\n newIp = beginning.concat(terminal).join(':');\n }\n } else {\n newIp = null;\n }\n } catch (e) {\n newIp = null;\n }\n }\n requestData['user_ip'] = newIp;\n}\n\nfunction handleOptions(current, input, payload, logger) {\n var result = merge(current, input, payload);\n result = updateDeprecatedOptions(result, logger);\n if (!input || input.overwriteScrubFields) {\n return result;\n }\n if (input.scrubFields) {\n result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);\n }\n return result;\n}\n\nfunction updateDeprecatedOptions(options, logger) {\n if(options.hostWhiteList && !options.hostSafeList) {\n options.hostSafeList = options.hostWhiteList;\n options.hostWhiteList = undefined;\n logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');\n }\n if(options.hostBlackList && !options.hostBlockList) {\n options.hostBlockList = options.hostBlackList;\n options.hostBlackList = undefined;\n logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');\n }\n return options;\n}\n\nmodule.exports = {\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n createItem: createItem,\n addErrorContext: addErrorContext,\n createTelemetryEvent: createTelemetryEvent,\n filterIp: filterIp,\n formatArgsAsString: formatArgsAsString,\n formatUrl: formatUrl,\n get: get,\n handleOptions: handleOptions,\n isError: isError,\n isFiniteNumber: isFiniteNumber,\n isFunction: isFunction,\n isIterable: isIterable,\n isNativeFunction: isNativeFunction,\n isObject: isObject,\n isString: isString,\n isType: isType,\n isPromise: isPromise,\n jsonParse: jsonParse,\n LEVELS: LEVELS,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n merge: merge,\n now: now,\n redact: redact,\n RollbarJSON: RollbarJSON,\n sanitizeUrl: sanitizeUrl,\n set: set,\n setupJSON: setupJSON,\n stringify: stringify,\n maxByteSize: maxByteSize,\n typeName: typeName,\n uuid4: uuid4\n};\n","'use strict';\n\n/* eslint-disable no-console */\nrequire('console-polyfill');\nvar detection = require('./detection');\nvar _ = require('../utility');\n\nfunction error() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.error(_.formatArgsAsString(args));\n } else {\n console.error.apply(console, args);\n }\n}\n\nfunction info() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.info(_.formatArgsAsString(args));\n } else {\n console.info.apply(console, args);\n }\n}\n\nfunction log() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.log(_.formatArgsAsString(args));\n } else {\n console.log.apply(console, args);\n }\n}\n\n/* eslint-enable no-console */\n\nmodule.exports = {\n error: error,\n info: info,\n log: log\n};\n","'use strict';\n\n// See https://nodejs.org/docs/latest/api/url.html\nfunction parse(url) {\n var result = {\n protocol: null, auth: null, host: null, path: null,\n hash: null, href: url, hostname: null, port: null,\n pathname: null, search: null, query: null\n };\n\n var i, last;\n i = url.indexOf('//');\n if (i !== -1) {\n result.protocol = url.substring(0,i);\n last = i+2;\n } else {\n last = 0;\n }\n \n i = url.indexOf('@', last);\n if (i !== -1) {\n result.auth = url.substring(last, i);\n last = i+1;\n }\n\n i = url.indexOf('/', last);\n if (i === -1) {\n i = url.indexOf('?', last);\n if (i === -1) {\n i = url.indexOf('#', last);\n if (i === -1) {\n result.host = url.substring(last);\n } else {\n result.host = url.substring(last, i);\n result.hash = url.substring(i);\n }\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n return result;\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n\n i = url.indexOf('#', last);\n if (i === -1) {\n result.path = url.substring(last);\n } else {\n result.path = url.substring(last, i);\n result.hash = url.substring(i);\n }\n\n if (result.path) {\n var pathParts = result.path.split('?');\n result.pathname = pathParts[0];\n result.query = pathParts[1];\n result.search = result.query ? '?' + result.query : null;\n }\n return result;\n}\n\nmodule.exports = {\n parse: parse\n};\n","'use strict';\n\nvar ErrorStackParser = require('error-stack-parser');\n\nvar UNKNOWN_FUNCTION = '?';\nvar ERR_CLASS_REGEXP = new RegExp('^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ');\n\nfunction guessFunctionName() {\n return UNKNOWN_FUNCTION;\n}\n\n\nfunction gatherContext() {\n return null;\n}\n\n\nfunction Frame(stackFrame) {\n var data = {};\n\n data._stackFrame = stackFrame;\n\n data.url = stackFrame.fileName;\n data.line = stackFrame.lineNumber;\n data.func = stackFrame.functionName;\n data.column = stackFrame.columnNumber;\n data.args = stackFrame.args;\n\n data.context = gatherContext();\n\n return data;\n}\n\n\nfunction Stack(exception, skip) {\n function getStack() {\n var parserStack = [];\n\n skip = skip || 0;\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch(e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = skip; i < parserStack.length; i++) {\n stack.push(new Frame(parserStack[i]));\n }\n\n return stack;\n }\n\n return {\n stack: getStack(),\n message: exception.message,\n name: _mostSpecificErrorName(exception),\n rawStack: exception.stack,\n rawException: exception\n };\n}\n\n\nfunction parse(e, skip) {\n var err = e;\n\n if (err.nested) {\n var traceChain = [];\n while (err) {\n traceChain.push(new Stack(err, skip));\n err = err.nested;\n\n skip = 0; // Only apply skip value to primary error\n }\n\n // Return primary error with full trace chain attached.\n traceChain[0].traceChain = traceChain;\n return traceChain[0];\n } else {\n return new Stack(err, skip);\n }\n}\n\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg || !errMsg.match) {\n return ['Unknown error. There was no error message to display.', ''];\n }\n var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);\n var errClass = '(unknown)';\n\n if (errClassMatch) {\n errClass = errClassMatch[errClassMatch.length - 1];\n errMsg = errMsg.replace((errClassMatch[errClassMatch.length - 2] || '') + errClass + ':', '');\n errMsg = errMsg.replace(/(^[\\s]+|[\\s]+$)/g, '');\n }\n return [errClass, errMsg];\n}\n\n// * Prefers any value over an empty string\n// * Prefers any value over 'Error' where possible\n// * Prefers name over constructor.name when both are more specific than 'Error'\nfunction _mostSpecificErrorName(error) {\n var name = error.name && error.name.length && error.name;\n var constructorName = error.constructor.name && error.constructor.name.length && error.constructor.name;\n\n if (!name || !constructorName) {\n return name || constructorName;\n }\n\n if (name === 'Error') {\n return constructorName;\n }\n return name;\n}\n\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame\n};\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction scrub(data, scrubFields, scrubPaths) {\n scrubFields = scrubFields || [];\n\n if (scrubPaths) {\n for (var i = 0; i < scrubPaths.length; ++i) {\n scrubPath(data, scrubPaths[i]);\n }\n }\n\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart) {\n return paramPart + _.redact();\n }\n\n function paramScrubber(v) {\n var i;\n if (_.isType(v, 'string')) {\n for (i = 0; i < queryRes.length; ++i) {\n v = v.replace(queryRes[i], redactQueryParam);\n }\n }\n return v;\n }\n\n function valScrubber(k, v) {\n var i;\n for (i = 0; i < paramRes.length; ++i) {\n if (paramRes[i].test(k)) {\n v = _.redact();\n break;\n }\n }\n return v;\n }\n\n function scrubber(k, v, seen) {\n var tmpV = valScrubber(k, v);\n if (tmpV === v) {\n if (_.isType(v, 'object') || _.isType(v, 'array')) {\n return traverse(v, scrubber, seen);\n }\n return paramScrubber(tmpV);\n } else {\n return tmpV;\n }\n }\n\n return traverse(data, scrubber);\n}\n\nfunction scrubPath(obj, path) {\n var keys = path.split('.');\n var last = keys.length - 1;\n try {\n for (var i = 0; i <= last; ++i) {\n if (i < last) {\n obj = obj[keys[i]];\n } else {\n obj[keys[i]] = _.redact();\n }\n }\n } catch (e) {\n // Missing key is OK;\n }\n}\n\nfunction _getScrubFieldRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '^\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?$';\n ret.push(new RegExp(pat, 'i'));\n }\n return ret;\n}\n\n\nfunction _getScrubQueryParamRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?';\n ret.push(new RegExp('(' + pat + '=)([^&\\\\n]+)', 'igm'));\n }\n return ret;\n}\n\nmodule.exports = scrub;\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction traverse(obj, func, seen) {\n var k, v, i;\n var isObj = _.isType(obj, 'object');\n var isArray = _.isType(obj, 'array');\n var keys = [];\n var seenIndex;\n\n // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.\n seen = seen || { obj: [], mapped: []};\n\n if (isObj) {\n seenIndex = seen.obj.indexOf(obj);\n\n if (isObj && seenIndex !== -1) {\n // Prefer the mapped object if there is one.\n return seen.mapped[seenIndex] || seen.obj[seenIndex];\n }\n\n seen.obj.push(obj);\n seenIndex = seen.obj.length - 1;\n }\n\n if (isObj) {\n for (k in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, k)) {\n keys.push(k);\n }\n }\n } else if (isArray) {\n for (i = 0; i < obj.length; ++i) {\n keys.push(i);\n }\n }\n\n var result = isObj ? {} : [];\n var same = true;\n for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n result[k] = func(k, v, seen);\n same = same && result[k] === obj[k];\n }\n\n if (isObj && !same) {\n seen.mapped[seenIndex] = result;\n }\n\n return !same ? result : obj;\n}\n\nmodule.exports = traverse;\n","'use strict';\n\nvar rollbar = require('../rollbar');\n\nvar options = (typeof window !== 'undefined') && window._rollbarConfig;\nvar alias = options && options.globalAlias || 'Rollbar';\nvar shimRunning = (typeof window !== 'undefined') && window[alias] && typeof window[alias].shimId === 'function' && window[alias].shimId() !== undefined;\n\nif ((typeof window !== 'undefined') && !window._rollbarStartTime) {\n window._rollbarStartTime = (new Date()).getTime();\n}\n\nif (!shimRunning && options) {\n var Rollbar = new rollbar(options);\n window[alias] = Rollbar;\n} else if (typeof window !== 'undefined') {\n window.rollbar = rollbar;\n window._rollbarDidLoad = true;\n} else if (typeof self !== 'undefined') {\n self.rollbar = rollbar;\n self._rollbarDidLoad = true;\n}\n\nmodule.exports = rollbar;\n","'use strict';\n\nvar Rollbar = require('./core');\nvar telemeter = require('../telemetry');\nvar instrumenter = require('./telemetry');\nvar polyfillJSON = require('../utility/polyfillJSON');\nvar wrapGlobals = require('./wrapGlobals');\nvar scrub = require('../scrub');\nvar truncation = require('../truncation');\n\nRollbar.setComponents({\n telemeter: telemeter,\n instrumenter: instrumenter,\n polyfillJSON: polyfillJSON,\n wrapGlobals: wrapGlobals,\n scrub: scrub,\n truncation: truncation\n});\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar Client = require('../rollbar');\nvar _ = require('../utility');\nvar API = require('../api');\nvar logger = require('./logger');\nvar globals = require('./globalSetup');\n\nvar Transport = require('./transport');\nvar urllib = require('./url');\n\nvar transforms = require('./transforms');\nvar sharedTransforms = require('../transforms');\nvar predicates = require('./predicates');\nvar sharedPredicates = require('../predicates');\nvar errorParser = require('../errorParser');\n\nfunction Rollbar(options, client) {\n this.options = _.handleOptions(defaultOptions, options, null, logger);\n this.options._configuredOptions = options;\n var Telemeter = this.components.telemeter;\n var Instrumenter = this.components.instrumenter;\n var polyfillJSON = this.components.polyfillJSON;\n this.wrapGlobals = this.components.wrapGlobals;\n this.scrub = this.components.scrub;\n var truncation = this.components.truncation;\n\n var transport = new Transport(truncation);\n var api = new API(this.options, transport, urllib, truncation);\n if (Telemeter) {\n this.telemeter = new Telemeter(this.options);\n }\n this.client = client || new Client(this.options, api, logger, this.telemeter, 'browser');\n var gWindow = _gWindow();\n var gDocument = (typeof document != 'undefined') && document;\n this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers\n this.anonymousErrorsPending = 0;\n addTransformsToNotifier(this.client.notifier, this, gWindow);\n addPredicatesToQueue(this.client.queue);\n this.setupUnhandledCapture();\n if (Instrumenter) {\n this.instrumenter = new Instrumenter(this.options, this.client.telemeter, this, gWindow, gDocument);\n this.instrumenter.instrument();\n }\n _.setupJSON(polyfillJSON);\n}\n\nvar _instance = null;\nRollbar.init = function(options, client) {\n if (_instance) {\n return _instance.global(options).configure(options);\n }\n _instance = new Rollbar(options, client);\n return _instance;\n};\n\nRollbar.prototype.components = {};\n\nRollbar.setComponents = function(components) {\n Rollbar.prototype.components = components;\n}\n\nfunction handleUninitialized(maybeCallback) {\n var message = 'Rollbar is not initialized';\n logger.error(message);\n if (maybeCallback) {\n maybeCallback(new Error(message));\n }\n}\n\nRollbar.prototype.global = function(options) {\n this.client.global(options);\n return this;\n};\nRollbar.global = function(options) {\n if (_instance) {\n return _instance.global(options);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.configure = function(options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = {payload: payloadData};\n }\n this.options = _.handleOptions(oldOptions, options, payload, logger);\n this.options._configuredOptions = _.handleOptions(oldOptions._configuredOptions, options, payload);\n this.client.configure(this.options, payloadData);\n this.instrumenter && this.instrumenter.configure(this.options);\n this.setupUnhandledCapture();\n return this;\n};\nRollbar.configure = function(options, payloadData) {\n if (_instance) {\n return _instance.configure(options, payloadData);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.lastError = function() {\n return this.client.lastError;\n};\nRollbar.lastError = function() {\n if (_instance) {\n return _instance.lastError();\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.log = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.log(item);\n return {uuid: uuid};\n};\nRollbar.log = function() {\n if (_instance) {\n return _instance.log.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.debug = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.debug(item);\n return {uuid: uuid};\n};\nRollbar.debug = function() {\n if (_instance) {\n return _instance.debug.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.info = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.info(item);\n return {uuid: uuid};\n};\nRollbar.info = function() {\n if (_instance) {\n return _instance.info.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warn = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warn(item);\n return {uuid: uuid};\n};\nRollbar.warn = function() {\n if (_instance) {\n return _instance.warn.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warning = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warning(item);\n return {uuid: uuid};\n};\nRollbar.warning = function() {\n if (_instance) {\n return _instance.warning.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.error = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.error(item);\n return {uuid: uuid};\n};\nRollbar.error = function() {\n if (_instance) {\n return _instance.error.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.critical = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.critical(item);\n return {uuid: uuid};\n};\nRollbar.critical = function() {\n if (_instance) {\n return _instance.critical.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.buildJsonPayload = function(item) {\n return this.client.buildJsonPayload(item);\n};\nRollbar.buildJsonPayload = function() {\n if (_instance) {\n return _instance.buildJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.sendJsonPayload = function(jsonPayload) {\n return this.client.sendJsonPayload(jsonPayload);\n};\nRollbar.sendJsonPayload = function() {\n if (_instance) {\n return _instance.sendJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.setupUnhandledCapture = function() {\n var gWindow = _gWindow();\n\n if (!this.unhandledExceptionsInitialized) {\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(gWindow, this);\n if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {\n this.wrapGlobals(gWindow, this);\n }\n this.unhandledExceptionsInitialized = true;\n }\n }\n if (!this.unhandledRejectionsInitialized) {\n if (this.options.captureUnhandledRejections || this.options.handleUnhandledRejections) {\n globals.captureUnhandledRejections(gWindow, this);\n this.unhandledRejectionsInitialized = true;\n }\n }\n};\n\nRollbar.prototype.handleUncaughtException = function(message, url, lineno, colno, error, context) {\n if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {\n return;\n }\n\n // Chrome will always send 5+ arguments and error will be valid or null, not undefined.\n // If error is undefined, we have a different caller.\n // Chrome also sends errors from web workers with null error, but does not invoke\n // prepareStackTrace() for these. Test for empty url to skip them.\n if (this.options.inspectAnonymousErrors && this.isChrome && error === null && url === '') {\n return 'anonymous';\n }\n\n var item;\n var stackInfo = _.makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n 'onerror',\n 'uncaught exception',\n errorParser\n );\n if (_.isError(error)) {\n item = this._createItem([message, error, context]);\n item._unhandledStackInfo = stackInfo;\n } else if (_.isError(url)) {\n item = this._createItem([message, url, context]);\n item._unhandledStackInfo = stackInfo;\n } else {\n item = this._createItem([message, context]);\n item.stackInfo = stackInfo;\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n this.client.log(item);\n};\n\n/**\n * Chrome only. Other browsers will ignore.\n *\n * Use Error.prepareStackTrace to extract information about errors that\n * do not have a valid error object in onerror().\n *\n * In tested version of Chrome, onerror is called first but has no way\n * to communicate with prepareStackTrace. Use a counter to let this\n * handler know which errors to send to Rollbar.\n *\n * In config options, set inspectAnonymousErrors to enable.\n */\nRollbar.prototype.handleAnonymousErrors = function() {\n if (!this.options.inspectAnonymousErrors || !this.isChrome) {\n return;\n }\n\n var r = this;\n function prepareStackTrace(error, _stack) { // eslint-disable-line no-unused-vars\n if (r.options.inspectAnonymousErrors) {\n if (r.anonymousErrorsPending) {\n // This is the only known way to detect that onerror saw an anonymous error.\n // It depends on onerror reliably being called before Error.prepareStackTrace,\n // which so far holds true on tested versions of Chrome. If versions of Chrome\n // are tested that behave differently, this logic will need to be updated\n // accordingly.\n r.anonymousErrorsPending -= 1;\n\n if (!error) {\n // Not likely to get here, but calling handleUncaughtException from here\n // without an error object would throw off the anonymousErrorsPending counter,\n // so return now.\n return;\n }\n\n // Allow this to be tracked later.\n error._isAnonymous = true;\n\n // url, lineno, colno shouldn't be needed for these errors.\n // If that changes, update this accordingly, using the unused\n // _stack param as needed (rather than parse error.toString()).\n r.handleUncaughtException(error.message, null, null, null, error);\n }\n }\n\n // Workaround to ensure stack is preserved for normal errors.\n return error.stack;\n }\n\n // https://v8.dev/docs/stack-trace-api\n try {\n Error.prepareStackTrace = prepareStackTrace;\n } catch (e) {\n this.options.inspectAnonymousErrors = false;\n this.error('anonymous error handler failed', e);\n }\n}\n\nRollbar.prototype.handleUnhandledRejection = function(reason, promise) {\n if (!this.options.captureUnhandledRejections && !this.options.handleUnhandledRejections) {\n return;\n }\n\n var message = 'unhandled rejection was null or undefined!';\n if (reason) {\n if (reason.message) {\n message = reason.message;\n } else {\n var reasonResult = _.stringify(reason);\n if (reasonResult.value) {\n message = reasonResult.value;\n }\n }\n }\n var context = (reason && reason._rollbarContext) || (promise && promise._rollbarContext);\n\n var item;\n if (_.isError(reason)) {\n item = this._createItem([message, reason, context]);\n } else {\n item = this._createItem([message, reason, context]);\n item.stackInfo = _.makeUnhandledStackInfo(\n message,\n '',\n 0,\n 0,\n null,\n 'unhandledrejection',\n '',\n errorParser\n );\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n item._originalArgs = item._originalArgs || [];\n item._originalArgs.push(promise);\n this.client.log(item);\n};\n\nRollbar.prototype.wrap = function(f, context, _before) {\n try {\n var ctxFn;\n if(_.isFunction(context)) {\n ctxFn = context;\n } else {\n ctxFn = function() { return context || {}; };\n }\n\n if (!_.isFunction(f)) {\n return f;\n }\n\n if (f._isWrap) {\n return f;\n }\n\n if (!f._rollbar_wrapped) {\n f._rollbar_wrapped = function () {\n if (_before && _.isFunction(_before)) {\n _before.apply(this, arguments);\n }\n try {\n return f.apply(this, arguments);\n } catch(exc) {\n var e = exc;\n if (e && window._rollbarWrappedError !== e) {\n if (_.isType(e, 'string')) {\n e = new String(e);\n }\n e._rollbarContext = ctxFn() || {};\n e._rollbarContext._wrappedSource = f.toString();\n\n window._rollbarWrappedError = e;\n }\n throw e;\n }\n };\n\n f._rollbar_wrapped._isWrap = true;\n\n if (f.hasOwnProperty) {\n for (var prop in f) {\n if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {\n f._rollbar_wrapped[prop] = f[prop];\n }\n }\n }\n }\n\n return f._rollbar_wrapped;\n } catch (e) {\n // Return the original function if the wrap fails.\n return f;\n }\n};\nRollbar.wrap = function(f, context) {\n if (_instance) {\n return _instance.wrap(f, context);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.captureEvent = function() {\n var event = _.createTelemetryEvent(arguments);\n return this.client.captureEvent(event.type, event.metadata, event.level);\n};\nRollbar.captureEvent = function() {\n if (_instance) {\n return _instance.captureEvent.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\n// The following two methods are used internally and are not meant for public use\nRollbar.prototype.captureDomContentLoaded = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureLoad(ts);\n};\n\n/* Internal */\n\nfunction addTransformsToNotifier(notifier, rollbar, gWindow) {\n notifier\n .addTransform(transforms.handleDomException)\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(gWindow))\n .addTransform(transforms.addClientInfo(gWindow))\n .addTransform(transforms.addPluginInfo(gWindow))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(sharedTransforms.addConfigToPayload)\n .addTransform(transforms.addScrubber(rollbar.scrub))\n .addTransform(sharedTransforms.userTransform(logger))\n .addTransform(sharedTransforms.addConfiguredOptions)\n .addTransform(sharedTransforms.addDiagnosticKeys)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(sharedPredicates.checkLevel)\n .addPredicate(predicates.checkIgnore)\n .addPredicate(sharedPredicates.userCheckIgnore(logger))\n .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))\n .addPredicate(sharedPredicates.urlIsSafeListed(logger))\n .addPredicate(sharedPredicates.messageIsIgnored(logger));\n}\n\nRollbar.prototype.loadFull = function() {\n logger.info('Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.');\n};\n\nRollbar.prototype._createItem = function(args) {\n return _.createItem(args, logger, this);\n};\n\nfunction _getFirstFunction(args) {\n for (var i = 0, len = args.length; i < len; ++i) {\n if (_.isFunction(args[i])) {\n return args[i];\n }\n }\n return undefined;\n}\n\nfunction _gWindow() {\n return ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n}\n\nvar defaults = require('../defaults');\nvar scrubFields = require('./defaults/scrubFields');\n\nvar defaultOptions = {\n version: defaults.version,\n scrubFields: scrubFields.scrubFields,\n logLevel: defaults.logLevel,\n reportLevel: defaults.reportLevel,\n uncaughtErrorLevel: defaults.uncaughtErrorLevel,\n endpoint: defaults.endpoint,\n verbose: false,\n enabled: true,\n transmit: true,\n sendConfig: false,\n includeItemsInTelemetry: true,\n captureIp: true,\n inspectAnonymousErrors: true,\n ignoreDuplicateErrors: true,\n wrapGlobalEventHandlers: false\n};\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar _ = require('./utility');\n\n/*\n * Rollbar - the interface to Rollbar\n *\n * @param options\n * @param api\n * @param logger\n */\nfunction Rollbar(options, api, logger, telemeter, platform) {\n this.options = _.merge(options);\n this.logger = logger;\n Rollbar.rateLimiter.configureGlobal(this.options);\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.api = api;\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n\n // This must happen before the Notifier is created\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = telemeter;\n setStackTraceLimit(options);\n this.lastError = null;\n this.lastErrorHash = 'none';\n}\n\nvar defaultOptions = {\n maxItems: 0,\n itemsPerMinute: 60\n};\n\nRollbar.rateLimiter = new RateLimiter(defaultOptions);\n\nRollbar.prototype.global = function (options) {\n Rollbar.rateLimiter.configureGlobal(options);\n return this;\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n\n this.options = _.merge(oldOptions, options, payload);\n\n // This must happen before the Notifier is configured\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier && this.notifier.configure(this.options);\n this.telemeter && this.telemeter.configure(this.options);\n setStackTraceLimit(options);\n this.global(this.options);\n\n if (validateTracer(options.tracer)) {\n this.tracer = options.tracer\n }\n\n return this;\n};\n\nRollbar.prototype.log = function (item) {\n var level = this._defaultLogLevel();\n return this._log(level, item);\n};\n\nRollbar.prototype.debug = function (item) {\n this._log('debug', item);\n};\n\nRollbar.prototype.info = function (item) {\n this._log('info', item);\n};\n\nRollbar.prototype.warn = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.warning = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.error = function (item) {\n this._log('error', item);\n};\n\nRollbar.prototype.critical = function (item) {\n this._log('critical', item);\n};\n\nRollbar.prototype.wait = function (callback) {\n this.queue.wait(callback);\n};\n\nRollbar.prototype.captureEvent = function (type, metadata, level) {\n return this.telemeter && this.telemeter.captureEvent(type, metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function (ts) {\n return this.telemeter && this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (ts) {\n return this.telemeter && this.telemeter.captureLoad(ts);\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.api.buildJsonPayload(item);\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n this.api.postJsonPayload(jsonPayload);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function (defaultLevel, item) {\n var callback;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {\n if (callback) {\n var error = new Error('ignored identical item');\n error.item = item;\n callback(error);\n }\n return;\n }\n try {\n this._addTracingInfo(item);\n item.level = item.level || defaultLevel;\n this.telemeter && this.telemeter._captureRollbarItem(item);\n item.telemetryEvents = (this.telemeter && this.telemeter.copyEvents()) || [];\n this.notifier.log(item, callback);\n } catch (e) {\n if (callback) {\n callback(e);\n }\n this.logger.error(e);\n }\n};\n\nRollbar.prototype._defaultLogLevel = function () {\n return this.options.logLevel || 'debug';\n};\n\nRollbar.prototype._sameAsLastError = function (item) {\n if (!item._isUncaught) {\n return false;\n }\n var itemHash = generateItemHash(item);\n if (this.lastErrorHash === itemHash) {\n return true;\n }\n this.lastError = item.err;\n this.lastErrorHash = itemHash;\n return false;\n};\n\nRollbar.prototype._addTracingInfo = function (item) {\n // Tracer validation occurs in the constructor\n // or in the Rollbar.prototype.configure methods\n if (this.tracer) {\n // add rollbar occurrence uuid to span\n var span = this.tracer.scope().active();\n\n if (validateSpan(span)) {\n span.setTag('rollbar.error_uuid', item.uuid);\n span.setTag('rollbar.has_error', true);\n span.setTag('error', true);\n span.setTag('rollbar.item_url', `https://rollbar.com/item/uuid/?uuid=${item.uuid}`);\n span.setTag('rollbar.occurrence_url', `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`);\n\n // add span ID & trace ID to occurrence\n var opentracingSpanId = span.context().toSpanId();\n var opentracingTraceId = span.context().toTraceId();\n\n if (item.custom) {\n item.custom.opentracing_span_id = opentracingSpanId;\n item.custom.opentracing_trace_id = opentracingTraceId;\n } else {\n item.custom = {\n opentracing_span_id: opentracingSpanId,\n opentracing_trace_id: opentracingTraceId\n };\n }\n }\n }\n}\n\nfunction generateItemHash(item) {\n var message = item.message || '';\n var stack = (item.err || {}).stack || String(item.err);\n return message + '::' + stack;\n}\n\n// Node.js, Chrome, Safari, and some other browsers support this property\n// which globally sets the number of stack frames returned in an Error object.\n// If a browser can't use it, no harm done.\nfunction setStackTraceLimit(options) {\n if (options.stackTraceLimit) {\n Error.stackTraceLimit = options.stackTraceLimit;\n }\n}\n\n/**\n * Validate the Tracer object provided to the Client\n * is valid for our Opentracing use case.\n * @param {opentracer.Tracer} tracer\n */\nfunction validateTracer(tracer) {\n if (!tracer) {\n return false;\n }\n\n if (!tracer.scope || typeof tracer.scope !== 'function') {\n return false;\n }\n\n var scope = tracer.scope();\n\n if (!scope || !scope.active || typeof scope.active !== 'function') {\n return false;\n }\n\n return true;\n}\n\n/**\n * Validate the Span object provided\n * @param {opentracer.Span} span\n */\nfunction validateSpan(span) {\n if (!span || !span.context || typeof span.context !== 'function') {\n return false;\n }\n\n var spanContext = span.context();\n\n if (!spanContext\n || !spanContext.toSpanId\n || !spanContext.toTraceId\n || typeof spanContext.toSpanId !== 'function'\n || typeof spanContext.toTraceId !== 'function') {\n return false\n }\n\n return true;\n}\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar\n *\n * @param options - the same options that are accepted by configureGlobal offered as a convenience\n */\nfunction RateLimiter(options) {\n this.startTime = _.now();\n this.counter = 0;\n this.perMinCounter = 0;\n this.platform = null;\n this.platformOptions = {};\n this.configureGlobal(options);\n}\n\nRateLimiter.globalSettings = {\n startTime: _.now(),\n maxItems: undefined,\n itemsPerMinute: undefined\n};\n\n/*\n * configureGlobal - set the global rate limiter options\n *\n * @param options - Only the following values are recognized:\n * startTime: a timestamp of the form returned by (new Date()).getTime()\n * maxItems: the maximum items\n * itemsPerMinute: the max number of items to send in a given minute\n */\nRateLimiter.prototype.configureGlobal = function(options) {\n if (options.startTime !== undefined) {\n RateLimiter.globalSettings.startTime = options.startTime;\n }\n if (options.maxItems !== undefined) {\n RateLimiter.globalSettings.maxItems = options.maxItems;\n }\n if (options.itemsPerMinute !== undefined) {\n RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;\n }\n};\n\n/*\n * shouldSend - determine if we should send a given item based on rate limit settings\n *\n * @param item - the item we are about to send\n * @returns An object with the following structure:\n * error: (Error|null)\n * shouldSend: bool\n * payload: (Object|null)\n * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and\n * exactly one of error or payload will be non-null. If error is non-null, the returned Error will\n * describe the situation, but it means that we were already over a rate limit (either globally or\n * per minute) when this item was checked. If error is null, and therefore payload is non-null, it\n * means this item put us over the global rate limit and the payload should be sent to Rollbar in\n * place of the passed in item.\n */\nRateLimiter.prototype.shouldSend = function(item, now) {\n now = now || _.now();\n var elapsedTime = now - this.startTime;\n if (elapsedTime < 0 || elapsedTime >= 60000) {\n this.startTime = now;\n this.perMinCounter = 0;\n }\n\n var globalRateLimit = RateLimiter.globalSettings.maxItems;\n var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;\n\n if (checkRate(item, globalRateLimit, this.counter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimit + ' max items reached', false);\n } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimitPerMin + ' items per minute reached', false);\n }\n this.counter++;\n this.perMinCounter++;\n\n var shouldSend = !checkRate(item, globalRateLimit, this.counter);\n var perMinute = shouldSend;\n shouldSend = shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);\n return shouldSendValue(this.platform, this.platformOptions, null, shouldSend, globalRateLimit, globalRateLimitPerMin, perMinute);\n};\n\nRateLimiter.prototype.setPlatformOptions = function(platform, options) {\n this.platform = platform;\n this.platformOptions = options;\n};\n\n/* Helpers */\n\nfunction checkRate(item, limit, counter) {\n return !item.ignoreRateLimit && limit >= 1 && counter > limit;\n}\n\nfunction shouldSendValue(platform, options, error, shouldSend, globalRateLimit, limitPerMin, perMinute) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute);\n }\n return {error: error, shouldSend: shouldSend, payload: payload};\n}\n\nfunction rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute) {\n var environment = options.environment || (options.payload && options.payload.environment);\n var msg;\n if (perMinute) {\n msg = 'item per minute limit reached, ignoring errors until timeout';\n } else {\n msg = 'maxItems has been hit, ignoring errors until reset.';\n }\n var item = {\n body: {\n message: {\n body: msg,\n extra: {\n maxItems: globalRateLimit,\n itemsPerMinute: limitPerMin\n }\n }\n },\n language: 'javascript',\n environment: environment,\n notifier: {\n version: (options.notifier && options.notifier.version) || options.version\n }\n };\n if (platform === 'browser') {\n item.platform = 'browser';\n item.framework = 'browser-js';\n item.notifier.name = 'rollbar-browser-js';\n } else if (platform === 'server') {\n item.framework = options.framework || 'node-js';\n item.notifier.name = options.notifier.name;\n } else if (platform === 'react-native') {\n item.framework = options.framework || 'react-native';\n item.notifier.name = options.notifier.name;\n }\n return item;\n}\n\nmodule.exports = RateLimiter;\n","'use strict';\n\n'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isPlainObject = function isPlainObject(obj) {\n\tif (!obj || toStr.call(obj) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tvar hasOwnConstructor = hasOwn.call(obj, 'constructor');\n\tvar hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n\t// Not own constructor property must be Object\n\tif (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n\t\treturn false;\n\t}\n\n\t// Own properties are enumerated firstly, so to speed up,\n\t// if last one is own, then all properties are own.\n\tvar key;\n\tfor (key in obj) {/**/}\n\n\treturn typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\nfunction merge() {\n var i, src, copy, clone, name,\n result = {},\n current = null,\n length = arguments.length;\n\n for (i=0; i < length; i++) {\n current = arguments[i];\n if (current == null) {\n continue;\n }\n\n for (name in current) {\n src = result[name];\n copy = current[name];\n if (result !== copy) {\n if (copy && isPlainObject(copy)) {\n clone = src && isPlainObject(src) ? src : {};\n result[name] = merge(clone, copy);\n } else if (typeof copy !== 'undefined') {\n result[name] = copy;\n }\n }\n }\n }\n return result;\n}\n\nmodule.exports = merge;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Queue - an object which handles which handles a queue of items to be sent to Rollbar.\n * This object handles rate limiting via a passed in rate limiter, retries based on connection\n * errors, and filtering of items based on a set of configurable predicates. The communication to\n * the backend is performed via a given API object.\n *\n * @param rateLimiter - An object which conforms to the interface\n * rateLimiter.shouldSend(item) -> bool\n * @param api - An object which conforms to the interface\n * api.postItem(payload, function(err, response))\n * @param logger - An object used to log verbose messages if desired\n * @param options - see Queue.prototype.configure\n */\nfunction Queue(rateLimiter, api, logger, options) {\n this.rateLimiter = rateLimiter;\n this.api = api;\n this.logger = logger;\n this.options = options;\n this.predicates = [];\n this.pendingItems = [];\n this.pendingRequests = [];\n this.retryQueue = [];\n this.retryHandle = null;\n this.waitCallback = null;\n this.waitIntervalID = null;\n}\n\n/*\n * configure - updates the options this queue uses\n *\n * @param options\n */\nQueue.prototype.configure = function(options) {\n this.api && this.api.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addPredicate - adds a predicate to the end of the list of predicates for this queue\n *\n * @param predicate - function(item, options) -> (bool|{err: Error})\n * Returning true means that this predicate passes and the item is okay to go on the queue\n * Returning false means do not add the item to the queue, but it is not an error\n * Returning {err: Error} means do not add the item to the queue, and the given error explains why\n * Returning {err: undefined} is equivalent to returning true but don't do that\n */\nQueue.prototype.addPredicate = function(predicate) {\n if (_.isFunction(predicate)) {\n this.predicates.push(predicate);\n }\n return this;\n};\n\nQueue.prototype.addPendingItem = function(item) {\n this.pendingItems.push(item);\n};\n\nQueue.prototype.removePendingItem = function(item) {\n var idx = this.pendingItems.indexOf(item);\n if (idx !== -1) {\n this.pendingItems.splice(idx, 1);\n }\n};\n\n/*\n * addItem - Send an item to the Rollbar API if all of the predicates are satisfied\n *\n * @param item - The payload to send to the backend\n * @param callback - function(error, repsonse) which will be called with the response from the API\n * in the case of a success, otherwise response will be null and error will have a value. If both\n * error and response are null then the item was stopped by a predicate which did not consider this\n * to be an error condition, but nonetheless did not send the item to the API.\n * @param originalError - The original error before any transformations that is to be logged if any\n */\nQueue.prototype.addItem = function(item, callback, originalError, originalItem) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() { return; };\n }\n var predicateResult = this._applyPredicates(item);\n if (predicateResult.stop) {\n this.removePendingItem(originalItem);\n callback(predicateResult.err);\n return;\n }\n this._maybeLog(item, originalError);\n this.removePendingItem(originalItem);\n if (!this.options.transmit) {\n callback(new Error('Transmit disabled'));\n return;\n }\n this.pendingRequests.push(item);\n try {\n this._makeApiRequest(item, function(err, resp) {\n this._dequeuePendingRequest(item);\n callback(err, resp);\n }.bind(this));\n } catch (e) {\n this._dequeuePendingRequest(item);\n callback(e);\n }\n};\n\n/*\n * wait - Stop any further errors from being added to the queue, and get called back when all items\n * currently processing have finished sending to the backend.\n *\n * @param callback - function() called when all pending items have been sent\n */\nQueue.prototype.wait = function(callback) {\n if (!_.isFunction(callback)) {\n return;\n }\n this.waitCallback = callback;\n if (this._maybeCallWait()) {\n return;\n }\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitIntervalID = setInterval(function() {\n this._maybeCallWait();\n }.bind(this), 500);\n};\n\n/* _applyPredicates - Sequentially applies the predicates that have been added to the queue to the\n * given item with the currently configured options.\n *\n * @param item - An item in the queue\n * @returns {stop: bool, err: (Error|null)} - stop being true means do not add item to the queue,\n * the error value should be passed up to a callbak if we are stopping.\n */\nQueue.prototype._applyPredicates = function(item) {\n var p = null;\n for (var i = 0, len = this.predicates.length; i < len; i++) {\n p = this.predicates[i](item, this.options);\n if (!p || p.err !== undefined) {\n return {stop: true, err: p.err};\n }\n }\n return {stop: false, err: null};\n};\n\n/*\n * _makeApiRequest - Send an item to Rollbar, callback when done, if there is an error make an\n * effort to retry if we are configured to do so.\n *\n * @param item - an item ready to send to the backend\n * @param callback - function(err, response)\n */\nQueue.prototype._makeApiRequest = function(item, callback) {\n var rateLimitResponse = this.rateLimiter.shouldSend(item);\n if (rateLimitResponse.shouldSend) {\n this.api.postItem(item, function(err, resp) {\n if (err) {\n this._maybeRetry(err, item, callback);\n } else {\n callback(err, resp);\n }\n }.bind(this));\n } else if (rateLimitResponse.error) {\n callback(rateLimitResponse.error);\n } else {\n this.api.postItem(rateLimitResponse.payload, callback);\n }\n};\n\n// These are errors basically mean there is no internet connection\nvar RETRIABLE_ERRORS = ['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED', 'EHOSTUNREACH', 'EPIPE', 'EAI_AGAIN'];\n\n/*\n * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback\n * with the error.\n *\n * @param err - an error returned by the API transport\n * @param item - the item that was trying to be sent when this error occured\n * @param callback - function(err, response)\n */\nQueue.prototype._maybeRetry = function(err, item, callback) {\n var shouldRetry = false;\n if (this.options.retryInterval) {\n for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {\n if (err.code === RETRIABLE_ERRORS[i]) {\n shouldRetry = true;\n break;\n }\n }\n if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {\n item.retries = item.retries ? item.retries + 1 : 1;\n if (item.retries > this.options.maxRetries) {\n shouldRetry = false;\n }\n }\n }\n if (shouldRetry) {\n this._retryApiRequest(item, callback);\n } else {\n callback(err);\n }\n};\n\n/*\n * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process\n * that queue based on the retryInterval in the options for this queue.\n *\n * @param item - an item that failed to send due to an error we deem retriable\n * @param callback - function(err, response)\n */\nQueue.prototype._retryApiRequest = function(item, callback) {\n this.retryQueue.push({item: item, callback: callback});\n\n if (!this.retryHandle) {\n this.retryHandle = setInterval(function() {\n while (this.retryQueue.length) {\n var retryObject = this.retryQueue.shift();\n this._makeApiRequest(retryObject.item, retryObject.callback);\n }\n }.bind(this), this.options.retryInterval);\n }\n};\n\n/*\n * _dequeuePendingRequest - Removes the item from the pending request queue, this queue is used to\n * enable to functionality of providing a callback that clients can pass to `wait` to be notified\n * when the pending request queue has been emptied. This must be called when the API finishes\n * processing this item. If a `wait` callback is configured, it is called by this function.\n *\n * @param item - the item previously added to the pending request queue\n */\nQueue.prototype._dequeuePendingRequest = function(item) {\n var idx = this.pendingRequests.indexOf(item);\n if (idx !== -1) {\n this.pendingRequests.splice(idx, 1);\n this._maybeCallWait();\n }\n};\n\nQueue.prototype._maybeLog = function(data, originalError) {\n if (this.logger && this.options.verbose) {\n var message = originalError;\n message = message || _.get(data, 'body.trace.exception.message');\n message = message || _.get(data, 'body.trace_chain.0.exception.message');\n if (message) {\n this.logger.error(message);\n return;\n }\n message = _.get(data, 'body.message.body');\n if (message) {\n this.logger.log(message);\n }\n }\n};\n\nQueue.prototype._maybeCallWait = function() {\n if (_.isFunction(this.waitCallback) && this.pendingItems.length === 0 && this.pendingRequests.length === 0) {\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitCallback();\n return true;\n }\n return false;\n};\n\nmodule.exports = Queue;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Notifier - the internal object responsible for delegating between the client exposed API, the\n * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the\n * queue which handles the communcation with the Rollbar API servers.\n *\n * @param queue - an object that conforms to the interface: addItem(item, callback)\n * @param options - an object representing the options to be set for this notifier, this should have\n * any defaults already set by the caller\n */\nfunction Notifier(queue, options) {\n this.queue = queue;\n this.options = options;\n this.transforms = [];\n this.diagnostic = {};\n}\n\n/*\n * configure - updates the options for this notifier with the passed in object\n *\n * @param options - an object which gets merged with the current options set on this notifier\n * @returns this\n */\nNotifier.prototype.configure = function(options) {\n this.queue && this.queue.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addTransform - adds a transform onto the end of the queue of transforms for this notifier\n *\n * @param transform - a function which takes three arguments:\n * * item: An Object representing the data to eventually be sent to Rollbar\n * * options: The current value of the options for this notifier\n * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this\n * callback with a null value for error if it wants the processing chain to continue, otherwise\n * with an error to terminate the processing. The item should be the updated item after this\n * transform is finished modifying it.\n */\nNotifier.prototype.addTransform = function(transform) {\n if (_.isFunction(transform)) {\n this.transforms.push(transform);\n }\n return this;\n};\n\n/*\n * log - the internal log function which applies the configured transforms and then pushes onto the\n * queue to be sent to the backend.\n *\n * @param item - An object with the following structure:\n * message [String] - An optional string to be sent to rollbar\n * error [Error] - An optional error\n *\n * @param callback - A function of type function(err, resp) which will be called with exactly one\n * null argument and one non-null argument. The callback will be called once, either during the\n * transform stage if an error occurs inside a transform, or in response to the communication with\n * the backend. The second argument will be the response from the backend in case of success.\n */\nNotifier.prototype.log = function(item, callback) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!this.options.enabled) {\n return callback(new Error('Rollbar is not enabled'));\n }\n\n this.queue.addPendingItem(item);\n var originalError = item.err;\n this._applyTransforms(item, function(err, i) {\n if (err) {\n this.queue.removePendingItem(item);\n return callback(err, null);\n }\n this.queue.addItem(i, callback, originalError, item);\n }.bind(this));\n};\n\n/* Internal */\n\n/*\n * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See\n * `addTransform` for more information.\n *\n * @param item - An item to be transformed\n * @param callback - A function of type function(err, item) which will be called with a non-null\n * error and a null item in the case of a transform failure, or a null error and non-null item after\n * all transforms have been applied.\n */\nNotifier.prototype._applyTransforms = function(item, callback) {\n var transformIndex = -1;\n var transformsLength = this.transforms.length;\n var transforms = this.transforms;\n var options = this.options;\n\n var cb = function(err, i) {\n if (err) {\n callback(err, null);\n return;\n }\n\n transformIndex++;\n\n if (transformIndex === transformsLength) {\n callback(null, i);\n return;\n }\n\n transforms[transformIndex](i, options, cb);\n };\n\n cb(null, item);\n};\n\nmodule.exports = Notifier;\n","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1/item/',\n search: null,\n version: '1',\n protocol: 'https:',\n port: 443\n};\n\n/**\n * Api is an object that encapsulates methods of communicating with\n * the Rollbar API. It is a standard interface with some parts implemented\n * differently for server or browser contexts. It is an object that should\n * be instantiated when used so it can contain non-global options that may\n * be different for another instance of RollbarApi.\n *\n * @param options {\n * accessToken: the accessToken to use for posting items to rollbar\n * endpoint: an alternative endpoint to send errors to\n * must be a valid, fully qualified URL.\n * The default is: https://api.rollbar.com/api/1/item\n * proxy: if you wish to proxy requests provide an object\n * with the following keys:\n * host or hostname (required): foo.example.com\n * port (optional): 123\n * protocol (optional): https\n * }\n */\nfunction Api(options, transport, urllib, truncation, jsonBackup) {\n this.options = options;\n this.transport = transport;\n this.url = urllib;\n this.truncation = truncation;\n this.jsonBackup = jsonBackup;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, urllib);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function(data, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n this.transport.post(this.accessToken, transportOptions, payload, callback);\n};\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.buildJsonPayload = function(data, callback) {\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n\n if (stringifyResult.error) {\n if (callback) {\n callback(stringifyResult.error);\n }\n return null;\n }\n\n return stringifyResult.value;\n};\n\n/**\n *\n * @param jsonPayload\n * @param callback\n */\nApi.prototype.postJsonPayload = function(jsonPayload, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n this.transport.postJsonPayload(this.accessToken, transportOptions, jsonPayload, callback);\n};\n\nApi.prototype.configure = function(options) {\n var oldOptions = this.oldOptions;\n this.options = _.merge(oldOptions, options);\n this.transportOptions = _getTransport(this.options, this.url);\n if (this.options.accessToken !== undefined) {\n this.accessToken = this.options.accessToken;\n }\n return this;\n};\n\nfunction _getTransport(options, url) {\n return helpers.getTransportFromOptions(options, defaultOptions, url);\n}\n\nmodule.exports = Api;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (!_.isType(data.context, 'string')) {\n var contextResult = _.stringify(data.context, jsonBackup);\n if (contextResult.error) {\n data.context = 'Error: could not serialize \\'context\\'';\n } else {\n data.context = contextResult.value || '';\n }\n if (data.context.length > 255) {\n data.context = data.context.substr(0, 255);\n }\n }\n return {\n access_token: accessToken,\n data: data\n };\n}\n\nfunction getTransportFromOptions(options, defaults, url) {\n var hostname = defaults.hostname;\n var protocol = defaults.protocol;\n var port = defaults.port;\n var path = defaults.path;\n var search = defaults.search;\n var timeout = options.timeout;\n\n var proxy = options.proxy;\n if (options.endpoint) {\n var opts = url.parse(options.endpoint);\n hostname = opts.hostname;\n protocol = opts.protocol;\n port = opts.port;\n path = opts.pathname;\n search = opts.search;\n }\n return {\n timeout: timeout,\n hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy\n };\n}\n\nfunction transportOptions(transport, method) {\n var protocol = transport.protocol || 'https:';\n var port = transport.port || (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);\n var hostname = transport.hostname;\n var path = transport.path;\n var timeout = transport.timeout;\n if (transport.search) {\n path = path + transport.search;\n }\n if (transport.proxy) {\n path = protocol + '//' + hostname + path;\n hostname = transport.proxy.host || transport.proxy.hostname;\n port = transport.proxy.port;\n protocol = transport.proxy.protocol || protocol;\n }\n return {\n timeout: timeout,\n protocol: protocol,\n hostname: hostname,\n path: path,\n port: port,\n method: method\n };\n}\n\nfunction appendPathToPath(base, path) {\n var baseTrailingSlash = /\\/$/.test(base);\n var pathBeginningSlash = /^\\//.test(path);\n\n if (baseTrailingSlash && pathBeginningSlash) {\n path = path.substring(1);\n } else if (!baseTrailingSlash && !pathBeginningSlash) {\n path = '/' + path;\n }\n\n return base + path;\n}\n\nmodule.exports = {\n buildPayload: buildPayload,\n getTransportFromOptions: getTransportFromOptions,\n transportOptions: transportOptions,\n appendPathToPath: appendPathToPath\n};\n","// Console-polyfill. MIT license.\n// https://github.com/paulmillr/console-polyfill\n// Make it safe to do console.log() always.\n(function(global) {\n 'use strict';\n if (!global.console) {\n global.console = {};\n }\n var con = global.console;\n var prop, method;\n var dummy = function() {};\n var properties = ['memory'];\n var methods = ('assert,clear,count,debug,dir,dirxml,error,exception,group,' +\n 'groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,' +\n 'show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn').split(',');\n while (prop = properties.pop()) if (!con[prop]) con[prop] = {};\n while (method = methods.pop()) if (!con[method]) con[method] = dummy;\n // Using `this` for web workers & supports Browserify / Webpack.\n})(typeof window === 'undefined' ? this : window);\n","'use strict';\n\n// This detection.js module is used to encapsulate any ugly browser/feature\n// detection we may need to do.\n\n// Figure out which version of IE we're using, if any.\n// This is gleaned from http://stackoverflow.com/questions/5574842/best-way-to-check-for-ie-less-than-9-in-javascript-without-library\n// Will return an integer on IE (i.e. 8)\n// Will return undefined otherwise\nfunction getIEVersion() {\n\tvar undef;\n\tif (typeof document === 'undefined') {\n\t\treturn undef;\n\t}\n\n var v = 3,\n div = document.createElement('div'),\n all = div.getElementsByTagName('i');\n\n while (\n div.innerHTML = '',\n all[0]\n );\n\n return v > 4 ? v : undef;\n}\n\nvar Detection = {\n ieVersion: getIEVersion\n};\n\nmodule.exports = Detection;\n","'use strict';\n\nfunction captureUncaughtExceptions(window, handler, shim) {\n if (!window) { return; }\n var oldOnError;\n\n if (typeof handler._rollbarOldOnError === 'function') {\n oldOnError = handler._rollbarOldOnError;\n } else if (window.onerror) {\n oldOnError = window.onerror;\n while (oldOnError._rollbarOldOnError) {\n oldOnError = oldOnError._rollbarOldOnError;\n }\n handler._rollbarOldOnError = oldOnError;\n }\n\n handler.handleAnonymousErrors();\n\n var fn = function() {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n if (shim) {\n fn._rollbarOldOnError = oldOnError;\n }\n window.onerror = fn;\n}\n\nfunction _rollbarWindowOnError(window, r, old, args) {\n if (window._rollbarWrappedError) {\n if (!args[4]) {\n args[4] = window._rollbarWrappedError;\n }\n if (!args[5]) {\n args[5] = window._rollbarWrappedError._rollbarContext;\n }\n window._rollbarWrappedError = null;\n }\n\n var ret = r.handleUncaughtException.apply(r, args);\n\n if (old) {\n old.apply(window, args);\n }\n\n // Let other chained onerror handlers above run before setting this.\n // If an error is thrown and caught within a chained onerror handler,\n // Error.prepareStackTrace() will see that one before the one we want.\n if (ret === 'anonymous') {\n r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()\n }\n}\n\nfunction captureUnhandledRejections(window, handler, shim) {\n if (!window) { return; }\n\n if (typeof window._rollbarURH === 'function' && window._rollbarURH.belongsToShim) {\n window.removeEventListener('unhandledrejection', window._rollbarURH);\n }\n\n var rejectionHandler = function (evt) {\n var reason, promise, detail;\n try {\n reason = evt.reason;\n } catch (e) {\n reason = undefined;\n }\n try {\n promise = evt.promise;\n } catch (e) {\n promise = '[unhandledrejection] error getting `promise` from event';\n }\n try {\n detail = evt.detail;\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\n }\n } catch (e) {\n // Ignore\n }\n if (!reason) {\n reason = '[unhandledrejection] error getting `reason` from event';\n }\n\n if (handler && handler.handleUnhandledRejection) {\n handler.handleUnhandledRejection(reason, promise);\n }\n };\n rejectionHandler.belongsToShim = shim;\n window._rollbarURH = rejectionHandler;\n window.addEventListener('unhandledrejection', rejectionHandler);\n}\n\n\nmodule.exports = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections\n};\n","'use strict';\n\n/*global XDomainRequest*/\n\nvar _ = require('../utility');\nvar logger = require('./logger');\n\n/*\n * accessToken may be embedded in payload but that should not\n * be assumed\n *\n * options: {\n * hostname\n * protocol\n * path\n * port\n * method\n * }\n *\n * params is an object containing key/value pairs. These\n * will be appended to the path as 'key=value&key=value'\n *\n * payload is an unserialized object\n */\nfunction Transport(truncation) {\n this.truncation = truncation;\n}\n\nTransport.prototype.get = function(accessToken, options, params, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n _.addParamsAndAccessTokenToPath(accessToken, options, params);\n\n var method = 'GET';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, null, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.post = function(accessToken, options, payload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!payload) {\n return callback(new Error('Cannot send empty request'));\n }\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n if (stringifyResult.error) {\n return callback(stringifyResult.error);\n }\n\n var writeData = stringifyResult.value;\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, writeData, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.postJsonPayload = function (accessToken, options, jsonPayload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, jsonPayload, callback, requestFactory, options.timeout);\n}\n\n\n// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope\n// so Angular change detection isn't triggered on each API call.\n// This is the equivalent of runOutsideAngular().\n//\nfunction _makeZoneRequest() {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;\n var args = Array.prototype.slice.call(arguments);\n\n if (currentZone && currentZone._name === 'angular') {\n var rootZone = currentZone._parent;\n rootZone.run(function () {\n _makeRequest.apply(undefined, args);\n });\n } else {\n _makeRequest.apply(undefined, args);\n }\n}\n\n/* global RollbarProxy */\nfunction _proxyRequest(json, callback) {\n var rollbarProxy = new RollbarProxy();\n rollbarProxy.sendJsonPayload(\n json,\n function(_msg) { /* do nothing */ }, // eslint-disable-line no-unused-vars\n function(err) {\n callback(new Error(err));\n }\n );\n}\n\nfunction _makeRequest(accessToken, url, method, data, callback, requestFactory, timeout) {\n if (typeof RollbarProxy !== 'undefined') {\n return _proxyRequest(data, callback);\n }\n\n var request;\n if (requestFactory) {\n request = requestFactory();\n } else {\n request = _createXMLHTTPObject();\n }\n if (!request) {\n // Give up, no way to send requests\n return callback(new Error('No way to send a request'));\n }\n try {\n try {\n var onreadystatechange = function() {\n try {\n if (onreadystatechange && request.readyState === 4) {\n onreadystatechange = undefined;\n\n var parseResponse = _.jsonParse(request.responseText);\n if (_isSuccess(request)) {\n callback(parseResponse.error, parseResponse.value);\n return;\n } else if (_isNormalFailure(request)) {\n if (request.status === 403) {\n // likely caused by using a server access token\n var message = parseResponse.value && parseResponse.value.message;\n logger.error(message);\n }\n // return valid http status codes\n callback(new Error(String(request.status)));\n } else {\n // IE will return a status 12000+ on some sort of connection failure,\n // so we return a blank error\n // http://msdn.microsoft.com/en-us/library/aa383770%28VS.85%29.aspx\n var msg = 'XHR response had no status code (likely connection failure)';\n callback(_newRetriableError(msg));\n }\n }\n } catch (ex) {\n //jquery source mentions firefox may error out while accessing the\n //request members if there is a network error\n //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111\n var exc;\n if (ex && ex.stack) {\n exc = ex;\n } else {\n exc = new Error(ex);\n }\n callback(exc);\n }\n };\n\n request.open(method, url, true);\n if (request.setRequestHeader) {\n request.setRequestHeader('Content-Type', 'application/json');\n request.setRequestHeader('X-Rollbar-Access-Token', accessToken);\n }\n\n if(_.isFiniteNumber(timeout)) {\n request.timeout = timeout;\n }\n\n request.onreadystatechange = onreadystatechange;\n request.send(data);\n } catch (e1) {\n // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest\n if (typeof XDomainRequest !== 'undefined') {\n\n // Assume we are in a really old browser which has a bunch of limitations:\n // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx\n\n // Extreme paranoia: if we have XDomainRequest then we have a window, but just in case\n if (!window || !window.location) {\n return callback(new Error('No window available during request, unknown environment'));\n }\n\n // If the current page is http, try and send over http\n if (window.location.href.substring(0, 5) === 'http:' && url.substring(0, 5) === 'https') {\n url = 'http' + url.substring(5);\n }\n\n var xdomainrequest = new XDomainRequest();\n xdomainrequest.onprogress = function() {};\n xdomainrequest.ontimeout = function() {\n var msg = 'Request timed out';\n var code = 'ETIMEDOUT';\n callback(_newRetriableError(msg, code));\n };\n xdomainrequest.onerror = function() {\n callback(new Error('Error during request'));\n };\n xdomainrequest.onload = function() {\n var parseResponse = _.jsonParse(xdomainrequest.responseText);\n callback(parseResponse.error, parseResponse.value);\n };\n xdomainrequest.open(method, url, true);\n xdomainrequest.send(data);\n } else {\n callback(new Error('Cannot find a method to transport a request'));\n }\n }\n } catch (e2) {\n callback(e2);\n }\n}\n\nfunction _createXMLHTTPObject() {\n /* global ActiveXObject:false */\n\n var factories = [\n function () {\n return new XMLHttpRequest();\n },\n function () {\n return new ActiveXObject('Msxml2.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Msxml3.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Microsoft.XMLHTTP');\n }\n ];\n var xmlhttp;\n var i;\n var numFactories = factories.length;\n for (i = 0; i < numFactories; i++) {\n /* eslint-disable no-empty */\n try {\n xmlhttp = factories[i]();\n break;\n } catch (e) {\n // pass\n }\n /* eslint-enable no-empty */\n }\n return xmlhttp;\n}\n\nfunction _isSuccess(r) {\n return r && r.status && r.status === 200;\n}\n\nfunction _isNormalFailure(r) {\n return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;\n}\n\nfunction _newRetriableError(message, code) {\n var err = new Error(message);\n err.code = code || 'ENOTFOUND';\n return err;\n}\n\nmodule.exports = Transport;\n","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('../errorParser');\nvar logger = require('./logger');\n\nfunction handleDomException(item, options, callback) {\n if(item.err && errorParser.Stack(item.err).name === 'DOMException') {\n var originalError = new Error();\n originalError.name = item.err.name;\n originalError.message = item.err.message;\n originalError.stack = item.err.stack;\n originalError.nested = item.err;\n item.err = originalError;\n }\n callback(null, item);\n}\n\nfunction handleItemWithError(item, options, callback) {\n item.data = item.data || {};\n if (item.err) {\n try {\n item.stackInfo = item.err._savedStackTrace || errorParser.parse(item.err, item.skipFrames);\n\n if (options.addErrorContext) {\n addErrorContext(item);\n }\n } catch (e) {\n logger.error('Error while parsing the error object.', e);\n try {\n item.message = item.err.message || item.err.description || item.message || String(item.err);\n } catch (e2) {\n item.message = String(item.err) || String(e2);\n }\n delete item.err;\n }\n }\n callback(null, item);\n}\n\nfunction addErrorContext(item) {\n var chain = [];\n var err = item.err;\n\n chain.push(err);\n\n while (err.nested) {\n err = err.nested;\n chain.push(err);\n }\n\n _.addErrorContext(item, chain);\n}\n\nfunction ensureItemHasSomethingToSay(item, options, callback) {\n if (!item.message && !item.stackInfo && !item.custom) {\n callback(new Error('No message, stack info, or custom data'), null);\n }\n callback(null, item);\n}\n\nfunction addBaseInfo(item, options, callback) {\n var environment = (options.payload && options.payload.environment) || options.environment;\n item.data = _.merge(item.data, {\n environment: environment,\n level: item.level,\n endpoint: options.endpoint,\n platform: 'browser',\n framework: 'browser-js',\n language: 'javascript',\n server: {},\n uuid: item.uuid,\n notifier: {\n name: 'rollbar-browser-js',\n version: options.version\n },\n custom: item.custom\n });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.location) {\n return callback(null, item);\n }\n var remoteString = '$remote_ip';\n if (!options.captureIp) {\n remoteString = null;\n } else if (options.captureIp !== true) {\n remoteString += '_anonymize';\n }\n _.set(item, 'data.request', {\n url: window.location.href,\n query_string: window.location.search,\n user_ip: remoteString\n });\n callback(null, item);\n };\n}\n\nfunction addClientInfo(window) {\n return function(item, options, callback) {\n if (!window) {\n return callback(null, item);\n }\n var nav = window.navigator || {};\n var scr = window.screen || {};\n _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: nav.userAgent,\n language: nav.language,\n cookie_enabled: nav.cookieEnabled,\n screen: {\n width: scr.width,\n height: scr.height\n }\n }\n });\n callback(null, item);\n };\n}\n\nfunction addPluginInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.navigator) {\n return callback(null, item);\n }\n var plugins = [];\n var navPlugins = window.navigator.plugins || [];\n var cur;\n for (var i=0, l=navPlugins.length; i < l; ++i) {\n cur = navPlugins[i];\n plugins.push({name: cur.name, description: cur.description});\n }\n _.set(item, 'data.client.javascript.plugins', plugins);\n callback(null, item);\n };\n}\n\nfunction addBody(item, options, callback) {\n if (item.stackInfo) {\n if (item.stackInfo.traceChain) {\n addBodyTraceChain(item, options, callback);\n } else {\n addBodyTrace(item, options, callback);\n }\n } else {\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction addBodyMessage(item, options, callback) {\n var message = item.message;\n var custom = item.custom;\n\n if (!message) {\n message = 'Item sent with null or missing arguments.';\n }\n var result = {\n body: message\n };\n\n if (custom) {\n result.extra = _.merge(custom);\n }\n\n _.set(item, 'data.body', {message: result});\n callback(null, item);\n}\n\nfunction stackFromItem(item) {\n // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = item.stackInfo.stack;\n if (stack && stack.length === 0 && item._unhandledStackInfo && item._unhandledStackInfo.stack) {\n stack = item._unhandledStackInfo.stack;\n }\n return stack;\n}\n\nfunction addBodyTraceChain(item, options, callback) {\n var traceChain = item.stackInfo.traceChain;\n var traces = [];\n\n var traceChainLength = traceChain.length;\n for (var i = 0; i < traceChainLength; i++) {\n var trace = buildTrace(item, traceChain[i], options);\n traces.push(trace);\n }\n\n _.set(item, 'data.body', {trace_chain: traces});\n callback(null, item);\n}\n\nfunction addBodyTrace(item, options, callback) {\n var stack = stackFromItem(item);\n\n if (stack) {\n var trace = buildTrace(item, item.stackInfo, options);\n _.set(item, 'data.body', {trace: trace});\n callback(null, item);\n } else {\n var stackInfo = item.stackInfo;\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction buildTrace(item, stackInfo, options) {\n var description = item && item.data.description;\n var custom = item && item.custom;\n var stack = stackFromItem(item);\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n var trace = {\n exception: {\n 'class': className,\n message: message\n }\n };\n\n if (description) {\n trace.exception.description = description;\n }\n\n if (stack) {\n if (stack.length === 0) {\n trace.exception.stack = stackInfo.rawStack;\n trace.exception.raw = String(stackInfo.rawException);\n }\n var stackFrame;\n var frame;\n var code;\n var pre;\n var post;\n var contextLength;\n var i, mid;\n\n trace.frames = [];\n for (i = 0; i < stack.length; ++i) {\n stackFrame = stack[i];\n frame = {\n filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',\n lineno: stackFrame.line || null,\n method: (!stackFrame.func || stackFrame.func === '?') ? '[anonymous]' : stackFrame.func,\n colno: stackFrame.column\n };\n if (options.sendFrameUrl) {\n frame.url = stackFrame.url;\n }\n if (frame.method && frame.method.endsWith && frame.method.endsWith('_rollbar_wrapped')) {\n continue;\n }\n\n code = pre = post = null;\n contextLength = stackFrame.context ? stackFrame.context.length : 0;\n if (contextLength) {\n mid = Math.floor(contextLength / 2);\n pre = stackFrame.context.slice(0, mid);\n code = stackFrame.context[mid];\n post = stackFrame.context.slice(mid);\n }\n\n if (code) {\n frame.code = code;\n }\n\n if (pre || post) {\n frame.context = {};\n if (pre && pre.length) {\n frame.context.pre = pre;\n }\n if (post && post.length) {\n frame.context.post = post;\n }\n }\n\n if (stackFrame.args) {\n frame.args = stackFrame.args;\n }\n\n trace.frames.push(frame);\n }\n\n // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last\n trace.frames.reverse();\n\n if (custom) {\n trace.extra = _.merge(custom);\n }\n }\n\n return trace;\n}\n\nfunction errorClass(stackInfo, guess, options) {\n if (stackInfo.name) {\n return stackInfo.name;\n } else if (options.guessErrorClass) {\n return guess;\n } else {\n return '(unknown)';\n }\n}\n\nfunction addScrubber(scrubFn) {\n return function (item, options, callback) {\n if (scrubFn) {\n var scrubFields = options.scrubFields || [];\n var scrubPaths = options.scrubPaths || [];\n item.data = scrubFn(item.data, scrubFields, scrubPaths);\n }\n callback(null, item);\n }\n}\n\nmodule.exports = {\n handleDomException: handleDomException,\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n addScrubber: addScrubber\n};\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('error-stack-parser', ['stackframe'], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory(require('stackframe'));\n } else {\n root.ErrorStackParser = factory(root.StackFrame);\n }\n}(this, function ErrorStackParser(StackFrame) {\n 'use strict';\n\n var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\\S+:\\d+/;\n var CHROME_IE_STACK_REGEXP = /^\\s*at .*(\\S+:\\d+|\\(native\\))/m;\n var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\\[native code])?$/;\n\n return {\n /**\n * Given an Error object, extract the most information from it.\n *\n * @param {Error} error object\n * @return {Array} of StackFrames\n */\n parse: function ErrorStackParser$$parse(error) {\n if (typeof error.stacktrace !== 'undefined' || typeof error['opera#sourceloc'] !== 'undefined') {\n return this.parseOpera(error);\n } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {\n return this.parseV8OrIE(error);\n } else if (error.stack) {\n return this.parseFFOrSafari(error);\n } else {\n throw new Error('Cannot parse given Error object');\n }\n },\n\n // Separate line and column numbers from a string of the form: (URI:Line:Column)\n extractLocation: function ErrorStackParser$$extractLocation(urlLike) {\n // Fail-fast but return locations like \"(native)\"\n if (urlLike.indexOf(':') === -1) {\n return [urlLike];\n }\n\n var regExp = /(.+?)(?::(\\d+))?(?::(\\d+))?$/;\n var parts = regExp.exec(urlLike.replace(/[()]/g, ''));\n return [parts[1], parts[2] || undefined, parts[3] || undefined];\n },\n\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(CHROME_IE_STACK_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n if (line.indexOf('(eval ') > -1) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n line = line.replace(/eval code/g, 'eval').replace(/(\\(eval at [^()]*)|(\\),.*$)/g, '');\n }\n var sanitizedLine = line.replace(/^\\s+/, '').replace(/\\(eval code/g, '(');\n\n // capture and preseve the parenthesized location \"(/foo/my bar.js:12:87)\" in\n // case it has spaces in it, as the string is split on \\s+ later on\n var location = sanitizedLine.match(/ (\\((.+):(\\d+):(\\d+)\\)$)/);\n\n // remove the parenthesized location from the line, if it was matched\n sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;\n\n var tokens = sanitizedLine.split(/\\s+/).slice(1);\n // if a location was matched, pass it to extractLocation() otherwise pop the last token\n var locationParts = this.extractLocation(location ? location[1] : tokens.pop());\n var functionName = tokens.join(' ') || undefined;\n var fileName = ['eval', ''].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];\n\n return new StackFrame({\n functionName: functionName,\n fileName: fileName,\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n },\n\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n if (line.indexOf(' > eval') > -1) {\n line = line.replace(/ line (\\d+)(?: > eval line \\d+)* > eval:\\d+:\\d+/g, ':$1');\n }\n\n if (line.indexOf('@') === -1 && line.indexOf(':') === -1) {\n // Safari eval frames only have function names and nothing else\n return new StackFrame({\n functionName: line\n });\n } else {\n var functionNameRegex = /((.*\".+\"[^@]*)?[^@]*)(?:@)/;\n var matches = line.match(functionNameRegex);\n var functionName = matches && matches[1] ? matches[1] : undefined;\n var locationParts = this.extractLocation(line.replace(functionNameRegex, ''));\n\n return new StackFrame({\n functionName: functionName,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }\n }, this);\n },\n\n parseOpera: function ErrorStackParser$$parseOpera(e) {\n if (!e.stacktrace || (e.message.indexOf('\\n') > -1 &&\n e.message.split('\\n').length > e.stacktrace.split('\\n').length)) {\n return this.parseOpera9(e);\n } else if (!e.stack) {\n return this.parseOpera10(e);\n } else {\n return this.parseOpera11(e);\n }\n },\n\n parseOpera9: function ErrorStackParser$$parseOpera9(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)/i;\n var lines = e.message.split('\\n');\n var result = [];\n\n for (var i = 2, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(new StackFrame({\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n }));\n }\n }\n\n return result;\n },\n\n parseOpera10: function ErrorStackParser$$parseOpera10(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)(?:: In function (\\S+))?$/i;\n var lines = e.stacktrace.split('\\n');\n var result = [];\n\n for (var i = 0, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(\n new StackFrame({\n functionName: match[3] || undefined,\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n })\n );\n }\n }\n\n return result;\n },\n\n // Opera 10.65+ Error.stack very similar to FF/Safari\n parseOpera11: function ErrorStackParser$$parseOpera11(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);\n }, this);\n\n return filtered.map(function(line) {\n var tokens = line.split('@');\n var locationParts = this.extractLocation(tokens.pop());\n var functionCall = (tokens.shift() || '');\n var functionName = functionCall\n .replace(//, '$2')\n .replace(/\\([^)]*\\)/g, '') || undefined;\n var argsRaw;\n if (functionCall.match(/\\(([^)]*)\\)/)) {\n argsRaw = functionCall.replace(/^[^(]+\\(([^)]*)\\)$/, '$1');\n }\n var args = (argsRaw === undefined || argsRaw === '[arguments not available]') ?\n undefined : argsRaw.split(',');\n\n return new StackFrame({\n functionName: functionName,\n args: args,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n }\n };\n}));\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('stackframe', [], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.StackFrame = factory();\n }\n}(this, function() {\n 'use strict';\n function _isNumber(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n }\n\n function _capitalize(str) {\n return str.charAt(0).toUpperCase() + str.substring(1);\n }\n\n function _getter(p) {\n return function() {\n return this[p];\n };\n }\n\n var booleanProps = ['isConstructor', 'isEval', 'isNative', 'isToplevel'];\n var numericProps = ['columnNumber', 'lineNumber'];\n var stringProps = ['fileName', 'functionName', 'source'];\n var arrayProps = ['args'];\n var objectProps = ['evalOrigin'];\n\n var props = booleanProps.concat(numericProps, stringProps, arrayProps, objectProps);\n\n function StackFrame(obj) {\n if (!obj) return;\n for (var i = 0; i < props.length; i++) {\n if (obj[props[i]] !== undefined) {\n this['set' + _capitalize(props[i])](obj[props[i]]);\n }\n }\n }\n\n StackFrame.prototype = {\n getArgs: function() {\n return this.args;\n },\n setArgs: function(v) {\n if (Object.prototype.toString.call(v) !== '[object Array]') {\n throw new TypeError('Args must be an Array');\n }\n this.args = v;\n },\n\n getEvalOrigin: function() {\n return this.evalOrigin;\n },\n setEvalOrigin: function(v) {\n if (v instanceof StackFrame) {\n this.evalOrigin = v;\n } else if (v instanceof Object) {\n this.evalOrigin = new StackFrame(v);\n } else {\n throw new TypeError('Eval Origin must be an Object or StackFrame');\n }\n },\n\n toString: function() {\n var fileName = this.getFileName() || '';\n var lineNumber = this.getLineNumber() || '';\n var columnNumber = this.getColumnNumber() || '';\n var functionName = this.getFunctionName() || '';\n if (this.getIsEval()) {\n if (fileName) {\n return '[eval] (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return '[eval]:' + lineNumber + ':' + columnNumber;\n }\n if (functionName) {\n return functionName + ' (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return fileName + ':' + lineNumber + ':' + columnNumber;\n }\n };\n\n StackFrame.fromString = function StackFrame$$fromString(str) {\n var argsStartIndex = str.indexOf('(');\n var argsEndIndex = str.lastIndexOf(')');\n\n var functionName = str.substring(0, argsStartIndex);\n var args = str.substring(argsStartIndex + 1, argsEndIndex).split(',');\n var locationString = str.substring(argsEndIndex + 1);\n\n if (locationString.indexOf('@') === 0) {\n var parts = /@(.+?)(?::(\\d+))?(?::(\\d+))?$/.exec(locationString, '');\n var fileName = parts[1];\n var lineNumber = parts[2];\n var columnNumber = parts[3];\n }\n\n return new StackFrame({\n functionName: functionName,\n args: args || undefined,\n fileName: fileName,\n lineNumber: lineNumber || undefined,\n columnNumber: columnNumber || undefined\n });\n };\n\n for (var i = 0; i < booleanProps.length; i++) {\n StackFrame.prototype['get' + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);\n StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function(p) {\n return function(v) {\n this[p] = Boolean(v);\n };\n })(booleanProps[i]);\n }\n\n for (var j = 0; j < numericProps.length; j++) {\n StackFrame.prototype['get' + _capitalize(numericProps[j])] = _getter(numericProps[j]);\n StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function(p) {\n return function(v) {\n if (!_isNumber(v)) {\n throw new TypeError(p + ' must be a Number');\n }\n this[p] = Number(v);\n };\n })(numericProps[j]);\n }\n\n for (var k = 0; k < stringProps.length; k++) {\n StackFrame.prototype['get' + _capitalize(stringProps[k])] = _getter(stringProps[k]);\n StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function(p) {\n return function(v) {\n this[p] = String(v);\n };\n })(stringProps[k]);\n }\n\n return StackFrame;\n}));\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction itemToPayload(item, options, callback) {\n var payloadOptions = options.payload || {};\n if (payloadOptions.body) {\n delete payloadOptions.body;\n }\n\n var data = _.merge(item.data, payloadOptions);\n if (item._isUncaught) {\n data._isUncaught = true;\n }\n if (item._originalArgs) {\n data._originalArgs = item._originalArgs;\n }\n callback(null, data);\n}\n\nfunction addTelemetryData(item, options, callback) {\n if (item.telemetryEvents) {\n _.set(item, 'data.body.telemetry', item.telemetryEvents);\n }\n callback(null, item);\n}\n\nfunction addMessageWithError(item, options, callback) {\n if (!item.message) {\n callback(null, item);\n return;\n }\n var tracePath = 'data.body.trace_chain.0';\n var trace = _.get(item, tracePath);\n if (!trace) {\n tracePath = 'data.body.trace';\n trace = _.get(item, tracePath);\n }\n if (trace) {\n if (!(trace.exception && trace.exception.description)) {\n _.set(item, tracePath+'.exception.description', item.message);\n callback(null, item);\n return;\n }\n var extra = _.get(item, tracePath+'.extra') || {};\n var newExtra = _.merge(extra, {message: item.message});\n _.set(item, tracePath+'.extra', newExtra);\n }\n callback(null, item);\n}\n\nfunction userTransform(logger) {\n return function(item, options, callback) {\n var newItem = _.merge(item);\n var response = null;\n try {\n if (_.isFunction(options.transform)) {\n response = options.transform(newItem.data, item);\n }\n } catch (e) {\n options.transform = null;\n logger.error('Error while calling custom transform() function. Removing custom transform().', e);\n callback(null, item);\n return;\n }\n if(_.isPromise(response)) {\n response.then(function (promisedItem) {\n if(promisedItem) {\n newItem.data = promisedItem;\n }\n callback(null, newItem);\n }, function (error) {\n callback(error, item);\n });\n } else {\n callback(null, newItem);\n }\n }\n}\n\nfunction addConfigToPayload(item, options, callback) {\n if (!options.sendConfig) {\n return callback(null, item);\n }\n var configKey = '_rollbarConfig';\n var custom = _.get(item, 'data.custom') || {};\n custom[configKey] = options;\n item.data.custom = custom;\n callback(null, item);\n}\n\nfunction addFunctionOption(options, name) {\n if(_.isFunction(options[name])) {\n options[name] = options[name].toString();\n }\n}\n\nfunction addConfiguredOptions(item, options, callback) {\n var configuredOptions = options._configuredOptions;\n\n // These must be stringified or they'll get dropped during serialization.\n addFunctionOption(configuredOptions, 'transform');\n addFunctionOption(configuredOptions, 'checkIgnore');\n addFunctionOption(configuredOptions, 'onSendCallback');\n\n delete configuredOptions.accessToken;\n item.data.notifier.configured_options = configuredOptions;\n callback(null, item);\n}\n\nfunction addDiagnosticKeys(item, options, callback) {\n var diagnostic = _.merge(item.notifier.client.notifier.diagnostic, item.diagnostic);\n\n if (_.get(item, 'err._isAnonymous')) {\n diagnostic.is_anonymous = true;\n }\n\n if (item._isUncaught) {\n diagnostic.is_uncaught = item._isUncaught;\n }\n\n if (item.err) {\n try {\n diagnostic.raw_error = {\n message: item.err.message,\n name: item.err.name,\n constructor_name: item.err.constructor && item.err.constructor.name,\n filename: item.err.fileName,\n line: item.err.lineNumber,\n column: item.err.columnNumber,\n stack: item.err.stack\n };\n } catch (e) {\n diagnostic.raw_error = { failed: String(e) };\n }\n }\n\n item.data.notifier.diagnostic = _.merge(item.data.notifier.diagnostic, diagnostic);\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError,\n userTransform: userTransform,\n addConfigToPayload: addConfigToPayload,\n addConfiguredOptions: addConfiguredOptions,\n addDiagnosticKeys: addDiagnosticKeys\n};\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction checkIgnore(item, settings) {\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore\n};\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction checkLevel(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = settings.reportLevel;\n var reportLevelVal = _.LEVELS[reportLevel] || 0;\n\n if (levelVal < reportLevelVal) {\n return false;\n }\n return true;\n}\n\nfunction userCheckIgnore(logger) {\n return function(item, settings) {\n var isUncaught = !!item._isUncaught;\n delete item._isUncaught;\n var args = item._originalArgs;\n delete item._originalArgs;\n try {\n if (_.isFunction(settings.onSendCallback)) {\n settings.onSendCallback(isUncaught, args, item);\n }\n } catch (e) {\n settings.onSendCallback = null;\n logger.error('Error while calling onSendCallback, removing', e);\n }\n try {\n if (_.isFunction(settings.checkIgnore) && settings.checkIgnore(isUncaught, args, item)) {\n return false;\n }\n } catch (e) {\n settings.checkIgnore = null;\n logger.error('Error while calling custom checkIgnore(), removing', e);\n }\n return true;\n }\n}\n\nfunction urlIsNotBlockListed(logger) {\n return function(item, settings) {\n return !urlIsOnAList(item, settings, 'blocklist', logger);\n }\n}\n\nfunction urlIsSafeListed(logger) {\n return function(item, settings) {\n return urlIsOnAList(item, settings, 'safelist', logger);\n }\n}\n\nfunction matchFrames(trace, list, block) {\n if (!trace) { return !block }\n\n var frames = trace.frames;\n\n if (!frames || frames.length === 0) { return !block; }\n\n var frame, filename, url, urlRegex;\n var listLength = list.length;\n var frameLength = frames.length;\n for (var i = 0; i < frameLength; i++) {\n frame = frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) { return !block; }\n\n for (var j = 0; j < listLength; j++) {\n url = list[j];\n urlRegex = new RegExp(url);\n\n if (urlRegex.test(filename)) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction urlIsOnAList(item, settings, safeOrBlock, logger) {\n // safelist is the default\n var block = false;\n if (safeOrBlock === 'blocklist') {\n block = true;\n }\n\n var list, traces;\n try {\n list = block ? settings.hostBlockList : settings.hostSafeList;\n traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];\n\n // These two checks are important to come first as they are defaults\n // in case the list is missing or the trace is missing or not well-formed\n if (!list || list.length === 0) {\n return !block;\n }\n if (traces.length === 0 || !traces[0]) {\n return !block;\n }\n\n var tracesLength = traces.length;\n for (var i = 0; i < tracesLength; i++) {\n if(matchFrames(traces[i], list, block)) {\n return true;\n }\n }\n } catch (e)\n /* istanbul ignore next */\n {\n if (block) {\n settings.hostBlockList = null;\n } else {\n settings.hostSafeList = null;\n }\n var listName = block ? 'hostBlockList' : 'hostSafeList';\n logger.error('Error while reading your configuration\\'s ' + listName + ' option. Removing custom ' + listName + '.', e);\n return !block;\n }\n return false;\n}\n\nfunction messageIsIgnored(logger) {\n return function(item, settings) {\n var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n messages = messagesFromItem(item);\n\n if (messages.length === 0){\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n\n for (j = 0; j < messages.length; j++) {\n messageIsIgnored = rIgnoredMessage.test(messages[j]);\n\n if (messageIsIgnored) {\n return false;\n }\n }\n }\n } catch(e)\n /* istanbul ignore next */\n {\n settings.ignoredMessages = null;\n logger.error('Error while reading your configuration\\'s ignoredMessages option. Removing custom ignoredMessages.');\n }\n\n return true;\n }\n}\n\nfunction messagesFromItem(item) {\n var body = item.body;\n var messages = [];\n\n // The payload schema only allows one of trace_chain, message, or trace.\n // However, existing test cases are based on having both trace and message present.\n // So here we preserve the ability to collect strings from any combination of these keys.\n if (body.trace_chain) {\n var traceChain = body.trace_chain;\n for (var i = 0; i < traceChain.length; i++) {\n var trace = traceChain[i];\n messages.push(_.get(trace, 'exception.message'));\n }\n }\n if (body.trace) {\n messages.push(_.get(body, 'trace.exception.message'));\n }\n if (body.message) {\n messages.push(_.get(body, 'message.body'));\n }\n return messages;\n}\n\nmodule.exports = {\n checkLevel: checkLevel,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlockListed: urlIsNotBlockListed,\n urlIsSafeListed: urlIsSafeListed,\n messageIsIgnored: messageIsIgnored\n};\n","'use strict';\n\nmodule.exports = {\n version: '2.24.1',\n endpoint: 'api.rollbar.com/api/1/item/',\n logLevel: 'debug',\n reportLevel: 'debug',\n uncaughtErrorLevel: 'error',\n maxItems: 0,\n itemsPerMin: 60\n}\n","'use strict';\n\nmodule.exports = {\n scrubFields: [\n 'pw',\n 'pass',\n 'passwd',\n 'password',\n 'secret',\n 'confirm_password',\n 'confirmPassword',\n 'password_confirmation',\n 'passwordConfirmation',\n 'access_token',\n 'accessToken',\n 'X-Rollbar-Access-Token',\n 'secret_key',\n 'secretKey',\n 'secretToken',\n 'cc-number',\n 'card number',\n 'cardnumber',\n 'cardnum',\n 'ccnum',\n 'ccnumber',\n 'cc num',\n 'creditcardnumber',\n 'credit card number',\n 'newcreditcardnumber',\n 'new credit card',\n 'creditcardno',\n 'credit card no',\n 'card#',\n 'card #',\n 'cc-csc',\n 'cvc',\n 'cvc2',\n 'cvv2',\n 'ccv2',\n 'security code',\n 'card verification',\n 'name on credit card',\n 'name on card',\n 'nameoncard',\n 'cardholder',\n 'card holder',\n 'name des karteninhabers',\n 'ccname',\n 'card type',\n 'cardtype',\n 'cc type',\n 'cctype',\n 'payment type',\n 'expiration date',\n 'expirationdate',\n 'expdate',\n 'cc-exp',\n 'ccmonth',\n 'ccyear'\n ]\n}\n","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.merge(options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n}\n\nTelemeter.prototype.configure = function(options) {\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n var deleteCount = 0;\n if (this.maxQueueSize > newMaxEvents) {\n deleteCount = this.maxQueueSize - newMaxEvents;\n }\n this.maxQueueSize = newMaxEvents;\n this.queue.splice(0, deleteCount);\n};\n\nTelemeter.prototype.copyEvents = function() {\n var events = Array.prototype.slice.call(this.queue, 0);\n if (_.isFunction(this.options.filterTelemetry)) {\n try {\n var i = events.length;\n while (i--) {\n if (this.options.filterTelemetry(events[i])) {\n events.splice(i, 1);\n }\n }\n } catch (e) {\n this.options.filterTelemetry = null;\n }\n }\n return events;\n};\n\nTelemeter.prototype.capture = function(type, metadata, level, rollbarUUID, timestamp) {\n var e = {\n level: getLevel(type, level),\n type: type,\n timestamp_ms: timestamp || _.now(),\n body: metadata,\n source: 'client'\n };\n if (rollbarUUID) {\n e.uuid = rollbarUUID;\n }\n\n try {\n if (_.isFunction(this.options.filterTelemetry) && this.options.filterTelemetry(e)) {\n return false;\n }\n } catch (exc) {\n this.options.filterTelemetry = null;\n }\n\n this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function(type, metadata, level, rollbarUUID) {\n return this.capture(type, metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.captureError = function(err, level, rollbarUUID, timestamp) {\n var metadata = {\n message: err.message || String(err)\n };\n if (err.stack) {\n metadata.stack = err.stack;\n }\n return this.capture('error', metadata, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureLog = function(message, level, rollbarUUID, timestamp) {\n return this.capture('log', {\n message: message\n }, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID, requestData) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\n if (requestData) {\n metadata.request = requestData;\n }\n var level = this.levelFromStatus(metadata.status_code);\n return this.capture('network', metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.levelFromStatus = function(statusCode) {\n if (statusCode >= 200 && statusCode < 400) {\n return 'info';\n }\n if (statusCode === 0 || statusCode >= 400) {\n return 'error';\n }\n return 'info';\n};\n\nTelemeter.prototype.captureDom = function(subtype, element, value, checked, rollbarUUID) {\n var metadata = {\n subtype: subtype,\n element: element\n };\n if (value !== undefined) {\n metadata.value = value;\n }\n if (checked !== undefined) {\n metadata.checked = checked;\n }\n return this.capture('dom', metadata, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureNavigation = function(from, to, rollbarUUID) {\n return this.capture('navigation', {from: from, to: to}, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureDomContentLoaded = function(ts) {\n return this.capture('navigation', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n */\n};\nTelemeter.prototype.captureLoad = function(ts) {\n return this.capture('navigation', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n */\n};\n\nTelemeter.prototype.captureConnectivityChange = function(type, rollbarUUID) {\n return this.captureNetwork({change: type}, 'connectivity', rollbarUUID);\n};\n\n// Only intended to be used internally by the notifier\nTelemeter.prototype._captureRollbarItem = function(item) {\n if (!this.options.includeItemsInTelemetry) {\n return;\n }\n if (item.err) {\n return this.captureError(item.err, item.level, item.uuid, item.timestamp);\n }\n if (item.message) {\n return this.captureLog(item.message, item.level, item.uuid, item.timestamp);\n }\n if (item.custom) {\n return this.capture('log', item.custom, item.level, item.uuid, item.timestamp);\n }\n};\n\nTelemeter.prototype.push = function(e) {\n this.queue.push(e);\n if (this.queue.length > this.maxQueueSize) {\n this.queue.shift();\n }\n};\n\nfunction getLevel(type, level) {\n if (level) {\n return level;\n }\n var defaultLevel = {\n error: 'error',\n manual: 'info'\n };\n return defaultLevel[type] || 'info';\n}\n\nmodule.exports = Telemeter;\n","'use strict';\n\nvar _ = require('../utility');\nvar scrub = require('../scrub');\nvar urlparser = require('./url');\nvar domUtil = require('./domUtility');\n\nvar defaults = {\n network: true,\n networkResponseHeaders: false,\n networkResponseBody: false,\n networkRequestHeaders: false,\n networkRequestBody: false,\n networkErrorOnHttp5xx: false,\n networkErrorOnHttp4xx: false,\n networkErrorOnHttp0: false,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true,\n contentSecurityPolicy: true,\n errorOnContentSecurityPolicy: false\n};\n\nfunction replace(obj, name, replacement, replacements, type) {\n var orig = obj[name];\n obj[name] = replacement(orig);\n if (replacements) {\n replacements[type].push([obj, name, orig]);\n }\n}\n\nfunction restore(replacements, type) {\n var b;\n while (replacements[type].length) {\n b = replacements[type].shift();\n b[0][b[1]] = b[2];\n }\n}\n\nfunction nameFromDescription(description) {\n if (!description || !description.attributes) { return null; }\n var attrs = description.attributes;\n for (var a = 0; a < attrs.length; ++a) {\n if (attrs[a].key === 'name') {\n return attrs[a].value;\n }\n }\n return null;\n}\n\nfunction defaultValueScrubber(scrubFields) {\n var patterns = [];\n for (var i = 0; i < scrubFields.length; ++i) {\n patterns.push(new RegExp(scrubFields[i], 'i'));\n }\n return function(description) {\n var name = nameFromDescription(description);\n if (!name) { return false; }\n for (var i = 0; i < patterns.length; ++i) {\n if (patterns[i].test(name)) {\n return true;\n }\n }\n return false;\n };\n}\n\nfunction Instrumenter(options, telemeter, rollbar, _window, _document) {\n this.options = options;\n var autoInstrument = options.autoInstrument;\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);\n this.telemeter = telemeter;\n this.rollbar = rollbar;\n this.diagnostic = rollbar.client.notifier.diagnostic;\n this._window = _window || {};\n this._document = _document || {};\n this.replacements = {\n network: [],\n log: [],\n navigation: [],\n connectivity: []\n };\n this.eventRemovers = {\n dom: [],\n connectivity: [],\n contentsecuritypolicy: []\n };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function(options) {\n this.options = _.merge(this.options, options);\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.merge(this.autoInstrument);\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n if (options.scrubTelemetryInputs !== undefined) {\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n }\n if (options.telemetryScrubber !== undefined) {\n this.telemetryScrubber = options.telemetryScrubber;\n }\n};\n\n// eslint-disable-next-line complexity\nInstrumenter.prototype.instrument = function(oldSettings) {\n if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {\n this.instrumentNetwork();\n } else if (!this.autoInstrument.network && oldSettings && oldSettings.network) {\n this.deinstrumentNetwork();\n }\n\n if (this.autoInstrument.log && !(oldSettings && oldSettings.log)) {\n this.instrumentConsole();\n } else if (!this.autoInstrument.log && oldSettings && oldSettings.log) {\n this.deinstrumentConsole();\n }\n\n if (this.autoInstrument.dom && !(oldSettings && oldSettings.dom)) {\n this.instrumentDom();\n } else if (!this.autoInstrument.dom && oldSettings && oldSettings.dom) {\n this.deinstrumentDom();\n }\n\n if (this.autoInstrument.navigation && !(oldSettings && oldSettings.navigation)) {\n this.instrumentNavigation();\n } else if (!this.autoInstrument.navigation && oldSettings && oldSettings.navigation) {\n this.deinstrumentNavigation();\n }\n\n if (this.autoInstrument.connectivity && !(oldSettings && oldSettings.connectivity)) {\n this.instrumentConnectivity();\n } else if (!this.autoInstrument.connectivity && oldSettings && oldSettings.connectivity) {\n this.deinstrumentConnectivity();\n }\n\n if (this.autoInstrument.contentSecurityPolicy && !(oldSettings && oldSettings.contentSecurityPolicy)) {\n this.instrumentContentSecurityPolicy();\n } else if (!this.autoInstrument.contentSecurityPolicy && oldSettings && oldSettings.contentSecurityPolicy) {\n this.deinstrumentContentSecurityPolicy();\n }\n};\n\nInstrumenter.prototype.deinstrumentNetwork = function() {\n restore(this.replacements, 'network');\n};\n\nInstrumenter.prototype.instrumentNetwork = function() {\n var self = this;\n\n function wrapProp(prop, xhr) {\n if (prop in xhr && _.isFunction(xhr[prop])) {\n replace(xhr, prop, function(orig) {\n return self.rollbar.wrap(orig);\n });\n }\n }\n\n if ('XMLHttpRequest' in this._window) {\n var xhrp = this._window.XMLHttpRequest.prototype;\n replace(xhrp, 'open', function(orig) {\n return function(method, url) {\n if (_.isType(url, 'string')) {\n if (this.__rollbar_xhr) {\n this.__rollbar_xhr.method = method;\n this.__rollbar_xhr.url = url;\n this.__rollbar_xhr.status_code = null;\n this.__rollbar_xhr.start_time_ms = _.now();\n this.__rollbar_xhr.end_time_ms = null;\n } else {\n this.__rollbar_xhr = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'setRequestHeader', function(orig) {\n return function(header, value) {\n // If xhr.open is async, __rollbar_xhr may not be initialized yet.\n if (!this.__rollbar_xhr) {\n this.__rollbar_xhr = {};\n }\n if (_.isType(header, 'string') && _.isType(value, 'string')) {\n if (self.autoInstrument.networkRequestHeaders) {\n if (!this.__rollbar_xhr.request_headers) {\n this.__rollbar_xhr.request_headers = {};\n }\n this.__rollbar_xhr.request_headers[header] = value;\n }\n // We want the content type even if request header telemetry is off.\n if (header.toLowerCase() === 'content-type') {\n this.__rollbar_xhr.request_content_type = value;\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'send', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(data) {\n /* eslint-enable no-unused-vars */\n var xhr = this;\n\n function onreadystatechangeHandler() {\n if (xhr.__rollbar_xhr) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n if (self.autoInstrument.networkRequestBody) {\n xhr.__rollbar_xhr.request = data;\n }\n xhr.__rollbar_event = self.captureNetwork(xhr.__rollbar_xhr, 'xhr', undefined);\n }\n if (xhr.readyState < 2) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n }\n if (xhr.readyState > 3) {\n xhr.__rollbar_xhr.end_time_ms = _.now();\n\n var headers = null;\n xhr.__rollbar_xhr.response_content_type = xhr.getResponseHeader('Content-Type');\n if (self.autoInstrument.networkResponseHeaders) {\n var headersConfig = self.autoInstrument.networkResponseHeaders;\n headers = {};\n try {\n var header, i;\n if (headersConfig === true) {\n var allHeaders = xhr.getAllResponseHeaders();\n if (allHeaders) {\n var arr = allHeaders.trim().split(/[\\r\\n]+/);\n var parts, value;\n for (i=0; i < arr.length; i++) {\n parts = arr[i].split(': ');\n header = parts.shift();\n value = parts.join(': ');\n headers[header] = value;\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n header = headersConfig[i];\n headers[header] = xhr.getResponseHeader(header);\n }\n }\n } catch (e) {\n /* we ignore the errors here that could come from different\n * browser issues with the xhr methods */\n }\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n try {\n body = xhr.responseText;\n } catch (e) {\n /* ignore errors from reading responseText */\n }\n }\n var response = null;\n if (body || headers) {\n response = {};\n if (body) {\n if (self.isJsonContentType(xhr.__rollbar_xhr.response_content_type)) {\n response.body = self.scrubJson(body);\n } else {\n response.body = body;\n }\n }\n if (headers) {\n response.headers = headers;\n }\n }\n if (response) {\n xhr.__rollbar_xhr.response = response;\n }\n try {\n var code = xhr.status;\n code = code === 1223 ? 204 : code;\n xhr.__rollbar_xhr.status_code = code;\n xhr.__rollbar_event.level = self.telemeter.levelFromStatus(code);\n self.errorOnHttpStatus(xhr.__rollbar_xhr);\n } catch (e) {\n /* ignore possible exception from xhr.status */\n }\n }\n }\n }\n\n wrapProp('onload', xhr);\n wrapProp('onerror', xhr);\n wrapProp('onprogress', xhr);\n\n if ('onreadystatechange' in xhr && _.isFunction(xhr.onreadystatechange)) {\n replace(xhr, 'onreadystatechange', function(orig) {\n return self.rollbar.wrap(orig, undefined, onreadystatechangeHandler);\n });\n } else {\n xhr.onreadystatechange = onreadystatechangeHandler;\n }\n if (xhr.__rollbar_xhr && self.trackHttpErrors()) {\n xhr.__rollbar_xhr.stack = (new Error()).stack;\n }\n return orig.apply(this, arguments);\n }\n }, this.replacements, 'network');\n }\n\n if ('fetch' in this._window) {\n replace(this._window, 'fetch', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(fn, t) {\n /* eslint-enable no-unused-vars */\n var args = new Array(arguments.length);\n for (var i=0, len=args.length; i < len; i++) {\n args[i] = arguments[i];\n }\n var input = args[0];\n var method = 'GET';\n var url;\n if (_.isType(input, 'string')) {\n url = input;\n } else if (input) {\n url = input.url;\n if (input.method) {\n method = input.method;\n }\n }\n if (args[1] && args[1].method) {\n method = args[1].method;\n }\n var metadata = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n if (args[1] && args[1].headers) {\n // Argument may be a Headers object, or plain object. Ensure here that\n // we are working with a Headers object with case-insensitive keys.\n var reqHeaders = new Headers(args[1].headers);\n\n metadata.request_content_type = reqHeaders.get('Content-Type');\n\n if (self.autoInstrument.networkRequestHeaders) {\n metadata.request_headers = self.fetchHeaders(reqHeaders, self.autoInstrument.networkRequestHeaders)\n }\n }\n\n if (self.autoInstrument.networkRequestBody) {\n if (args[1] && args[1].body) {\n metadata.request = args[1].body;\n } else if (args[0] && !_.isType(args[0], 'string') && args[0].body) {\n metadata.request = args[0].body;\n }\n }\n self.captureNetwork(metadata, 'fetch', undefined);\n if (self.trackHttpErrors()) {\n metadata.stack = (new Error()).stack;\n }\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n metadata.response_content_type = resp.headers.get('Content-Type');\n var headers = null;\n if (self.autoInstrument.networkResponseHeaders) {\n headers = self.fetchHeaders(resp.headers, self.autoInstrument.networkResponseHeaders);\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n if (typeof resp.text === 'function') { // Response.text() is not implemented on some platforms\n // The response must be cloned to prevent reading (and locking) the original stream.\n body = resp.clone().text(); //returns a Promise\n }\n }\n if (headers || body) {\n metadata.response = {};\n if (body) {\n // Test to ensure body is a Promise, which it should always be.\n if (typeof body.then === 'function') {\n body.then(function (text) {\n if (self.isJsonContentType(metadata.response_content_type)) {\n metadata.response.body = self.scrubJson(text);\n }\n });\n } else {\n metadata.response.body = body;\n }\n }\n if (headers) {\n metadata.response.headers = headers;\n }\n }\n self.errorOnHttpStatus(metadata);\n return resp;\n });\n };\n }, this.replacements, 'network');\n }\n};\n\nInstrumenter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID) {\n if (metadata.request && this.isJsonContentType(metadata.request_content_type)) {\n metadata.request = this.scrubJson(metadata.request);\n }\n return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);\n};\n\nInstrumenter.prototype.isJsonContentType = function(contentType) {\n return (contentType && _.isType(contentType, 'string') && contentType.toLowerCase().includes('json')) ? true : false;\n}\n\nInstrumenter.prototype.scrubJson = function(json) {\n return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));\n}\n\nInstrumenter.prototype.fetchHeaders = function(inHeaders, headersConfig) {\n var outHeaders = {};\n try {\n var i;\n if (headersConfig === true) {\n if (typeof inHeaders.entries === 'function') { // Headers.entries() is not implemented in IE\n var allHeaders = inHeaders.entries();\n var currentHeader = allHeaders.next();\n while (!currentHeader.done) {\n outHeaders[currentHeader.value[0]] = currentHeader.value[1];\n currentHeader = allHeaders.next();\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n var header = headersConfig[i];\n outHeaders[header] = inHeaders.get(header);\n }\n }\n } catch (e) {\n /* ignore probable IE errors */\n }\n return outHeaders;\n}\n\nInstrumenter.prototype.trackHttpErrors = function() {\n return this.autoInstrument.networkErrorOnHttp5xx ||\n this.autoInstrument.networkErrorOnHttp4xx ||\n this.autoInstrument.networkErrorOnHttp0;\n}\n\nInstrumenter.prototype.errorOnHttpStatus = function(metadata) {\n var status = metadata.status_code;\n\n if ((status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||\n (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||\n (status === 0 && this.autoInstrument.networkErrorOnHttp0)) {\n var error = new Error('HTTP request failed with Status ' + status);\n error.stack = metadata.stack;\n this.rollbar.error(error, { skipFrames: 1 });\n }\n}\n\nInstrumenter.prototype.deinstrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n var b;\n while (this.replacements['log'].length) {\n b = this.replacements['log'].shift();\n this._window.console[b[0]] = b[1];\n }\n};\n\nInstrumenter.prototype.instrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n\n var self = this;\n var c = this._window.console;\n\n function wrapConsole(method) {\n 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778\n\n var orig = c[method];\n var origConsole = c;\n var level = method === 'warn' ? 'warning' : method;\n c[method] = function() {\n var args = Array.prototype.slice.call(arguments);\n var message = _.formatArgsAsString(args);\n self.telemeter.captureLog(message, level);\n if (orig) {\n Function.prototype.apply.call(orig, origConsole, args);\n }\n };\n self.replacements['log'].push([method, orig]);\n }\n var methods = ['debug','info','warn','error','log'];\n try {\n for (var i=0, len=methods.length; i < len; i++) {\n wrapConsole(methods[i]);\n }\n } catch (e) {\n this.diagnostic.instrumentConsole = { error: e.message };\n }\n};\n\nInstrumenter.prototype.deinstrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n this.removeListeners('dom');\n};\n\nInstrumenter.prototype.instrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n var clickHandler = this.handleClick.bind(this);\n var blurHandler = this.handleBlur.bind(this);\n this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);\n this.addListener('dom', this._window, 'blur', 'onfocusout', blurHandler, true);\n};\n\nInstrumenter.prototype.handleClick = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n var hasTag = e && e.tagName;\n var anchorOrButton = domUtil.isDescribedElement(e, 'a') || domUtil.isDescribedElement(e, 'button');\n if (hasTag && (anchorOrButton || domUtil.isDescribedElement(e, 'input', ['button', 'submit']))) {\n this.captureDomEvent('click', e);\n } else if (domUtil.isDescribedElement(e, 'input', ['checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value, e.checked);\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleBlur = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n if (e && e.tagName) {\n if (domUtil.isDescribedElement(e, 'textarea')) {\n this.captureDomEvent('input', e, e.value);\n } else if (domUtil.isDescribedElement(e, 'select') && e.options && e.options.length) {\n this.handleSelectInputChanged(e);\n } else if (domUtil.isDescribedElement(e, 'input') && !domUtil.isDescribedElement(e, 'input', ['button', 'submit', 'hidden', 'checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value);\n }\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleSelectInputChanged = function(elem) {\n if (elem.multiple) {\n for (var i = 0; i < elem.options.length; i++) {\n if (elem.options[i].selected) {\n this.captureDomEvent('input', elem, elem.options[i].value);\n }\n }\n } else if (elem.selectedIndex >= 0 && elem.options[elem.selectedIndex]) {\n this.captureDomEvent('input', elem, elem.options[elem.selectedIndex].value);\n }\n};\n\nInstrumenter.prototype.captureDomEvent = function(subtype, element, value, isChecked) {\n if (value !== undefined) {\n if (this.scrubTelemetryInputs || (domUtil.getElementType(element) === 'password')) {\n value = '[scrubbed]';\n } else {\n var description = domUtil.describeElement(element);\n if (this.telemetryScrubber) {\n if (this.telemetryScrubber(description)) {\n value = '[scrubbed]';\n }\n } else if (this.defaultValueScrubber(description)) {\n value = '[scrubbed]';\n }\n }\n }\n var elementString = domUtil.elementArrayToString(domUtil.treeToArray(element));\n this.telemeter.captureDom(subtype, elementString, value, isChecked);\n};\n\nInstrumenter.prototype.deinstrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n restore(this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.instrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n var self = this;\n replace(this._window, 'onpopstate', function(orig) {\n return function() {\n var current = self._location.href;\n self.handleUrlChange(self._lastHref, current);\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n }, this.replacements, 'navigation');\n\n replace(this._window.history, 'pushState', function(orig) {\n return function() {\n var url = arguments.length > 2 ? arguments[2] : undefined;\n if (url) {\n self.handleUrlChange(self._lastHref, url + '');\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.handleUrlChange = function(from, to) {\n var parsedHref = urlparser.parse(this._location.href);\n var parsedTo = urlparser.parse(to);\n var parsedFrom = urlparser.parse(from);\n this._lastHref = to;\n if (parsedHref.protocol === parsedTo.protocol && parsedHref.host === parsedTo.host) {\n to = parsedTo.path + (parsedTo.hash || '');\n }\n if (parsedHref.protocol === parsedFrom.protocol && parsedHref.host === parsedFrom.host) {\n from = parsedFrom.path + (parsedFrom.hash || '');\n }\n this.telemeter.captureNavigation(from, to);\n};\n\nInstrumenter.prototype.deinstrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.removeListeners('connectivity');\n } else {\n restore(this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.instrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.addListener('connectivity', this._window, 'online', undefined, function() {\n this.telemeter.captureConnectivityChange('online');\n }.bind(this), true);\n this.addListener('connectivity', this._window, 'offline', undefined, function() {\n this.telemeter.captureConnectivityChange('offline');\n }.bind(this), true);\n } else {\n var self = this;\n replace(this._document.body, 'ononline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('online');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n replace(this._document.body, 'onoffline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('offline');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.handleCspEvent = function(cspEvent) {\n var message = 'Security Policy Violation: ' +\n 'blockedURI: ' + cspEvent.blockedURI + ', ' +\n 'violatedDirective: ' + cspEvent.violatedDirective + ', ' +\n 'effectiveDirective: ' + cspEvent.effectiveDirective + ', ';\n\n if (cspEvent.sourceFile) {\n message += 'location: ' + cspEvent.sourceFile + ', ' +\n 'line: ' + cspEvent.lineNumber + ', ' +\n 'col: ' + cspEvent.columnNumber + ', ';\n }\n\n message += 'originalPolicy: ' + cspEvent.originalPolicy;\n\n this.telemeter.captureLog(message, 'error');\n this.handleCspError(message);\n}\n\nInstrumenter.prototype.handleCspError = function(message) {\n if (this.autoInstrument.errorOnContentSecurityPolicy) {\n this.rollbar.error(message);\n }\n}\n\nInstrumenter.prototype.deinstrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._window)) { return; }\n\n this.removeListeners('contentsecuritypolicy');\n};\n\nInstrumenter.prototype.instrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._window)) { return; }\n\n var cspHandler = this.handleCspEvent.bind(this);\n this.addListener('contentsecuritypolicy', this._window, 'securitypolicyviolation', null, cspHandler, false);\n};\n\nInstrumenter.prototype.addListener = function(section, obj, type, altType, handler, capture) {\n if (obj.addEventListener) {\n obj.addEventListener(type, handler, capture);\n this.eventRemovers[section].push(function() {\n obj.removeEventListener(type, handler, capture);\n });\n } else if (altType) {\n obj.attachEvent(altType, handler);\n this.eventRemovers[section].push(function() {\n obj.detachEvent(altType, handler);\n });\n }\n};\n\nInstrumenter.prototype.removeListeners = function(section) {\n var r;\n while (this.eventRemovers[section].length) {\n r = this.eventRemovers[section].shift();\n r();\n }\n};\n\nmodule.exports = Instrumenter;\n","'use strict';\n\nfunction getElementType(e) {\n return (e.getAttribute('type') || '').toLowerCase();\n}\n\nfunction isDescribedElement(element, type, subtypes) {\n if (element.tagName.toLowerCase() !== type.toLowerCase()) {\n return false;\n }\n if (!subtypes) {\n return true;\n }\n element = getElementType(element);\n for (var i = 0; i < subtypes.length; i++) {\n if (subtypes[i] === element) {\n return true;\n }\n }\n return false;\n}\n\nfunction getElementFromEvent(evt, doc) {\n if (evt.target) {\n return evt.target;\n }\n if (doc && doc.elementFromPoint) {\n return doc.elementFromPoint(evt.clientX, evt.clientY);\n }\n return undefined;\n}\n\nfunction treeToArray(elem) {\n var MAX_HEIGHT = 5;\n var out = [];\n var nextDescription;\n for (var height = 0; elem && height < MAX_HEIGHT; height++) {\n nextDescription = describeElement(elem);\n if (nextDescription.tagName === 'html') {\n break;\n }\n out.unshift(nextDescription);\n elem = elem.parentNode;\n }\n return out;\n}\n\nfunction elementArrayToString(a) {\n var MAX_LENGTH = 80;\n var separator = ' > ', separatorLength = separator.length;\n var out = [], len = 0, nextStr, totalLength;\n\n for (var i = a.length - 1; i >= 0; i--) {\n nextStr = descriptionToString(a[i]);\n totalLength = len + (out.length * separatorLength) + nextStr.length;\n if (i < a.length - 1 && totalLength >= MAX_LENGTH + 3) {\n out.unshift('...');\n break;\n }\n out.unshift(nextStr);\n len += nextStr.length;\n }\n return out.join(separator);\n}\n\nfunction descriptionToString(desc) {\n if (!desc || !desc.tagName) {\n return '';\n }\n var out = [desc.tagName];\n if (desc.id) {\n out.push('#' + desc.id);\n }\n if (desc.classes) {\n out.push('.' + desc.classes.join('.'));\n }\n for (var i = 0; i < desc.attributes.length; i++) {\n out.push('[' + desc.attributes[i].key + '=\"' + desc.attributes[i].value + '\"]');\n }\n\n return out.join('');\n}\n\n/**\n * Input: a dom element\n * Output: null if tagName is falsey or input is falsey, else\n * {\n * tagName: String,\n * id: String | undefined,\n * classes: [String] | undefined,\n * attributes: [\n * {\n * key: OneOf(type, name, title, alt),\n * value: String\n * }\n * ]\n * }\n */\nfunction describeElement(elem) {\n if (!elem || !elem.tagName) {\n return null;\n }\n var out = {}, className, key, attr, i;\n out.tagName = elem.tagName.toLowerCase();\n if (elem.id) {\n out.id = elem.id;\n }\n className = elem.className;\n if (className && (typeof className === 'string')) {\n out.classes = className.split(/\\s+/);\n }\n var attributes = ['type', 'name', 'title', 'alt'];\n out.attributes = [];\n for (i = 0; i < attributes.length; i++) {\n key = attributes[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.attributes.push({key: key, value: attr});\n }\n }\n return out;\n}\n\nmodule.exports = {\n describeElement: describeElement,\n descriptionToString: descriptionToString,\n elementArrayToString: elementArrayToString,\n treeToArray: treeToArray,\n getElementFromEvent: getElementFromEvent,\n isDescribedElement: isDescribedElement,\n getElementType: getElementType\n};\n","'use strict';\n\nvar polyfillJSON = require('../../vendor/JSON-js/json3');\n\nmodule.exports = polyfillJSON;\n","// json3.js\n// 2017-02-21\n// Public Domain.\n// NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.\n// See http://www.JSON.org/js.html\n// This code should be minified before deployment.\n// See http://javascript.crockford.com/jsmin.html\n\n// USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO\n// NOT CONTROL.\n\n// This file creates a global JSON object containing two methods: stringify\n// and parse. This file provides the ES5 JSON capability to ES3 systems.\n// If a project might run on IE8 or earlier, then this file should be included.\n// This file does nothing on ES5 systems.\n\n// JSON.stringify(value, replacer, space)\n// value any JavaScript value, usually an object or array.\n// replacer an optional parameter that determines how object\n// values are stringified for objects. It can be a\n// function or an array of strings.\n// space an optional parameter that specifies the indentation\n// of nested structures. If it is omitted, the text will\n// be packed without extra whitespace. If it is a number,\n// it will specify the number of spaces to indent at each\n// level. If it is a string (such as \"\\t\" or \" \"),\n// it contains the characters used to indent at each level.\n// This method produces a JSON text from a JavaScript value.\n// When an object value is found, if the object contains a toJSON\n// method, its toJSON method will be called and the result will be\n// stringified. A toJSON method does not serialize: it returns the\n// value represented by the name/value pair that should be serialized,\n// or undefined if nothing should be serialized. The toJSON method\n// will be passed the key associated with the value, and this will be\n// bound to the value.\n\n// For example, this would serialize Dates as ISO strings.\n\n// Date.prototype.toJSON = function (key) {\n// function f(n) {\n// // Format integers to have at least two digits.\n// return (n < 10)\n// ? \"0\" + n\n// : n;\n// }\n// return this.getUTCFullYear() + \"-\" +\n// f(this.getUTCMonth() + 1) + \"-\" +\n// f(this.getUTCDate()) + \"T\" +\n// f(this.getUTCHours()) + \":\" +\n// f(this.getUTCMinutes()) + \":\" +\n// f(this.getUTCSeconds()) + \"Z\";\n// };\n\n// You can provide an optional replacer method. It will be passed the\n// key and value of each member, with this bound to the containing\n// object. The value that is returned from your method will be\n// serialized. If your method returns undefined, then the member will\n// be excluded from the serialization.\n\n// If the replacer parameter is an array of strings, then it will be\n// used to select the members to be serialized. It filters the results\n// such that only members with keys listed in the replacer array are\n// stringified.\n\n// Values that do not have JSON representations, such as undefined or\n// functions, will not be serialized. Such values in objects will be\n// dropped; in arrays they will be replaced with null. You can use\n// a replacer function to replace those with JSON values.\n\n// JSON.stringify(undefined) returns undefined.\n\n// The optional space parameter produces a stringification of the\n// value that is filled with line breaks and indentation to make it\n// easier to read.\n\n// If the space parameter is a non-empty string, then that string will\n// be used for indentation. If the space parameter is a number, then\n// the indentation will be that many spaces.\n\n// Example:\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}]);\n// // text is '[\"e\",{\"pluribus\":\"unum\"}]'\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}], null, \"\\t\");\n// // text is '[\\n\\t\"e\",\\n\\t{\\n\\t\\t\"pluribus\": \"unum\"\\n\\t}\\n]'\n\n// text = JSON.stringify([new Date()], function (key, value) {\n// return this[key] instanceof Date\n// ? \"Date(\" + this[key] + \")\"\n// : value;\n// });\n// // text is '[\"Date(---current time---)\"]'\n\n// JSON.parse(text, reviver)\n// This method parses a JSON text to produce an object or array.\n// It can throw a SyntaxError exception.\n// This has been modified to use JSON-js/json_parse_state.js as the\n// parser instead of the one built around eval found in JSON-js/json2.js\n\n// The optional reviver parameter is a function that can filter and\n// transform the results. It receives each of the keys and values,\n// and its return value is used instead of the original value.\n// If it returns what it received, then the structure is not modified.\n// If it returns undefined then the member is deleted.\n\n// Example:\n\n// // Parse the text. Values that look like ISO date strings will\n// // be converted to Date objects.\n\n// myData = JSON.parse(text, function (key, value) {\n// var a;\n// if (typeof value === \"string\") {\n// a =\n// /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2}(?:\\.\\d*)?)Z$/.exec(value);\n// if (a) {\n// return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],\n// +a[5], +a[6]));\n// }\n// }\n// return value;\n// });\n\n// myData = JSON.parse('[\"Date(09/09/2001)\"]', function (key, value) {\n// var d;\n// if (typeof value === \"string\" &&\n// value.slice(0, 5) === \"Date(\" &&\n// value.slice(-1) === \")\") {\n// d = new Date(value.slice(5, -1));\n// if (d) {\n// return d;\n// }\n// }\n// return value;\n// });\n\n// This is a reference implementation. You are free to copy, modify, or\n// redistribute.\n\n/*jslint\n for, this\n */\n\n/*property\n JSON, apply, call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,\n getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,\n lastIndex, length, parse, prototype, push, replace, slice, stringify,\n test, toJSON, toString, valueOf\n */\n\nvar setupCustomJSON = function(JSON) {\n\n var rx_one = /^[\\],:{}\\s]*$/;\n var rx_two = /\\\\(?:[\"\\\\\\/bfnrt]|u[0-9a-fA-F]{4})/g;\n var rx_three = /\"[^\"\\\\\\n\\r]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g;\n var rx_four = /(?:^|:|,)(?:\\s*\\[)+/g;\n var rx_escapable = /[\\\\\"\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n var rx_dangerous = /[\\u0000\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n\n function f(n) {\n // Format integers to have at least two digits.\n return n < 10\n ? \"0\" + n\n : n;\n }\n\n function this_value() {\n return this.valueOf();\n }\n\n if (typeof Date.prototype.toJSON !== \"function\") {\n\n Date.prototype.toJSON = function () {\n\n return isFinite(this.valueOf())\n ? this.getUTCFullYear() + \"-\" +\n f(this.getUTCMonth() + 1) + \"-\" +\n f(this.getUTCDate()) + \"T\" +\n f(this.getUTCHours()) + \":\" +\n f(this.getUTCMinutes()) + \":\" +\n f(this.getUTCSeconds()) + \"Z\"\n : null;\n };\n\n Boolean.prototype.toJSON = this_value;\n Number.prototype.toJSON = this_value;\n String.prototype.toJSON = this_value;\n }\n\n var gap;\n var indent;\n var meta;\n var rep;\n\n\n function quote(string) {\n\n // If the string contains no control characters, no quote characters, and no\n // backslash characters, then we can safely slap some quotes around it.\n // Otherwise we must also replace the offending characters with safe escape\n // sequences.\n\n rx_escapable.lastIndex = 0;\n return rx_escapable.test(string)\n ? \"\\\"\" + string.replace(rx_escapable, function (a) {\n var c = meta[a];\n return typeof c === \"string\"\n ? c\n : \"\\\\u\" + (\"0000\" + a.charCodeAt(0).toString(16)).slice(-4);\n }) + \"\\\"\"\n : \"\\\"\" + string + \"\\\"\";\n }\n\n\n function str(key, holder) {\n\n // Produce a string from holder[key].\n\n var i; // The loop counter.\n var k; // The member key.\n var v; // The member value.\n var length;\n var mind = gap;\n var partial;\n var value = holder[key];\n\n // If the value has a toJSON method, call it to obtain a replacement value.\n\n if (value && typeof value === \"object\" &&\n typeof value.toJSON === \"function\") {\n value = value.toJSON(key);\n }\n\n // If we were called with a replacer function, then call the replacer to\n // obtain a replacement value.\n\n if (typeof rep === \"function\") {\n value = rep.call(holder, key, value);\n }\n\n // What happens next depends on the value's type.\n\n switch (typeof value) {\n case \"string\":\n return quote(value);\n\n case \"number\":\n\n // JSON numbers must be finite. Encode non-finite numbers as null.\n\n return isFinite(value)\n ? String(value)\n : \"null\";\n\n case \"boolean\":\n case \"null\":\n\n // If the value is a boolean or null, convert it to a string. Note:\n // typeof null does not produce \"null\". The case is included here in\n // the remote chance that this gets fixed someday.\n\n return String(value);\n\n // If the type is \"object\", we might be dealing with an object or an array or\n // null.\n\n case \"object\":\n\n // Due to a specification blunder in ECMAScript, typeof null is \"object\",\n // so watch out for that case.\n\n if (!value) {\n return \"null\";\n }\n\n // Make an array to hold the partial results of stringifying this object value.\n\n gap += indent;\n partial = [];\n\n // Is the value an array?\n\n if (Object.prototype.toString.apply(value) === \"[object Array]\") {\n\n // The value is an array. Stringify every element. Use null as a placeholder\n // for non-JSON values.\n\n length = value.length;\n for (i = 0; i < length; i += 1) {\n partial[i] = str(i, value) || \"null\";\n }\n\n // Join all of the elements together, separated with commas, and wrap them in\n // brackets.\n\n v = partial.length === 0\n ? \"[]\"\n : gap\n ? \"[\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"]\"\n : \"[\" + partial.join(\",\") + \"]\";\n gap = mind;\n return v;\n }\n\n // If the replacer is an array, use it to select the members to be stringified.\n\n if (rep && typeof rep === \"object\") {\n length = rep.length;\n for (i = 0; i < length; i += 1) {\n if (typeof rep[i] === \"string\") {\n k = rep[i];\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n } else {\n\n // Otherwise, iterate through all of the keys in the object.\n\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(value, k)) {\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n }\n\n // Join all of the member texts together, separated with commas,\n // and wrap them in braces.\n\n v = partial.length === 0\n ? \"{}\"\n : gap\n ? \"{\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"}\"\n : \"{\" + partial.join(\",\") + \"}\";\n gap = mind;\n return v;\n }\n }\n\n // If the JSON object does not yet have a stringify method, give it one.\n\n if (typeof JSON.stringify !== \"function\") {\n meta = { // table of character substitutions\n \"\\b\": \"\\\\b\",\n \"\\t\": \"\\\\t\",\n \"\\n\": \"\\\\n\",\n \"\\f\": \"\\\\f\",\n \"\\r\": \"\\\\r\",\n \"\\\"\": \"\\\\\\\"\",\n \"\\\\\": \"\\\\\\\\\"\n };\n JSON.stringify = function (value, replacer, space) {\n\n // The stringify method takes a value and an optional replacer, and an optional\n // space parameter, and returns a JSON text. The replacer can be a function\n // that can replace values, or an array of strings that will select the keys.\n // A default replacer method can be provided. Use of the space parameter can\n // produce text that is more easily readable.\n\n var i;\n gap = \"\";\n indent = \"\";\n\n // If the space parameter is a number, make an indent string containing that\n // many spaces.\n\n if (typeof space === \"number\") {\n for (i = 0; i < space; i += 1) {\n indent += \" \";\n }\n\n // If the space parameter is a string, it will be used as the indent string.\n\n } else if (typeof space === \"string\") {\n indent = space;\n }\n\n // If there is a replacer, it must be a function or an array.\n // Otherwise, throw an error.\n\n rep = replacer;\n if (replacer && typeof replacer !== \"function\" &&\n (typeof replacer !== \"object\" ||\n typeof replacer.length !== \"number\")) {\n throw new Error(\"JSON.stringify\");\n }\n\n // Make a fake root object containing our value under the key of \"\".\n // Return the result of stringifying the value.\n\n return str(\"\", {\"\": value});\n };\n }\n\n\n // If the JSON object does not yet have a parse method, give it one.\n\n if (typeof JSON.parse !== \"function\") {\n JSON.parse = (function () {\n\n // This function creates a JSON parse function that uses a state machine rather\n // than the dangerous eval function to parse a JSON text.\n\n var state; // The state of the parser, one of\n // 'go' The starting state\n // 'ok' The final, accepting state\n // 'firstokey' Ready for the first key of the object or\n // the closing of an empty object\n // 'okey' Ready for the next key of the object\n // 'colon' Ready for the colon\n // 'ovalue' Ready for the value half of a key/value pair\n // 'ocomma' Ready for a comma or closing }\n // 'firstavalue' Ready for the first value of an array or\n // an empty array\n // 'avalue' Ready for the next value of an array\n // 'acomma' Ready for a comma or closing ]\n var stack; // The stack, for controlling nesting.\n var container; // The current container object or array\n var key; // The current key\n var value; // The current value\n var escapes = { // Escapement translation table\n \"\\\\\": \"\\\\\",\n \"\\\"\": \"\\\"\",\n \"/\": \"/\",\n \"t\": \"\\t\",\n \"n\": \"\\n\",\n \"r\": \"\\r\",\n \"f\": \"\\f\",\n \"b\": \"\\b\"\n };\n var string = { // The actions for string tokens\n go: function () {\n state = \"ok\";\n },\n firstokey: function () {\n key = value;\n state = \"colon\";\n },\n okey: function () {\n key = value;\n state = \"colon\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var number = { // The actions for number tokens\n go: function () {\n state = \"ok\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var action = {\n\n // The action table describes the behavior of the machine. It contains an\n // object for each token. Each object contains a method that is called when\n // a token is matched in a state. An object will lack a method for illegal\n // states.\n\n \"{\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = {};\n state = \"firstokey\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = {};\n state = \"firstokey\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n }\n },\n \"}\": {\n firstokey: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n ocomma: function () {\n var pop = stack.pop();\n container[key] = value;\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \"[\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = [];\n state = \"firstavalue\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = [];\n state = \"firstavalue\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n }\n },\n \"]\": {\n firstavalue: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n acomma: function () {\n var pop = stack.pop();\n container.push(value);\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \":\": {\n colon: function () {\n if (Object.hasOwnProperty.call(container, key)) {\n throw new SyntaxError(\"Duplicate key '\" + key + \"\\\"\");\n }\n state = \"ovalue\";\n }\n },\n \",\": {\n ocomma: function () {\n container[key] = value;\n state = \"okey\";\n },\n acomma: function () {\n container.push(value);\n state = \"avalue\";\n }\n },\n \"true\": {\n go: function () {\n value = true;\n state = \"ok\";\n },\n ovalue: function () {\n value = true;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = true;\n state = \"acomma\";\n },\n avalue: function () {\n value = true;\n state = \"acomma\";\n }\n },\n \"false\": {\n go: function () {\n value = false;\n state = \"ok\";\n },\n ovalue: function () {\n value = false;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = false;\n state = \"acomma\";\n },\n avalue: function () {\n value = false;\n state = \"acomma\";\n }\n },\n \"null\": {\n go: function () {\n value = null;\n state = \"ok\";\n },\n ovalue: function () {\n value = null;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = null;\n state = \"acomma\";\n },\n avalue: function () {\n value = null;\n state = \"acomma\";\n }\n }\n };\n\n function debackslashify(text) {\n\n // Remove and replace any backslash escapement.\n\n return text.replace(/\\\\(?:u(.{4})|([^u]))/g, function (ignore, b, c) {\n return b\n ? String.fromCharCode(parseInt(b, 16))\n : escapes[c];\n });\n }\n\n return function (source, reviver) {\n\n // A regular expression is used to extract tokens from the JSON text.\n // The extraction process is cautious.\n\n var result;\n var tx = /^[\\u0020\\t\\n\\r]*(?:([,:\\[\\]{}]|true|false|null)|(-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?)|\"((?:[^\\r\\n\\t\\\\\\\"]|\\\\(?:[\"\\\\\\/trnfb]|u[0-9a-fA-F]{4}))*)\")/;\n\n // Set the starting state.\n\n state = \"go\";\n\n // The stack records the container, key, and state for each object or array\n // that contains another object or array while processing nested structures.\n\n stack = [];\n\n // If any error occurs, we will catch it and ultimately throw a syntax error.\n\n try {\n\n // For each token...\n\n while (true) {\n result = tx.exec(source);\n if (!result) {\n break;\n }\n\n // result is the result array from matching the tokenizing regular expression.\n // result[0] contains everything that matched, including any initial whitespace.\n // result[1] contains any punctuation that was matched, or true, false, or null.\n // result[2] contains a matched number, still in string form.\n // result[3] contains a matched string, without quotes but with escapement.\n\n if (result[1]) {\n\n // Token: Execute the action for this state and token.\n\n action[result[1]][state]();\n\n } else if (result[2]) {\n\n // Number token: Convert the number string into a number value and execute\n // the action for this state and number.\n\n value = +result[2];\n number[state]();\n } else {\n\n // String token: Replace the escapement sequences and execute the action for\n // this state and string.\n\n value = debackslashify(result[3]);\n string[state]();\n }\n\n // Remove the token from the string. The loop will continue as long as there\n // are tokens. This is a slow process, but it allows the use of ^ matching,\n // which assures that no illegal tokens slip through.\n\n source = source.slice(result[0].length);\n }\n\n // If we find a state/token combination that is illegal, then the action will\n // cause an error. We handle the error by simply changing the state.\n\n } catch (e) {\n state = e;\n }\n\n // The parsing is finished. If we are not in the final \"ok\" state, or if the\n // remaining source contains anything except whitespace, then we did not have\n //a well-formed JSON text.\n\n if (state !== \"ok\" || (/[^\\u0020\\t\\n\\r]/.test(source))) {\n throw (state instanceof SyntaxError)\n ? state\n : new SyntaxError(\"JSON\");\n }\n\n // If there is a reviver function, we recursively walk the new structure,\n // passing each name/value pair to the reviver function for possible\n // transformation, starting with a temporary root object that holds the current\n // value in an empty key. If there is not a reviver function, we simply return\n // that value.\n\n return (typeof reviver === \"function\")\n ? (function walk(holder, key) {\n var k;\n var v;\n var val = holder[key];\n if (val && typeof val === \"object\") {\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(val, k)) {\n v = walk(val, k);\n if (v !== undefined) {\n val[k] = v;\n } else {\n delete val[k];\n }\n }\n }\n }\n return reviver.call(holder, key, val);\n }({\"\": value}, \"\"))\n : value;\n };\n }());\n }\n}\n\nmodule.exports = setupCustomJSON;\n","'use strict';\n\nfunction wrapGlobals(window, handler, shim) {\n if (!window) { return; }\n // Adapted from https://github.com/bugsnag/bugsnag-js\n var globals = 'EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload'.split(',');\n var i, global;\n for (i = 0; i < globals.length; ++i) {\n global = globals[i];\n\n if (window[global] && window[global].prototype) {\n _extendListenerPrototype(handler, window[global].prototype, shim);\n }\n }\n}\n\nfunction _extendListenerPrototype(handler, prototype, shim) {\n if (prototype.hasOwnProperty && prototype.hasOwnProperty('addEventListener')) {\n var oldAddEventListener = prototype.addEventListener;\n while (oldAddEventListener._rollbarOldAdd && oldAddEventListener.belongsToShim) {\n oldAddEventListener = oldAddEventListener._rollbarOldAdd;\n }\n var addFn = function(event, callback, bubble) {\n oldAddEventListener.call(this, event, handler.wrap(callback), bubble);\n };\n addFn._rollbarOldAdd = oldAddEventListener;\n addFn.belongsToShim = shim;\n prototype.addEventListener = addFn;\n\n var oldRemoveEventListener = prototype.removeEventListener;\n while (oldRemoveEventListener._rollbarOldRemove && oldRemoveEventListener.belongsToShim) {\n oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;\n }\n var removeFn = function(event, callback, bubble) {\n oldRemoveEventListener.call(this, event, callback && callback._rollbar_wrapped || callback, bubble);\n };\n removeFn._rollbarOldRemove = oldRemoveEventListener;\n removeFn.belongsToShim = shim;\n prototype.removeEventListener = removeFn;\n }\n}\n\nmodule.exports = wrapGlobals;\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction raw(payload, jsonBackup) {\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction selectFrames(frames, range) {\n var len = frames.length;\n if (len > range * 2) {\n return frames.slice(0, range).concat(frames.slice(len - range));\n }\n return frames;\n}\n\nfunction truncateFrames(payload, jsonBackup, range) {\n range = (typeof range === 'undefined') ? 30 : range;\n var body = payload.data.body;\n var frames;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n frames = chain[i].frames;\n frames = selectFrames(frames, range);\n chain[i].frames = frames;\n }\n } else if (body.trace) {\n frames = body.trace.frames;\n frames = selectFrames(frames, range);\n body.trace.frames = frames;\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction maybeTruncateValue(len, val) {\n if (!val) {\n return val;\n }\n if (val.length > len) {\n return val.slice(0, len - 3).concat('...');\n }\n return val;\n}\n\nfunction truncateStrings(len, payload, jsonBackup) {\n function truncator(k, v, seen) {\n switch (_.typeName(v)) {\n case 'string':\n return maybeTruncateValue(len, v);\n case 'object':\n case 'array':\n return traverse(v, truncator, seen);\n default:\n return v;\n }\n }\n payload = traverse(payload, truncator);\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction truncateTraceData(traceData) {\n if (traceData.exception) {\n delete traceData.exception.description;\n traceData.exception.message = maybeTruncateValue(255, traceData.exception.message);\n }\n traceData.frames = selectFrames(traceData.frames, 1);\n return traceData;\n}\n\nfunction minBody(payload, jsonBackup) {\n var body = payload.data.body;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n chain[i] = truncateTraceData(chain[i]);\n }\n } else if (body.trace) {\n body.trace = truncateTraceData(body.trace);\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction needsTruncation(payload, maxSize) {\n return _.maxByteSize(payload) > maxSize;\n}\n\nfunction truncate(payload, jsonBackup, maxSize) {\n maxSize = (typeof maxSize === 'undefined') ? (512 * 1024) : maxSize;\n var strategies = [\n raw,\n truncateFrames,\n truncateStrings.bind(null, 1024),\n truncateStrings.bind(null, 512),\n truncateStrings.bind(null, 256),\n minBody\n ];\n var strategy, results, result;\n\n while ((strategy = strategies.shift())) {\n results = strategy(payload, jsonBackup);\n payload = results[0];\n result = results[1];\n if (result.error || !needsTruncation(result.value, maxSize)) {\n return result;\n }\n }\n return result;\n}\n\nmodule.exports = {\n truncate: truncate,\n\n /* for testing */\n raw: raw,\n truncateFrames: truncateFrames,\n truncateStrings: truncateStrings,\n maybeTruncateValue: maybeTruncateValue\n};\n"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/rollbar.named-amd.min.js b/dist/rollbar.named-amd.min.js index b437c0a8c..39b98a31c 100644 --- a/dist/rollbar.named-amd.min.js +++ b/dist/rollbar.named-amd.min.js @@ -1,2 +1,2 @@ -define("rollbar",[],(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=6)}([function(t,e,r){"use strict";var n=r(12),o={};function i(t,e){return e===s(t)}function s(t){var e=typeof t;return"object"!==e?e:t?t instanceof Error?"error":{}.toString.call(t).match(/\s([a-zA-Z]+)/)[1].toLowerCase():"null"}function a(t){return i(t,"function")}function u(t){var e=Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?"),r=RegExp("^"+e+"$");return c(t)&&r.test(t)}function c(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function l(){var t=v();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var r=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?r:7&r|8).toString(16)}))}var p={strictMode:!1,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};function f(t,e){var r,n;try{r=o.stringify(t)}catch(o){if(e&&a(e))try{r=e(t)}catch(t){n=t}else n=o}return{error:n,value:r}}function h(t,e){return function(r,n){try{e(r,n)}catch(e){t.error(e)}}}var d=["log","network","dom","navigation","error","manual"],m=["critical","error","warning","info","debug"];function g(t,e){for(var r=0;ra)?(s=e.path,e.path=s.substring(0,a)+i+"&"+s.substring(a+1)):-1!==u?(s=e.path,e.path=s.substring(0,u)+i+s.substring(u)):e.path=e.path+i},createItem:function(t,e,r,o,i){for(var a,u,c,p,f,d,m=[],g=[],y=0,b=t.length;y0&&((c=n(c)).extraArgs=m);var k={message:a,err:u,custom:c,timestamp:v(),callback:p,notifier:r,diagnostic:{},uuid:l()};return function(t,e){e&&void 0!==e.level&&(t.level=e.level,delete e.level);e&&void 0!==e.skipFrames&&(t.skipFrames=e.skipFrames,delete e.skipFrames)}(k,c),o&&f&&(k.request=f),i&&(k.lambdaContext=i),k._originalArgs=t,k.diagnostic.original_arg_types=g,k},addErrorContext:function(t,e){var r=t.data.custom||{},o=!1;try{for(var i=0;i2){var o=n.slice(0,3),i=o[2].indexOf("/");-1!==i&&(o[2]=o[2].substring(0,i));r=o.concat("0000:0000:0000:0000:0000").join(":")}}else r=null}catch(t){r=null}else r=null;t.user_ip=r}},formatArgsAsString:function(t){var e,r,n,o=[];for(e=0,r=t.length;e500&&(n=n.substr(0,497)+"...");break;case"null":n="null";break;case"undefined":n="undefined";break;case"symbol":n=n.toString()}o.push(n)}return o.join(" ")},formatUrl:function(t,e){if(!(e=e||t.protocol)&&t.port&&(80===t.port?e="http:":443===t.port&&(e="https:")),e=e||"https:",!t.hostname)return null;var r=e+"//"+t.hostname;return t.port&&(r=r+":"+t.port),t.path&&(r+=t.path),r},get:function(t,e){if(t){var r=e.split("."),n=t;try{for(var o=0,i=r.length;o=1&&r>e}function s(t,e,r,n,o,i,s){var a=null;return r&&(r=new Error(r)),r||n||(a=function(t,e,r,n,o){var i,s=e.environment||e.payload&&e.payload.environment;i=o?"item per minute limit reached, ignoring errors until timeout":"maxItems has been hit, ignoring errors until reset.";var a={body:{message:{body:i,extra:{maxItems:r,itemsPerMinute:n}}},language:"javascript",environment:s,notifier:{version:e.notifier&&e.notifier.version||e.version}};"browser"===t?(a.platform="browser",a.framework="browser-js",a.notifier.name="rollbar-browser-js"):"server"===t?(a.framework=e.framework||"node-js",a.notifier.name=e.notifier.name):"react-native"===t&&(a.framework=e.framework||"react-native",a.notifier.name=e.notifier.name);return a}(t,e,o,i,s)),{error:r,shouldSend:n,payload:a}}o.globalSettings={startTime:n.now(),maxItems:void 0,itemsPerMinute:void 0},o.prototype.configureGlobal=function(t){void 0!==t.startTime&&(o.globalSettings.startTime=t.startTime),void 0!==t.maxItems&&(o.globalSettings.maxItems=t.maxItems),void 0!==t.itemsPerMinute&&(o.globalSettings.itemsPerMinute=t.itemsPerMinute)},o.prototype.shouldSend=function(t,e){var r=(e=e||n.now())-this.startTime;(r<0||r>=6e4)&&(this.startTime=e,this.perMinCounter=0);var a=o.globalSettings.maxItems,u=o.globalSettings.itemsPerMinute;if(i(t,a,this.counter))return s(this.platform,this.platformOptions,a+" max items reached",!1);if(i(t,u,this.perMinCounter))return s(this.platform,this.platformOptions,u+" items per minute reached",!1);this.counter++,this.perMinCounter++;var c=!i(t,a,this.counter),l=c;return c=c&&!i(t,u,this.perMinCounter),s(this.platform,this.platformOptions,null,c,a,u,l)},o.prototype.setPlatformOptions=function(t,e){this.platform=t,this.platformOptions=e},t.exports=o},function(t,e,r){"use strict";var n=Object.prototype.hasOwnProperty,o=Object.prototype.toString,i=function(t){if(!t||"[object Object]"!==o.call(t))return!1;var e,r=n.call(t,"constructor"),i=t.constructor&&t.constructor.prototype&&n.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!r&&!i)return!1;for(e in t);return void 0===e||n.call(t,e)};t.exports=function t(){var e,r,n,o,s,a={},u=null,c=arguments.length;for(e=0;ethis.options.maxRetries&&(o=!1))}o?this._retryApiRequest(e,r):r(t)},o.prototype._retryApiRequest=function(t,e){this.retryQueue.push({item:t,callback:e}),this.retryHandle||(this.retryHandle=setInterval(function(){for(;this.retryQueue.length;){var t=this.retryQueue.shift();this._makeApiRequest(t.item,t.callback)}}.bind(this),this.options.retryInterval))},o.prototype._dequeuePendingRequest=function(t){var e=this.pendingRequests.indexOf(t);-1!==e&&(this.pendingRequests.splice(e,1),this._maybeCallWait())},o.prototype._maybeLog=function(t,e){if(this.logger&&this.options.verbose){var r=e;if(r=(r=r||n.get(t,"body.trace.exception.message"))||n.get(t,"body.trace_chain.0.exception.message"))return void this.logger.error(r);(r=n.get(t,"body.message.body"))&&this.logger.log(r)}},o.prototype._maybeCallWait=function(){return!(!n.isFunction(this.waitCallback)||0!==this.pendingItems.length||0!==this.pendingRequests.length)&&(this.waitIntervalID&&(this.waitIntervalID=clearInterval(this.waitIntervalID)),this.waitCallback(),!0)},t.exports=o},function(t,e,r){"use strict";var n=r(0);function o(t,e){this.queue=t,this.options=e,this.transforms=[],this.diagnostic={}}o.prototype.configure=function(t){this.queue&&this.queue.configure(t);var e=this.options;return this.options=n.merge(e,t),this},o.prototype.addTransform=function(t){return n.isFunction(t)&&this.transforms.push(t),this},o.prototype.log=function(t,e){if(e&&n.isFunction(e)||(e=function(){}),!this.options.enabled)return e(new Error("Rollbar is not enabled"));this.queue.addPendingItem(t);var r=t.err;this._applyTransforms(t,function(n,o){if(n)return this.queue.removePendingItem(t),e(n,null);this.queue.addItem(o,e,r,t)}.bind(this))},o.prototype._applyTransforms=function(t,e){var r=-1,n=this.transforms.length,o=this.transforms,i=this.options,s=function(t,a){t?e(t,null):++r!==n?o[r](a,i,s):e(null,a)};s(null,t)},t.exports=o},function(t,e,r){"use strict";var n=r(0),o=r(16),i={hostname:"api.rollbar.com",path:"/api/1/item/",search:null,version:"1",protocol:"https:",port:443};function s(t,e,r,n,o){this.options=t,this.transport=e,this.url=r,this.truncation=n,this.jsonBackup=o,this.accessToken=t.accessToken,this.transportOptions=a(t,r)}function a(t,e){return o.getTransportFromOptions(t,i,e)}s.prototype.postItem=function(t,e){var r=o.transportOptions(this.transportOptions,"POST"),n=o.buildPayload(this.accessToken,t,this.jsonBackup);this.transport.post(this.accessToken,r,n,e)},s.prototype.buildJsonPayload=function(t,e){var r,i=o.buildPayload(this.accessToken,t,this.jsonBackup);return(r=this.truncation?this.truncation.truncate(i):n.stringify(i)).error?(e&&e(r.error),null):r.value},s.prototype.postJsonPayload=function(t,e){var r=o.transportOptions(this.transportOptions,"POST");this.transport.postJsonPayload(this.accessToken,r,t,e)},s.prototype.configure=function(t){var e=this.oldOptions;return this.options=n.merge(e,t),this.transportOptions=a(this.options,this.url),void 0!==this.options.accessToken&&(this.accessToken=this.options.accessToken),this},t.exports=s},function(t,e,r){"use strict";var n=r(0);t.exports={buildPayload:function(t,e,r){if(!n.isType(e.context,"string")){var o=n.stringify(e.context,r);o.error?e.context="Error: could not serialize 'context'":e.context=o.value||"",e.context.length>255&&(e.context=e.context.substr(0,255))}return{access_token:t,data:e}},getTransportFromOptions:function(t,e,r){var n=e.hostname,o=e.protocol,i=e.port,s=e.path,a=e.search,u=t.timeout,c=t.proxy;if(t.endpoint){var l=r.parse(t.endpoint);n=l.hostname,o=l.protocol,i=l.port,s=l.pathname,a=l.search}return{timeout:u,hostname:n,protocol:o,port:i,path:s,search:a,proxy:c}},transportOptions:function(t,e){var r=t.protocol||"https:",n=t.port||("http:"===r?80:"https:"===r?443:void 0),o=t.hostname,i=t.path,s=t.timeout;return t.search&&(i+=t.search),t.proxy&&(i=r+"//"+o+i,o=t.proxy.host||t.proxy.hostname,n=t.proxy.port,r=t.proxy.protocol||r),{timeout:s,protocol:r,hostname:o,path:i,port:n,method:e}},appendPathToPath:function(t,e){var r=/\/$/.test(t),n=/^\//.test(e);return r&&n?e=e.substring(1):r||n||(e="/"+e),t+e}}},function(t,e){!function(t){"use strict";t.console||(t.console={});for(var e,r,n=t.console,o=function(){},i=["memory"],s="assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(",");e=i.pop();)n[e]||(n[e]={});for(;r=s.pop();)n[r]||(n[r]=o)}("undefined"==typeof window?this:window)},function(t,e,r){"use strict";var n={ieVersion:function(){if("undefined"!=typeof document){for(var t=3,e=document.createElement("div"),r=e.getElementsByTagName("i");e.innerHTML="\x3c!--[if gt IE "+ ++t+"]>4?t:void 0}}};t.exports=n},function(t,e,r){"use strict";function n(t,e,r,n){t._rollbarWrappedError&&(n[4]||(n[4]=t._rollbarWrappedError),n[5]||(n[5]=t._rollbarWrappedError._rollbarContext),t._rollbarWrappedError=null);var o=e.handleUncaughtException.apply(e,n);r&&r.apply(t,n),"anonymous"===o&&(e.anonymousErrorsPending+=1)}t.exports={captureUncaughtExceptions:function(t,e,r){if(t){var o;if("function"==typeof e._rollbarOldOnError)o=e._rollbarOldOnError;else if(t.onerror){for(o=t.onerror;o._rollbarOldOnError;)o=o._rollbarOldOnError;e._rollbarOldOnError=o}e.handleAnonymousErrors();var i=function(){var r=Array.prototype.slice.call(arguments,0);n(t,e,o,r)};r&&(i._rollbarOldOnError=o),t.onerror=i}},captureUnhandledRejections:function(t,e,r){if(t){"function"==typeof t._rollbarURH&&t._rollbarURH.belongsToShim&&t.removeEventListener("unhandledrejection",t._rollbarURH);var n=function(t){var r,n,o;try{r=t.reason}catch(t){r=void 0}try{n=t.promise}catch(t){n="[unhandledrejection] error getting `promise` from event"}try{o=t.detail,!r&&o&&(r=o.reason,n=o.promise)}catch(t){}r||(r="[unhandledrejection] error getting `reason` from event"),e&&e.handleUnhandledRejection&&e.handleUnhandledRejection(r,n)};n.belongsToShim=r,t._rollbarURH=n,t.addEventListener("unhandledrejection",n)}}}},function(t,e,r){"use strict";var n=r(0),o=r(1);function i(t){this.truncation=t}function s(){var t="undefined"!=typeof window&&window||"undefined"!=typeof self&&self,e=t&&t.Zone&&t.Zone.current,r=Array.prototype.slice.call(arguments);if(e&&"angular"===e._name){var n=e._parent;n.run((function(){a.apply(void 0,r)}))}else a.apply(void 0,r)}function a(t,e,r,i,s,a,c){if("undefined"!=typeof RollbarProxy)return function(t,e){(new RollbarProxy).sendJsonPayload(t,(function(t){}),(function(t){e(new Error(t))}))}(i,s);var l;if(!(l=a?a():function(){var t,e,r=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],n=r.length;for(e=0;e=400&&t.status<600}(l)){if(403===l.status){var e=t.value&&t.value.message;o.error(e)}s(new Error(String(l.status)))}else{s(u("XHR response had no status code (likely connection failure)"))}}}catch(t){var r;r=t&&t.stack?t:new Error(t),s(r)}var i};l.open(r,e,!0),l.setRequestHeader&&(l.setRequestHeader("Content-Type","application/json"),l.setRequestHeader("X-Rollbar-Access-Token",t)),n.isFiniteNumber(c)&&(l.timeout=c),l.onreadystatechange=p,l.send(i)}catch(t){if("undefined"!=typeof XDomainRequest){if(!window||!window.location)return s(new Error("No window available during request, unknown environment"));"http:"===window.location.href.substring(0,5)&&"https"===e.substring(0,5)&&(e="http"+e.substring(5));var f=new XDomainRequest;f.onprogress=function(){},f.ontimeout=function(){s(u("Request timed out","ETIMEDOUT"))},f.onerror=function(){s(new Error("Error during request"))},f.onload=function(){var t=n.jsonParse(f.responseText);s(t.error,t.value)},f.open(r,e,!0),f.send(i)}else s(new Error("Cannot find a method to transport a request"))}}catch(t){s(t)}}function u(t,e){var r=new Error(t);return r.code=e||"ENOTFOUND",r}i.prototype.get=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){}),n.addParamsAndAccessTokenToPath(t,e,r);s(t,n.formatUrl(e),"GET",null,o,i,e.timeout)},i.prototype.post=function(t,e,r,o,i){if(o&&n.isFunction(o)||(o=function(){}),!r)return o(new Error("Cannot send empty request"));var a;if((a=this.truncation?this.truncation.truncate(r):n.stringify(r)).error)return o(a.error);var u=a.value;s(t,n.formatUrl(e),"POST",u,o,i,e.timeout)},i.prototype.postJsonPayload=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){});s(t,n.formatUrl(e),"POST",r,o,i,e.timeout)},t.exports=i},function(t,e,r){"use strict";var n=r(0),o=r(3),i=r(1);function s(t,e,r){var o=t.message,i=t.custom;o||(o="Item sent with null or missing arguments.");var s={body:o};i&&(s.extra=n.merge(i)),n.set(t,"data.body",{message:s}),r(null,t)}function a(t){var e=t.stackInfo.stack;return e&&0===e.length&&t._unhandledStackInfo&&t._unhandledStackInfo.stack&&(e=t._unhandledStackInfo.stack),e}function u(t,e,r){var i=t&&t.data.description,s=t&&t.custom,u=a(t),l=o.guessErrorClass(e.message),p={exception:{class:c(e,l[0],r),message:l[1]}};if(i&&(p.exception.description=i),u){var f,h,d,m,g,v,y,b;for(0===u.length&&(p.exception.stack=e.rawStack,p.exception.raw=String(e.rawException)),p.frames=[],y=0;y-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var r=e.replace(/^\s+/,"").replace(/\(eval code/g,"("),n=r.match(/ (\((.+):(\d+):(\d+)\)$)/),o=(r=n?r.replace(n[0],""):r).split(/\s+/).slice(1),i=this.extractLocation(n?n[1]:o.pop()),s=o.join(" ")||void 0,a=["eval",""].indexOf(i[0])>-1?void 0:i[0];return new t({functionName:s,fileName:a,lineNumber:i[1],columnNumber:i[2],source:e})}),this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter((function(t){return!t.match(n)}),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 t({functionName:e});var r=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(r),o=n&&n[1]?n[1]:void 0,i=this.extractLocation(e.replace(r,""));return new t({functionName:o,fileName:i[0],lineNumber:i[1],columnNumber:i[2],source:e})}),this)},parseOpera:function(t){return!t.stacktrace||t.message.indexOf("\n")>-1&&t.message.split("\n").length>t.stacktrace.split("\n").length?this.parseOpera9(t):t.stack?this.parseOpera11(t):this.parseOpera10(t)},parseOpera9:function(e){for(var r=/Line (\d+).*script (?:in )?(\S+)/i,n=e.message.split("\n"),o=[],i=2,s=n.length;i/,"$2").replace(/\([^)]*\)/g,"")||void 0;i.match(/\(([^)]*)\)/)&&(r=i.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var a=void 0===r||"[arguments not available]"===r?void 0:r.split(",");return new t({functionName:s,args:a,fileName:o[0],lineNumber:o[1],columnNumber:o[2],source:e})}),this)}}})?n.apply(e,o):n)||(t.exports=i)}()},function(t,e,r){var n,o,i;!function(r,s){"use strict";o=[],void 0===(i="function"==typeof(n=function(){function t(t){return t.charAt(0).toUpperCase()+t.substring(1)}function e(t){return function(){return this[t]}}var r=["isConstructor","isEval","isNative","isToplevel"],n=["columnNumber","lineNumber"],o=["fileName","functionName","source"],i=r.concat(n,o,["args"],["evalOrigin"]);function s(e){if(e)for(var r=0;ro&&(i=this.maxQueueSize-o),this.maxQueueSize=o,this.queue.splice(0,i)},o.prototype.copyEvents=function(){var t=Array.prototype.slice.call(this.queue,0);if(n.isFunction(this.options.filterTelemetry))try{for(var e=t.length;e--;)this.options.filterTelemetry(t[e])&&t.splice(e,1)}catch(t){this.options.filterTelemetry=null}return t},o.prototype.capture=function(t,e,r,o,s){var a={level:i(t,r),type:t,timestamp_ms:s||n.now(),body:e,source:"client"};o&&(a.uuid=o);try{if(n.isFunction(this.options.filterTelemetry)&&this.options.filterTelemetry(a))return!1}catch(t){this.options.filterTelemetry=null}return this.push(a),a},o.prototype.captureEvent=function(t,e,r,n){return this.capture(t,e,r,n)},o.prototype.captureError=function(t,e,r,n){var o={message:t.message||String(t)};return t.stack&&(o.stack=t.stack),this.capture("error",o,e,r,n)},o.prototype.captureLog=function(t,e,r,n){return this.capture("log",{message:t},e,r,n)},o.prototype.captureNetwork=function(t,e,r,n){e=e||"xhr",t.subtype=t.subtype||e,n&&(t.request=n);var o=this.levelFromStatus(t.status_code);return this.capture("network",t,o,r)},o.prototype.levelFromStatus=function(t){return t>=200&&t<400?"info":0===t||t>=400?"error":"info"},o.prototype.captureDom=function(t,e,r,n,o){var i={subtype:t,element:e};return void 0!==r&&(i.value=r),void 0!==n&&(i.checked=n),this.capture("dom",i,"info",o)},o.prototype.captureNavigation=function(t,e,r){return this.capture("navigation",{from:t,to:e},"info",r)},o.prototype.captureDomContentLoaded=function(t){return this.capture("navigation",{subtype:"DOMContentLoaded"},"info",void 0,t&&t.getTime())},o.prototype.captureLoad=function(t){return this.capture("navigation",{subtype:"load"},"info",void 0,t&&t.getTime())},o.prototype.captureConnectivityChange=function(t,e){return this.captureNetwork({change:t},"connectivity",e)},o.prototype._captureRollbarItem=function(t){if(this.options.includeItemsInTelemetry)return t.err?this.captureError(t.err,t.level,t.uuid,t.timestamp):t.message?this.captureLog(t.message,t.level,t.uuid,t.timestamp):t.custom?this.capture("log",t.custom,t.level,t.uuid,t.timestamp):void 0},o.prototype.push=function(t){this.queue.push(t),this.queue.length>this.maxQueueSize&&this.queue.shift()},t.exports=o},function(t,e,r){"use strict";var n=r(0),o=r(4),i=r(2),s=r(31),a={network:!0,networkResponseHeaders:!1,networkResponseBody:!1,networkRequestHeaders:!1,networkRequestBody:!1,networkErrorOnHttp5xx:!1,networkErrorOnHttp4xx:!1,networkErrorOnHttp0:!1,log:!0,dom:!0,navigation:!0,connectivity:!0,contentSecurityPolicy:!0,errorOnContentSecurityPolicy:!1};function u(t,e,r,n,o){var i=t[e];t[e]=r(i),n&&n[o].push([t,e,i])}function c(t,e){for(var r;t[e].length;)(r=t[e].shift())[0][r[1]]=r[2]}function l(t,e,r,o,i){this.options=t;var s=t.autoInstrument;!1===t.enabled||!1===s?this.autoInstrument={}:(n.isType(s,"object")||(s=a),this.autoInstrument=n.merge(a,s)),this.scrubTelemetryInputs=!!t.scrubTelemetryInputs,this.telemetryScrubber=t.telemetryScrubber,this.defaultValueScrubber=function(t){for(var e=[],r=0;r3)){i.__rollbar_xhr.end_time_ms=n.now();var e=null;if(i.__rollbar_xhr.response_content_type=i.getResponseHeader("Content-Type"),t.autoInstrument.networkResponseHeaders){var r=t.autoInstrument.networkResponseHeaders;e={};try{var s,a;if(!0===r){var u=i.getAllResponseHeaders();if(u){var c,l,p=u.trim().split(/[\r\n]+/);for(a=0;a=500&&this.autoInstrument.networkErrorOnHttp5xx||e>=400&&this.autoInstrument.networkErrorOnHttp4xx||0===e&&this.autoInstrument.networkErrorOnHttp0){var r=new Error("HTTP request failed with Status "+e);r.stack=t.stack,this.rollbar.error(r,{skipFrames:1})}},l.prototype.deinstrumentConsole=function(){if("console"in this._window&&this._window.console.log)for(var t;this.replacements.log.length;)t=this.replacements.log.shift(),this._window.console[t[0]]=t[1]},l.prototype.instrumentConsole=function(){if("console"in this._window&&this._window.console.log){var t=this,e=this._window.console,r=["debug","info","warn","error","log"];try{for(var o=0,i=r.length;o=0&&t.options[t.selectedIndex]&&this.captureDomEvent("input",t,t.options[t.selectedIndex].value)},l.prototype.captureDomEvent=function(t,e,r,n){if(void 0!==r)if(this.scrubTelemetryInputs||"password"===s.getElementType(e))r="[scrubbed]";else{var o=s.describeElement(e);this.telemetryScrubber?this.telemetryScrubber(o)&&(r="[scrubbed]"):this.defaultValueScrubber(o)&&(r="[scrubbed]")}var i=s.elementArrayToString(s.treeToArray(e));this.telemeter.captureDom(t,i,r,n)},l.prototype.deinstrumentNavigation=function(){var t=this._window.chrome;!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState&&c(this.replacements,"navigation")},l.prototype.instrumentNavigation=function(){var t=this._window.chrome;if(!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState){var e=this;u(this._window,"onpopstate",(function(t){return function(){var r=e._location.href;e.handleUrlChange(e._lastHref,r),t&&t.apply(this,arguments)}}),this.replacements,"navigation"),u(this._window.history,"pushState",(function(t){return function(){var r=arguments.length>2?arguments[2]:void 0;return r&&e.handleUrlChange(e._lastHref,r+""),t.apply(this,arguments)}}),this.replacements,"navigation")}},l.prototype.handleUrlChange=function(t,e){var r=i.parse(this._location.href),n=i.parse(e),o=i.parse(t);this._lastHref=e,r.protocol===n.protocol&&r.host===n.host&&(e=n.path+(n.hash||"")),r.protocol===o.protocol&&r.host===o.host&&(t=o.path+(o.hash||"")),this.telemeter.captureNavigation(t,e)},l.prototype.deinstrumentConnectivity=function(){("addEventListener"in this._window||"body"in this._document)&&(this._window.addEventListener?this.removeListeners("connectivity"):c(this.replacements,"connectivity"))},l.prototype.instrumentConnectivity=function(){if("addEventListener"in this._window||"body"in this._document)if(this._window.addEventListener)this.addListener("connectivity",this._window,"online",void 0,function(){this.telemeter.captureConnectivityChange("online")}.bind(this),!0),this.addListener("connectivity",this._window,"offline",void 0,function(){this.telemeter.captureConnectivityChange("offline")}.bind(this),!0);else{var t=this;u(this._document.body,"ononline",(function(e){return function(){t.telemeter.captureConnectivityChange("online"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity"),u(this._document.body,"onoffline",(function(e){return function(){t.telemeter.captureConnectivityChange("offline"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity")}},l.prototype.handleCspEvent=function(t){var e="Security Policy Violation: blockedURI: "+t.blockedURI+", violatedDirective: "+t.violatedDirective+", effectiveDirective: "+t.effectiveDirective+", ";t.sourceFile&&(e+="location: "+t.sourceFile+", line: "+t.lineNumber+", col: "+t.columnNumber+", "),e+="originalPolicy: "+t.originalPolicy,this.telemeter.captureLog(e,"error"),this.handleCspError(e)},l.prototype.handleCspError=function(t){this.autoInstrument.errorOnContentSecurityPolicy&&this.rollbar.error(t)},l.prototype.deinstrumentContentSecurityPolicy=function(){"addEventListener"in this._window&&this.removeListeners("contentsecuritypolicy")},l.prototype.instrumentContentSecurityPolicy=function(){if("addEventListener"in this._window){var t=this.handleCspEvent.bind(this);this.addListener("contentsecuritypolicy",this._window,"securitypolicyviolation",null,t,!1)}},l.prototype.addListener=function(t,e,r,n,o,i){e.addEventListener?(e.addEventListener(r,o,i),this.eventRemovers[t].push((function(){e.removeEventListener(r,o,i)}))):n&&(e.attachEvent(n,o),this.eventRemovers[t].push((function(){e.detachEvent(n,o)})))},l.prototype.removeListeners=function(t){for(;this.eventRemovers[t].length;)this.eventRemovers[t].shift()()},t.exports=l},function(t,e,r){"use strict";function n(t){return(t.getAttribute("type")||"").toLowerCase()}function o(t){if(!t||!t.tagName)return"";var e=[t.tagName];t.id&&e.push("#"+t.id),t.classes&&e.push("."+t.classes.join("."));for(var r=0;r=0;a--){if(e=o(t[a]),r=s+i.length*n+e.length,a=83){i.unshift("...");break}i.unshift(e),s+=e.length}return i.join(" > ")},treeToArray:function(t){for(var e,r=[],n=0;t&&n<5&&"html"!==(e=i(t)).tagName;n++)r.unshift(e),t=t.parentNode;return r},getElementFromEvent:function(t,e){return t.target?t.target:e&&e.elementFromPoint?e.elementFromPoint(t.clientX,t.clientY):void 0},isDescribedElement:function(t,e,r){if(t.tagName.toLowerCase()!==e.toLowerCase())return!1;if(!r)return!0;t=n(t);for(var o=0;o2*e?t.slice(0,e).concat(t.slice(r-e)):t}function a(t,e,r){r=void 0===r?30:r;var o,i=t.data.body;if(i.trace_chain)for(var a=i.trace_chain,u=0;ut?e.slice(0,t-3).concat("..."):e}function c(t,e,r){return[e=o(e,(function e(r,i,s){switch(n.typeName(i)){case"string":return u(t,i);case"object":case"array":return o(i,e,s);default:return i}})),n.stringify(e,r)]}function l(t){return t.exception&&(delete t.exception.description,t.exception.message=u(255,t.exception.message)),t.frames=s(t.frames,1),t}function p(t,e){var r=t.data.body;if(r.trace_chain)for(var o=r.trace_chain,i=0;ie}t.exports={truncate:function(t,e,r){r=void 0===r?524288:r;for(var n,o,s,u=[i,a,c.bind(null,1024),c.bind(null,512),c.bind(null,256),p];n=u.shift();)if(t=(o=n(t,e))[0],(s=o[1]).error||!f(s.value,r))return s;return s},raw:i,truncateFrames:a,truncateStrings:c,maybeTruncateValue:u}}])})); +define("rollbar",[],(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=6)}([function(t,e,r){"use strict";var n=r(12),o={};function i(t,e){return e===s(t)}function s(t){var e=typeof t;return"object"!==e?e:t?t instanceof Error?"error":{}.toString.call(t).match(/\s([a-zA-Z]+)/)[1].toLowerCase():"null"}function a(t){return i(t,"function")}function u(t){var e=Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?"),r=RegExp("^"+e+"$");return c(t)&&r.test(t)}function c(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function l(){var t=y();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var r=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?r:7&r|8).toString(16)}))}var p={strictMode:!1,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};function f(t,e){var r,n;try{r=o.stringify(t)}catch(o){if(e&&a(e))try{r=e(t)}catch(t){n=t}else n=o}return{error:n,value:r}}function h(t,e){return function(r,n){try{e(r,n)}catch(e){t.error(e)}}}function d(t){return function t(e,r){var n,o,a,u={};try{for(o in e)(n=e[o])&&(i(n,"object")||i(n,"array"))?r.includes(n)?u[o]="Removed circular reference: "+s(n):((a=r.slice()).push(n),u[o]=t(n,a)):u[o]=n}catch(t){u="Failed cloning custom data: "+t.message}return u}(t,[t])}var m=["log","network","dom","navigation","error","manual"],g=["critical","error","warning","info","debug"];function v(t,e){for(var r=0;ra)?(s=e.path,e.path=s.substring(0,a)+i+"&"+s.substring(a+1)):-1!==u?(s=e.path,e.path=s.substring(0,u)+i+s.substring(u)):e.path=e.path+i},createItem:function(t,e,r,n,o){for(var i,a,u,c,p,f,m=[],g=[],v=0,b=t.length;v0&&(u||(u=d({})),u.extraArgs=d(m));var k={message:i,err:a,custom:u,timestamp:y(),callback:c,notifier:r,diagnostic:{},uuid:l()};return function(t,e){e&&void 0!==e.level&&(t.level=e.level,delete e.level);e&&void 0!==e.skipFrames&&(t.skipFrames=e.skipFrames,delete e.skipFrames)}(k,u),n&&p&&(k.request=p),o&&(k.lambdaContext=o),k._originalArgs=t,k.diagnostic.original_arg_types=g,k},addErrorContext:function(t,e){var r=t.data.custom||{},o=!1;try{for(var i=0;i2){var o=n.slice(0,3),i=o[2].indexOf("/");-1!==i&&(o[2]=o[2].substring(0,i));r=o.concat("0000:0000:0000:0000:0000").join(":")}}else r=null}catch(t){r=null}else r=null;t.user_ip=r}},formatArgsAsString:function(t){var e,r,n,o=[];for(e=0,r=t.length;e500&&(n=n.substr(0,497)+"...");break;case"null":n="null";break;case"undefined":n="undefined";break;case"symbol":n=n.toString()}o.push(n)}return o.join(" ")},formatUrl:function(t,e){if(!(e=e||t.protocol)&&t.port&&(80===t.port?e="http:":443===t.port&&(e="https:")),e=e||"https:",!t.hostname)return null;var r=e+"//"+t.hostname;return t.port&&(r=r+":"+t.port),t.path&&(r+=t.path),r},get:function(t,e){if(t){var r=e.split("."),n=t;try{for(var o=0,i=r.length;o=1&&r>e}function s(t,e,r,n,o,i,s){var a=null;return r&&(r=new Error(r)),r||n||(a=function(t,e,r,n,o){var i,s=e.environment||e.payload&&e.payload.environment;i=o?"item per minute limit reached, ignoring errors until timeout":"maxItems has been hit, ignoring errors until reset.";var a={body:{message:{body:i,extra:{maxItems:r,itemsPerMinute:n}}},language:"javascript",environment:s,notifier:{version:e.notifier&&e.notifier.version||e.version}};"browser"===t?(a.platform="browser",a.framework="browser-js",a.notifier.name="rollbar-browser-js"):"server"===t?(a.framework=e.framework||"node-js",a.notifier.name=e.notifier.name):"react-native"===t&&(a.framework=e.framework||"react-native",a.notifier.name=e.notifier.name);return a}(t,e,o,i,s)),{error:r,shouldSend:n,payload:a}}o.globalSettings={startTime:n.now(),maxItems:void 0,itemsPerMinute:void 0},o.prototype.configureGlobal=function(t){void 0!==t.startTime&&(o.globalSettings.startTime=t.startTime),void 0!==t.maxItems&&(o.globalSettings.maxItems=t.maxItems),void 0!==t.itemsPerMinute&&(o.globalSettings.itemsPerMinute=t.itemsPerMinute)},o.prototype.shouldSend=function(t,e){var r=(e=e||n.now())-this.startTime;(r<0||r>=6e4)&&(this.startTime=e,this.perMinCounter=0);var a=o.globalSettings.maxItems,u=o.globalSettings.itemsPerMinute;if(i(t,a,this.counter))return s(this.platform,this.platformOptions,a+" max items reached",!1);if(i(t,u,this.perMinCounter))return s(this.platform,this.platformOptions,u+" items per minute reached",!1);this.counter++,this.perMinCounter++;var c=!i(t,a,this.counter),l=c;return c=c&&!i(t,u,this.perMinCounter),s(this.platform,this.platformOptions,null,c,a,u,l)},o.prototype.setPlatformOptions=function(t,e){this.platform=t,this.platformOptions=e},t.exports=o},function(t,e,r){"use strict";var n=Object.prototype.hasOwnProperty,o=Object.prototype.toString,i=function(t){if(!t||"[object Object]"!==o.call(t))return!1;var e,r=n.call(t,"constructor"),i=t.constructor&&t.constructor.prototype&&n.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!r&&!i)return!1;for(e in t);return void 0===e||n.call(t,e)};t.exports=function t(){var e,r,n,o,s,a={},u=null,c=arguments.length;for(e=0;ethis.options.maxRetries&&(o=!1))}o?this._retryApiRequest(e,r):r(t)},o.prototype._retryApiRequest=function(t,e){this.retryQueue.push({item:t,callback:e}),this.retryHandle||(this.retryHandle=setInterval(function(){for(;this.retryQueue.length;){var t=this.retryQueue.shift();this._makeApiRequest(t.item,t.callback)}}.bind(this),this.options.retryInterval))},o.prototype._dequeuePendingRequest=function(t){var e=this.pendingRequests.indexOf(t);-1!==e&&(this.pendingRequests.splice(e,1),this._maybeCallWait())},o.prototype._maybeLog=function(t,e){if(this.logger&&this.options.verbose){var r=e;if(r=(r=r||n.get(t,"body.trace.exception.message"))||n.get(t,"body.trace_chain.0.exception.message"))return void this.logger.error(r);(r=n.get(t,"body.message.body"))&&this.logger.log(r)}},o.prototype._maybeCallWait=function(){return!(!n.isFunction(this.waitCallback)||0!==this.pendingItems.length||0!==this.pendingRequests.length)&&(this.waitIntervalID&&(this.waitIntervalID=clearInterval(this.waitIntervalID)),this.waitCallback(),!0)},t.exports=o},function(t,e,r){"use strict";var n=r(0);function o(t,e){this.queue=t,this.options=e,this.transforms=[],this.diagnostic={}}o.prototype.configure=function(t){this.queue&&this.queue.configure(t);var e=this.options;return this.options=n.merge(e,t),this},o.prototype.addTransform=function(t){return n.isFunction(t)&&this.transforms.push(t),this},o.prototype.log=function(t,e){if(e&&n.isFunction(e)||(e=function(){}),!this.options.enabled)return e(new Error("Rollbar is not enabled"));this.queue.addPendingItem(t);var r=t.err;this._applyTransforms(t,function(n,o){if(n)return this.queue.removePendingItem(t),e(n,null);this.queue.addItem(o,e,r,t)}.bind(this))},o.prototype._applyTransforms=function(t,e){var r=-1,n=this.transforms.length,o=this.transforms,i=this.options,s=function(t,a){t?e(t,null):++r!==n?o[r](a,i,s):e(null,a)};s(null,t)},t.exports=o},function(t,e,r){"use strict";var n=r(0),o=r(16),i={hostname:"api.rollbar.com",path:"/api/1/item/",search:null,version:"1",protocol:"https:",port:443};function s(t,e,r,n,o){this.options=t,this.transport=e,this.url=r,this.truncation=n,this.jsonBackup=o,this.accessToken=t.accessToken,this.transportOptions=a(t,r)}function a(t,e){return o.getTransportFromOptions(t,i,e)}s.prototype.postItem=function(t,e){var r=o.transportOptions(this.transportOptions,"POST"),n=o.buildPayload(this.accessToken,t,this.jsonBackup);this.transport.post(this.accessToken,r,n,e)},s.prototype.buildJsonPayload=function(t,e){var r,i=o.buildPayload(this.accessToken,t,this.jsonBackup);return(r=this.truncation?this.truncation.truncate(i):n.stringify(i)).error?(e&&e(r.error),null):r.value},s.prototype.postJsonPayload=function(t,e){var r=o.transportOptions(this.transportOptions,"POST");this.transport.postJsonPayload(this.accessToken,r,t,e)},s.prototype.configure=function(t){var e=this.oldOptions;return this.options=n.merge(e,t),this.transportOptions=a(this.options,this.url),void 0!==this.options.accessToken&&(this.accessToken=this.options.accessToken),this},t.exports=s},function(t,e,r){"use strict";var n=r(0);t.exports={buildPayload:function(t,e,r){if(!n.isType(e.context,"string")){var o=n.stringify(e.context,r);o.error?e.context="Error: could not serialize 'context'":e.context=o.value||"",e.context.length>255&&(e.context=e.context.substr(0,255))}return{access_token:t,data:e}},getTransportFromOptions:function(t,e,r){var n=e.hostname,o=e.protocol,i=e.port,s=e.path,a=e.search,u=t.timeout,c=t.proxy;if(t.endpoint){var l=r.parse(t.endpoint);n=l.hostname,o=l.protocol,i=l.port,s=l.pathname,a=l.search}return{timeout:u,hostname:n,protocol:o,port:i,path:s,search:a,proxy:c}},transportOptions:function(t,e){var r=t.protocol||"https:",n=t.port||("http:"===r?80:"https:"===r?443:void 0),o=t.hostname,i=t.path,s=t.timeout;return t.search&&(i+=t.search),t.proxy&&(i=r+"//"+o+i,o=t.proxy.host||t.proxy.hostname,n=t.proxy.port,r=t.proxy.protocol||r),{timeout:s,protocol:r,hostname:o,path:i,port:n,method:e}},appendPathToPath:function(t,e){var r=/\/$/.test(t),n=/^\//.test(e);return r&&n?e=e.substring(1):r||n||(e="/"+e),t+e}}},function(t,e){!function(t){"use strict";t.console||(t.console={});for(var e,r,n=t.console,o=function(){},i=["memory"],s="assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(",");e=i.pop();)n[e]||(n[e]={});for(;r=s.pop();)n[r]||(n[r]=o)}("undefined"==typeof window?this:window)},function(t,e,r){"use strict";var n={ieVersion:function(){if("undefined"!=typeof document){for(var t=3,e=document.createElement("div"),r=e.getElementsByTagName("i");e.innerHTML="\x3c!--[if gt IE "+ ++t+"]>4?t:void 0}}};t.exports=n},function(t,e,r){"use strict";function n(t,e,r,n){t._rollbarWrappedError&&(n[4]||(n[4]=t._rollbarWrappedError),n[5]||(n[5]=t._rollbarWrappedError._rollbarContext),t._rollbarWrappedError=null);var o=e.handleUncaughtException.apply(e,n);r&&r.apply(t,n),"anonymous"===o&&(e.anonymousErrorsPending+=1)}t.exports={captureUncaughtExceptions:function(t,e,r){if(t){var o;if("function"==typeof e._rollbarOldOnError)o=e._rollbarOldOnError;else if(t.onerror){for(o=t.onerror;o._rollbarOldOnError;)o=o._rollbarOldOnError;e._rollbarOldOnError=o}e.handleAnonymousErrors();var i=function(){var r=Array.prototype.slice.call(arguments,0);n(t,e,o,r)};r&&(i._rollbarOldOnError=o),t.onerror=i}},captureUnhandledRejections:function(t,e,r){if(t){"function"==typeof t._rollbarURH&&t._rollbarURH.belongsToShim&&t.removeEventListener("unhandledrejection",t._rollbarURH);var n=function(t){var r,n,o;try{r=t.reason}catch(t){r=void 0}try{n=t.promise}catch(t){n="[unhandledrejection] error getting `promise` from event"}try{o=t.detail,!r&&o&&(r=o.reason,n=o.promise)}catch(t){}r||(r="[unhandledrejection] error getting `reason` from event"),e&&e.handleUnhandledRejection&&e.handleUnhandledRejection(r,n)};n.belongsToShim=r,t._rollbarURH=n,t.addEventListener("unhandledrejection",n)}}}},function(t,e,r){"use strict";var n=r(0),o=r(1);function i(t){this.truncation=t}function s(){var t="undefined"!=typeof window&&window||"undefined"!=typeof self&&self,e=t&&t.Zone&&t.Zone.current,r=Array.prototype.slice.call(arguments);if(e&&"angular"===e._name){var n=e._parent;n.run((function(){a.apply(void 0,r)}))}else a.apply(void 0,r)}function a(t,e,r,i,s,a,c){if("undefined"!=typeof RollbarProxy)return function(t,e){(new RollbarProxy).sendJsonPayload(t,(function(t){}),(function(t){e(new Error(t))}))}(i,s);var l;if(!(l=a?a():function(){var t,e,r=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],n=r.length;for(e=0;e=400&&t.status<600}(l)){if(403===l.status){var e=t.value&&t.value.message;o.error(e)}s(new Error(String(l.status)))}else{s(u("XHR response had no status code (likely connection failure)"))}}}catch(t){var r;r=t&&t.stack?t:new Error(t),s(r)}var i};l.open(r,e,!0),l.setRequestHeader&&(l.setRequestHeader("Content-Type","application/json"),l.setRequestHeader("X-Rollbar-Access-Token",t)),n.isFiniteNumber(c)&&(l.timeout=c),l.onreadystatechange=p,l.send(i)}catch(t){if("undefined"!=typeof XDomainRequest){if(!window||!window.location)return s(new Error("No window available during request, unknown environment"));"http:"===window.location.href.substring(0,5)&&"https"===e.substring(0,5)&&(e="http"+e.substring(5));var f=new XDomainRequest;f.onprogress=function(){},f.ontimeout=function(){s(u("Request timed out","ETIMEDOUT"))},f.onerror=function(){s(new Error("Error during request"))},f.onload=function(){var t=n.jsonParse(f.responseText);s(t.error,t.value)},f.open(r,e,!0),f.send(i)}else s(new Error("Cannot find a method to transport a request"))}}catch(t){s(t)}}function u(t,e){var r=new Error(t);return r.code=e||"ENOTFOUND",r}i.prototype.get=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){}),n.addParamsAndAccessTokenToPath(t,e,r);s(t,n.formatUrl(e),"GET",null,o,i,e.timeout)},i.prototype.post=function(t,e,r,o,i){if(o&&n.isFunction(o)||(o=function(){}),!r)return o(new Error("Cannot send empty request"));var a;if((a=this.truncation?this.truncation.truncate(r):n.stringify(r)).error)return o(a.error);var u=a.value;s(t,n.formatUrl(e),"POST",u,o,i,e.timeout)},i.prototype.postJsonPayload=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){});s(t,n.formatUrl(e),"POST",r,o,i,e.timeout)},t.exports=i},function(t,e,r){"use strict";var n=r(0),o=r(3),i=r(1);function s(t,e,r){var o=t.message,i=t.custom;o||(o="Item sent with null or missing arguments.");var s={body:o};i&&(s.extra=n.merge(i)),n.set(t,"data.body",{message:s}),r(null,t)}function a(t){var e=t.stackInfo.stack;return e&&0===e.length&&t._unhandledStackInfo&&t._unhandledStackInfo.stack&&(e=t._unhandledStackInfo.stack),e}function u(t,e,r){var i=t&&t.data.description,s=t&&t.custom,u=a(t),l=o.guessErrorClass(e.message),p={exception:{class:c(e,l[0],r),message:l[1]}};if(i&&(p.exception.description=i),u){var f,h,d,m,g,v,y,b;for(0===u.length&&(p.exception.stack=e.rawStack,p.exception.raw=String(e.rawException)),p.frames=[],y=0;y-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var r=e.replace(/^\s+/,"").replace(/\(eval code/g,"("),n=r.match(/ (\((.+):(\d+):(\d+)\)$)/),o=(r=n?r.replace(n[0],""):r).split(/\s+/).slice(1),i=this.extractLocation(n?n[1]:o.pop()),s=o.join(" ")||void 0,a=["eval",""].indexOf(i[0])>-1?void 0:i[0];return new t({functionName:s,fileName:a,lineNumber:i[1],columnNumber:i[2],source:e})}),this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter((function(t){return!t.match(n)}),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 t({functionName:e});var r=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(r),o=n&&n[1]?n[1]:void 0,i=this.extractLocation(e.replace(r,""));return new t({functionName:o,fileName:i[0],lineNumber:i[1],columnNumber:i[2],source:e})}),this)},parseOpera:function(t){return!t.stacktrace||t.message.indexOf("\n")>-1&&t.message.split("\n").length>t.stacktrace.split("\n").length?this.parseOpera9(t):t.stack?this.parseOpera11(t):this.parseOpera10(t)},parseOpera9:function(e){for(var r=/Line (\d+).*script (?:in )?(\S+)/i,n=e.message.split("\n"),o=[],i=2,s=n.length;i/,"$2").replace(/\([^)]*\)/g,"")||void 0;i.match(/\(([^)]*)\)/)&&(r=i.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var a=void 0===r||"[arguments not available]"===r?void 0:r.split(",");return new t({functionName:s,args:a,fileName:o[0],lineNumber:o[1],columnNumber:o[2],source:e})}),this)}}})?n.apply(e,o):n)||(t.exports=i)}()},function(t,e,r){var n,o,i;!function(r,s){"use strict";o=[],void 0===(i="function"==typeof(n=function(){function t(t){return t.charAt(0).toUpperCase()+t.substring(1)}function e(t){return function(){return this[t]}}var r=["isConstructor","isEval","isNative","isToplevel"],n=["columnNumber","lineNumber"],o=["fileName","functionName","source"],i=r.concat(n,o,["args"],["evalOrigin"]);function s(e){if(e)for(var r=0;ro&&(i=this.maxQueueSize-o),this.maxQueueSize=o,this.queue.splice(0,i)},o.prototype.copyEvents=function(){var t=Array.prototype.slice.call(this.queue,0);if(n.isFunction(this.options.filterTelemetry))try{for(var e=t.length;e--;)this.options.filterTelemetry(t[e])&&t.splice(e,1)}catch(t){this.options.filterTelemetry=null}return t},o.prototype.capture=function(t,e,r,o,s){var a={level:i(t,r),type:t,timestamp_ms:s||n.now(),body:e,source:"client"};o&&(a.uuid=o);try{if(n.isFunction(this.options.filterTelemetry)&&this.options.filterTelemetry(a))return!1}catch(t){this.options.filterTelemetry=null}return this.push(a),a},o.prototype.captureEvent=function(t,e,r,n){return this.capture(t,e,r,n)},o.prototype.captureError=function(t,e,r,n){var o={message:t.message||String(t)};return t.stack&&(o.stack=t.stack),this.capture("error",o,e,r,n)},o.prototype.captureLog=function(t,e,r,n){return this.capture("log",{message:t},e,r,n)},o.prototype.captureNetwork=function(t,e,r,n){e=e||"xhr",t.subtype=t.subtype||e,n&&(t.request=n);var o=this.levelFromStatus(t.status_code);return this.capture("network",t,o,r)},o.prototype.levelFromStatus=function(t){return t>=200&&t<400?"info":0===t||t>=400?"error":"info"},o.prototype.captureDom=function(t,e,r,n,o){var i={subtype:t,element:e};return void 0!==r&&(i.value=r),void 0!==n&&(i.checked=n),this.capture("dom",i,"info",o)},o.prototype.captureNavigation=function(t,e,r){return this.capture("navigation",{from:t,to:e},"info",r)},o.prototype.captureDomContentLoaded=function(t){return this.capture("navigation",{subtype:"DOMContentLoaded"},"info",void 0,t&&t.getTime())},o.prototype.captureLoad=function(t){return this.capture("navigation",{subtype:"load"},"info",void 0,t&&t.getTime())},o.prototype.captureConnectivityChange=function(t,e){return this.captureNetwork({change:t},"connectivity",e)},o.prototype._captureRollbarItem=function(t){if(this.options.includeItemsInTelemetry)return t.err?this.captureError(t.err,t.level,t.uuid,t.timestamp):t.message?this.captureLog(t.message,t.level,t.uuid,t.timestamp):t.custom?this.capture("log",t.custom,t.level,t.uuid,t.timestamp):void 0},o.prototype.push=function(t){this.queue.push(t),this.queue.length>this.maxQueueSize&&this.queue.shift()},t.exports=o},function(t,e,r){"use strict";var n=r(0),o=r(4),i=r(2),s=r(31),a={network:!0,networkResponseHeaders:!1,networkResponseBody:!1,networkRequestHeaders:!1,networkRequestBody:!1,networkErrorOnHttp5xx:!1,networkErrorOnHttp4xx:!1,networkErrorOnHttp0:!1,log:!0,dom:!0,navigation:!0,connectivity:!0,contentSecurityPolicy:!0,errorOnContentSecurityPolicy:!1};function u(t,e,r,n,o){var i=t[e];t[e]=r(i),n&&n[o].push([t,e,i])}function c(t,e){for(var r;t[e].length;)(r=t[e].shift())[0][r[1]]=r[2]}function l(t,e,r,o,i){this.options=t;var s=t.autoInstrument;!1===t.enabled||!1===s?this.autoInstrument={}:(n.isType(s,"object")||(s=a),this.autoInstrument=n.merge(a,s)),this.scrubTelemetryInputs=!!t.scrubTelemetryInputs,this.telemetryScrubber=t.telemetryScrubber,this.defaultValueScrubber=function(t){for(var e=[],r=0;r3)){i.__rollbar_xhr.end_time_ms=n.now();var e=null;if(i.__rollbar_xhr.response_content_type=i.getResponseHeader("Content-Type"),t.autoInstrument.networkResponseHeaders){var r=t.autoInstrument.networkResponseHeaders;e={};try{var s,a;if(!0===r){var u=i.getAllResponseHeaders();if(u){var c,l,p=u.trim().split(/[\r\n]+/);for(a=0;a=500&&this.autoInstrument.networkErrorOnHttp5xx||e>=400&&this.autoInstrument.networkErrorOnHttp4xx||0===e&&this.autoInstrument.networkErrorOnHttp0){var r=new Error("HTTP request failed with Status "+e);r.stack=t.stack,this.rollbar.error(r,{skipFrames:1})}},l.prototype.deinstrumentConsole=function(){if("console"in this._window&&this._window.console.log)for(var t;this.replacements.log.length;)t=this.replacements.log.shift(),this._window.console[t[0]]=t[1]},l.prototype.instrumentConsole=function(){if("console"in this._window&&this._window.console.log){var t=this,e=this._window.console,r=["debug","info","warn","error","log"];try{for(var o=0,i=r.length;o=0&&t.options[t.selectedIndex]&&this.captureDomEvent("input",t,t.options[t.selectedIndex].value)},l.prototype.captureDomEvent=function(t,e,r,n){if(void 0!==r)if(this.scrubTelemetryInputs||"password"===s.getElementType(e))r="[scrubbed]";else{var o=s.describeElement(e);this.telemetryScrubber?this.telemetryScrubber(o)&&(r="[scrubbed]"):this.defaultValueScrubber(o)&&(r="[scrubbed]")}var i=s.elementArrayToString(s.treeToArray(e));this.telemeter.captureDom(t,i,r,n)},l.prototype.deinstrumentNavigation=function(){var t=this._window.chrome;!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState&&c(this.replacements,"navigation")},l.prototype.instrumentNavigation=function(){var t=this._window.chrome;if(!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState){var e=this;u(this._window,"onpopstate",(function(t){return function(){var r=e._location.href;e.handleUrlChange(e._lastHref,r),t&&t.apply(this,arguments)}}),this.replacements,"navigation"),u(this._window.history,"pushState",(function(t){return function(){var r=arguments.length>2?arguments[2]:void 0;return r&&e.handleUrlChange(e._lastHref,r+""),t.apply(this,arguments)}}),this.replacements,"navigation")}},l.prototype.handleUrlChange=function(t,e){var r=i.parse(this._location.href),n=i.parse(e),o=i.parse(t);this._lastHref=e,r.protocol===n.protocol&&r.host===n.host&&(e=n.path+(n.hash||"")),r.protocol===o.protocol&&r.host===o.host&&(t=o.path+(o.hash||"")),this.telemeter.captureNavigation(t,e)},l.prototype.deinstrumentConnectivity=function(){("addEventListener"in this._window||"body"in this._document)&&(this._window.addEventListener?this.removeListeners("connectivity"):c(this.replacements,"connectivity"))},l.prototype.instrumentConnectivity=function(){if("addEventListener"in this._window||"body"in this._document)if(this._window.addEventListener)this.addListener("connectivity",this._window,"online",void 0,function(){this.telemeter.captureConnectivityChange("online")}.bind(this),!0),this.addListener("connectivity",this._window,"offline",void 0,function(){this.telemeter.captureConnectivityChange("offline")}.bind(this),!0);else{var t=this;u(this._document.body,"ononline",(function(e){return function(){t.telemeter.captureConnectivityChange("online"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity"),u(this._document.body,"onoffline",(function(e){return function(){t.telemeter.captureConnectivityChange("offline"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity")}},l.prototype.handleCspEvent=function(t){var e="Security Policy Violation: blockedURI: "+t.blockedURI+", violatedDirective: "+t.violatedDirective+", effectiveDirective: "+t.effectiveDirective+", ";t.sourceFile&&(e+="location: "+t.sourceFile+", line: "+t.lineNumber+", col: "+t.columnNumber+", "),e+="originalPolicy: "+t.originalPolicy,this.telemeter.captureLog(e,"error"),this.handleCspError(e)},l.prototype.handleCspError=function(t){this.autoInstrument.errorOnContentSecurityPolicy&&this.rollbar.error(t)},l.prototype.deinstrumentContentSecurityPolicy=function(){"addEventListener"in this._window&&this.removeListeners("contentsecuritypolicy")},l.prototype.instrumentContentSecurityPolicy=function(){if("addEventListener"in this._window){var t=this.handleCspEvent.bind(this);this.addListener("contentsecuritypolicy",this._window,"securitypolicyviolation",null,t,!1)}},l.prototype.addListener=function(t,e,r,n,o,i){e.addEventListener?(e.addEventListener(r,o,i),this.eventRemovers[t].push((function(){e.removeEventListener(r,o,i)}))):n&&(e.attachEvent(n,o),this.eventRemovers[t].push((function(){e.detachEvent(n,o)})))},l.prototype.removeListeners=function(t){for(;this.eventRemovers[t].length;)this.eventRemovers[t].shift()()},t.exports=l},function(t,e,r){"use strict";function n(t){return(t.getAttribute("type")||"").toLowerCase()}function o(t){if(!t||!t.tagName)return"";var e=[t.tagName];t.id&&e.push("#"+t.id),t.classes&&e.push("."+t.classes.join("."));for(var r=0;r=0;a--){if(e=o(t[a]),r=s+i.length*n+e.length,a=83){i.unshift("...");break}i.unshift(e),s+=e.length}return i.join(" > ")},treeToArray:function(t){for(var e,r=[],n=0;t&&n<5&&"html"!==(e=i(t)).tagName;n++)r.unshift(e),t=t.parentNode;return r},getElementFromEvent:function(t,e){return t.target?t.target:e&&e.elementFromPoint?e.elementFromPoint(t.clientX,t.clientY):void 0},isDescribedElement:function(t,e,r){if(t.tagName.toLowerCase()!==e.toLowerCase())return!1;if(!r)return!0;t=n(t);for(var o=0;o2*e?t.slice(0,e).concat(t.slice(r-e)):t}function a(t,e,r){r=void 0===r?30:r;var o,i=t.data.body;if(i.trace_chain)for(var a=i.trace_chain,u=0;ut?e.slice(0,t-3).concat("..."):e}function c(t,e,r){return[e=o(e,(function e(r,i,s){switch(n.typeName(i)){case"string":return u(t,i);case"object":case"array":return o(i,e,s);default:return i}})),n.stringify(e,r)]}function l(t){return t.exception&&(delete t.exception.description,t.exception.message=u(255,t.exception.message)),t.frames=s(t.frames,1),t}function p(t,e){var r=t.data.body;if(r.trace_chain)for(var o=r.trace_chain,i=0;ie}t.exports={truncate:function(t,e,r){r=void 0===r?524288:r;for(var n,o,s,u=[i,a,c.bind(null,1024),c.bind(null,512),c.bind(null,256),p];n=u.shift();)if(t=(o=n(t,e))[0],(s=o[1]).error||!f(s.value,r))return s;return s},raw:i,truncateFrames:a,truncateStrings:c,maybeTruncateValue:u}}])})); //# sourceMappingURL=rollbar.named-amd.min.js.map \ No newline at end of file diff --git a/dist/rollbar.named-amd.min.js.map b/dist/rollbar.named-amd.min.js.map index 465dbe827..87a48cc57 100644 --- a/dist/rollbar.named-amd.min.js.map +++ b/dist/rollbar.named-amd.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://rollbar/webpack/bootstrap","webpack://rollbar/./src/utility.js","webpack://rollbar/./src/browser/logger.js","webpack://rollbar/./src/browser/url.js","webpack://rollbar/./src/errorParser.js","webpack://rollbar/./src/scrub.js","webpack://rollbar/./src/utility/traverse.js","webpack://rollbar/./src/browser/bundles/rollbar.js","webpack://rollbar/./src/browser/rollbar.js","webpack://rollbar/./src/browser/core.js","webpack://rollbar/./src/rollbar.js","webpack://rollbar/./src/rateLimiter.js","webpack://rollbar/./src/merge.js","webpack://rollbar/./src/queue.js","webpack://rollbar/./src/notifier.js","webpack://rollbar/./src/api.js","webpack://rollbar/./src/apiUtility.js","webpack://rollbar/./node_modules/console-polyfill/index.js","webpack://rollbar/./src/browser/detection.js","webpack://rollbar/./src/browser/globalSetup.js","webpack://rollbar/./src/browser/transport.js","webpack://rollbar/./src/browser/transforms.js","webpack://rollbar/./node_modules/error-stack-parser/error-stack-parser.js","webpack://rollbar/./node_modules/error-stack-parser/node_modules/stackframe/stackframe.js","webpack://rollbar/./src/transforms.js","webpack://rollbar/./src/browser/predicates.js","webpack://rollbar/./src/predicates.js","webpack://rollbar/./src/defaults.js","webpack://rollbar/./src/browser/defaults/scrubFields.js","webpack://rollbar/./src/telemetry.js","webpack://rollbar/./src/browser/telemetry.js","webpack://rollbar/./src/browser/domUtility.js","webpack://rollbar/./src/utility/polyfillJSON.js","webpack://rollbar/./vendor/JSON-js/json3.js","webpack://rollbar/./src/browser/wrapGlobals.js","webpack://rollbar/./src/truncation.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","merge","RollbarJSON","isType","x","typeName","Error","toString","match","toLowerCase","isFunction","f","isNativeFunction","funcMatchString","Function","replace","reIsNative","RegExp","isObject","test","type","uuid4","now","Math","random","floor","parseUriOptions","strictMode","q","parser","strict","loose","stringify","obj","backup","error","jsonError","backupError","wrapCallback","logger","err","resp","e","TELEMETRY_TYPES","TELEMETRY_LEVELS","arrayIncludes","arr","val","k","length","Date","addParamsAndAccessTokenToPath","accessToken","options","params","access_token","paramsArray","push","join","query","sort","path","qs","indexOf","h","substring","createItem","args","notifier","requestKeys","lambdaContext","message","custom","callback","request","arg","extraArgs","argTypes","typ","DOMException","j","len","undefined","item","timestamp","diagnostic","uuid","level","skipFrames","setCustomItemKeys","_originalArgs","original_arg_types","addErrorContext","errors","data","contextAdded","rollbarContext","error_context","createTelemetryEvent","metadata","filterIp","requestData","captureIp","newIp","parts","split","pop","beginning","slice","slashIdx","concat","formatArgsAsString","result","substr","formatUrl","u","protocol","port","hostname","keys","handleOptions","current","input","payload","hostWhiteList","hostSafeList","log","hostBlackList","hostBlockList","updateDeprecatedOptions","overwriteScrubFields","scrubFields","isError","isFiniteNumber","Number","isFinite","isIterable","isString","String","isPromise","then","jsonParse","parse","LEVELS","debug","info","warning","critical","makeUnhandledStackInfo","url","lineno","colno","backupMessage","errorParser","location","line","column","func","guessFunctionName","context","gatherContext","href","document","useragent","window","navigator","userAgent","redact","sanitizeUrl","baseUrlParts","str","exec","uri","$0","$1","$2","parseUri","anchor","source","set","temp","replacement","setupJSON","polyfillJSON","JSON","maxByteSize","string","count","code","charCodeAt","detection","_","Array","arguments","unshift","ieVersion","console","apply","last","auth","host","hash","pathname","search","parseInt","pathParts","ErrorStackParser","ERR_CLASS_REGEXP","Frame","stackFrame","_stackFrame","fileName","lineNumber","functionName","columnNumber","Stack","exception","skip","stack","parserStack","getStack","_mostSpecificErrorName","rawStack","rawException","constructorName","constructor","guessErrorClass","errMsg","errClassMatch","errClass","nested","traceChain","traverse","scrubPath","scrubPaths","paramRes","pat","ret","_getScrubFieldRegexs","queryRes","_getScrubQueryParamRegexs","redactQueryParam","dummy0","paramPart","scrubber","v","seen","tmpV","valScrubber","paramScrubber","seenIndex","isObj","isArray","mapped","same","rollbar","_rollbarConfig","alias","globalAlias","shimRunning","shimId","_rollbarStartTime","getTime","Rollbar","_rollbarDidLoad","self","telemeter","instrumenter","wrapGlobals","scrub","truncation","setComponents","Client","API","globals","Transport","urllib","transforms","sharedTransforms","predicates","sharedPredicates","client","this","defaultOptions","_configuredOptions","Telemeter","components","Instrumenter","transport","api","gWindow","_gWindow","gDocument","isChrome","chrome","runtime","anonymousErrorsPending","addTransform","handleDomException","handleItemWithError","ensureItemHasSomethingToSay","addBaseInfo","addRequestInfo","addClientInfo","addPluginInfo","addBody","addMessageWithError","addTelemetryData","addConfigToPayload","addScrubber","userTransform","addConfiguredOptions","addDiagnosticKeys","itemToPayload","addTransformsToNotifier","queue","addPredicate","checkLevel","checkIgnore","userCheckIgnore","urlIsNotBlockListed","urlIsSafeListed","messageIsIgnored","setupUnhandledCapture","instrument","_instance","handleUninitialized","maybeCallback","_getFirstFunction","init","global","configure","payloadData","oldOptions","lastError","_createItem","warn","buildJsonPayload","sendJsonPayload","jsonPayload","unhandledExceptionsInitialized","captureUncaught","handleUncaughtExceptions","captureUncaughtExceptions","wrapGlobalEventHandlers","unhandledRejectionsInitialized","captureUnhandledRejections","handleUnhandledRejections","handleUncaughtException","inspectAnonymousErrors","stackInfo","_unhandledStackInfo","uncaughtErrorLevel","_isUncaught","handleAnonymousErrors","prepareStackTrace","_stack","_isAnonymous","handleUnhandledRejection","reason","promise","reasonResult","_rollbarContext","wrap","_before","ctxFn","_isWrap","_rollbar_wrapped","exc","_rollbarWrappedError","_wrappedSource","prop","captureEvent","event","captureDomContentLoaded","ts","captureLoad","loadFull","defaults","version","logLevel","reportLevel","endpoint","verbose","enabled","transmit","sendConfig","includeItemsInTelemetry","ignoreDuplicateErrors","RateLimiter","Queue","Notifier","platform","rateLimiter","configureGlobal","setPlatformOptions","tracer","validateTracer","setStackTraceLimit","lastErrorHash","stackTraceLimit","scope","active","maxItems","itemsPerMinute","_defaultLogLevel","_log","wait","postJsonPayload","defaultLevel","_sameAsLastError","_addTracingInfo","_captureRollbarItem","telemetryEvents","copyEvents","itemHash","generateItemHash","span","spanContext","toSpanId","toTraceId","validateSpan","setTag","opentracingSpanId","opentracingTraceId","opentracing_span_id","opentracing_trace_id","startTime","counter","perMinCounter","platformOptions","checkRate","limit","ignoreRateLimit","shouldSendValue","shouldSend","globalRateLimit","limitPerMin","perMinute","msg","environment","body","extra","language","framework","rateLimitPayload","globalSettings","elapsedTime","globalRateLimitPerMin","hasOwn","toStr","isPlainObject","hasOwnConstructor","hasIsPrototypeOf","src","copy","clone","pendingItems","pendingRequests","retryQueue","retryHandle","waitCallback","waitIntervalID","predicate","addPendingItem","removePendingItem","idx","splice","addItem","originalError","originalItem","predicateResult","_applyPredicates","stop","_maybeLog","_makeApiRequest","_dequeuePendingRequest","_maybeCallWait","clearInterval","setInterval","rateLimitResponse","postItem","_maybeRetry","RETRIABLE_ERRORS","shouldRetry","retryInterval","maxRetries","retries","_retryApiRequest","retryObject","shift","transform","_applyTransforms","transformIndex","transformsLength","cb","helpers","Api","jsonBackup","transportOptions","_getTransport","getTransportFromOptions","buildPayload","post","stringifyResult","truncate","contextResult","timeout","proxy","opts","method","appendPathToPath","base","baseTrailingSlash","pathBeginningSlash","con","dummy","properties","methods","Detection","div","createElement","all","getElementsByTagName","innerHTML","undef","_rollbarWindowOnError","old","handler","shim","oldOnError","_rollbarOldOnError","onerror","fn","_rollbarURH","belongsToShim","removeEventListener","rejectionHandler","evt","detail","addEventListener","_makeZoneRequest","currentZone","Zone","_name","rootZone","_parent","run","_makeRequest","requestFactory","RollbarProxy","json","_msg","_proxyRequest","xmlhttp","factories","XMLHttpRequest","ActiveXObject","numFactories","_createXMLHTTPObject","onreadystatechange","readyState","parseResponse","responseText","status","_isNormalFailure","_newRetriableError","ex","open","setRequestHeader","send","e1","XDomainRequest","xdomainrequest","onprogress","ontimeout","onload","e2","writeData","addBodyMessage","stackFromItem","buildTrace","description","guess","trace","errorClass","frame","pre","contextLength","mid","raw","frames","filename","sendFrameUrl","endsWith","reverse","_savedStackTrace","chain","server","remoteString","query_string","user_ip","nav","scr","screen","runtime_ms","round","javascript","browser","cookie_enabled","cookieEnabled","width","height","cur","plugins","navPlugins","traces","traceChainLength","trace_chain","addBodyTraceChain","className","addBodyTrace","scrubFn","StackFrame","FIREFOX_SAFARI_STACK_REGEXP","CHROME_IE_STACK_REGEXP","SAFARI_NATIVE_CODE_REGEXP","stacktrace","parseOpera","parseV8OrIE","parseFFOrSafari","extractLocation","urlLike","filter","map","sanitizedLine","tokens","locationParts","functionNameRegex","matches","parseOpera9","parseOpera11","parseOpera10","lineRE","lines","argsRaw","functionCall","_capitalize","charAt","toUpperCase","_getter","booleanProps","numericProps","stringProps","props","getArgs","setArgs","TypeError","getEvalOrigin","evalOrigin","setEvalOrigin","getFileName","getLineNumber","getColumnNumber","getFunctionName","getIsEval","fromString","argsStartIndex","argsEndIndex","lastIndexOf","locationString","Boolean","isNaN","parseFloat","addFunctionOption","payloadOptions","tracePath","newExtra","newItem","response","promisedItem","configuredOptions","configured_options","is_anonymous","is_uncaught","raw_error","constructor_name","failed","settings","matchFrames","list","block","listLength","frameLength","urlIsOnAList","safeOrBlock","tracesLength","listName","levelVal","isUncaught","onSendCallback","ignoredMessages","rIgnoredMessage","messages","messagesFromItem","itemsPerMin","maxTelemetryEvents","maxQueueSize","max","min","getLevel","manual","newMaxEvents","deleteCount","events","filterTelemetry","capture","rollbarUUID","timestamp_ms","captureError","captureLog","captureNetwork","subtype","levelFromStatus","status_code","statusCode","captureDom","element","checked","captureNavigation","from","to","captureConnectivityChange","change","urlparser","domUtil","network","networkResponseHeaders","networkResponseBody","networkRequestHeaders","networkRequestBody","networkErrorOnHttp5xx","networkErrorOnHttp4xx","networkErrorOnHttp0","dom","navigation","connectivity","contentSecurityPolicy","errorOnContentSecurityPolicy","replacements","orig","restore","b","_window","_document","autoInstrument","scrubTelemetryInputs","telemetryScrubber","defaultValueScrubber","patterns","attributes","attrs","a","nameFromDescription","eventRemovers","contentsecuritypolicy","_location","_lastHref","oldSettings","deinstrumentNetwork","instrumentNetwork","deinstrumentConsole","instrumentConsole","deinstrumentDom","instrumentDom","deinstrumentNavigation","instrumentNavigation","deinstrumentConnectivity","instrumentConnectivity","deinstrumentContentSecurityPolicy","instrumentContentSecurityPolicy","wrapProp","xhr","xhrp","__rollbar_xhr","start_time_ms","end_time_ms","header","request_headers","request_content_type","onreadystatechangeHandler","__rollbar_event","headers","response_content_type","getResponseHeader","headersConfig","allHeaders","getAllResponseHeaders","trim","isJsonContentType","scrubJson","errorOnHttpStatus","trackHttpErrors","reqHeaders","Headers","fetchHeaders","text","contentType","includes","inHeaders","outHeaders","entries","currentHeader","next","done","wrapConsole","origConsole","removeListeners","clickHandler","handleClick","blurHandler","handleBlur","addListener","getElementFromEvent","hasTag","tagName","anchorOrButton","isDescribedElement","captureDomEvent","handleSelectInputChanged","elem","multiple","selected","selectedIndex","isChecked","getElementType","describeElement","elementString","elementArrayToString","treeToArray","app","history","pushState","handleUrlChange","parsedHref","parsedTo","parsedFrom","handleCspEvent","cspEvent","blockedURI","violatedDirective","effectiveDirective","sourceFile","originalPolicy","handleCspError","cspHandler","section","altType","attachEvent","detachEvent","getAttribute","descriptionToString","desc","out","id","classes","attr","nextStr","totalLength","separatorLength","MAX_LENGTH","nextDescription","parentNode","doc","target","elementFromPoint","clientX","clientY","subtypes","gap","indent","meta","rep","state","container","escapes","number","action","rx_escapable","this_value","valueOf","quote","lastIndex","toJSON","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","\"","replacer","space","holder","partial","mind","go","firstokey","okey","ovalue","firstavalue","avalue","ocomma","acomma","colon","SyntaxError","reviver","tx","ignore","fromCharCode","walk","_extendListenerPrototype","oldAddEventListener","_rollbarOldAdd","addFn","bubble","oldRemoveEventListener","_rollbarOldRemove","removeFn","selectFrames","range","truncateFrames","maybeTruncateValue","truncateStrings","truncator","truncateTraceData","traceData","minBody","needsTruncation","maxSize","strategy","results","strategies"],"mappings":"mDACE,IAAIA,EAAmB,GAGvB,SAASC,E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,OAAeA,EAW5D,IAVA,IAQIC,EAAUC,EAAS7zB,EARnB8zB,EAAa,CACfhW,EACAqV,EACAE,EAAgB56B,KAAK,KAAM,MAC3B46B,EAAgB56B,KAAK,KAAM,KAC3B46B,EAAgB56B,KAAK,KAAM,KAC3Bg7B,GAIMG,EAAWE,EAAWpc,SAI5B,GAFA/W,GADAkzB,EAAUD,EAASjzB,EAASuX,IACV,IAClBlY,EAAS6zB,EAAQ,IACN14B,QAAUu4B,EAAgB1zB,EAAO9H,MAAOy7B,GACjD,OAAO3zB,EAGX,OAAOA,GAOP8d,IAAKA,EACLqV,eAAgBA,EAChBE,gBAAiBA,EACjBD,mBAAoBA","file":"rollbar.named-amd.min.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n","'use strict';\n\nvar merge = require('./merge');\n\nvar RollbarJSON = {};\nfunction setupJSON(polyfillJSON) {\n if (isFunction(RollbarJSON.stringify) && isFunction(RollbarJSON.parse)) {\n return;\n }\n\n if (isDefined(JSON)) {\n // If polyfill is provided, prefer it over existing non-native shims.\n if(polyfillJSON) {\n if (isNativeFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isNativeFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n } else { // else accept any interface that is present.\n if (isFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n }\n }\n if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {\n polyfillJSON && polyfillJSON(RollbarJSON);\n }\n}\n\n/*\n * isType - Given a Javascript value and a string, returns true if the type of the value matches the\n * given string.\n *\n * @param x - any value\n * @param t - a lowercase string containing one of the following type names:\n * - undefined\n * - null\n * - error\n * - number\n * - boolean\n * - string\n * - symbol\n * - function\n * - object\n * - array\n * @returns true if x is of type t, otherwise false\n */\nfunction isType(x, t) {\n return t === typeName(x);\n}\n\n/*\n * typeName - Given a Javascript value, returns the type of the object as a string\n */\nfunction typeName(x) {\n var name = typeof x;\n if (name !== 'object') {\n return name;\n }\n if (!x) {\n return 'null';\n }\n if (x instanceof Error) {\n return 'error';\n }\n return ({}).toString.call(x).match(/\\s([a-zA-Z]+)/)[1].toLowerCase();\n}\n\n/* isFunction - a convenience function for checking if a value is a function\n *\n * @param f - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isFunction(f) {\n return isType(f, 'function');\n}\n\n/* isNativeFunction - a convenience function for checking if a value is a native JS function\n *\n * @param f - any value\n * @returns true if f is a native JS function, otherwise false\n */\nfunction isNativeFunction(f) {\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n var funcMatchString = Function.prototype.toString.call(Object.prototype.hasOwnProperty)\n .replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?');\n var reIsNative = RegExp('^' + funcMatchString + '$');\n return isObject(f) && reIsNative.test(f);\n}\n\n/* isObject - Checks if the argument is an object\n *\n * @param value - any value\n * @returns true is value is an object function is an object)\n*/\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/* isString - Checks if the argument is a string\n *\n * @param value - any value\n * @returns true if value is a string\n*/\nfunction isString(value) {\n return typeof value === 'string' || value instanceof String\n}\n\n/**\n * isFiniteNumber - determines whether the passed value is a finite number\n *\n * @param {*} n - any value\n * @returns true if value is a finite number\n */\n function isFiniteNumber(n) {\n return Number.isFinite(n);\n}\n\n/*\n * isDefined - a convenience function for checking if a value is not equal to undefined\n *\n * @param u - any value\n * @returns true if u is anything other than undefined\n */\nfunction isDefined(u) {\n return !isType(u, 'undefined');\n}\n\n/*\n * isIterable - convenience function for checking if a value can be iterated, essentially\n * whether it is an object or an array.\n *\n * @param i - any value\n * @returns true if i is an object or an array as determined by `typeName`\n */\nfunction isIterable(i) {\n var type = typeName(i);\n return (type === 'object' || type === 'array');\n}\n\n/*\n * isError - convenience function for checking if a value is of an error type\n *\n * @param e - any value\n * @returns true if e is an error\n */\nfunction isError(e) {\n // Detect both Error and Firefox Exception type\n return isType(e, 'error') || isType(e, 'exception');\n}\n\n/* isPromise - a convenience function for checking if a value is a promise\n *\n * @param p - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isPromise(p) {\n return isObject(p) && isType(p.then, 'function');\n}\n\nfunction redact() {\n return '********';\n}\n\n// from http://stackoverflow.com/a/8809472/1138191\nfunction uuid4() {\n var d = now();\n var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n var r = (d + Math.random() * 16) % 16 | 0;\n d = Math.floor(d / 16);\n return (c === 'x' ? r : (r & 0x7 | 0x8)).toString(16);\n });\n return uuid;\n}\n\nvar LEVELS = {\n debug: 0,\n info: 1,\n warning: 2,\n error: 3,\n critical: 4\n};\n\nfunction sanitizeUrl(url) {\n var baseUrlParts = parseUri(url);\n if (!baseUrlParts) {\n return '(unknown)';\n }\n\n // remove a trailing # if there is no anchor\n if (baseUrlParts.anchor === '') {\n baseUrlParts.source = baseUrlParts.source.replace('#', '');\n }\n\n url = baseUrlParts.source.replace('?' + baseUrlParts.query, '');\n return url;\n}\n\nvar parseUriOptions = {\n strictMode: false,\n key: [\n 'source',\n 'protocol',\n 'authority',\n 'userInfo',\n 'user',\n 'password',\n 'host',\n 'port',\n 'relative',\n 'path',\n 'directory',\n 'file',\n 'query',\n 'anchor'\n ],\n q: {\n name: 'queryKey',\n parser: /(?:^|&)([^&=]*)=?([^&]*)/g\n },\n parser: {\n strict: /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n loose: /^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/\n }\n};\n\nfunction parseUri(str) {\n if (!isType(str, 'string')) {\n return undefined;\n }\n\n var o = parseUriOptions;\n var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);\n var uri = {};\n\n for (var i = 0, l = o.key.length; i < l; ++i) {\n uri[o.key[i]] = m[i] || '';\n }\n\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) {\n uri[o.q.name][$1] = $2;\n }\n });\n\n return uri;\n}\n\nfunction addParamsAndAccessTokenToPath(accessToken, options, params) {\n params = params || {};\n params.access_token = accessToken;\n var paramsArray = [];\n var k;\n for (k in params) {\n if (Object.prototype.hasOwnProperty.call(params, k)) {\n paramsArray.push([k, params[k]].join('='));\n }\n }\n var query = '?' + paramsArray.sort().join('&');\n\n options = options || {};\n options.path = options.path || '';\n var qs = options.path.indexOf('?');\n var h = options.path.indexOf('#');\n var p;\n if (qs !== -1 && (h === -1 || h > qs)) {\n p = options.path;\n options.path = p.substring(0,qs) + query + '&' + p.substring(qs+1);\n } else {\n if (h !== -1) {\n p = options.path;\n options.path = p.substring(0,h) + query + p.substring(h);\n } else {\n options.path = options.path + query;\n }\n }\n}\n\nfunction formatUrl(u, protocol) {\n protocol = protocol || u.protocol;\n if (!protocol && u.port) {\n if (u.port === 80) {\n protocol = 'http:';\n } else if (u.port === 443) {\n protocol = 'https:';\n }\n }\n protocol = protocol || 'https:';\n\n if (!u.hostname) {\n return null;\n }\n var result = protocol + '//' + u.hostname;\n if (u.port) {\n result = result + ':' + u.port;\n }\n if (u.path) {\n result = result + u.path;\n }\n return result;\n}\n\nfunction stringify(obj, backup) {\n var value, error;\n try {\n value = RollbarJSON.stringify(obj);\n } catch (jsonError) {\n if (backup && isFunction(backup)) {\n try {\n value = backup(obj);\n } catch (backupError) {\n error = backupError;\n }\n } else {\n error = jsonError;\n }\n }\n return {error: error, value: value};\n}\n\nfunction maxByteSize(string) {\n // The transport will use utf-8, so assume utf-8 encoding.\n //\n // This minimal implementation will accurately count bytes for all UCS-2 and\n // single code point UTF-16. If presented with multi code point UTF-16,\n // which should be rare, it will safely overcount, not undercount.\n //\n // While robust utf-8 encoders exist, this is far smaller and far more performant.\n // For quickly counting payload size for truncation, smaller is better.\n\n var count = 0;\n var length = string.length;\n\n for (var i = 0; i < length; i++) {\n var code = string.charCodeAt(i);\n if (code < 128) { // up to 7 bits\n count = count + 1;\n } else if (code < 2048) { // up to 11 bits\n count = count + 2;\n } else if (code < 65536) { // up to 16 bits\n count = count + 3;\n }\n }\n\n return count;\n}\n\nfunction jsonParse(s) {\n var value, error;\n try {\n value = RollbarJSON.parse(s);\n } catch (e) {\n error = e;\n }\n return {error: error, value: value};\n}\n\nfunction makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n mode,\n backupMessage,\n errorParser\n) {\n var location = {\n url: url || '',\n line: lineno,\n column: colno\n };\n location.func = errorParser.guessFunctionName(location.url, location.line);\n location.context = errorParser.gatherContext(location.url, location.line);\n var href = typeof document !== 'undefined' && document && document.location && document.location.href;\n var useragent = typeof window !== 'undefined' && window && window.navigator && window.navigator.userAgent;\n return {\n 'mode': mode,\n 'message': error ? String(error) : (message || backupMessage),\n 'url': href,\n 'stack': [location],\n 'useragent': useragent\n };\n}\n\nfunction wrapCallback(logger, f) {\n return function(err, resp) {\n try {\n f(err, resp);\n } catch (e) {\n logger.error(e);\n }\n };\n}\n\nfunction createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\n var diagnostic = {};\n var argTypes = [];\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n argTypes.push(typ);\n switch (typ) {\n case 'undefined':\n break;\n case 'string':\n message ? extraArgs.push(arg) : message = arg;\n break;\n case 'function':\n callback = wrapCallback(logger, arg);\n break;\n case 'date':\n extraArgs.push(arg);\n break;\n case 'error':\n case 'domexception':\n case 'exception': // Firefox Exception type\n err ? extraArgs.push(arg) : err = arg;\n break;\n case 'object':\n case 'array':\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n if (requestKeys && typ === 'object' && !request) {\n for (var j = 0, len = requestKeys.length; j < len; ++j) {\n if (arg[requestKeys[j]] !== undefined) {\n request = arg;\n break;\n }\n }\n if (request) {\n break;\n }\n }\n custom ? extraArgs.push(arg) : custom = arg;\n break;\n default:\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n extraArgs.push(arg);\n }\n }\n\n if (extraArgs.length > 0) {\n // if custom is an array this turns it into an object with integer keys\n custom = merge(custom);\n custom.extraArgs = extraArgs;\n }\n\n var item = {\n message: message,\n err: err,\n custom: custom,\n timestamp: now(),\n callback: callback,\n notifier: notifier,\n diagnostic: diagnostic,\n uuid: uuid4()\n };\n\n setCustomItemKeys(item, custom);\n\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n item.diagnostic.original_arg_types = argTypes;\n return item;\n}\n\nfunction setCustomItemKeys(item, custom) {\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (custom && custom.skipFrames !== undefined) {\n item.skipFrames = custom.skipFrames;\n delete custom.skipFrames;\n }\n}\n\nfunction addErrorContext(item, errors) {\n var custom = item.data.custom || {};\n var contextAdded = false;\n\n try {\n for (var i = 0; i < errors.length; ++i) {\n if (errors[i].hasOwnProperty('rollbarContext')) {\n custom = merge(custom, errors[i].rollbarContext);\n contextAdded = true;\n }\n }\n\n // Avoid adding an empty object to the data.\n if (contextAdded) {\n item.data.custom = custom;\n }\n } catch (e) {\n item.diagnostic.error_context = 'Failed: ' + e.message;\n }\n}\n\nvar TELEMETRY_TYPES = ['log', 'network', 'dom', 'navigation', 'error', 'manual'];\nvar TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];\n\nfunction arrayIncludes(arr, val) {\n for (var k = 0; k < arr.length; ++k) {\n if (arr[k] === val) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction createTelemetryEvent(args) {\n var type, metadata, level;\n var arg;\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n switch (typ) {\n case 'string':\n if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {\n type = arg;\n } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {\n level = arg;\n }\n break;\n case 'object':\n metadata = arg;\n break;\n default:\n break;\n }\n }\n var event = {\n type: type || 'manual',\n metadata: metadata || {},\n level: level\n };\n\n return event;\n}\n\n/*\n * get - given an obj/array and a keypath, return the value at that keypath or\n * undefined if not possible.\n *\n * @param obj - an object or array\n * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'\n * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`\n */\nfunction get(obj, path) {\n if (!obj) {\n return undefined;\n }\n var keys = path.split('.');\n var result = obj;\n try {\n for (var i = 0, len = keys.length; i < len; ++i) {\n result = result[keys[i]];\n }\n } catch (e) {\n result = undefined;\n }\n return result;\n}\n\nfunction set(obj, path, value) {\n if (!obj) {\n return;\n }\n var keys = path.split('.');\n var len = keys.length;\n if (len < 1) {\n return;\n }\n if (len === 1) {\n obj[keys[0]] = value;\n return;\n }\n try {\n var temp = obj[keys[0]] || {};\n var replacement = temp;\n for (var i = 1; i < len - 1; ++i) {\n temp[keys[i]] = temp[keys[i]] || {};\n temp = temp[keys[i]];\n }\n temp[keys[len-1]] = value;\n obj[keys[0]] = replacement;\n } catch (e) {\n return;\n }\n}\n\nfunction formatArgsAsString(args) {\n var i, len, arg;\n var result = [];\n for (i = 0, len = args.length; i < len; ++i) {\n arg = args[i];\n switch (typeName(arg)) {\n case 'object':\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500) {\n arg = arg.substr(0, 497) + '...';\n }\n break;\n case 'null':\n arg = 'null';\n break;\n case 'undefined':\n arg = 'undefined';\n break;\n case 'symbol':\n arg = arg.toString();\n break;\n }\n result.push(arg);\n }\n return result.join(' ');\n}\n\nfunction now() {\n if (Date.now) {\n return +Date.now();\n }\n return +new Date();\n}\n\nfunction filterIp(requestData, captureIp) {\n if (!requestData || !requestData['user_ip'] || captureIp === true) {\n return;\n }\n var newIp = requestData['user_ip'];\n if (!captureIp) {\n newIp = null;\n } else {\n try {\n var parts;\n if (newIp.indexOf('.') !== -1) {\n parts = newIp.split('.');\n parts.pop();\n parts.push('0');\n newIp = parts.join('.');\n } else if (newIp.indexOf(':') !== -1) {\n parts = newIp.split(':');\n if (parts.length > 2) {\n var beginning = parts.slice(0, 3);\n var slashIdx = beginning[2].indexOf('/');\n if (slashIdx !== -1) {\n beginning[2] = beginning[2].substring(0, slashIdx);\n }\n var terminal = '0000:0000:0000:0000:0000';\n newIp = beginning.concat(terminal).join(':');\n }\n } else {\n newIp = null;\n }\n } catch (e) {\n newIp = null;\n }\n }\n requestData['user_ip'] = newIp;\n}\n\nfunction handleOptions(current, input, payload, logger) {\n var result = merge(current, input, payload);\n result = updateDeprecatedOptions(result, logger);\n if (!input || input.overwriteScrubFields) {\n return result;\n }\n if (input.scrubFields) {\n result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);\n }\n return result;\n}\n\nfunction updateDeprecatedOptions(options, logger) {\n if(options.hostWhiteList && !options.hostSafeList) {\n options.hostSafeList = options.hostWhiteList;\n options.hostWhiteList = undefined;\n logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');\n }\n if(options.hostBlackList && !options.hostBlockList) {\n options.hostBlockList = options.hostBlackList;\n options.hostBlackList = undefined;\n logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');\n }\n return options;\n}\n\nmodule.exports = {\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n createItem: createItem,\n addErrorContext: addErrorContext,\n createTelemetryEvent: createTelemetryEvent,\n filterIp: filterIp,\n formatArgsAsString: formatArgsAsString,\n formatUrl: formatUrl,\n get: get,\n handleOptions: handleOptions,\n isError: isError,\n isFiniteNumber: isFiniteNumber,\n isFunction: isFunction,\n isIterable: isIterable,\n isNativeFunction: isNativeFunction,\n isObject: isObject,\n isString: isString,\n isType: isType,\n isPromise: isPromise,\n jsonParse: jsonParse,\n LEVELS: LEVELS,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n merge: merge,\n now: now,\n redact: redact,\n RollbarJSON: RollbarJSON,\n sanitizeUrl: sanitizeUrl,\n set: set,\n setupJSON: setupJSON,\n stringify: stringify,\n maxByteSize: maxByteSize,\n typeName: typeName,\n uuid4: uuid4\n};\n","'use strict';\n\n/* eslint-disable no-console */\nrequire('console-polyfill');\nvar detection = require('./detection');\nvar _ = require('../utility');\n\nfunction error() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.error(_.formatArgsAsString(args));\n } else {\n console.error.apply(console, args);\n }\n}\n\nfunction info() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.info(_.formatArgsAsString(args));\n } else {\n console.info.apply(console, args);\n }\n}\n\nfunction log() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.log(_.formatArgsAsString(args));\n } else {\n console.log.apply(console, args);\n }\n}\n\n/* eslint-enable no-console */\n\nmodule.exports = {\n error: error,\n info: info,\n log: log\n};\n","'use strict';\n\n// See https://nodejs.org/docs/latest/api/url.html\nfunction parse(url) {\n var result = {\n protocol: null, auth: null, host: null, path: null,\n hash: null, href: url, hostname: null, port: null,\n pathname: null, search: null, query: null\n };\n\n var i, last;\n i = url.indexOf('//');\n if (i !== -1) {\n result.protocol = url.substring(0,i);\n last = i+2;\n } else {\n last = 0;\n }\n \n i = url.indexOf('@', last);\n if (i !== -1) {\n result.auth = url.substring(last, i);\n last = i+1;\n }\n\n i = url.indexOf('/', last);\n if (i === -1) {\n i = url.indexOf('?', last);\n if (i === -1) {\n i = url.indexOf('#', last);\n if (i === -1) {\n result.host = url.substring(last);\n } else {\n result.host = url.substring(last, i);\n result.hash = url.substring(i);\n }\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n return result;\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n\n i = url.indexOf('#', last);\n if (i === -1) {\n result.path = url.substring(last);\n } else {\n result.path = url.substring(last, i);\n result.hash = url.substring(i);\n }\n\n if (result.path) {\n var pathParts = result.path.split('?');\n result.pathname = pathParts[0];\n result.query = pathParts[1];\n result.search = result.query ? '?' + result.query : null;\n }\n return result;\n}\n\nmodule.exports = {\n parse: parse\n};\n","'use strict';\n\nvar ErrorStackParser = require('error-stack-parser');\n\nvar UNKNOWN_FUNCTION = '?';\nvar ERR_CLASS_REGEXP = new RegExp('^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ');\n\nfunction guessFunctionName() {\n return UNKNOWN_FUNCTION;\n}\n\n\nfunction gatherContext() {\n return null;\n}\n\n\nfunction Frame(stackFrame) {\n var data = {};\n\n data._stackFrame = stackFrame;\n\n data.url = stackFrame.fileName;\n data.line = stackFrame.lineNumber;\n data.func = stackFrame.functionName;\n data.column = stackFrame.columnNumber;\n data.args = stackFrame.args;\n\n data.context = gatherContext();\n\n return data;\n}\n\n\nfunction Stack(exception, skip) {\n function getStack() {\n var parserStack = [];\n\n skip = skip || 0;\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch(e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = skip; i < parserStack.length; i++) {\n stack.push(new Frame(parserStack[i]));\n }\n\n return stack;\n }\n\n return {\n stack: getStack(),\n message: exception.message,\n name: _mostSpecificErrorName(exception),\n rawStack: exception.stack,\n rawException: exception\n };\n}\n\n\nfunction parse(e, skip) {\n var err = e;\n\n if (err.nested) {\n var traceChain = [];\n while (err) {\n traceChain.push(new Stack(err, skip));\n err = err.nested;\n\n skip = 0; // Only apply skip value to primary error\n }\n\n // Return primary error with full trace chain attached.\n traceChain[0].traceChain = traceChain;\n return traceChain[0];\n } else {\n return new Stack(err, skip);\n }\n}\n\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg || !errMsg.match) {\n return ['Unknown error. There was no error message to display.', ''];\n }\n var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);\n var errClass = '(unknown)';\n\n if (errClassMatch) {\n errClass = errClassMatch[errClassMatch.length - 1];\n errMsg = errMsg.replace((errClassMatch[errClassMatch.length - 2] || '') + errClass + ':', '');\n errMsg = errMsg.replace(/(^[\\s]+|[\\s]+$)/g, '');\n }\n return [errClass, errMsg];\n}\n\n// * Prefers any value over an empty string\n// * Prefers any value over 'Error' where possible\n// * Prefers name over constructor.name when both are more specific than 'Error'\nfunction _mostSpecificErrorName(error) {\n var name = error.name && error.name.length && error.name;\n var constructorName = error.constructor.name && error.constructor.name.length && error.constructor.name;\n\n if (!name || !constructorName) {\n return name || constructorName;\n }\n\n if (name === 'Error') {\n return constructorName;\n }\n return name;\n}\n\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame\n};\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction scrub(data, scrubFields, scrubPaths) {\n scrubFields = scrubFields || [];\n\n if (scrubPaths) {\n for (var i = 0; i < scrubPaths.length; ++i) {\n scrubPath(data, scrubPaths[i]);\n }\n }\n\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart) {\n return paramPart + _.redact();\n }\n\n function paramScrubber(v) {\n var i;\n if (_.isType(v, 'string')) {\n for (i = 0; i < queryRes.length; ++i) {\n v = v.replace(queryRes[i], redactQueryParam);\n }\n }\n return v;\n }\n\n function valScrubber(k, v) {\n var i;\n for (i = 0; i < paramRes.length; ++i) {\n if (paramRes[i].test(k)) {\n v = _.redact();\n break;\n }\n }\n return v;\n }\n\n function scrubber(k, v, seen) {\n var tmpV = valScrubber(k, v);\n if (tmpV === v) {\n if (_.isType(v, 'object') || _.isType(v, 'array')) {\n return traverse(v, scrubber, seen);\n }\n return paramScrubber(tmpV);\n } else {\n return tmpV;\n }\n }\n\n return traverse(data, scrubber);\n}\n\nfunction scrubPath(obj, path) {\n var keys = path.split('.');\n var last = keys.length - 1;\n try {\n for (var i = 0; i <= last; ++i) {\n if (i < last) {\n obj = obj[keys[i]];\n } else {\n obj[keys[i]] = _.redact();\n }\n }\n } catch (e) {\n // Missing key is OK;\n }\n}\n\nfunction _getScrubFieldRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '^\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?$';\n ret.push(new RegExp(pat, 'i'));\n }\n return ret;\n}\n\n\nfunction _getScrubQueryParamRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?';\n ret.push(new RegExp('(' + pat + '=)([^&\\\\n]+)', 'igm'));\n }\n return ret;\n}\n\nmodule.exports = scrub;\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction traverse(obj, func, seen) {\n var k, v, i;\n var isObj = _.isType(obj, 'object');\n var isArray = _.isType(obj, 'array');\n var keys = [];\n var seenIndex;\n\n // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.\n seen = seen || { obj: [], mapped: []};\n\n if (isObj) {\n seenIndex = seen.obj.indexOf(obj);\n\n if (isObj && seenIndex !== -1) {\n // Prefer the mapped object if there is one.\n return seen.mapped[seenIndex] || seen.obj[seenIndex];\n }\n\n seen.obj.push(obj);\n seenIndex = seen.obj.length - 1;\n }\n\n if (isObj) {\n for (k in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, k)) {\n keys.push(k);\n }\n }\n } else if (isArray) {\n for (i = 0; i < obj.length; ++i) {\n keys.push(i);\n }\n }\n\n var result = isObj ? {} : [];\n var same = true;\n for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n result[k] = func(k, v, seen);\n same = same && result[k] === obj[k];\n }\n\n if (isObj && !same) {\n seen.mapped[seenIndex] = result;\n }\n\n return !same ? result : obj;\n}\n\nmodule.exports = traverse;\n","'use strict';\n\nvar rollbar = require('../rollbar');\n\nvar options = (typeof window !== 'undefined') && window._rollbarConfig;\nvar alias = options && options.globalAlias || 'Rollbar';\nvar shimRunning = (typeof window !== 'undefined') && window[alias] && typeof window[alias].shimId === 'function' && window[alias].shimId() !== undefined;\n\nif ((typeof window !== 'undefined') && !window._rollbarStartTime) {\n window._rollbarStartTime = (new Date()).getTime();\n}\n\nif (!shimRunning && options) {\n var Rollbar = new rollbar(options);\n window[alias] = Rollbar;\n} else if (typeof window !== 'undefined') {\n window.rollbar = rollbar;\n window._rollbarDidLoad = true;\n} else if (typeof self !== 'undefined') {\n self.rollbar = rollbar;\n self._rollbarDidLoad = true;\n}\n\nmodule.exports = rollbar;\n","'use strict';\n\nvar Rollbar = require('./core');\nvar telemeter = require('../telemetry');\nvar instrumenter = require('./telemetry');\nvar polyfillJSON = require('../utility/polyfillJSON');\nvar wrapGlobals = require('./wrapGlobals');\nvar scrub = require('../scrub');\nvar truncation = require('../truncation');\n\nRollbar.setComponents({\n telemeter: telemeter,\n instrumenter: instrumenter,\n polyfillJSON: polyfillJSON,\n wrapGlobals: wrapGlobals,\n scrub: scrub,\n truncation: truncation\n});\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar Client = require('../rollbar');\nvar _ = require('../utility');\nvar API = require('../api');\nvar logger = require('./logger');\nvar globals = require('./globalSetup');\n\nvar Transport = require('./transport');\nvar urllib = require('./url');\n\nvar transforms = require('./transforms');\nvar sharedTransforms = require('../transforms');\nvar predicates = require('./predicates');\nvar sharedPredicates = require('../predicates');\nvar errorParser = require('../errorParser');\n\nfunction Rollbar(options, client) {\n this.options = _.handleOptions(defaultOptions, options, null, logger);\n this.options._configuredOptions = options;\n var Telemeter = this.components.telemeter;\n var Instrumenter = this.components.instrumenter;\n var polyfillJSON = this.components.polyfillJSON;\n this.wrapGlobals = this.components.wrapGlobals;\n this.scrub = this.components.scrub;\n var truncation = this.components.truncation;\n\n var transport = new Transport(truncation);\n var api = new API(this.options, transport, urllib, truncation);\n if (Telemeter) {\n this.telemeter = new Telemeter(this.options);\n }\n this.client = client || new Client(this.options, api, logger, this.telemeter, 'browser');\n var gWindow = _gWindow();\n var gDocument = (typeof document != 'undefined') && document;\n this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers\n this.anonymousErrorsPending = 0;\n addTransformsToNotifier(this.client.notifier, this, gWindow);\n addPredicatesToQueue(this.client.queue);\n this.setupUnhandledCapture();\n if (Instrumenter) {\n this.instrumenter = new Instrumenter(this.options, this.client.telemeter, this, gWindow, gDocument);\n this.instrumenter.instrument();\n }\n _.setupJSON(polyfillJSON);\n}\n\nvar _instance = null;\nRollbar.init = function(options, client) {\n if (_instance) {\n return _instance.global(options).configure(options);\n }\n _instance = new Rollbar(options, client);\n return _instance;\n};\n\nRollbar.prototype.components = {};\n\nRollbar.setComponents = function(components) {\n Rollbar.prototype.components = components;\n}\n\nfunction handleUninitialized(maybeCallback) {\n var message = 'Rollbar is not initialized';\n logger.error(message);\n if (maybeCallback) {\n maybeCallback(new Error(message));\n }\n}\n\nRollbar.prototype.global = function(options) {\n this.client.global(options);\n return this;\n};\nRollbar.global = function(options) {\n if (_instance) {\n return _instance.global(options);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.configure = function(options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = {payload: payloadData};\n }\n this.options = _.handleOptions(oldOptions, options, payload, logger);\n this.options._configuredOptions = _.handleOptions(oldOptions._configuredOptions, options, payload);\n this.client.configure(this.options, payloadData);\n this.instrumenter && this.instrumenter.configure(this.options);\n this.setupUnhandledCapture();\n return this;\n};\nRollbar.configure = function(options, payloadData) {\n if (_instance) {\n return _instance.configure(options, payloadData);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.lastError = function() {\n return this.client.lastError;\n};\nRollbar.lastError = function() {\n if (_instance) {\n return _instance.lastError();\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.log = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.log(item);\n return {uuid: uuid};\n};\nRollbar.log = function() {\n if (_instance) {\n return _instance.log.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.debug = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.debug(item);\n return {uuid: uuid};\n};\nRollbar.debug = function() {\n if (_instance) {\n return _instance.debug.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.info = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.info(item);\n return {uuid: uuid};\n};\nRollbar.info = function() {\n if (_instance) {\n return _instance.info.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warn = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warn(item);\n return {uuid: uuid};\n};\nRollbar.warn = function() {\n if (_instance) {\n return _instance.warn.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warning = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warning(item);\n return {uuid: uuid};\n};\nRollbar.warning = function() {\n if (_instance) {\n return _instance.warning.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.error = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.error(item);\n return {uuid: uuid};\n};\nRollbar.error = function() {\n if (_instance) {\n return _instance.error.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.critical = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.critical(item);\n return {uuid: uuid};\n};\nRollbar.critical = function() {\n if (_instance) {\n return _instance.critical.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.buildJsonPayload = function(item) {\n return this.client.buildJsonPayload(item);\n};\nRollbar.buildJsonPayload = function() {\n if (_instance) {\n return _instance.buildJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.sendJsonPayload = function(jsonPayload) {\n return this.client.sendJsonPayload(jsonPayload);\n};\nRollbar.sendJsonPayload = function() {\n if (_instance) {\n return _instance.sendJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.setupUnhandledCapture = function() {\n var gWindow = _gWindow();\n\n if (!this.unhandledExceptionsInitialized) {\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(gWindow, this);\n if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {\n this.wrapGlobals(gWindow, this);\n }\n this.unhandledExceptionsInitialized = true;\n }\n }\n if (!this.unhandledRejectionsInitialized) {\n if (this.options.captureUnhandledRejections || this.options.handleUnhandledRejections) {\n globals.captureUnhandledRejections(gWindow, this);\n this.unhandledRejectionsInitialized = true;\n }\n }\n};\n\nRollbar.prototype.handleUncaughtException = function(message, url, lineno, colno, error, context) {\n if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {\n return;\n }\n\n // Chrome will always send 5+ arguments and error will be valid or null, not undefined.\n // If error is undefined, we have a different caller.\n // Chrome also sends errors from web workers with null error, but does not invoke\n // prepareStackTrace() for these. Test for empty url to skip them.\n if (this.options.inspectAnonymousErrors && this.isChrome && error === null && url === '') {\n return 'anonymous';\n }\n\n var item;\n var stackInfo = _.makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n 'onerror',\n 'uncaught exception',\n errorParser\n );\n if (_.isError(error)) {\n item = this._createItem([message, error, context]);\n item._unhandledStackInfo = stackInfo;\n } else if (_.isError(url)) {\n item = this._createItem([message, url, context]);\n item._unhandledStackInfo = stackInfo;\n } else {\n item = this._createItem([message, context]);\n item.stackInfo = stackInfo;\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n this.client.log(item);\n};\n\n/**\n * Chrome only. Other browsers will ignore.\n *\n * Use Error.prepareStackTrace to extract information about errors that\n * do not have a valid error object in onerror().\n *\n * In tested version of Chrome, onerror is called first but has no way\n * to communicate with prepareStackTrace. Use a counter to let this\n * handler know which errors to send to Rollbar.\n *\n * In config options, set inspectAnonymousErrors to enable.\n */\nRollbar.prototype.handleAnonymousErrors = function() {\n if (!this.options.inspectAnonymousErrors || !this.isChrome) {\n return;\n }\n\n var r = this;\n function prepareStackTrace(error, _stack) { // eslint-disable-line no-unused-vars\n if (r.options.inspectAnonymousErrors) {\n if (r.anonymousErrorsPending) {\n // This is the only known way to detect that onerror saw an anonymous error.\n // It depends on onerror reliably being called before Error.prepareStackTrace,\n // which so far holds true on tested versions of Chrome. If versions of Chrome\n // are tested that behave differently, this logic will need to be updated\n // accordingly.\n r.anonymousErrorsPending -= 1;\n\n if (!error) {\n // Not likely to get here, but calling handleUncaughtException from here\n // without an error object would throw off the anonymousErrorsPending counter,\n // so return now.\n return;\n }\n\n // Allow this to be tracked later.\n error._isAnonymous = true;\n\n // url, lineno, colno shouldn't be needed for these errors.\n // If that changes, update this accordingly, using the unused\n // _stack param as needed (rather than parse error.toString()).\n r.handleUncaughtException(error.message, null, null, null, error);\n }\n }\n\n // Workaround to ensure stack is preserved for normal errors.\n return error.stack;\n }\n\n // https://v8.dev/docs/stack-trace-api\n try {\n Error.prepareStackTrace = prepareStackTrace;\n } catch (e) {\n this.options.inspectAnonymousErrors = false;\n this.error('anonymous error handler failed', e);\n }\n}\n\nRollbar.prototype.handleUnhandledRejection = function(reason, promise) {\n if (!this.options.captureUnhandledRejections && !this.options.handleUnhandledRejections) {\n return;\n }\n\n var message = 'unhandled rejection was null or undefined!';\n if (reason) {\n if (reason.message) {\n message = reason.message;\n } else {\n var reasonResult = _.stringify(reason);\n if (reasonResult.value) {\n message = reasonResult.value;\n }\n }\n }\n var context = (reason && reason._rollbarContext) || (promise && promise._rollbarContext);\n\n var item;\n if (_.isError(reason)) {\n item = this._createItem([message, reason, context]);\n } else {\n item = this._createItem([message, reason, context]);\n item.stackInfo = _.makeUnhandledStackInfo(\n message,\n '',\n 0,\n 0,\n null,\n 'unhandledrejection',\n '',\n errorParser\n );\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n item._originalArgs = item._originalArgs || [];\n item._originalArgs.push(promise);\n this.client.log(item);\n};\n\nRollbar.prototype.wrap = function(f, context, _before) {\n try {\n var ctxFn;\n if(_.isFunction(context)) {\n ctxFn = context;\n } else {\n ctxFn = function() { return context || {}; };\n }\n\n if (!_.isFunction(f)) {\n return f;\n }\n\n if (f._isWrap) {\n return f;\n }\n\n if (!f._rollbar_wrapped) {\n f._rollbar_wrapped = function () {\n if (_before && _.isFunction(_before)) {\n _before.apply(this, arguments);\n }\n try {\n return f.apply(this, arguments);\n } catch(exc) {\n var e = exc;\n if (e && window._rollbarWrappedError !== e) {\n if (_.isType(e, 'string')) {\n e = new String(e);\n }\n e._rollbarContext = ctxFn() || {};\n e._rollbarContext._wrappedSource = f.toString();\n\n window._rollbarWrappedError = e;\n }\n throw e;\n }\n };\n\n f._rollbar_wrapped._isWrap = true;\n\n if (f.hasOwnProperty) {\n for (var prop in f) {\n if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {\n f._rollbar_wrapped[prop] = f[prop];\n }\n }\n }\n }\n\n return f._rollbar_wrapped;\n } catch (e) {\n // Return the original function if the wrap fails.\n return f;\n }\n};\nRollbar.wrap = function(f, context) {\n if (_instance) {\n return _instance.wrap(f, context);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.captureEvent = function() {\n var event = _.createTelemetryEvent(arguments);\n return this.client.captureEvent(event.type, event.metadata, event.level);\n};\nRollbar.captureEvent = function() {\n if (_instance) {\n return _instance.captureEvent.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\n// The following two methods are used internally and are not meant for public use\nRollbar.prototype.captureDomContentLoaded = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureLoad(ts);\n};\n\n/* Internal */\n\nfunction addTransformsToNotifier(notifier, rollbar, gWindow) {\n notifier\n .addTransform(transforms.handleDomException)\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(gWindow))\n .addTransform(transforms.addClientInfo(gWindow))\n .addTransform(transforms.addPluginInfo(gWindow))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(sharedTransforms.addConfigToPayload)\n .addTransform(transforms.addScrubber(rollbar.scrub))\n .addTransform(sharedTransforms.userTransform(logger))\n .addTransform(sharedTransforms.addConfiguredOptions)\n .addTransform(sharedTransforms.addDiagnosticKeys)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(sharedPredicates.checkLevel)\n .addPredicate(predicates.checkIgnore)\n .addPredicate(sharedPredicates.userCheckIgnore(logger))\n .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))\n .addPredicate(sharedPredicates.urlIsSafeListed(logger))\n .addPredicate(sharedPredicates.messageIsIgnored(logger));\n}\n\nRollbar.prototype.loadFull = function() {\n logger.info('Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.');\n};\n\nRollbar.prototype._createItem = function(args) {\n return _.createItem(args, logger, this);\n};\n\nfunction _getFirstFunction(args) {\n for (var i = 0, len = args.length; i < len; ++i) {\n if (_.isFunction(args[i])) {\n return args[i];\n }\n }\n return undefined;\n}\n\nfunction _gWindow() {\n return ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n}\n\nvar defaults = require('../defaults');\nvar scrubFields = require('./defaults/scrubFields');\n\nvar defaultOptions = {\n version: defaults.version,\n scrubFields: scrubFields.scrubFields,\n logLevel: defaults.logLevel,\n reportLevel: defaults.reportLevel,\n uncaughtErrorLevel: defaults.uncaughtErrorLevel,\n endpoint: defaults.endpoint,\n verbose: false,\n enabled: true,\n transmit: true,\n sendConfig: false,\n includeItemsInTelemetry: true,\n captureIp: true,\n inspectAnonymousErrors: true,\n ignoreDuplicateErrors: true,\n wrapGlobalEventHandlers: false\n};\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar _ = require('./utility');\n\n/*\n * Rollbar - the interface to Rollbar\n *\n * @param options\n * @param api\n * @param logger\n */\nfunction Rollbar(options, api, logger, telemeter, platform) {\n this.options = _.merge(options);\n this.logger = logger;\n Rollbar.rateLimiter.configureGlobal(this.options);\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.api = api;\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n\n // This must happen before the Notifier is created\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = telemeter;\n setStackTraceLimit(options);\n this.lastError = null;\n this.lastErrorHash = 'none';\n}\n\nvar defaultOptions = {\n maxItems: 0,\n itemsPerMinute: 60\n};\n\nRollbar.rateLimiter = new RateLimiter(defaultOptions);\n\nRollbar.prototype.global = function (options) {\n Rollbar.rateLimiter.configureGlobal(options);\n return this;\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n\n this.options = _.merge(oldOptions, options, payload);\n\n // This must happen before the Notifier is configured\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier && this.notifier.configure(this.options);\n this.telemeter && this.telemeter.configure(this.options);\n setStackTraceLimit(options);\n this.global(this.options);\n\n if (validateTracer(options.tracer)) {\n this.tracer = options.tracer\n }\n\n return this;\n};\n\nRollbar.prototype.log = function (item) {\n var level = this._defaultLogLevel();\n return this._log(level, item);\n};\n\nRollbar.prototype.debug = function (item) {\n this._log('debug', item);\n};\n\nRollbar.prototype.info = function (item) {\n this._log('info', item);\n};\n\nRollbar.prototype.warn = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.warning = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.error = function (item) {\n this._log('error', item);\n};\n\nRollbar.prototype.critical = function (item) {\n this._log('critical', item);\n};\n\nRollbar.prototype.wait = function (callback) {\n this.queue.wait(callback);\n};\n\nRollbar.prototype.captureEvent = function (type, metadata, level) {\n return this.telemeter && this.telemeter.captureEvent(type, metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function (ts) {\n return this.telemeter && this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (ts) {\n return this.telemeter && this.telemeter.captureLoad(ts);\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.api.buildJsonPayload(item);\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n this.api.postJsonPayload(jsonPayload);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function (defaultLevel, item) {\n var callback;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {\n if (callback) {\n var error = new Error('ignored identical item');\n error.item = item;\n callback(error);\n }\n return;\n }\n try {\n this._addTracingInfo(item);\n item.level = item.level || defaultLevel;\n this.telemeter && this.telemeter._captureRollbarItem(item);\n item.telemetryEvents = (this.telemeter && this.telemeter.copyEvents()) || [];\n this.notifier.log(item, callback);\n } catch (e) {\n if (callback) {\n callback(e);\n }\n this.logger.error(e);\n }\n};\n\nRollbar.prototype._defaultLogLevel = function () {\n return this.options.logLevel || 'debug';\n};\n\nRollbar.prototype._sameAsLastError = function (item) {\n if (!item._isUncaught) {\n return false;\n }\n var itemHash = generateItemHash(item);\n if (this.lastErrorHash === itemHash) {\n return true;\n }\n this.lastError = item.err;\n this.lastErrorHash = itemHash;\n return false;\n};\n\nRollbar.prototype._addTracingInfo = function (item) {\n // Tracer validation occurs in the constructor\n // or in the Rollbar.prototype.configure methods\n if (this.tracer) {\n // add rollbar occurrence uuid to span\n var span = this.tracer.scope().active();\n\n if (validateSpan(span)) {\n span.setTag('rollbar.error_uuid', item.uuid);\n span.setTag('rollbar.has_error', true);\n span.setTag('error', true);\n span.setTag('rollbar.item_url', `https://rollbar.com/item/uuid/?uuid=${item.uuid}`);\n span.setTag('rollbar.occurrence_url', `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`);\n\n // add span ID & trace ID to occurrence\n var opentracingSpanId = span.context().toSpanId();\n var opentracingTraceId = span.context().toTraceId();\n\n if (item.custom) {\n item.custom.opentracing_span_id = opentracingSpanId;\n item.custom.opentracing_trace_id = opentracingTraceId;\n } else {\n item.custom = {\n opentracing_span_id: opentracingSpanId,\n opentracing_trace_id: opentracingTraceId\n };\n }\n }\n }\n}\n\nfunction generateItemHash(item) {\n var message = item.message || '';\n var stack = (item.err || {}).stack || String(item.err);\n return message + '::' + stack;\n}\n\n// Node.js, Chrome, Safari, and some other browsers support this property\n// which globally sets the number of stack frames returned in an Error object.\n// If a browser can't use it, no harm done.\nfunction setStackTraceLimit(options) {\n if (options.stackTraceLimit) {\n Error.stackTraceLimit = options.stackTraceLimit;\n }\n}\n\n/**\n * Validate the Tracer object provided to the Client\n * is valid for our Opentracing use case.\n * @param {opentracer.Tracer} tracer\n */\nfunction validateTracer(tracer) {\n if (!tracer) {\n return false;\n }\n\n if (!tracer.scope || typeof tracer.scope !== 'function') {\n return false;\n }\n\n var scope = tracer.scope();\n\n if (!scope || !scope.active || typeof scope.active !== 'function') {\n return false;\n }\n\n return true;\n}\n\n/**\n * Validate the Span object provided\n * @param {opentracer.Span} span\n */\nfunction validateSpan(span) {\n if (!span || !span.context || typeof span.context !== 'function') {\n return false;\n }\n\n var spanContext = span.context();\n\n if (!spanContext\n || !spanContext.toSpanId\n || !spanContext.toTraceId\n || typeof spanContext.toSpanId !== 'function'\n || typeof spanContext.toTraceId !== 'function') {\n return false\n }\n\n return true;\n}\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar\n *\n * @param options - the same options that are accepted by configureGlobal offered as a convenience\n */\nfunction RateLimiter(options) {\n this.startTime = _.now();\n this.counter = 0;\n this.perMinCounter = 0;\n this.platform = null;\n this.platformOptions = {};\n this.configureGlobal(options);\n}\n\nRateLimiter.globalSettings = {\n startTime: _.now(),\n maxItems: undefined,\n itemsPerMinute: undefined\n};\n\n/*\n * configureGlobal - set the global rate limiter options\n *\n * @param options - Only the following values are recognized:\n * startTime: a timestamp of the form returned by (new Date()).getTime()\n * maxItems: the maximum items\n * itemsPerMinute: the max number of items to send in a given minute\n */\nRateLimiter.prototype.configureGlobal = function(options) {\n if (options.startTime !== undefined) {\n RateLimiter.globalSettings.startTime = options.startTime;\n }\n if (options.maxItems !== undefined) {\n RateLimiter.globalSettings.maxItems = options.maxItems;\n }\n if (options.itemsPerMinute !== undefined) {\n RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;\n }\n};\n\n/*\n * shouldSend - determine if we should send a given item based on rate limit settings\n *\n * @param item - the item we are about to send\n * @returns An object with the following structure:\n * error: (Error|null)\n * shouldSend: bool\n * payload: (Object|null)\n * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and\n * exactly one of error or payload will be non-null. If error is non-null, the returned Error will\n * describe the situation, but it means that we were already over a rate limit (either globally or\n * per minute) when this item was checked. If error is null, and therefore payload is non-null, it\n * means this item put us over the global rate limit and the payload should be sent to Rollbar in\n * place of the passed in item.\n */\nRateLimiter.prototype.shouldSend = function(item, now) {\n now = now || _.now();\n var elapsedTime = now - this.startTime;\n if (elapsedTime < 0 || elapsedTime >= 60000) {\n this.startTime = now;\n this.perMinCounter = 0;\n }\n\n var globalRateLimit = RateLimiter.globalSettings.maxItems;\n var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;\n\n if (checkRate(item, globalRateLimit, this.counter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimit + ' max items reached', false);\n } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimitPerMin + ' items per minute reached', false);\n }\n this.counter++;\n this.perMinCounter++;\n\n var shouldSend = !checkRate(item, globalRateLimit, this.counter);\n var perMinute = shouldSend;\n shouldSend = shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);\n return shouldSendValue(this.platform, this.platformOptions, null, shouldSend, globalRateLimit, globalRateLimitPerMin, perMinute);\n};\n\nRateLimiter.prototype.setPlatformOptions = function(platform, options) {\n this.platform = platform;\n this.platformOptions = options;\n};\n\n/* Helpers */\n\nfunction checkRate(item, limit, counter) {\n return !item.ignoreRateLimit && limit >= 1 && counter > limit;\n}\n\nfunction shouldSendValue(platform, options, error, shouldSend, globalRateLimit, limitPerMin, perMinute) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute);\n }\n return {error: error, shouldSend: shouldSend, payload: payload};\n}\n\nfunction rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute) {\n var environment = options.environment || (options.payload && options.payload.environment);\n var msg;\n if (perMinute) {\n msg = 'item per minute limit reached, ignoring errors until timeout';\n } else {\n msg = 'maxItems has been hit, ignoring errors until reset.';\n }\n var item = {\n body: {\n message: {\n body: msg,\n extra: {\n maxItems: globalRateLimit,\n itemsPerMinute: limitPerMin\n }\n }\n },\n language: 'javascript',\n environment: environment,\n notifier: {\n version: (options.notifier && options.notifier.version) || options.version\n }\n };\n if (platform === 'browser') {\n item.platform = 'browser';\n item.framework = 'browser-js';\n item.notifier.name = 'rollbar-browser-js';\n } else if (platform === 'server') {\n item.framework = options.framework || 'node-js';\n item.notifier.name = options.notifier.name;\n } else if (platform === 'react-native') {\n item.framework = options.framework || 'react-native';\n item.notifier.name = options.notifier.name;\n }\n return item;\n}\n\nmodule.exports = RateLimiter;\n","'use strict';\n\n'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isPlainObject = function isPlainObject(obj) {\n\tif (!obj || toStr.call(obj) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tvar hasOwnConstructor = hasOwn.call(obj, 'constructor');\n\tvar hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n\t// Not own constructor property must be Object\n\tif (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n\t\treturn false;\n\t}\n\n\t// Own properties are enumerated firstly, so to speed up,\n\t// if last one is own, then all properties are own.\n\tvar key;\n\tfor (key in obj) {/**/}\n\n\treturn typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\nfunction merge() {\n var i, src, copy, clone, name,\n result = {},\n current = null,\n length = arguments.length;\n\n for (i=0; i < length; i++) {\n current = arguments[i];\n if (current == null) {\n continue;\n }\n\n for (name in current) {\n src = result[name];\n copy = current[name];\n if (result !== copy) {\n if (copy && isPlainObject(copy)) {\n clone = src && isPlainObject(src) ? src : {};\n result[name] = merge(clone, copy);\n } else if (typeof copy !== 'undefined') {\n result[name] = copy;\n }\n }\n }\n }\n return result;\n}\n\nmodule.exports = merge;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Queue - an object which handles which handles a queue of items to be sent to Rollbar.\n * This object handles rate limiting via a passed in rate limiter, retries based on connection\n * errors, and filtering of items based on a set of configurable predicates. The communication to\n * the backend is performed via a given API object.\n *\n * @param rateLimiter - An object which conforms to the interface\n * rateLimiter.shouldSend(item) -> bool\n * @param api - An object which conforms to the interface\n * api.postItem(payload, function(err, response))\n * @param logger - An object used to log verbose messages if desired\n * @param options - see Queue.prototype.configure\n */\nfunction Queue(rateLimiter, api, logger, options) {\n this.rateLimiter = rateLimiter;\n this.api = api;\n this.logger = logger;\n this.options = options;\n this.predicates = [];\n this.pendingItems = [];\n this.pendingRequests = [];\n this.retryQueue = [];\n this.retryHandle = null;\n this.waitCallback = null;\n this.waitIntervalID = null;\n}\n\n/*\n * configure - updates the options this queue uses\n *\n * @param options\n */\nQueue.prototype.configure = function(options) {\n this.api && this.api.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addPredicate - adds a predicate to the end of the list of predicates for this queue\n *\n * @param predicate - function(item, options) -> (bool|{err: Error})\n * Returning true means that this predicate passes and the item is okay to go on the queue\n * Returning false means do not add the item to the queue, but it is not an error\n * Returning {err: Error} means do not add the item to the queue, and the given error explains why\n * Returning {err: undefined} is equivalent to returning true but don't do that\n */\nQueue.prototype.addPredicate = function(predicate) {\n if (_.isFunction(predicate)) {\n this.predicates.push(predicate);\n }\n return this;\n};\n\nQueue.prototype.addPendingItem = function(item) {\n this.pendingItems.push(item);\n};\n\nQueue.prototype.removePendingItem = function(item) {\n var idx = this.pendingItems.indexOf(item);\n if (idx !== -1) {\n this.pendingItems.splice(idx, 1);\n }\n};\n\n/*\n * addItem - Send an item to the Rollbar API if all of the predicates are satisfied\n *\n * @param item - The payload to send to the backend\n * @param callback - function(error, repsonse) which will be called with the response from the API\n * in the case of a success, otherwise response will be null and error will have a value. If both\n * error and response are null then the item was stopped by a predicate which did not consider this\n * to be an error condition, but nonetheless did not send the item to the API.\n * @param originalError - The original error before any transformations that is to be logged if any\n */\nQueue.prototype.addItem = function(item, callback, originalError, originalItem) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() { return; };\n }\n var predicateResult = this._applyPredicates(item);\n if (predicateResult.stop) {\n this.removePendingItem(originalItem);\n callback(predicateResult.err);\n return;\n }\n this._maybeLog(item, originalError);\n this.removePendingItem(originalItem);\n if (!this.options.transmit) {\n callback(new Error('Transmit disabled'));\n return;\n }\n this.pendingRequests.push(item);\n try {\n this._makeApiRequest(item, function(err, resp) {\n this._dequeuePendingRequest(item);\n callback(err, resp);\n }.bind(this));\n } catch (e) {\n this._dequeuePendingRequest(item);\n callback(e);\n }\n};\n\n/*\n * wait - Stop any further errors from being added to the queue, and get called back when all items\n * currently processing have finished sending to the backend.\n *\n * @param callback - function() called when all pending items have been sent\n */\nQueue.prototype.wait = function(callback) {\n if (!_.isFunction(callback)) {\n return;\n }\n this.waitCallback = callback;\n if (this._maybeCallWait()) {\n return;\n }\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitIntervalID = setInterval(function() {\n this._maybeCallWait();\n }.bind(this), 500);\n};\n\n/* _applyPredicates - Sequentially applies the predicates that have been added to the queue to the\n * given item with the currently configured options.\n *\n * @param item - An item in the queue\n * @returns {stop: bool, err: (Error|null)} - stop being true means do not add item to the queue,\n * the error value should be passed up to a callbak if we are stopping.\n */\nQueue.prototype._applyPredicates = function(item) {\n var p = null;\n for (var i = 0, len = this.predicates.length; i < len; i++) {\n p = this.predicates[i](item, this.options);\n if (!p || p.err !== undefined) {\n return {stop: true, err: p.err};\n }\n }\n return {stop: false, err: null};\n};\n\n/*\n * _makeApiRequest - Send an item to Rollbar, callback when done, if there is an error make an\n * effort to retry if we are configured to do so.\n *\n * @param item - an item ready to send to the backend\n * @param callback - function(err, response)\n */\nQueue.prototype._makeApiRequest = function(item, callback) {\n var rateLimitResponse = this.rateLimiter.shouldSend(item);\n if (rateLimitResponse.shouldSend) {\n this.api.postItem(item, function(err, resp) {\n if (err) {\n this._maybeRetry(err, item, callback);\n } else {\n callback(err, resp);\n }\n }.bind(this));\n } else if (rateLimitResponse.error) {\n callback(rateLimitResponse.error);\n } else {\n this.api.postItem(rateLimitResponse.payload, callback);\n }\n};\n\n// These are errors basically mean there is no internet connection\nvar RETRIABLE_ERRORS = ['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED', 'EHOSTUNREACH', 'EPIPE', 'EAI_AGAIN'];\n\n/*\n * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback\n * with the error.\n *\n * @param err - an error returned by the API transport\n * @param item - the item that was trying to be sent when this error occured\n * @param callback - function(err, response)\n */\nQueue.prototype._maybeRetry = function(err, item, callback) {\n var shouldRetry = false;\n if (this.options.retryInterval) {\n for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {\n if (err.code === RETRIABLE_ERRORS[i]) {\n shouldRetry = true;\n break;\n }\n }\n if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {\n item.retries = item.retries ? item.retries + 1 : 1;\n if (item.retries > this.options.maxRetries) {\n shouldRetry = false;\n }\n }\n }\n if (shouldRetry) {\n this._retryApiRequest(item, callback);\n } else {\n callback(err);\n }\n};\n\n/*\n * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process\n * that queue based on the retryInterval in the options for this queue.\n *\n * @param item - an item that failed to send due to an error we deem retriable\n * @param callback - function(err, response)\n */\nQueue.prototype._retryApiRequest = function(item, callback) {\n this.retryQueue.push({item: item, callback: callback});\n\n if (!this.retryHandle) {\n this.retryHandle = setInterval(function() {\n while (this.retryQueue.length) {\n var retryObject = this.retryQueue.shift();\n this._makeApiRequest(retryObject.item, retryObject.callback);\n }\n }.bind(this), this.options.retryInterval);\n }\n};\n\n/*\n * _dequeuePendingRequest - Removes the item from the pending request queue, this queue is used to\n * enable to functionality of providing a callback that clients can pass to `wait` to be notified\n * when the pending request queue has been emptied. This must be called when the API finishes\n * processing this item. If a `wait` callback is configured, it is called by this function.\n *\n * @param item - the item previously added to the pending request queue\n */\nQueue.prototype._dequeuePendingRequest = function(item) {\n var idx = this.pendingRequests.indexOf(item);\n if (idx !== -1) {\n this.pendingRequests.splice(idx, 1);\n this._maybeCallWait();\n }\n};\n\nQueue.prototype._maybeLog = function(data, originalError) {\n if (this.logger && this.options.verbose) {\n var message = originalError;\n message = message || _.get(data, 'body.trace.exception.message');\n message = message || _.get(data, 'body.trace_chain.0.exception.message');\n if (message) {\n this.logger.error(message);\n return;\n }\n message = _.get(data, 'body.message.body');\n if (message) {\n this.logger.log(message);\n }\n }\n};\n\nQueue.prototype._maybeCallWait = function() {\n if (_.isFunction(this.waitCallback) && this.pendingItems.length === 0 && this.pendingRequests.length === 0) {\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitCallback();\n return true;\n }\n return false;\n};\n\nmodule.exports = Queue;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Notifier - the internal object responsible for delegating between the client exposed API, the\n * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the\n * queue which handles the communcation with the Rollbar API servers.\n *\n * @param queue - an object that conforms to the interface: addItem(item, callback)\n * @param options - an object representing the options to be set for this notifier, this should have\n * any defaults already set by the caller\n */\nfunction Notifier(queue, options) {\n this.queue = queue;\n this.options = options;\n this.transforms = [];\n this.diagnostic = {};\n}\n\n/*\n * configure - updates the options for this notifier with the passed in object\n *\n * @param options - an object which gets merged with the current options set on this notifier\n * @returns this\n */\nNotifier.prototype.configure = function(options) {\n this.queue && this.queue.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addTransform - adds a transform onto the end of the queue of transforms for this notifier\n *\n * @param transform - a function which takes three arguments:\n * * item: An Object representing the data to eventually be sent to Rollbar\n * * options: The current value of the options for this notifier\n * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this\n * callback with a null value for error if it wants the processing chain to continue, otherwise\n * with an error to terminate the processing. The item should be the updated item after this\n * transform is finished modifying it.\n */\nNotifier.prototype.addTransform = function(transform) {\n if (_.isFunction(transform)) {\n this.transforms.push(transform);\n }\n return this;\n};\n\n/*\n * log - the internal log function which applies the configured transforms and then pushes onto the\n * queue to be sent to the backend.\n *\n * @param item - An object with the following structure:\n * message [String] - An optional string to be sent to rollbar\n * error [Error] - An optional error\n *\n * @param callback - A function of type function(err, resp) which will be called with exactly one\n * null argument and one non-null argument. The callback will be called once, either during the\n * transform stage if an error occurs inside a transform, or in response to the communication with\n * the backend. The second argument will be the response from the backend in case of success.\n */\nNotifier.prototype.log = function(item, callback) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!this.options.enabled) {\n return callback(new Error('Rollbar is not enabled'));\n }\n\n this.queue.addPendingItem(item);\n var originalError = item.err;\n this._applyTransforms(item, function(err, i) {\n if (err) {\n this.queue.removePendingItem(item);\n return callback(err, null);\n }\n this.queue.addItem(i, callback, originalError, item);\n }.bind(this));\n};\n\n/* Internal */\n\n/*\n * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See\n * `addTransform` for more information.\n *\n * @param item - An item to be transformed\n * @param callback - A function of type function(err, item) which will be called with a non-null\n * error and a null item in the case of a transform failure, or a null error and non-null item after\n * all transforms have been applied.\n */\nNotifier.prototype._applyTransforms = function(item, callback) {\n var transformIndex = -1;\n var transformsLength = this.transforms.length;\n var transforms = this.transforms;\n var options = this.options;\n\n var cb = function(err, i) {\n if (err) {\n callback(err, null);\n return;\n }\n\n transformIndex++;\n\n if (transformIndex === transformsLength) {\n callback(null, i);\n return;\n }\n\n transforms[transformIndex](i, options, cb);\n };\n\n cb(null, item);\n};\n\nmodule.exports = Notifier;\n","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1/item/',\n search: null,\n version: '1',\n protocol: 'https:',\n port: 443\n};\n\n/**\n * Api is an object that encapsulates methods of communicating with\n * the Rollbar API. It is a standard interface with some parts implemented\n * differently for server or browser contexts. It is an object that should\n * be instantiated when used so it can contain non-global options that may\n * be different for another instance of RollbarApi.\n *\n * @param options {\n * accessToken: the accessToken to use for posting items to rollbar\n * endpoint: an alternative endpoint to send errors to\n * must be a valid, fully qualified URL.\n * The default is: https://api.rollbar.com/api/1/item\n * proxy: if you wish to proxy requests provide an object\n * with the following keys:\n * host or hostname (required): foo.example.com\n * port (optional): 123\n * protocol (optional): https\n * }\n */\nfunction Api(options, transport, urllib, truncation, jsonBackup) {\n this.options = options;\n this.transport = transport;\n this.url = urllib;\n this.truncation = truncation;\n this.jsonBackup = jsonBackup;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, urllib);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function(data, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n this.transport.post(this.accessToken, transportOptions, payload, callback);\n};\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.buildJsonPayload = function(data, callback) {\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n\n if (stringifyResult.error) {\n if (callback) {\n callback(stringifyResult.error);\n }\n return null;\n }\n\n return stringifyResult.value;\n};\n\n/**\n *\n * @param jsonPayload\n * @param callback\n */\nApi.prototype.postJsonPayload = function(jsonPayload, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n this.transport.postJsonPayload(this.accessToken, transportOptions, jsonPayload, callback);\n};\n\nApi.prototype.configure = function(options) {\n var oldOptions = this.oldOptions;\n this.options = _.merge(oldOptions, options);\n this.transportOptions = _getTransport(this.options, this.url);\n if (this.options.accessToken !== undefined) {\n this.accessToken = this.options.accessToken;\n }\n return this;\n};\n\nfunction _getTransport(options, url) {\n return helpers.getTransportFromOptions(options, defaultOptions, url);\n}\n\nmodule.exports = Api;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (!_.isType(data.context, 'string')) {\n var contextResult = _.stringify(data.context, jsonBackup);\n if (contextResult.error) {\n data.context = 'Error: could not serialize \\'context\\'';\n } else {\n data.context = contextResult.value || '';\n }\n if (data.context.length > 255) {\n data.context = data.context.substr(0, 255);\n }\n }\n return {\n access_token: accessToken,\n data: data\n };\n}\n\nfunction getTransportFromOptions(options, defaults, url) {\n var hostname = defaults.hostname;\n var protocol = defaults.protocol;\n var port = defaults.port;\n var path = defaults.path;\n var search = defaults.search;\n var timeout = options.timeout;\n\n var proxy = options.proxy;\n if (options.endpoint) {\n var opts = url.parse(options.endpoint);\n hostname = opts.hostname;\n protocol = opts.protocol;\n port = opts.port;\n path = opts.pathname;\n search = opts.search;\n }\n return {\n timeout: timeout,\n hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy\n };\n}\n\nfunction transportOptions(transport, method) {\n var protocol = transport.protocol || 'https:';\n var port = transport.port || (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);\n var hostname = transport.hostname;\n var path = transport.path;\n var timeout = transport.timeout;\n if (transport.search) {\n path = path + transport.search;\n }\n if (transport.proxy) {\n path = protocol + '//' + hostname + path;\n hostname = transport.proxy.host || transport.proxy.hostname;\n port = transport.proxy.port;\n protocol = transport.proxy.protocol || protocol;\n }\n return {\n timeout: timeout,\n protocol: protocol,\n hostname: hostname,\n path: path,\n port: port,\n method: method\n };\n}\n\nfunction appendPathToPath(base, path) {\n var baseTrailingSlash = /\\/$/.test(base);\n var pathBeginningSlash = /^\\//.test(path);\n\n if (baseTrailingSlash && pathBeginningSlash) {\n path = path.substring(1);\n } else if (!baseTrailingSlash && !pathBeginningSlash) {\n path = '/' + path;\n }\n\n return base + path;\n}\n\nmodule.exports = {\n buildPayload: buildPayload,\n getTransportFromOptions: getTransportFromOptions,\n transportOptions: transportOptions,\n appendPathToPath: appendPathToPath\n};\n","// Console-polyfill. MIT license.\n// https://github.com/paulmillr/console-polyfill\n// Make it safe to do console.log() always.\n(function(global) {\n 'use strict';\n if (!global.console) {\n global.console = {};\n }\n var con = global.console;\n var prop, method;\n var dummy = function() {};\n var properties = ['memory'];\n var methods = ('assert,clear,count,debug,dir,dirxml,error,exception,group,' +\n 'groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,' +\n 'show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn').split(',');\n while (prop = properties.pop()) if (!con[prop]) con[prop] = {};\n while (method = methods.pop()) if (!con[method]) con[method] = dummy;\n // Using `this` for web workers & supports Browserify / Webpack.\n})(typeof window === 'undefined' ? this : window);\n","'use strict';\n\n// This detection.js module is used to encapsulate any ugly browser/feature\n// detection we may need to do.\n\n// Figure out which version of IE we're using, if any.\n// This is gleaned from http://stackoverflow.com/questions/5574842/best-way-to-check-for-ie-less-than-9-in-javascript-without-library\n// Will return an integer on IE (i.e. 8)\n// Will return undefined otherwise\nfunction getIEVersion() {\n\tvar undef;\n\tif (typeof document === 'undefined') {\n\t\treturn undef;\n\t}\n\n var v = 3,\n div = document.createElement('div'),\n all = div.getElementsByTagName('i');\n\n while (\n div.innerHTML = '',\n all[0]\n );\n\n return v > 4 ? v : undef;\n}\n\nvar Detection = {\n ieVersion: getIEVersion\n};\n\nmodule.exports = Detection;\n","'use strict';\n\nfunction captureUncaughtExceptions(window, handler, shim) {\n if (!window) { return; }\n var oldOnError;\n\n if (typeof handler._rollbarOldOnError === 'function') {\n oldOnError = handler._rollbarOldOnError;\n } else if (window.onerror) {\n oldOnError = window.onerror;\n while (oldOnError._rollbarOldOnError) {\n oldOnError = oldOnError._rollbarOldOnError;\n }\n handler._rollbarOldOnError = oldOnError;\n }\n\n handler.handleAnonymousErrors();\n\n var fn = function() {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n if (shim) {\n fn._rollbarOldOnError = oldOnError;\n }\n window.onerror = fn;\n}\n\nfunction _rollbarWindowOnError(window, r, old, args) {\n if (window._rollbarWrappedError) {\n if (!args[4]) {\n args[4] = window._rollbarWrappedError;\n }\n if (!args[5]) {\n args[5] = window._rollbarWrappedError._rollbarContext;\n }\n window._rollbarWrappedError = null;\n }\n\n var ret = r.handleUncaughtException.apply(r, args);\n\n if (old) {\n old.apply(window, args);\n }\n\n // Let other chained onerror handlers above run before setting this.\n // If an error is thrown and caught within a chained onerror handler,\n // Error.prepareStackTrace() will see that one before the one we want.\n if (ret === 'anonymous') {\n r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()\n }\n}\n\nfunction captureUnhandledRejections(window, handler, shim) {\n if (!window) { return; }\n\n if (typeof window._rollbarURH === 'function' && window._rollbarURH.belongsToShim) {\n window.removeEventListener('unhandledrejection', window._rollbarURH);\n }\n\n var rejectionHandler = function (evt) {\n var reason, promise, detail;\n try {\n reason = evt.reason;\n } catch (e) {\n reason = undefined;\n }\n try {\n promise = evt.promise;\n } catch (e) {\n promise = '[unhandledrejection] error getting `promise` from event';\n }\n try {\n detail = evt.detail;\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\n }\n } catch (e) {\n // Ignore\n }\n if (!reason) {\n reason = '[unhandledrejection] error getting `reason` from event';\n }\n\n if (handler && handler.handleUnhandledRejection) {\n handler.handleUnhandledRejection(reason, promise);\n }\n };\n rejectionHandler.belongsToShim = shim;\n window._rollbarURH = rejectionHandler;\n window.addEventListener('unhandledrejection', rejectionHandler);\n}\n\n\nmodule.exports = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections\n};\n","'use strict';\n\n/*global XDomainRequest*/\n\nvar _ = require('../utility');\nvar logger = require('./logger');\n\n/*\n * accessToken may be embedded in payload but that should not\n * be assumed\n *\n * options: {\n * hostname\n * protocol\n * path\n * port\n * method\n * }\n *\n * params is an object containing key/value pairs. These\n * will be appended to the path as 'key=value&key=value'\n *\n * payload is an unserialized object\n */\nfunction Transport(truncation) {\n this.truncation = truncation;\n}\n\nTransport.prototype.get = function(accessToken, options, params, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n _.addParamsAndAccessTokenToPath(accessToken, options, params);\n\n var method = 'GET';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, null, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.post = function(accessToken, options, payload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!payload) {\n return callback(new Error('Cannot send empty request'));\n }\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n if (stringifyResult.error) {\n return callback(stringifyResult.error);\n }\n\n var writeData = stringifyResult.value;\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, writeData, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.postJsonPayload = function (accessToken, options, jsonPayload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, jsonPayload, callback, requestFactory, options.timeout);\n}\n\n\n// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope\n// so Angular change detection isn't triggered on each API call.\n// This is the equivalent of runOutsideAngular().\n//\nfunction _makeZoneRequest() {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;\n var args = Array.prototype.slice.call(arguments);\n\n if (currentZone && currentZone._name === 'angular') {\n var rootZone = currentZone._parent;\n rootZone.run(function () {\n _makeRequest.apply(undefined, args);\n });\n } else {\n _makeRequest.apply(undefined, args);\n }\n}\n\n/* global RollbarProxy */\nfunction _proxyRequest(json, callback) {\n var rollbarProxy = new RollbarProxy();\n rollbarProxy.sendJsonPayload(\n json,\n function(_msg) { /* do nothing */ }, // eslint-disable-line no-unused-vars\n function(err) {\n callback(new Error(err));\n }\n );\n}\n\nfunction _makeRequest(accessToken, url, method, data, callback, requestFactory, timeout) {\n if (typeof RollbarProxy !== 'undefined') {\n return _proxyRequest(data, callback);\n }\n\n var request;\n if (requestFactory) {\n request = requestFactory();\n } else {\n request = _createXMLHTTPObject();\n }\n if (!request) {\n // Give up, no way to send requests\n return callback(new Error('No way to send a request'));\n }\n try {\n try {\n var onreadystatechange = function() {\n try {\n if (onreadystatechange && request.readyState === 4) {\n onreadystatechange = undefined;\n\n var parseResponse = _.jsonParse(request.responseText);\n if (_isSuccess(request)) {\n callback(parseResponse.error, parseResponse.value);\n return;\n } else if (_isNormalFailure(request)) {\n if (request.status === 403) {\n // likely caused by using a server access token\n var message = parseResponse.value && parseResponse.value.message;\n logger.error(message);\n }\n // return valid http status codes\n callback(new Error(String(request.status)));\n } else {\n // IE will return a status 12000+ on some sort of connection failure,\n // so we return a blank error\n // http://msdn.microsoft.com/en-us/library/aa383770%28VS.85%29.aspx\n var msg = 'XHR response had no status code (likely connection failure)';\n callback(_newRetriableError(msg));\n }\n }\n } catch (ex) {\n //jquery source mentions firefox may error out while accessing the\n //request members if there is a network error\n //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111\n var exc;\n if (ex && ex.stack) {\n exc = ex;\n } else {\n exc = new Error(ex);\n }\n callback(exc);\n }\n };\n\n request.open(method, url, true);\n if (request.setRequestHeader) {\n request.setRequestHeader('Content-Type', 'application/json');\n request.setRequestHeader('X-Rollbar-Access-Token', accessToken);\n }\n\n if(_.isFiniteNumber(timeout)) {\n request.timeout = timeout;\n }\n\n request.onreadystatechange = onreadystatechange;\n request.send(data);\n } catch (e1) {\n // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest\n if (typeof XDomainRequest !== 'undefined') {\n\n // Assume we are in a really old browser which has a bunch of limitations:\n // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx\n\n // Extreme paranoia: if we have XDomainRequest then we have a window, but just in case\n if (!window || !window.location) {\n return callback(new Error('No window available during request, unknown environment'));\n }\n\n // If the current page is http, try and send over http\n if (window.location.href.substring(0, 5) === 'http:' && url.substring(0, 5) === 'https') {\n url = 'http' + url.substring(5);\n }\n\n var xdomainrequest = new XDomainRequest();\n xdomainrequest.onprogress = function() {};\n xdomainrequest.ontimeout = function() {\n var msg = 'Request timed out';\n var code = 'ETIMEDOUT';\n callback(_newRetriableError(msg, code));\n };\n xdomainrequest.onerror = function() {\n callback(new Error('Error during request'));\n };\n xdomainrequest.onload = function() {\n var parseResponse = _.jsonParse(xdomainrequest.responseText);\n callback(parseResponse.error, parseResponse.value);\n };\n xdomainrequest.open(method, url, true);\n xdomainrequest.send(data);\n } else {\n callback(new Error('Cannot find a method to transport a request'));\n }\n }\n } catch (e2) {\n callback(e2);\n }\n}\n\nfunction _createXMLHTTPObject() {\n /* global ActiveXObject:false */\n\n var factories = [\n function () {\n return new XMLHttpRequest();\n },\n function () {\n return new ActiveXObject('Msxml2.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Msxml3.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Microsoft.XMLHTTP');\n }\n ];\n var xmlhttp;\n var i;\n var numFactories = factories.length;\n for (i = 0; i < numFactories; i++) {\n /* eslint-disable no-empty */\n try {\n xmlhttp = factories[i]();\n break;\n } catch (e) {\n // pass\n }\n /* eslint-enable no-empty */\n }\n return xmlhttp;\n}\n\nfunction _isSuccess(r) {\n return r && r.status && r.status === 200;\n}\n\nfunction _isNormalFailure(r) {\n return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;\n}\n\nfunction _newRetriableError(message, code) {\n var err = new Error(message);\n err.code = code || 'ENOTFOUND';\n return err;\n}\n\nmodule.exports = Transport;\n","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('../errorParser');\nvar logger = require('./logger');\n\nfunction handleDomException(item, options, callback) {\n if(item.err && errorParser.Stack(item.err).name === 'DOMException') {\n var originalError = new Error();\n originalError.name = item.err.name;\n originalError.message = item.err.message;\n originalError.stack = item.err.stack;\n originalError.nested = item.err;\n item.err = originalError;\n }\n callback(null, item);\n}\n\nfunction handleItemWithError(item, options, callback) {\n item.data = item.data || {};\n if (item.err) {\n try {\n item.stackInfo = item.err._savedStackTrace || errorParser.parse(item.err, item.skipFrames);\n\n if (options.addErrorContext) {\n addErrorContext(item);\n }\n } catch (e) {\n logger.error('Error while parsing the error object.', e);\n try {\n item.message = item.err.message || item.err.description || item.message || String(item.err);\n } catch (e2) {\n item.message = String(item.err) || String(e2);\n }\n delete item.err;\n }\n }\n callback(null, item);\n}\n\nfunction addErrorContext(item) {\n var chain = [];\n var err = item.err;\n\n chain.push(err);\n\n while (err.nested) {\n err = err.nested;\n chain.push(err);\n }\n\n _.addErrorContext(item, chain);\n}\n\nfunction ensureItemHasSomethingToSay(item, options, callback) {\n if (!item.message && !item.stackInfo && !item.custom) {\n callback(new Error('No message, stack info, or custom data'), null);\n }\n callback(null, item);\n}\n\nfunction addBaseInfo(item, options, callback) {\n var environment = (options.payload && options.payload.environment) || options.environment;\n item.data = _.merge(item.data, {\n environment: environment,\n level: item.level,\n endpoint: options.endpoint,\n platform: 'browser',\n framework: 'browser-js',\n language: 'javascript',\n server: {},\n uuid: item.uuid,\n notifier: {\n name: 'rollbar-browser-js',\n version: options.version\n },\n custom: item.custom\n });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.location) {\n return callback(null, item);\n }\n var remoteString = '$remote_ip';\n if (!options.captureIp) {\n remoteString = null;\n } else if (options.captureIp !== true) {\n remoteString += '_anonymize';\n }\n _.set(item, 'data.request', {\n url: window.location.href,\n query_string: window.location.search,\n user_ip: remoteString\n });\n callback(null, item);\n };\n}\n\nfunction addClientInfo(window) {\n return function(item, options, callback) {\n if (!window) {\n return callback(null, item);\n }\n var nav = window.navigator || {};\n var scr = window.screen || {};\n _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: nav.userAgent,\n language: nav.language,\n cookie_enabled: nav.cookieEnabled,\n screen: {\n width: scr.width,\n height: scr.height\n }\n }\n });\n callback(null, item);\n };\n}\n\nfunction addPluginInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.navigator) {\n return callback(null, item);\n }\n var plugins = [];\n var navPlugins = window.navigator.plugins || [];\n var cur;\n for (var i=0, l=navPlugins.length; i < l; ++i) {\n cur = navPlugins[i];\n plugins.push({name: cur.name, description: cur.description});\n }\n _.set(item, 'data.client.javascript.plugins', plugins);\n callback(null, item);\n };\n}\n\nfunction addBody(item, options, callback) {\n if (item.stackInfo) {\n if (item.stackInfo.traceChain) {\n addBodyTraceChain(item, options, callback);\n } else {\n addBodyTrace(item, options, callback);\n }\n } else {\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction addBodyMessage(item, options, callback) {\n var message = item.message;\n var custom = item.custom;\n\n if (!message) {\n message = 'Item sent with null or missing arguments.';\n }\n var result = {\n body: message\n };\n\n if (custom) {\n result.extra = _.merge(custom);\n }\n\n _.set(item, 'data.body', {message: result});\n callback(null, item);\n}\n\nfunction stackFromItem(item) {\n // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = item.stackInfo.stack;\n if (stack && stack.length === 0 && item._unhandledStackInfo && item._unhandledStackInfo.stack) {\n stack = item._unhandledStackInfo.stack;\n }\n return stack;\n}\n\nfunction addBodyTraceChain(item, options, callback) {\n var traceChain = item.stackInfo.traceChain;\n var traces = [];\n\n var traceChainLength = traceChain.length;\n for (var i = 0; i < traceChainLength; i++) {\n var trace = buildTrace(item, traceChain[i], options);\n traces.push(trace);\n }\n\n _.set(item, 'data.body', {trace_chain: traces});\n callback(null, item);\n}\n\nfunction addBodyTrace(item, options, callback) {\n var stack = stackFromItem(item);\n\n if (stack) {\n var trace = buildTrace(item, item.stackInfo, options);\n _.set(item, 'data.body', {trace: trace});\n callback(null, item);\n } else {\n var stackInfo = item.stackInfo;\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction buildTrace(item, stackInfo, options) {\n var description = item && item.data.description;\n var custom = item && item.custom;\n var stack = stackFromItem(item);\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n var trace = {\n exception: {\n 'class': className,\n message: message\n }\n };\n\n if (description) {\n trace.exception.description = description;\n }\n\n if (stack) {\n if (stack.length === 0) {\n trace.exception.stack = stackInfo.rawStack;\n trace.exception.raw = String(stackInfo.rawException);\n }\n var stackFrame;\n var frame;\n var code;\n var pre;\n var post;\n var contextLength;\n var i, mid;\n\n trace.frames = [];\n for (i = 0; i < stack.length; ++i) {\n stackFrame = stack[i];\n frame = {\n filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',\n lineno: stackFrame.line || null,\n method: (!stackFrame.func || stackFrame.func === '?') ? '[anonymous]' : stackFrame.func,\n colno: stackFrame.column\n };\n if (options.sendFrameUrl) {\n frame.url = stackFrame.url;\n }\n if (frame.method && frame.method.endsWith && frame.method.endsWith('_rollbar_wrapped')) {\n continue;\n }\n\n code = pre = post = null;\n contextLength = stackFrame.context ? stackFrame.context.length : 0;\n if (contextLength) {\n mid = Math.floor(contextLength / 2);\n pre = stackFrame.context.slice(0, mid);\n code = stackFrame.context[mid];\n post = stackFrame.context.slice(mid);\n }\n\n if (code) {\n frame.code = code;\n }\n\n if (pre || post) {\n frame.context = {};\n if (pre && pre.length) {\n frame.context.pre = pre;\n }\n if (post && post.length) {\n frame.context.post = post;\n }\n }\n\n if (stackFrame.args) {\n frame.args = stackFrame.args;\n }\n\n trace.frames.push(frame);\n }\n\n // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last\n trace.frames.reverse();\n\n if (custom) {\n trace.extra = _.merge(custom);\n }\n }\n\n return trace;\n}\n\nfunction errorClass(stackInfo, guess, options) {\n if (stackInfo.name) {\n return stackInfo.name;\n } else if (options.guessErrorClass) {\n return guess;\n } else {\n return '(unknown)';\n }\n}\n\nfunction addScrubber(scrubFn) {\n return function (item, options, callback) {\n if (scrubFn) {\n var scrubFields = options.scrubFields || [];\n var scrubPaths = options.scrubPaths || [];\n item.data = scrubFn(item.data, scrubFields, scrubPaths);\n }\n callback(null, item);\n }\n}\n\nmodule.exports = {\n handleDomException: handleDomException,\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n addScrubber: addScrubber\n};\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('error-stack-parser', ['stackframe'], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory(require('stackframe'));\n } else {\n root.ErrorStackParser = factory(root.StackFrame);\n }\n}(this, function ErrorStackParser(StackFrame) {\n 'use strict';\n\n var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\\S+:\\d+/;\n var CHROME_IE_STACK_REGEXP = /^\\s*at .*(\\S+:\\d+|\\(native\\))/m;\n var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\\[native code])?$/;\n\n return {\n /**\n * Given an Error object, extract the most information from it.\n *\n * @param {Error} error object\n * @return {Array} of StackFrames\n */\n parse: function ErrorStackParser$$parse(error) {\n if (typeof error.stacktrace !== 'undefined' || typeof error['opera#sourceloc'] !== 'undefined') {\n return this.parseOpera(error);\n } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {\n return this.parseV8OrIE(error);\n } else if (error.stack) {\n return this.parseFFOrSafari(error);\n } else {\n throw new Error('Cannot parse given Error object');\n }\n },\n\n // Separate line and column numbers from a string of the form: (URI:Line:Column)\n extractLocation: function ErrorStackParser$$extractLocation(urlLike) {\n // Fail-fast but return locations like \"(native)\"\n if (urlLike.indexOf(':') === -1) {\n return [urlLike];\n }\n\n var regExp = /(.+?)(?::(\\d+))?(?::(\\d+))?$/;\n var parts = regExp.exec(urlLike.replace(/[()]/g, ''));\n return [parts[1], parts[2] || undefined, parts[3] || undefined];\n },\n\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(CHROME_IE_STACK_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n if (line.indexOf('(eval ') > -1) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n line = line.replace(/eval code/g, 'eval').replace(/(\\(eval at [^()]*)|(\\),.*$)/g, '');\n }\n var sanitizedLine = line.replace(/^\\s+/, '').replace(/\\(eval code/g, '(');\n\n // capture and preseve the parenthesized location \"(/foo/my bar.js:12:87)\" in\n // case it has spaces in it, as the string is split on \\s+ later on\n var location = sanitizedLine.match(/ (\\((.+):(\\d+):(\\d+)\\)$)/);\n\n // remove the parenthesized location from the line, if it was matched\n sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;\n\n var tokens = sanitizedLine.split(/\\s+/).slice(1);\n // if a location was matched, pass it to extractLocation() otherwise pop the last token\n var locationParts = this.extractLocation(location ? location[1] : tokens.pop());\n var functionName = tokens.join(' ') || undefined;\n var fileName = ['eval', ''].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];\n\n return new StackFrame({\n functionName: functionName,\n fileName: fileName,\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n },\n\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n if (line.indexOf(' > eval') > -1) {\n line = line.replace(/ line (\\d+)(?: > eval line \\d+)* > eval:\\d+:\\d+/g, ':$1');\n }\n\n if (line.indexOf('@') === -1 && line.indexOf(':') === -1) {\n // Safari eval frames only have function names and nothing else\n return new StackFrame({\n functionName: line\n });\n } else {\n var functionNameRegex = /((.*\".+\"[^@]*)?[^@]*)(?:@)/;\n var matches = line.match(functionNameRegex);\n var functionName = matches && matches[1] ? matches[1] : undefined;\n var locationParts = this.extractLocation(line.replace(functionNameRegex, ''));\n\n return new StackFrame({\n functionName: functionName,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }\n }, this);\n },\n\n parseOpera: function ErrorStackParser$$parseOpera(e) {\n if (!e.stacktrace || (e.message.indexOf('\\n') > -1 &&\n e.message.split('\\n').length > e.stacktrace.split('\\n').length)) {\n return this.parseOpera9(e);\n } else if (!e.stack) {\n return this.parseOpera10(e);\n } else {\n return this.parseOpera11(e);\n }\n },\n\n parseOpera9: function ErrorStackParser$$parseOpera9(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)/i;\n var lines = e.message.split('\\n');\n var result = [];\n\n for (var i = 2, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(new StackFrame({\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n }));\n }\n }\n\n return result;\n },\n\n parseOpera10: function ErrorStackParser$$parseOpera10(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)(?:: In function (\\S+))?$/i;\n var lines = e.stacktrace.split('\\n');\n var result = [];\n\n for (var i = 0, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(\n new StackFrame({\n functionName: match[3] || undefined,\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n })\n );\n }\n }\n\n return result;\n },\n\n // Opera 10.65+ Error.stack very similar to FF/Safari\n parseOpera11: function ErrorStackParser$$parseOpera11(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);\n }, this);\n\n return filtered.map(function(line) {\n var tokens = line.split('@');\n var locationParts = this.extractLocation(tokens.pop());\n var functionCall = (tokens.shift() || '');\n var functionName = functionCall\n .replace(//, '$2')\n .replace(/\\([^)]*\\)/g, '') || undefined;\n var argsRaw;\n if (functionCall.match(/\\(([^)]*)\\)/)) {\n argsRaw = functionCall.replace(/^[^(]+\\(([^)]*)\\)$/, '$1');\n }\n var args = (argsRaw === undefined || argsRaw === '[arguments not available]') ?\n undefined : argsRaw.split(',');\n\n return new StackFrame({\n functionName: functionName,\n args: args,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n }\n };\n}));\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('stackframe', [], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.StackFrame = factory();\n }\n}(this, function() {\n 'use strict';\n function _isNumber(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n }\n\n function _capitalize(str) {\n return str.charAt(0).toUpperCase() + str.substring(1);\n }\n\n function _getter(p) {\n return function() {\n return this[p];\n };\n }\n\n var booleanProps = ['isConstructor', 'isEval', 'isNative', 'isToplevel'];\n var numericProps = ['columnNumber', 'lineNumber'];\n var stringProps = ['fileName', 'functionName', 'source'];\n var arrayProps = ['args'];\n var objectProps = ['evalOrigin'];\n\n var props = booleanProps.concat(numericProps, stringProps, arrayProps, objectProps);\n\n function StackFrame(obj) {\n if (!obj) return;\n for (var i = 0; i < props.length; i++) {\n if (obj[props[i]] !== undefined) {\n this['set' + _capitalize(props[i])](obj[props[i]]);\n }\n }\n }\n\n StackFrame.prototype = {\n getArgs: function() {\n return this.args;\n },\n setArgs: function(v) {\n if (Object.prototype.toString.call(v) !== '[object Array]') {\n throw new TypeError('Args must be an Array');\n }\n this.args = v;\n },\n\n getEvalOrigin: function() {\n return this.evalOrigin;\n },\n setEvalOrigin: function(v) {\n if (v instanceof StackFrame) {\n this.evalOrigin = v;\n } else if (v instanceof Object) {\n this.evalOrigin = new StackFrame(v);\n } else {\n throw new TypeError('Eval Origin must be an Object or StackFrame');\n }\n },\n\n toString: function() {\n var fileName = this.getFileName() || '';\n var lineNumber = this.getLineNumber() || '';\n var columnNumber = this.getColumnNumber() || '';\n var functionName = this.getFunctionName() || '';\n if (this.getIsEval()) {\n if (fileName) {\n return '[eval] (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return '[eval]:' + lineNumber + ':' + columnNumber;\n }\n if (functionName) {\n return functionName + ' (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return fileName + ':' + lineNumber + ':' + columnNumber;\n }\n };\n\n StackFrame.fromString = function StackFrame$$fromString(str) {\n var argsStartIndex = str.indexOf('(');\n var argsEndIndex = str.lastIndexOf(')');\n\n var functionName = str.substring(0, argsStartIndex);\n var args = str.substring(argsStartIndex + 1, argsEndIndex).split(',');\n var locationString = str.substring(argsEndIndex + 1);\n\n if (locationString.indexOf('@') === 0) {\n var parts = /@(.+?)(?::(\\d+))?(?::(\\d+))?$/.exec(locationString, '');\n var fileName = parts[1];\n var lineNumber = parts[2];\n var columnNumber = parts[3];\n }\n\n return new StackFrame({\n functionName: functionName,\n args: args || undefined,\n fileName: fileName,\n lineNumber: lineNumber || undefined,\n columnNumber: columnNumber || undefined\n });\n };\n\n for (var i = 0; i < booleanProps.length; i++) {\n StackFrame.prototype['get' + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);\n StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function(p) {\n return function(v) {\n this[p] = Boolean(v);\n };\n })(booleanProps[i]);\n }\n\n for (var j = 0; j < numericProps.length; j++) {\n StackFrame.prototype['get' + _capitalize(numericProps[j])] = _getter(numericProps[j]);\n StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function(p) {\n return function(v) {\n if (!_isNumber(v)) {\n throw new TypeError(p + ' must be a Number');\n }\n this[p] = Number(v);\n };\n })(numericProps[j]);\n }\n\n for (var k = 0; k < stringProps.length; k++) {\n StackFrame.prototype['get' + _capitalize(stringProps[k])] = _getter(stringProps[k]);\n StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function(p) {\n return function(v) {\n this[p] = String(v);\n };\n })(stringProps[k]);\n }\n\n return StackFrame;\n}));\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction itemToPayload(item, options, callback) {\n var payloadOptions = options.payload || {};\n if (payloadOptions.body) {\n delete payloadOptions.body;\n }\n\n var data = _.merge(item.data, payloadOptions);\n if (item._isUncaught) {\n data._isUncaught = true;\n }\n if (item._originalArgs) {\n data._originalArgs = item._originalArgs;\n }\n callback(null, data);\n}\n\nfunction addTelemetryData(item, options, callback) {\n if (item.telemetryEvents) {\n _.set(item, 'data.body.telemetry', item.telemetryEvents);\n }\n callback(null, item);\n}\n\nfunction addMessageWithError(item, options, callback) {\n if (!item.message) {\n callback(null, item);\n return;\n }\n var tracePath = 'data.body.trace_chain.0';\n var trace = _.get(item, tracePath);\n if (!trace) {\n tracePath = 'data.body.trace';\n trace = _.get(item, tracePath);\n }\n if (trace) {\n if (!(trace.exception && trace.exception.description)) {\n _.set(item, tracePath+'.exception.description', item.message);\n callback(null, item);\n return;\n }\n var extra = _.get(item, tracePath+'.extra') || {};\n var newExtra = _.merge(extra, {message: item.message});\n _.set(item, tracePath+'.extra', newExtra);\n }\n callback(null, item);\n}\n\nfunction userTransform(logger) {\n return function(item, options, callback) {\n var newItem = _.merge(item);\n var response = null;\n try {\n if (_.isFunction(options.transform)) {\n response = options.transform(newItem.data, item);\n }\n } catch (e) {\n options.transform = null;\n logger.error('Error while calling custom transform() function. Removing custom transform().', e);\n callback(null, item);\n return;\n }\n if(_.isPromise(response)) {\n response.then(function (promisedItem) {\n if(promisedItem) {\n newItem.data = promisedItem;\n }\n callback(null, newItem);\n }, function (error) {\n callback(error, item);\n });\n } else {\n callback(null, newItem);\n }\n }\n}\n\nfunction addConfigToPayload(item, options, callback) {\n if (!options.sendConfig) {\n return callback(null, item);\n }\n var configKey = '_rollbarConfig';\n var custom = _.get(item, 'data.custom') || {};\n custom[configKey] = options;\n item.data.custom = custom;\n callback(null, item);\n}\n\nfunction addFunctionOption(options, name) {\n if(_.isFunction(options[name])) {\n options[name] = options[name].toString();\n }\n}\n\nfunction addConfiguredOptions(item, options, callback) {\n var configuredOptions = options._configuredOptions;\n\n // These must be stringified or they'll get dropped during serialization.\n addFunctionOption(configuredOptions, 'transform');\n addFunctionOption(configuredOptions, 'checkIgnore');\n addFunctionOption(configuredOptions, 'onSendCallback');\n\n delete configuredOptions.accessToken;\n item.data.notifier.configured_options = configuredOptions;\n callback(null, item);\n}\n\nfunction addDiagnosticKeys(item, options, callback) {\n var diagnostic = _.merge(item.notifier.client.notifier.diagnostic, item.diagnostic);\n\n if (_.get(item, 'err._isAnonymous')) {\n diagnostic.is_anonymous = true;\n }\n\n if (item._isUncaught) {\n diagnostic.is_uncaught = item._isUncaught;\n }\n\n if (item.err) {\n try {\n diagnostic.raw_error = {\n message: item.err.message,\n name: item.err.name,\n constructor_name: item.err.constructor && item.err.constructor.name,\n filename: item.err.fileName,\n line: item.err.lineNumber,\n column: item.err.columnNumber,\n stack: item.err.stack\n };\n } catch (e) {\n diagnostic.raw_error = { failed: String(e) };\n }\n }\n\n item.data.notifier.diagnostic = _.merge(item.data.notifier.diagnostic, diagnostic);\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError,\n userTransform: userTransform,\n addConfigToPayload: addConfigToPayload,\n addConfiguredOptions: addConfiguredOptions,\n addDiagnosticKeys: addDiagnosticKeys\n};\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction checkIgnore(item, settings) {\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore\n};\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction checkLevel(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = settings.reportLevel;\n var reportLevelVal = _.LEVELS[reportLevel] || 0;\n\n if (levelVal < reportLevelVal) {\n return false;\n }\n return true;\n}\n\nfunction userCheckIgnore(logger) {\n return function(item, settings) {\n var isUncaught = !!item._isUncaught;\n delete item._isUncaught;\n var args = item._originalArgs;\n delete item._originalArgs;\n try {\n if (_.isFunction(settings.onSendCallback)) {\n settings.onSendCallback(isUncaught, args, item);\n }\n } catch (e) {\n settings.onSendCallback = null;\n logger.error('Error while calling onSendCallback, removing', e);\n }\n try {\n if (_.isFunction(settings.checkIgnore) && settings.checkIgnore(isUncaught, args, item)) {\n return false;\n }\n } catch (e) {\n settings.checkIgnore = null;\n logger.error('Error while calling custom checkIgnore(), removing', e);\n }\n return true;\n }\n}\n\nfunction urlIsNotBlockListed(logger) {\n return function(item, settings) {\n return !urlIsOnAList(item, settings, 'blocklist', logger);\n }\n}\n\nfunction urlIsSafeListed(logger) {\n return function(item, settings) {\n return urlIsOnAList(item, settings, 'safelist', logger);\n }\n}\n\nfunction matchFrames(trace, list, block) {\n if (!trace) { return !block }\n\n var frames = trace.frames;\n\n if (!frames || frames.length === 0) { return !block; }\n\n var frame, filename, url, urlRegex;\n var listLength = list.length;\n var frameLength = frames.length;\n for (var i = 0; i < frameLength; i++) {\n frame = frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) { return !block; }\n\n for (var j = 0; j < listLength; j++) {\n url = list[j];\n urlRegex = new RegExp(url);\n\n if (urlRegex.test(filename)) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction urlIsOnAList(item, settings, safeOrBlock, logger) {\n // safelist is the default\n var block = false;\n if (safeOrBlock === 'blocklist') {\n block = true;\n }\n\n var list, traces;\n try {\n list = block ? settings.hostBlockList : settings.hostSafeList;\n traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];\n\n // These two checks are important to come first as they are defaults\n // in case the list is missing or the trace is missing or not well-formed\n if (!list || list.length === 0) {\n return !block;\n }\n if (traces.length === 0 || !traces[0]) {\n return !block;\n }\n\n var tracesLength = traces.length;\n for (var i = 0; i < tracesLength; i++) {\n if(matchFrames(traces[i], list, block)) {\n return true;\n }\n }\n } catch (e)\n /* istanbul ignore next */\n {\n if (block) {\n settings.hostBlockList = null;\n } else {\n settings.hostSafeList = null;\n }\n var listName = block ? 'hostBlockList' : 'hostSafeList';\n logger.error('Error while reading your configuration\\'s ' + listName + ' option. Removing custom ' + listName + '.', e);\n return !block;\n }\n return false;\n}\n\nfunction messageIsIgnored(logger) {\n return function(item, settings) {\n var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n messages = messagesFromItem(item);\n\n if (messages.length === 0){\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n\n for (j = 0; j < messages.length; j++) {\n messageIsIgnored = rIgnoredMessage.test(messages[j]);\n\n if (messageIsIgnored) {\n return false;\n }\n }\n }\n } catch(e)\n /* istanbul ignore next */\n {\n settings.ignoredMessages = null;\n logger.error('Error while reading your configuration\\'s ignoredMessages option. Removing custom ignoredMessages.');\n }\n\n return true;\n }\n}\n\nfunction messagesFromItem(item) {\n var body = item.body;\n var messages = [];\n\n // The payload schema only allows one of trace_chain, message, or trace.\n // However, existing test cases are based on having both trace and message present.\n // So here we preserve the ability to collect strings from any combination of these keys.\n if (body.trace_chain) {\n var traceChain = body.trace_chain;\n for (var i = 0; i < traceChain.length; i++) {\n var trace = traceChain[i];\n messages.push(_.get(trace, 'exception.message'));\n }\n }\n if (body.trace) {\n messages.push(_.get(body, 'trace.exception.message'));\n }\n if (body.message) {\n messages.push(_.get(body, 'message.body'));\n }\n return messages;\n}\n\nmodule.exports = {\n checkLevel: checkLevel,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlockListed: urlIsNotBlockListed,\n urlIsSafeListed: urlIsSafeListed,\n messageIsIgnored: messageIsIgnored\n};\n","'use strict';\n\nmodule.exports = {\n version: '2.24.0',\n endpoint: 'api.rollbar.com/api/1/item/',\n logLevel: 'debug',\n reportLevel: 'debug',\n uncaughtErrorLevel: 'error',\n maxItems: 0,\n itemsPerMin: 60\n}\n","'use strict';\n\nmodule.exports = {\n scrubFields: [\n 'pw',\n 'pass',\n 'passwd',\n 'password',\n 'secret',\n 'confirm_password',\n 'confirmPassword',\n 'password_confirmation',\n 'passwordConfirmation',\n 'access_token',\n 'accessToken',\n 'X-Rollbar-Access-Token',\n 'secret_key',\n 'secretKey',\n 'secretToken',\n 'cc-number',\n 'card number',\n 'cardnumber',\n 'cardnum',\n 'ccnum',\n 'ccnumber',\n 'cc num',\n 'creditcardnumber',\n 'credit card number',\n 'newcreditcardnumber',\n 'new credit card',\n 'creditcardno',\n 'credit card no',\n 'card#',\n 'card #',\n 'cc-csc',\n 'cvc',\n 'cvc2',\n 'cvv2',\n 'ccv2',\n 'security code',\n 'card verification',\n 'name on credit card',\n 'name on card',\n 'nameoncard',\n 'cardholder',\n 'card holder',\n 'name des karteninhabers',\n 'ccname',\n 'card type',\n 'cardtype',\n 'cc type',\n 'cctype',\n 'payment type',\n 'expiration date',\n 'expirationdate',\n 'expdate',\n 'cc-exp',\n 'ccmonth',\n 'ccyear'\n ]\n}\n","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.merge(options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n}\n\nTelemeter.prototype.configure = function(options) {\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n var deleteCount = 0;\n if (this.maxQueueSize > newMaxEvents) {\n deleteCount = this.maxQueueSize - newMaxEvents;\n }\n this.maxQueueSize = newMaxEvents;\n this.queue.splice(0, deleteCount);\n};\n\nTelemeter.prototype.copyEvents = function() {\n var events = Array.prototype.slice.call(this.queue, 0);\n if (_.isFunction(this.options.filterTelemetry)) {\n try {\n var i = events.length;\n while (i--) {\n if (this.options.filterTelemetry(events[i])) {\n events.splice(i, 1);\n }\n }\n } catch (e) {\n this.options.filterTelemetry = null;\n }\n }\n return events;\n};\n\nTelemeter.prototype.capture = function(type, metadata, level, rollbarUUID, timestamp) {\n var e = {\n level: getLevel(type, level),\n type: type,\n timestamp_ms: timestamp || _.now(),\n body: metadata,\n source: 'client'\n };\n if (rollbarUUID) {\n e.uuid = rollbarUUID;\n }\n\n try {\n if (_.isFunction(this.options.filterTelemetry) && this.options.filterTelemetry(e)) {\n return false;\n }\n } catch (exc) {\n this.options.filterTelemetry = null;\n }\n\n this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function(type, metadata, level, rollbarUUID) {\n return this.capture(type, metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.captureError = function(err, level, rollbarUUID, timestamp) {\n var metadata = {\n message: err.message || String(err)\n };\n if (err.stack) {\n metadata.stack = err.stack;\n }\n return this.capture('error', metadata, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureLog = function(message, level, rollbarUUID, timestamp) {\n return this.capture('log', {\n message: message\n }, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID, requestData) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\n if (requestData) {\n metadata.request = requestData;\n }\n var level = this.levelFromStatus(metadata.status_code);\n return this.capture('network', metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.levelFromStatus = function(statusCode) {\n if (statusCode >= 200 && statusCode < 400) {\n return 'info';\n }\n if (statusCode === 0 || statusCode >= 400) {\n return 'error';\n }\n return 'info';\n};\n\nTelemeter.prototype.captureDom = function(subtype, element, value, checked, rollbarUUID) {\n var metadata = {\n subtype: subtype,\n element: element\n };\n if (value !== undefined) {\n metadata.value = value;\n }\n if (checked !== undefined) {\n metadata.checked = checked;\n }\n return this.capture('dom', metadata, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureNavigation = function(from, to, rollbarUUID) {\n return this.capture('navigation', {from: from, to: to}, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureDomContentLoaded = function(ts) {\n return this.capture('navigation', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n */\n};\nTelemeter.prototype.captureLoad = function(ts) {\n return this.capture('navigation', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n */\n};\n\nTelemeter.prototype.captureConnectivityChange = function(type, rollbarUUID) {\n return this.captureNetwork({change: type}, 'connectivity', rollbarUUID);\n};\n\n// Only intended to be used internally by the notifier\nTelemeter.prototype._captureRollbarItem = function(item) {\n if (!this.options.includeItemsInTelemetry) {\n return;\n }\n if (item.err) {\n return this.captureError(item.err, item.level, item.uuid, item.timestamp);\n }\n if (item.message) {\n return this.captureLog(item.message, item.level, item.uuid, item.timestamp);\n }\n if (item.custom) {\n return this.capture('log', item.custom, item.level, item.uuid, item.timestamp);\n }\n};\n\nTelemeter.prototype.push = function(e) {\n this.queue.push(e);\n if (this.queue.length > this.maxQueueSize) {\n this.queue.shift();\n }\n};\n\nfunction getLevel(type, level) {\n if (level) {\n return level;\n }\n var defaultLevel = {\n error: 'error',\n manual: 'info'\n };\n return defaultLevel[type] || 'info';\n}\n\nmodule.exports = Telemeter;\n","'use strict';\n\nvar _ = require('../utility');\nvar scrub = require('../scrub');\nvar urlparser = require('./url');\nvar domUtil = require('./domUtility');\n\nvar defaults = {\n network: true,\n networkResponseHeaders: false,\n networkResponseBody: false,\n networkRequestHeaders: false,\n networkRequestBody: false,\n networkErrorOnHttp5xx: false,\n networkErrorOnHttp4xx: false,\n networkErrorOnHttp0: false,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true,\n contentSecurityPolicy: true,\n errorOnContentSecurityPolicy: false\n};\n\nfunction replace(obj, name, replacement, replacements, type) {\n var orig = obj[name];\n obj[name] = replacement(orig);\n if (replacements) {\n replacements[type].push([obj, name, orig]);\n }\n}\n\nfunction restore(replacements, type) {\n var b;\n while (replacements[type].length) {\n b = replacements[type].shift();\n b[0][b[1]] = b[2];\n }\n}\n\nfunction nameFromDescription(description) {\n if (!description || !description.attributes) { return null; }\n var attrs = description.attributes;\n for (var a = 0; a < attrs.length; ++a) {\n if (attrs[a].key === 'name') {\n return attrs[a].value;\n }\n }\n return null;\n}\n\nfunction defaultValueScrubber(scrubFields) {\n var patterns = [];\n for (var i = 0; i < scrubFields.length; ++i) {\n patterns.push(new RegExp(scrubFields[i], 'i'));\n }\n return function(description) {\n var name = nameFromDescription(description);\n if (!name) { return false; }\n for (var i = 0; i < patterns.length; ++i) {\n if (patterns[i].test(name)) {\n return true;\n }\n }\n return false;\n };\n}\n\nfunction Instrumenter(options, telemeter, rollbar, _window, _document) {\n this.options = options;\n var autoInstrument = options.autoInstrument;\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);\n this.telemeter = telemeter;\n this.rollbar = rollbar;\n this.diagnostic = rollbar.client.notifier.diagnostic;\n this._window = _window || {};\n this._document = _document || {};\n this.replacements = {\n network: [],\n log: [],\n navigation: [],\n connectivity: []\n };\n this.eventRemovers = {\n dom: [],\n connectivity: [],\n contentsecuritypolicy: []\n };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function(options) {\n this.options = _.merge(this.options, options);\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.merge(this.autoInstrument);\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n if (options.scrubTelemetryInputs !== undefined) {\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n }\n if (options.telemetryScrubber !== undefined) {\n this.telemetryScrubber = options.telemetryScrubber;\n }\n};\n\n// eslint-disable-next-line complexity\nInstrumenter.prototype.instrument = function(oldSettings) {\n if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {\n this.instrumentNetwork();\n } else if (!this.autoInstrument.network && oldSettings && oldSettings.network) {\n this.deinstrumentNetwork();\n }\n\n if (this.autoInstrument.log && !(oldSettings && oldSettings.log)) {\n this.instrumentConsole();\n } else if (!this.autoInstrument.log && oldSettings && oldSettings.log) {\n this.deinstrumentConsole();\n }\n\n if (this.autoInstrument.dom && !(oldSettings && oldSettings.dom)) {\n this.instrumentDom();\n } else if (!this.autoInstrument.dom && oldSettings && oldSettings.dom) {\n this.deinstrumentDom();\n }\n\n if (this.autoInstrument.navigation && !(oldSettings && oldSettings.navigation)) {\n this.instrumentNavigation();\n } else if (!this.autoInstrument.navigation && oldSettings && oldSettings.navigation) {\n this.deinstrumentNavigation();\n }\n\n if (this.autoInstrument.connectivity && !(oldSettings && oldSettings.connectivity)) {\n this.instrumentConnectivity();\n } else if (!this.autoInstrument.connectivity && oldSettings && oldSettings.connectivity) {\n this.deinstrumentConnectivity();\n }\n\n if (this.autoInstrument.contentSecurityPolicy && !(oldSettings && oldSettings.contentSecurityPolicy)) {\n this.instrumentContentSecurityPolicy();\n } else if (!this.autoInstrument.contentSecurityPolicy && oldSettings && oldSettings.contentSecurityPolicy) {\n this.deinstrumentContentSecurityPolicy();\n }\n};\n\nInstrumenter.prototype.deinstrumentNetwork = function() {\n restore(this.replacements, 'network');\n};\n\nInstrumenter.prototype.instrumentNetwork = function() {\n var self = this;\n\n function wrapProp(prop, xhr) {\n if (prop in xhr && _.isFunction(xhr[prop])) {\n replace(xhr, prop, function(orig) {\n return self.rollbar.wrap(orig);\n });\n }\n }\n\n if ('XMLHttpRequest' in this._window) {\n var xhrp = this._window.XMLHttpRequest.prototype;\n replace(xhrp, 'open', function(orig) {\n return function(method, url) {\n if (_.isType(url, 'string')) {\n if (this.__rollbar_xhr) {\n this.__rollbar_xhr.method = method;\n this.__rollbar_xhr.url = url;\n this.__rollbar_xhr.status_code = null;\n this.__rollbar_xhr.start_time_ms = _.now();\n this.__rollbar_xhr.end_time_ms = null;\n } else {\n this.__rollbar_xhr = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'setRequestHeader', function(orig) {\n return function(header, value) {\n // If xhr.open is async, __rollbar_xhr may not be initialized yet.\n if (!this.__rollbar_xhr) {\n this.__rollbar_xhr = {};\n }\n if (_.isType(header, 'string') && _.isType(value, 'string')) {\n if (self.autoInstrument.networkRequestHeaders) {\n if (!this.__rollbar_xhr.request_headers) {\n this.__rollbar_xhr.request_headers = {};\n }\n this.__rollbar_xhr.request_headers[header] = value;\n }\n // We want the content type even if request header telemetry is off.\n if (header.toLowerCase() === 'content-type') {\n this.__rollbar_xhr.request_content_type = value;\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'send', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(data) {\n /* eslint-enable no-unused-vars */\n var xhr = this;\n\n function onreadystatechangeHandler() {\n if (xhr.__rollbar_xhr) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n if (self.autoInstrument.networkRequestBody) {\n xhr.__rollbar_xhr.request = data;\n }\n xhr.__rollbar_event = self.captureNetwork(xhr.__rollbar_xhr, 'xhr', undefined);\n }\n if (xhr.readyState < 2) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n }\n if (xhr.readyState > 3) {\n xhr.__rollbar_xhr.end_time_ms = _.now();\n\n var headers = null;\n xhr.__rollbar_xhr.response_content_type = xhr.getResponseHeader('Content-Type');\n if (self.autoInstrument.networkResponseHeaders) {\n var headersConfig = self.autoInstrument.networkResponseHeaders;\n headers = {};\n try {\n var header, i;\n if (headersConfig === true) {\n var allHeaders = xhr.getAllResponseHeaders();\n if (allHeaders) {\n var arr = allHeaders.trim().split(/[\\r\\n]+/);\n var parts, value;\n for (i=0; i < arr.length; i++) {\n parts = arr[i].split(': ');\n header = parts.shift();\n value = parts.join(': ');\n headers[header] = value;\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n header = headersConfig[i];\n headers[header] = xhr.getResponseHeader(header);\n }\n }\n } catch (e) {\n /* we ignore the errors here that could come from different\n * browser issues with the xhr methods */\n }\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n try {\n body = xhr.responseText;\n } catch (e) {\n /* ignore errors from reading responseText */\n }\n }\n var response = null;\n if (body || headers) {\n response = {};\n if (body) {\n if (self.isJsonContentType(xhr.__rollbar_xhr.response_content_type)) {\n response.body = self.scrubJson(body);\n } else {\n response.body = body;\n }\n }\n if (headers) {\n response.headers = headers;\n }\n }\n if (response) {\n xhr.__rollbar_xhr.response = response;\n }\n try {\n var code = xhr.status;\n code = code === 1223 ? 204 : code;\n xhr.__rollbar_xhr.status_code = code;\n xhr.__rollbar_event.level = self.telemeter.levelFromStatus(code);\n self.errorOnHttpStatus(xhr.__rollbar_xhr);\n } catch (e) {\n /* ignore possible exception from xhr.status */\n }\n }\n }\n }\n\n wrapProp('onload', xhr);\n wrapProp('onerror', xhr);\n wrapProp('onprogress', xhr);\n\n if ('onreadystatechange' in xhr && _.isFunction(xhr.onreadystatechange)) {\n replace(xhr, 'onreadystatechange', function(orig) {\n return self.rollbar.wrap(orig, undefined, onreadystatechangeHandler);\n });\n } else {\n xhr.onreadystatechange = onreadystatechangeHandler;\n }\n if (xhr.__rollbar_xhr && self.trackHttpErrors()) {\n xhr.__rollbar_xhr.stack = (new Error()).stack;\n }\n return orig.apply(this, arguments);\n }\n }, this.replacements, 'network');\n }\n\n if ('fetch' in this._window) {\n replace(this._window, 'fetch', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(fn, t) {\n /* eslint-enable no-unused-vars */\n var args = new Array(arguments.length);\n for (var i=0, len=args.length; i < len; i++) {\n args[i] = arguments[i];\n }\n var input = args[0];\n var method = 'GET';\n var url;\n if (_.isType(input, 'string')) {\n url = input;\n } else if (input) {\n url = input.url;\n if (input.method) {\n method = input.method;\n }\n }\n if (args[1] && args[1].method) {\n method = args[1].method;\n }\n var metadata = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n if (args[1] && args[1].headers) {\n // Argument may be a Headers object, or plain object. Ensure here that\n // we are working with a Headers object with case-insensitive keys.\n var reqHeaders = new Headers(args[1].headers);\n\n metadata.request_content_type = reqHeaders.get('Content-Type');\n\n if (self.autoInstrument.networkRequestHeaders) {\n metadata.request_headers = self.fetchHeaders(reqHeaders, self.autoInstrument.networkRequestHeaders)\n }\n }\n\n if (self.autoInstrument.networkRequestBody) {\n if (args[1] && args[1].body) {\n metadata.request = args[1].body;\n } else if (args[0] && !_.isType(args[0], 'string') && args[0].body) {\n metadata.request = args[0].body;\n }\n }\n self.captureNetwork(metadata, 'fetch', undefined);\n if (self.trackHttpErrors()) {\n metadata.stack = (new Error()).stack;\n }\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n metadata.response_content_type = resp.headers.get('Content-Type');\n var headers = null;\n if (self.autoInstrument.networkResponseHeaders) {\n headers = self.fetchHeaders(resp.headers, self.autoInstrument.networkResponseHeaders);\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n if (typeof resp.text === 'function') { // Response.text() is not implemented on some platforms\n // The response must be cloned to prevent reading (and locking) the original stream.\n body = resp.clone().text(); //returns a Promise\n }\n }\n if (headers || body) {\n metadata.response = {};\n if (body) {\n // Test to ensure body is a Promise, which it should always be.\n if (typeof body.then === 'function') {\n body.then(function (text) {\n if (self.isJsonContentType(metadata.response_content_type)) {\n metadata.response.body = self.scrubJson(text);\n }\n });\n } else {\n metadata.response.body = body;\n }\n }\n if (headers) {\n metadata.response.headers = headers;\n }\n }\n self.errorOnHttpStatus(metadata);\n return resp;\n });\n };\n }, this.replacements, 'network');\n }\n};\n\nInstrumenter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID) {\n if (metadata.request && this.isJsonContentType(metadata.request_content_type)) {\n metadata.request = this.scrubJson(metadata.request);\n }\n return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);\n};\n\nInstrumenter.prototype.isJsonContentType = function(contentType) {\n return (contentType && _.isType(contentType, 'string') && contentType.toLowerCase().includes('json')) ? true : false;\n}\n\nInstrumenter.prototype.scrubJson = function(json) {\n return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));\n}\n\nInstrumenter.prototype.fetchHeaders = function(inHeaders, headersConfig) {\n var outHeaders = {};\n try {\n var i;\n if (headersConfig === true) {\n if (typeof inHeaders.entries === 'function') { // Headers.entries() is not implemented in IE\n var allHeaders = inHeaders.entries();\n var currentHeader = allHeaders.next();\n while (!currentHeader.done) {\n outHeaders[currentHeader.value[0]] = currentHeader.value[1];\n currentHeader = allHeaders.next();\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n var header = headersConfig[i];\n outHeaders[header] = inHeaders.get(header);\n }\n }\n } catch (e) {\n /* ignore probable IE errors */\n }\n return outHeaders;\n}\n\nInstrumenter.prototype.trackHttpErrors = function() {\n return this.autoInstrument.networkErrorOnHttp5xx ||\n this.autoInstrument.networkErrorOnHttp4xx ||\n this.autoInstrument.networkErrorOnHttp0;\n}\n\nInstrumenter.prototype.errorOnHttpStatus = function(metadata) {\n var status = metadata.status_code;\n\n if ((status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||\n (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||\n (status === 0 && this.autoInstrument.networkErrorOnHttp0)) {\n var error = new Error('HTTP request failed with Status ' + status);\n error.stack = metadata.stack;\n this.rollbar.error(error, { skipFrames: 1 });\n }\n}\n\nInstrumenter.prototype.deinstrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n var b;\n while (this.replacements['log'].length) {\n b = this.replacements['log'].shift();\n this._window.console[b[0]] = b[1];\n }\n};\n\nInstrumenter.prototype.instrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n\n var self = this;\n var c = this._window.console;\n\n function wrapConsole(method) {\n 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778\n\n var orig = c[method];\n var origConsole = c;\n var level = method === 'warn' ? 'warning' : method;\n c[method] = function() {\n var args = Array.prototype.slice.call(arguments);\n var message = _.formatArgsAsString(args);\n self.telemeter.captureLog(message, level);\n if (orig) {\n Function.prototype.apply.call(orig, origConsole, args);\n }\n };\n self.replacements['log'].push([method, orig]);\n }\n var methods = ['debug','info','warn','error','log'];\n try {\n for (var i=0, len=methods.length; i < len; i++) {\n wrapConsole(methods[i]);\n }\n } catch (e) {\n this.diagnostic.instrumentConsole = { error: e.message };\n }\n};\n\nInstrumenter.prototype.deinstrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n this.removeListeners('dom');\n};\n\nInstrumenter.prototype.instrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n var clickHandler = this.handleClick.bind(this);\n var blurHandler = this.handleBlur.bind(this);\n this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);\n this.addListener('dom', this._window, 'blur', 'onfocusout', blurHandler, true);\n};\n\nInstrumenter.prototype.handleClick = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n var hasTag = e && e.tagName;\n var anchorOrButton = domUtil.isDescribedElement(e, 'a') || domUtil.isDescribedElement(e, 'button');\n if (hasTag && (anchorOrButton || domUtil.isDescribedElement(e, 'input', ['button', 'submit']))) {\n this.captureDomEvent('click', e);\n } else if (domUtil.isDescribedElement(e, 'input', ['checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value, e.checked);\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleBlur = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n if (e && e.tagName) {\n if (domUtil.isDescribedElement(e, 'textarea')) {\n this.captureDomEvent('input', e, e.value);\n } else if (domUtil.isDescribedElement(e, 'select') && e.options && e.options.length) {\n this.handleSelectInputChanged(e);\n } else if (domUtil.isDescribedElement(e, 'input') && !domUtil.isDescribedElement(e, 'input', ['button', 'submit', 'hidden', 'checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value);\n }\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleSelectInputChanged = function(elem) {\n if (elem.multiple) {\n for (var i = 0; i < elem.options.length; i++) {\n if (elem.options[i].selected) {\n this.captureDomEvent('input', elem, elem.options[i].value);\n }\n }\n } else if (elem.selectedIndex >= 0 && elem.options[elem.selectedIndex]) {\n this.captureDomEvent('input', elem, elem.options[elem.selectedIndex].value);\n }\n};\n\nInstrumenter.prototype.captureDomEvent = function(subtype, element, value, isChecked) {\n if (value !== undefined) {\n if (this.scrubTelemetryInputs || (domUtil.getElementType(element) === 'password')) {\n value = '[scrubbed]';\n } else {\n var description = domUtil.describeElement(element);\n if (this.telemetryScrubber) {\n if (this.telemetryScrubber(description)) {\n value = '[scrubbed]';\n }\n } else if (this.defaultValueScrubber(description)) {\n value = '[scrubbed]';\n }\n }\n }\n var elementString = domUtil.elementArrayToString(domUtil.treeToArray(element));\n this.telemeter.captureDom(subtype, elementString, value, isChecked);\n};\n\nInstrumenter.prototype.deinstrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n restore(this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.instrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n var self = this;\n replace(this._window, 'onpopstate', function(orig) {\n return function() {\n var current = self._location.href;\n self.handleUrlChange(self._lastHref, current);\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n }, this.replacements, 'navigation');\n\n replace(this._window.history, 'pushState', function(orig) {\n return function() {\n var url = arguments.length > 2 ? arguments[2] : undefined;\n if (url) {\n self.handleUrlChange(self._lastHref, url + '');\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.handleUrlChange = function(from, to) {\n var parsedHref = urlparser.parse(this._location.href);\n var parsedTo = urlparser.parse(to);\n var parsedFrom = urlparser.parse(from);\n this._lastHref = to;\n if (parsedHref.protocol === parsedTo.protocol && parsedHref.host === parsedTo.host) {\n to = parsedTo.path + (parsedTo.hash || '');\n }\n if (parsedHref.protocol === parsedFrom.protocol && parsedHref.host === parsedFrom.host) {\n from = parsedFrom.path + (parsedFrom.hash || '');\n }\n this.telemeter.captureNavigation(from, to);\n};\n\nInstrumenter.prototype.deinstrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.removeListeners('connectivity');\n } else {\n restore(this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.instrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.addListener('connectivity', this._window, 'online', undefined, function() {\n this.telemeter.captureConnectivityChange('online');\n }.bind(this), true);\n this.addListener('connectivity', this._window, 'offline', undefined, function() {\n this.telemeter.captureConnectivityChange('offline');\n }.bind(this), true);\n } else {\n var self = this;\n replace(this._document.body, 'ononline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('online');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n replace(this._document.body, 'onoffline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('offline');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.handleCspEvent = function(cspEvent) {\n var message = 'Security Policy Violation: ' +\n 'blockedURI: ' + cspEvent.blockedURI + ', ' +\n 'violatedDirective: ' + cspEvent.violatedDirective + ', ' +\n 'effectiveDirective: ' + cspEvent.effectiveDirective + ', ';\n\n if (cspEvent.sourceFile) {\n message += 'location: ' + cspEvent.sourceFile + ', ' +\n 'line: ' + cspEvent.lineNumber + ', ' +\n 'col: ' + cspEvent.columnNumber + ', ';\n }\n\n message += 'originalPolicy: ' + cspEvent.originalPolicy;\n\n this.telemeter.captureLog(message, 'error');\n this.handleCspError(message);\n}\n\nInstrumenter.prototype.handleCspError = function(message) {\n if (this.autoInstrument.errorOnContentSecurityPolicy) {\n this.rollbar.error(message);\n }\n}\n\nInstrumenter.prototype.deinstrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._window)) { return; }\n\n this.removeListeners('contentsecuritypolicy');\n};\n\nInstrumenter.prototype.instrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._window)) { return; }\n\n var cspHandler = this.handleCspEvent.bind(this);\n this.addListener('contentsecuritypolicy', this._window, 'securitypolicyviolation', null, cspHandler, false);\n};\n\nInstrumenter.prototype.addListener = function(section, obj, type, altType, handler, capture) {\n if (obj.addEventListener) {\n obj.addEventListener(type, handler, capture);\n this.eventRemovers[section].push(function() {\n obj.removeEventListener(type, handler, capture);\n });\n } else if (altType) {\n obj.attachEvent(altType, handler);\n this.eventRemovers[section].push(function() {\n obj.detachEvent(altType, handler);\n });\n }\n};\n\nInstrumenter.prototype.removeListeners = function(section) {\n var r;\n while (this.eventRemovers[section].length) {\n r = this.eventRemovers[section].shift();\n r();\n }\n};\n\nmodule.exports = Instrumenter;\n","'use strict';\n\nfunction getElementType(e) {\n return (e.getAttribute('type') || '').toLowerCase();\n}\n\nfunction isDescribedElement(element, type, subtypes) {\n if (element.tagName.toLowerCase() !== type.toLowerCase()) {\n return false;\n }\n if (!subtypes) {\n return true;\n }\n element = getElementType(element);\n for (var i = 0; i < subtypes.length; i++) {\n if (subtypes[i] === element) {\n return true;\n }\n }\n return false;\n}\n\nfunction getElementFromEvent(evt, doc) {\n if (evt.target) {\n return evt.target;\n }\n if (doc && doc.elementFromPoint) {\n return doc.elementFromPoint(evt.clientX, evt.clientY);\n }\n return undefined;\n}\n\nfunction treeToArray(elem) {\n var MAX_HEIGHT = 5;\n var out = [];\n var nextDescription;\n for (var height = 0; elem && height < MAX_HEIGHT; height++) {\n nextDescription = describeElement(elem);\n if (nextDescription.tagName === 'html') {\n break;\n }\n out.unshift(nextDescription);\n elem = elem.parentNode;\n }\n return out;\n}\n\nfunction elementArrayToString(a) {\n var MAX_LENGTH = 80;\n var separator = ' > ', separatorLength = separator.length;\n var out = [], len = 0, nextStr, totalLength;\n\n for (var i = a.length - 1; i >= 0; i--) {\n nextStr = descriptionToString(a[i]);\n totalLength = len + (out.length * separatorLength) + nextStr.length;\n if (i < a.length - 1 && totalLength >= MAX_LENGTH + 3) {\n out.unshift('...');\n break;\n }\n out.unshift(nextStr);\n len += nextStr.length;\n }\n return out.join(separator);\n}\n\nfunction descriptionToString(desc) {\n if (!desc || !desc.tagName) {\n return '';\n }\n var out = [desc.tagName];\n if (desc.id) {\n out.push('#' + desc.id);\n }\n if (desc.classes) {\n out.push('.' + desc.classes.join('.'));\n }\n for (var i = 0; i < desc.attributes.length; i++) {\n out.push('[' + desc.attributes[i].key + '=\"' + desc.attributes[i].value + '\"]');\n }\n\n return out.join('');\n}\n\n/**\n * Input: a dom element\n * Output: null if tagName is falsey or input is falsey, else\n * {\n * tagName: String,\n * id: String | undefined,\n * classes: [String] | undefined,\n * attributes: [\n * {\n * key: OneOf(type, name, title, alt),\n * value: String\n * }\n * ]\n * }\n */\nfunction describeElement(elem) {\n if (!elem || !elem.tagName) {\n return null;\n }\n var out = {}, className, key, attr, i;\n out.tagName = elem.tagName.toLowerCase();\n if (elem.id) {\n out.id = elem.id;\n }\n className = elem.className;\n if (className && (typeof className === 'string')) {\n out.classes = className.split(/\\s+/);\n }\n var attributes = ['type', 'name', 'title', 'alt'];\n out.attributes = [];\n for (i = 0; i < attributes.length; i++) {\n key = attributes[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.attributes.push({key: key, value: attr});\n }\n }\n return out;\n}\n\nmodule.exports = {\n describeElement: describeElement,\n descriptionToString: descriptionToString,\n elementArrayToString: elementArrayToString,\n treeToArray: treeToArray,\n getElementFromEvent: getElementFromEvent,\n isDescribedElement: isDescribedElement,\n getElementType: getElementType\n};\n","'use strict';\n\nvar polyfillJSON = require('../../vendor/JSON-js/json3');\n\nmodule.exports = polyfillJSON;\n","// json3.js\n// 2017-02-21\n// Public Domain.\n// NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.\n// See http://www.JSON.org/js.html\n// This code should be minified before deployment.\n// See http://javascript.crockford.com/jsmin.html\n\n// USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO\n// NOT CONTROL.\n\n// This file creates a global JSON object containing two methods: stringify\n// and parse. This file provides the ES5 JSON capability to ES3 systems.\n// If a project might run on IE8 or earlier, then this file should be included.\n// This file does nothing on ES5 systems.\n\n// JSON.stringify(value, replacer, space)\n// value any JavaScript value, usually an object or array.\n// replacer an optional parameter that determines how object\n// values are stringified for objects. It can be a\n// function or an array of strings.\n// space an optional parameter that specifies the indentation\n// of nested structures. If it is omitted, the text will\n// be packed without extra whitespace. If it is a number,\n// it will specify the number of spaces to indent at each\n// level. If it is a string (such as \"\\t\" or \" \"),\n// it contains the characters used to indent at each level.\n// This method produces a JSON text from a JavaScript value.\n// When an object value is found, if the object contains a toJSON\n// method, its toJSON method will be called and the result will be\n// stringified. A toJSON method does not serialize: it returns the\n// value represented by the name/value pair that should be serialized,\n// or undefined if nothing should be serialized. The toJSON method\n// will be passed the key associated with the value, and this will be\n// bound to the value.\n\n// For example, this would serialize Dates as ISO strings.\n\n// Date.prototype.toJSON = function (key) {\n// function f(n) {\n// // Format integers to have at least two digits.\n// return (n < 10)\n// ? \"0\" + n\n// : n;\n// }\n// return this.getUTCFullYear() + \"-\" +\n// f(this.getUTCMonth() + 1) + \"-\" +\n// f(this.getUTCDate()) + \"T\" +\n// f(this.getUTCHours()) + \":\" +\n// f(this.getUTCMinutes()) + \":\" +\n// f(this.getUTCSeconds()) + \"Z\";\n// };\n\n// You can provide an optional replacer method. It will be passed the\n// key and value of each member, with this bound to the containing\n// object. The value that is returned from your method will be\n// serialized. If your method returns undefined, then the member will\n// be excluded from the serialization.\n\n// If the replacer parameter is an array of strings, then it will be\n// used to select the members to be serialized. It filters the results\n// such that only members with keys listed in the replacer array are\n// stringified.\n\n// Values that do not have JSON representations, such as undefined or\n// functions, will not be serialized. Such values in objects will be\n// dropped; in arrays they will be replaced with null. You can use\n// a replacer function to replace those with JSON values.\n\n// JSON.stringify(undefined) returns undefined.\n\n// The optional space parameter produces a stringification of the\n// value that is filled with line breaks and indentation to make it\n// easier to read.\n\n// If the space parameter is a non-empty string, then that string will\n// be used for indentation. If the space parameter is a number, then\n// the indentation will be that many spaces.\n\n// Example:\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}]);\n// // text is '[\"e\",{\"pluribus\":\"unum\"}]'\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}], null, \"\\t\");\n// // text is '[\\n\\t\"e\",\\n\\t{\\n\\t\\t\"pluribus\": \"unum\"\\n\\t}\\n]'\n\n// text = JSON.stringify([new Date()], function (key, value) {\n// return this[key] instanceof Date\n// ? \"Date(\" + this[key] + \")\"\n// : value;\n// });\n// // text is '[\"Date(---current time---)\"]'\n\n// JSON.parse(text, reviver)\n// This method parses a JSON text to produce an object or array.\n// It can throw a SyntaxError exception.\n// This has been modified to use JSON-js/json_parse_state.js as the\n// parser instead of the one built around eval found in JSON-js/json2.js\n\n// The optional reviver parameter is a function that can filter and\n// transform the results. It receives each of the keys and values,\n// and its return value is used instead of the original value.\n// If it returns what it received, then the structure is not modified.\n// If it returns undefined then the member is deleted.\n\n// Example:\n\n// // Parse the text. Values that look like ISO date strings will\n// // be converted to Date objects.\n\n// myData = JSON.parse(text, function (key, value) {\n// var a;\n// if (typeof value === \"string\") {\n// a =\n// /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2}(?:\\.\\d*)?)Z$/.exec(value);\n// if (a) {\n// return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],\n// +a[5], +a[6]));\n// }\n// }\n// return value;\n// });\n\n// myData = JSON.parse('[\"Date(09/09/2001)\"]', function (key, value) {\n// var d;\n// if (typeof value === \"string\" &&\n// value.slice(0, 5) === \"Date(\" &&\n// value.slice(-1) === \")\") {\n// d = new Date(value.slice(5, -1));\n// if (d) {\n// return d;\n// }\n// }\n// return value;\n// });\n\n// This is a reference implementation. You are free to copy, modify, or\n// redistribute.\n\n/*jslint\n for, this\n */\n\n/*property\n JSON, apply, call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,\n getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,\n lastIndex, length, parse, prototype, push, replace, slice, stringify,\n test, toJSON, toString, valueOf\n */\n\nvar setupCustomJSON = function(JSON) {\n\n var rx_one = /^[\\],:{}\\s]*$/;\n var rx_two = /\\\\(?:[\"\\\\\\/bfnrt]|u[0-9a-fA-F]{4})/g;\n var rx_three = /\"[^\"\\\\\\n\\r]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g;\n var rx_four = /(?:^|:|,)(?:\\s*\\[)+/g;\n var rx_escapable = /[\\\\\"\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n var rx_dangerous = /[\\u0000\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n\n function f(n) {\n // Format integers to have at least two digits.\n return n < 10\n ? \"0\" + n\n : n;\n }\n\n function this_value() {\n return this.valueOf();\n }\n\n if (typeof Date.prototype.toJSON !== \"function\") {\n\n Date.prototype.toJSON = function () {\n\n return isFinite(this.valueOf())\n ? this.getUTCFullYear() + \"-\" +\n f(this.getUTCMonth() + 1) + \"-\" +\n f(this.getUTCDate()) + \"T\" +\n f(this.getUTCHours()) + \":\" +\n f(this.getUTCMinutes()) + \":\" +\n f(this.getUTCSeconds()) + \"Z\"\n : null;\n };\n\n Boolean.prototype.toJSON = this_value;\n Number.prototype.toJSON = this_value;\n String.prototype.toJSON = this_value;\n }\n\n var gap;\n var indent;\n var meta;\n var rep;\n\n\n function quote(string) {\n\n // If the string contains no control characters, no quote characters, and no\n // backslash characters, then we can safely slap some quotes around it.\n // Otherwise we must also replace the offending characters with safe escape\n // sequences.\n\n rx_escapable.lastIndex = 0;\n return rx_escapable.test(string)\n ? \"\\\"\" + string.replace(rx_escapable, function (a) {\n var c = meta[a];\n return typeof c === \"string\"\n ? c\n : \"\\\\u\" + (\"0000\" + a.charCodeAt(0).toString(16)).slice(-4);\n }) + \"\\\"\"\n : \"\\\"\" + string + \"\\\"\";\n }\n\n\n function str(key, holder) {\n\n // Produce a string from holder[key].\n\n var i; // The loop counter.\n var k; // The member key.\n var v; // The member value.\n var length;\n var mind = gap;\n var partial;\n var value = holder[key];\n\n // If the value has a toJSON method, call it to obtain a replacement value.\n\n if (value && typeof value === \"object\" &&\n typeof value.toJSON === \"function\") {\n value = value.toJSON(key);\n }\n\n // If we were called with a replacer function, then call the replacer to\n // obtain a replacement value.\n\n if (typeof rep === \"function\") {\n value = rep.call(holder, key, value);\n }\n\n // What happens next depends on the value's type.\n\n switch (typeof value) {\n case \"string\":\n return quote(value);\n\n case \"number\":\n\n // JSON numbers must be finite. Encode non-finite numbers as null.\n\n return isFinite(value)\n ? String(value)\n : \"null\";\n\n case \"boolean\":\n case \"null\":\n\n // If the value is a boolean or null, convert it to a string. Note:\n // typeof null does not produce \"null\". The case is included here in\n // the remote chance that this gets fixed someday.\n\n return String(value);\n\n // If the type is \"object\", we might be dealing with an object or an array or\n // null.\n\n case \"object\":\n\n // Due to a specification blunder in ECMAScript, typeof null is \"object\",\n // so watch out for that case.\n\n if (!value) {\n return \"null\";\n }\n\n // Make an array to hold the partial results of stringifying this object value.\n\n gap += indent;\n partial = [];\n\n // Is the value an array?\n\n if (Object.prototype.toString.apply(value) === \"[object Array]\") {\n\n // The value is an array. Stringify every element. Use null as a placeholder\n // for non-JSON values.\n\n length = value.length;\n for (i = 0; i < length; i += 1) {\n partial[i] = str(i, value) || \"null\";\n }\n\n // Join all of the elements together, separated with commas, and wrap them in\n // brackets.\n\n v = partial.length === 0\n ? \"[]\"\n : gap\n ? \"[\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"]\"\n : \"[\" + partial.join(\",\") + \"]\";\n gap = mind;\n return v;\n }\n\n // If the replacer is an array, use it to select the members to be stringified.\n\n if (rep && typeof rep === \"object\") {\n length = rep.length;\n for (i = 0; i < length; i += 1) {\n if (typeof rep[i] === \"string\") {\n k = rep[i];\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n } else {\n\n // Otherwise, iterate through all of the keys in the object.\n\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(value, k)) {\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n }\n\n // Join all of the member texts together, separated with commas,\n // and wrap them in braces.\n\n v = partial.length === 0\n ? \"{}\"\n : gap\n ? \"{\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"}\"\n : \"{\" + partial.join(\",\") + \"}\";\n gap = mind;\n return v;\n }\n }\n\n // If the JSON object does not yet have a stringify method, give it one.\n\n if (typeof JSON.stringify !== \"function\") {\n meta = { // table of character substitutions\n \"\\b\": \"\\\\b\",\n \"\\t\": \"\\\\t\",\n \"\\n\": \"\\\\n\",\n \"\\f\": \"\\\\f\",\n \"\\r\": \"\\\\r\",\n \"\\\"\": \"\\\\\\\"\",\n \"\\\\\": \"\\\\\\\\\"\n };\n JSON.stringify = function (value, replacer, space) {\n\n // The stringify method takes a value and an optional replacer, and an optional\n // space parameter, and returns a JSON text. The replacer can be a function\n // that can replace values, or an array of strings that will select the keys.\n // A default replacer method can be provided. Use of the space parameter can\n // produce text that is more easily readable.\n\n var i;\n gap = \"\";\n indent = \"\";\n\n // If the space parameter is a number, make an indent string containing that\n // many spaces.\n\n if (typeof space === \"number\") {\n for (i = 0; i < space; i += 1) {\n indent += \" \";\n }\n\n // If the space parameter is a string, it will be used as the indent string.\n\n } else if (typeof space === \"string\") {\n indent = space;\n }\n\n // If there is a replacer, it must be a function or an array.\n // Otherwise, throw an error.\n\n rep = replacer;\n if (replacer && typeof replacer !== \"function\" &&\n (typeof replacer !== \"object\" ||\n typeof replacer.length !== \"number\")) {\n throw new Error(\"JSON.stringify\");\n }\n\n // Make a fake root object containing our value under the key of \"\".\n // Return the result of stringifying the value.\n\n return str(\"\", {\"\": value});\n };\n }\n\n\n // If the JSON object does not yet have a parse method, give it one.\n\n if (typeof JSON.parse !== \"function\") {\n JSON.parse = (function () {\n\n // This function creates a JSON parse function that uses a state machine rather\n // than the dangerous eval function to parse a JSON text.\n\n var state; // The state of the parser, one of\n // 'go' The starting state\n // 'ok' The final, accepting state\n // 'firstokey' Ready for the first key of the object or\n // the closing of an empty object\n // 'okey' Ready for the next key of the object\n // 'colon' Ready for the colon\n // 'ovalue' Ready for the value half of a key/value pair\n // 'ocomma' Ready for a comma or closing }\n // 'firstavalue' Ready for the first value of an array or\n // an empty array\n // 'avalue' Ready for the next value of an array\n // 'acomma' Ready for a comma or closing ]\n var stack; // The stack, for controlling nesting.\n var container; // The current container object or array\n var key; // The current key\n var value; // The current value\n var escapes = { // Escapement translation table\n \"\\\\\": \"\\\\\",\n \"\\\"\": \"\\\"\",\n \"/\": \"/\",\n \"t\": \"\\t\",\n \"n\": \"\\n\",\n \"r\": \"\\r\",\n \"f\": \"\\f\",\n \"b\": \"\\b\"\n };\n var string = { // The actions for string tokens\n go: function () {\n state = \"ok\";\n },\n firstokey: function () {\n key = value;\n state = \"colon\";\n },\n okey: function () {\n key = value;\n state = \"colon\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var number = { // The actions for number tokens\n go: function () {\n state = \"ok\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var action = {\n\n // The action table describes the behavior of the machine. It contains an\n // object for each token. Each object contains a method that is called when\n // a token is matched in a state. An object will lack a method for illegal\n // states.\n\n \"{\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = {};\n state = \"firstokey\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = {};\n state = \"firstokey\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n }\n },\n \"}\": {\n firstokey: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n ocomma: function () {\n var pop = stack.pop();\n container[key] = value;\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \"[\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = [];\n state = \"firstavalue\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = [];\n state = \"firstavalue\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n }\n },\n \"]\": {\n firstavalue: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n acomma: function () {\n var pop = stack.pop();\n container.push(value);\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \":\": {\n colon: function () {\n if (Object.hasOwnProperty.call(container, key)) {\n throw new SyntaxError(\"Duplicate key '\" + key + \"\\\"\");\n }\n state = \"ovalue\";\n }\n },\n \",\": {\n ocomma: function () {\n container[key] = value;\n state = \"okey\";\n },\n acomma: function () {\n container.push(value);\n state = \"avalue\";\n }\n },\n \"true\": {\n go: function () {\n value = true;\n state = \"ok\";\n },\n ovalue: function () {\n value = true;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = true;\n state = \"acomma\";\n },\n avalue: function () {\n value = true;\n state = \"acomma\";\n }\n },\n \"false\": {\n go: function () {\n value = false;\n state = \"ok\";\n },\n ovalue: function () {\n value = false;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = false;\n state = \"acomma\";\n },\n avalue: function () {\n value = false;\n state = \"acomma\";\n }\n },\n \"null\": {\n go: function () {\n value = null;\n state = \"ok\";\n },\n ovalue: function () {\n value = null;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = null;\n state = \"acomma\";\n },\n avalue: function () {\n value = null;\n state = \"acomma\";\n }\n }\n };\n\n function debackslashify(text) {\n\n // Remove and replace any backslash escapement.\n\n return text.replace(/\\\\(?:u(.{4})|([^u]))/g, function (ignore, b, c) {\n return b\n ? String.fromCharCode(parseInt(b, 16))\n : escapes[c];\n });\n }\n\n return function (source, reviver) {\n\n // A regular expression is used to extract tokens from the JSON text.\n // The extraction process is cautious.\n\n var result;\n var tx = /^[\\u0020\\t\\n\\r]*(?:([,:\\[\\]{}]|true|false|null)|(-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?)|\"((?:[^\\r\\n\\t\\\\\\\"]|\\\\(?:[\"\\\\\\/trnfb]|u[0-9a-fA-F]{4}))*)\")/;\n\n // Set the starting state.\n\n state = \"go\";\n\n // The stack records the container, key, and state for each object or array\n // that contains another object or array while processing nested structures.\n\n stack = [];\n\n // If any error occurs, we will catch it and ultimately throw a syntax error.\n\n try {\n\n // For each token...\n\n while (true) {\n result = tx.exec(source);\n if (!result) {\n break;\n }\n\n // result is the result array from matching the tokenizing regular expression.\n // result[0] contains everything that matched, including any initial whitespace.\n // result[1] contains any punctuation that was matched, or true, false, or null.\n // result[2] contains a matched number, still in string form.\n // result[3] contains a matched string, without quotes but with escapement.\n\n if (result[1]) {\n\n // Token: Execute the action for this state and token.\n\n action[result[1]][state]();\n\n } else if (result[2]) {\n\n // Number token: Convert the number string into a number value and execute\n // the action for this state and number.\n\n value = +result[2];\n number[state]();\n } else {\n\n // String token: Replace the escapement sequences and execute the action for\n // this state and string.\n\n value = debackslashify(result[3]);\n string[state]();\n }\n\n // Remove the token from the string. The loop will continue as long as there\n // are tokens. This is a slow process, but it allows the use of ^ matching,\n // which assures that no illegal tokens slip through.\n\n source = source.slice(result[0].length);\n }\n\n // If we find a state/token combination that is illegal, then the action will\n // cause an error. We handle the error by simply changing the state.\n\n } catch (e) {\n state = e;\n }\n\n // The parsing is finished. If we are not in the final \"ok\" state, or if the\n // remaining source contains anything except whitespace, then we did not have\n //a well-formed JSON text.\n\n if (state !== \"ok\" || (/[^\\u0020\\t\\n\\r]/.test(source))) {\n throw (state instanceof SyntaxError)\n ? state\n : new SyntaxError(\"JSON\");\n }\n\n // If there is a reviver function, we recursively walk the new structure,\n // passing each name/value pair to the reviver function for possible\n // transformation, starting with a temporary root object that holds the current\n // value in an empty key. If there is not a reviver function, we simply return\n // that value.\n\n return (typeof reviver === \"function\")\n ? (function walk(holder, key) {\n var k;\n var v;\n var val = holder[key];\n if (val && typeof val === \"object\") {\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(val, k)) {\n v = walk(val, k);\n if (v !== undefined) {\n val[k] = v;\n } else {\n delete val[k];\n }\n }\n }\n }\n return reviver.call(holder, key, val);\n }({\"\": value}, \"\"))\n : value;\n };\n }());\n }\n}\n\nmodule.exports = setupCustomJSON;\n","'use strict';\n\nfunction wrapGlobals(window, handler, shim) {\n if (!window) { return; }\n // Adapted from https://github.com/bugsnag/bugsnag-js\n var globals = 'EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload'.split(',');\n var i, global;\n for (i = 0; i < globals.length; ++i) {\n global = globals[i];\n\n if (window[global] && window[global].prototype) {\n _extendListenerPrototype(handler, window[global].prototype, shim);\n }\n }\n}\n\nfunction _extendListenerPrototype(handler, prototype, shim) {\n if (prototype.hasOwnProperty && prototype.hasOwnProperty('addEventListener')) {\n var oldAddEventListener = prototype.addEventListener;\n while (oldAddEventListener._rollbarOldAdd && oldAddEventListener.belongsToShim) {\n oldAddEventListener = oldAddEventListener._rollbarOldAdd;\n }\n var addFn = function(event, callback, bubble) {\n oldAddEventListener.call(this, event, handler.wrap(callback), bubble);\n };\n addFn._rollbarOldAdd = oldAddEventListener;\n addFn.belongsToShim = shim;\n prototype.addEventListener = addFn;\n\n var oldRemoveEventListener = prototype.removeEventListener;\n while (oldRemoveEventListener._rollbarOldRemove && oldRemoveEventListener.belongsToShim) {\n oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;\n }\n var removeFn = function(event, callback, bubble) {\n oldRemoveEventListener.call(this, event, callback && callback._rollbar_wrapped || callback, bubble);\n };\n removeFn._rollbarOldRemove = oldRemoveEventListener;\n removeFn.belongsToShim = shim;\n prototype.removeEventListener = removeFn;\n }\n}\n\nmodule.exports = wrapGlobals;\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction raw(payload, jsonBackup) {\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction selectFrames(frames, range) {\n var len = frames.length;\n if (len > range * 2) {\n return frames.slice(0, range).concat(frames.slice(len - range));\n }\n return frames;\n}\n\nfunction truncateFrames(payload, jsonBackup, range) {\n range = (typeof range === 'undefined') ? 30 : range;\n var body = payload.data.body;\n var frames;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n frames = chain[i].frames;\n frames = selectFrames(frames, range);\n chain[i].frames = frames;\n }\n } else if (body.trace) {\n frames = body.trace.frames;\n frames = selectFrames(frames, range);\n body.trace.frames = frames;\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction maybeTruncateValue(len, val) {\n if (!val) {\n return val;\n }\n if (val.length > len) {\n return val.slice(0, len - 3).concat('...');\n }\n return val;\n}\n\nfunction truncateStrings(len, payload, jsonBackup) {\n function truncator(k, v, seen) {\n switch (_.typeName(v)) {\n case 'string':\n return maybeTruncateValue(len, v);\n case 'object':\n case 'array':\n return traverse(v, truncator, seen);\n default:\n return v;\n }\n }\n payload = traverse(payload, truncator);\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction truncateTraceData(traceData) {\n if (traceData.exception) {\n delete traceData.exception.description;\n traceData.exception.message = maybeTruncateValue(255, traceData.exception.message);\n }\n traceData.frames = selectFrames(traceData.frames, 1);\n return traceData;\n}\n\nfunction minBody(payload, jsonBackup) {\n var body = payload.data.body;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n chain[i] = truncateTraceData(chain[i]);\n }\n } else if (body.trace) {\n body.trace = truncateTraceData(body.trace);\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction needsTruncation(payload, maxSize) {\n return _.maxByteSize(payload) > maxSize;\n}\n\nfunction truncate(payload, jsonBackup, maxSize) {\n maxSize = (typeof maxSize === 'undefined') ? (512 * 1024) : maxSize;\n var strategies = [\n raw,\n truncateFrames,\n truncateStrings.bind(null, 1024),\n truncateStrings.bind(null, 512),\n truncateStrings.bind(null, 256),\n minBody\n ];\n var strategy, results, result;\n\n while ((strategy = strategies.shift())) {\n results = strategy(payload, jsonBackup);\n payload = results[0];\n result = results[1];\n if (result.error || !needsTruncation(result.value, maxSize)) {\n return result;\n }\n }\n return result;\n}\n\nmodule.exports = {\n truncate: truncate,\n\n /* for testing */\n raw: raw,\n truncateFrames: truncateFrames,\n truncateStrings: truncateStrings,\n maybeTruncateValue: maybeTruncateValue\n};\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://rollbar/webpack/bootstrap","webpack://rollbar/./src/utility.js","webpack://rollbar/./src/browser/logger.js","webpack://rollbar/./src/browser/url.js","webpack://rollbar/./src/errorParser.js","webpack://rollbar/./src/scrub.js","webpack://rollbar/./src/utility/traverse.js","webpack://rollbar/./src/browser/bundles/rollbar.js","webpack://rollbar/./src/browser/rollbar.js","webpack://rollbar/./src/browser/core.js","webpack://rollbar/./src/rollbar.js","webpack://rollbar/./src/rateLimiter.js","webpack://rollbar/./src/merge.js","webpack://rollbar/./src/queue.js","webpack://rollbar/./src/notifier.js","webpack://rollbar/./src/api.js","webpack://rollbar/./src/apiUtility.js","webpack://rollbar/./node_modules/console-polyfill/index.js","webpack://rollbar/./src/browser/detection.js","webpack://rollbar/./src/browser/globalSetup.js","webpack://rollbar/./src/browser/transport.js","webpack://rollbar/./src/browser/transforms.js","webpack://rollbar/./node_modules/error-stack-parser/error-stack-parser.js","webpack://rollbar/./node_modules/error-stack-parser/node_modules/stackframe/stackframe.js","webpack://rollbar/./src/transforms.js","webpack://rollbar/./src/browser/predicates.js","webpack://rollbar/./src/predicates.js","webpack://rollbar/./src/defaults.js","webpack://rollbar/./src/browser/defaults/scrubFields.js","webpack://rollbar/./src/telemetry.js","webpack://rollbar/./src/browser/telemetry.js","webpack://rollbar/./src/browser/domUtility.js","webpack://rollbar/./src/utility/polyfillJSON.js","webpack://rollbar/./vendor/JSON-js/json3.js","webpack://rollbar/./src/browser/wrapGlobals.js","webpack://rollbar/./src/truncation.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","merge","RollbarJSON","isType","x","typeName","Error","toString","match","toLowerCase","isFunction","f","isNativeFunction","funcMatchString","Function","replace","reIsNative","RegExp","isObject","test","type","uuid4","now","Math","random","floor","parseUriOptions","strictMode","q","parser","strict","loose","stringify","obj","backup","error","jsonError","backupError","wrapCallback","logger","err","resp","e","nonCircularClone","clone","seen","newSeen","result","includes","slice","push","message","TELEMETRY_TYPES","TELEMETRY_LEVELS","arrayIncludes","arr","val","k","length","Date","addParamsAndAccessTokenToPath","accessToken","options","params","access_token","paramsArray","join","query","sort","path","qs","indexOf","h","substring","createItem","args","notifier","requestKeys","lambdaContext","custom","callback","request","arg","extraArgs","argTypes","typ","DOMException","j","len","undefined","item","timestamp","diagnostic","uuid","level","skipFrames","setCustomItemKeys","_originalArgs","original_arg_types","addErrorContext","errors","data","contextAdded","rollbarContext","error_context","createTelemetryEvent","metadata","filterIp","requestData","captureIp","newIp","parts","split","pop","beginning","slashIdx","concat","formatArgsAsString","substr","formatUrl","u","protocol","port","hostname","keys","handleOptions","current","input","payload","hostWhiteList","hostSafeList","log","hostBlackList","hostBlockList","updateDeprecatedOptions","overwriteScrubFields","scrubFields","isError","isFiniteNumber","Number","isFinite","isIterable","isString","String","isPromise","then","jsonParse","parse","LEVELS","debug","info","warning","critical","makeUnhandledStackInfo","url","lineno","colno","backupMessage","errorParser","location","line","column","func","guessFunctionName","context","gatherContext","href","document","useragent","window","navigator","userAgent","redact","sanitizeUrl","baseUrlParts","str","exec","uri","$0","$1","$2","parseUri","anchor","source","set","temp","replacement","setupJSON","polyfillJSON","JSON","maxByteSize","string","count","code","charCodeAt","detection","_","Array","arguments","unshift","ieVersion","console","apply","last","auth","host","hash","pathname","search","parseInt","pathParts","ErrorStackParser","ERR_CLASS_REGEXP","Frame","stackFrame","_stackFrame","fileName","lineNumber","functionName","columnNumber","Stack","exception","skip","stack","parserStack","getStack","_mostSpecificErrorName","rawStack","rawException","constructorName","constructor","guessErrorClass","errMsg","errClassMatch","errClass","nested","traceChain","traverse","scrubPath","scrubPaths","paramRes","pat","ret","_getScrubFieldRegexs","queryRes","_getScrubQueryParamRegexs","redactQueryParam","dummy0","paramPart","scrubber","v","tmpV","valScrubber","paramScrubber","seenIndex","isObj","isArray","mapped","same","rollbar","_rollbarConfig","alias","globalAlias","shimRunning","shimId","_rollbarStartTime","getTime","Rollbar","_rollbarDidLoad","self","telemeter","instrumenter","wrapGlobals","scrub","truncation","setComponents","Client","API","globals","Transport","urllib","transforms","sharedTransforms","predicates","sharedPredicates","client","this","defaultOptions","_configuredOptions","Telemeter","components","Instrumenter","transport","api","gWindow","_gWindow","gDocument","isChrome","chrome","runtime","anonymousErrorsPending","addTransform","handleDomException","handleItemWithError","ensureItemHasSomethingToSay","addBaseInfo","addRequestInfo","addClientInfo","addPluginInfo","addBody","addMessageWithError","addTelemetryData","addConfigToPayload","addScrubber","userTransform","addConfiguredOptions","addDiagnosticKeys","itemToPayload","addTransformsToNotifier","queue","addPredicate","checkLevel","checkIgnore","userCheckIgnore","urlIsNotBlockListed","urlIsSafeListed","messageIsIgnored","setupUnhandledCapture","instrument","_instance","handleUninitialized","maybeCallback","_getFirstFunction","init","global","configure","payloadData","oldOptions","lastError","_createItem","warn","buildJsonPayload","sendJsonPayload","jsonPayload","unhandledExceptionsInitialized","captureUncaught","handleUncaughtExceptions","captureUncaughtExceptions","wrapGlobalEventHandlers","unhandledRejectionsInitialized","captureUnhandledRejections","handleUnhandledRejections","handleUncaughtException","inspectAnonymousErrors","stackInfo","_unhandledStackInfo","uncaughtErrorLevel","_isUncaught","handleAnonymousErrors","prepareStackTrace","_stack","_isAnonymous","handleUnhandledRejection","reason","promise","reasonResult","_rollbarContext","wrap","_before","ctxFn","_isWrap","_rollbar_wrapped","exc","_rollbarWrappedError","_wrappedSource","prop","captureEvent","event","captureDomContentLoaded","ts","captureLoad","loadFull","defaults","version","logLevel","reportLevel","endpoint","verbose","enabled","transmit","sendConfig","includeItemsInTelemetry","ignoreDuplicateErrors","RateLimiter","Queue","Notifier","platform","rateLimiter","configureGlobal","setPlatformOptions","tracer","validateTracer","setStackTraceLimit","lastErrorHash","stackTraceLimit","scope","active","maxItems","itemsPerMinute","_defaultLogLevel","_log","wait","postJsonPayload","defaultLevel","_sameAsLastError","_addTracingInfo","_captureRollbarItem","telemetryEvents","copyEvents","itemHash","generateItemHash","span","spanContext","toSpanId","toTraceId","validateSpan","setTag","opentracingSpanId","opentracingTraceId","opentracing_span_id","opentracing_trace_id","startTime","counter","perMinCounter","platformOptions","checkRate","limit","ignoreRateLimit","shouldSendValue","shouldSend","globalRateLimit","limitPerMin","perMinute","msg","environment","body","extra","language","framework","rateLimitPayload","globalSettings","elapsedTime","globalRateLimitPerMin","hasOwn","toStr","isPlainObject","hasOwnConstructor","hasIsPrototypeOf","src","copy","pendingItems","pendingRequests","retryQueue","retryHandle","waitCallback","waitIntervalID","predicate","addPendingItem","removePendingItem","idx","splice","addItem","originalError","originalItem","predicateResult","_applyPredicates","stop","_maybeLog","_makeApiRequest","_dequeuePendingRequest","_maybeCallWait","clearInterval","setInterval","rateLimitResponse","postItem","_maybeRetry","RETRIABLE_ERRORS","shouldRetry","retryInterval","maxRetries","retries","_retryApiRequest","retryObject","shift","transform","_applyTransforms","transformIndex","transformsLength","cb","helpers","Api","jsonBackup","transportOptions","_getTransport","getTransportFromOptions","buildPayload","post","stringifyResult","truncate","contextResult","timeout","proxy","opts","method","appendPathToPath","base","baseTrailingSlash","pathBeginningSlash","con","dummy","properties","methods","Detection","div","createElement","all","getElementsByTagName","innerHTML","undef","_rollbarWindowOnError","old","handler","shim","oldOnError","_rollbarOldOnError","onerror","fn","_rollbarURH","belongsToShim","removeEventListener","rejectionHandler","evt","detail","addEventListener","_makeZoneRequest","currentZone","Zone","_name","rootZone","_parent","run","_makeRequest","requestFactory","RollbarProxy","json","_msg","_proxyRequest","xmlhttp","factories","XMLHttpRequest","ActiveXObject","numFactories","_createXMLHTTPObject","onreadystatechange","readyState","parseResponse","responseText","status","_isNormalFailure","_newRetriableError","ex","open","setRequestHeader","send","e1","XDomainRequest","xdomainrequest","onprogress","ontimeout","onload","e2","writeData","addBodyMessage","stackFromItem","buildTrace","description","guess","trace","errorClass","frame","pre","contextLength","mid","raw","frames","filename","sendFrameUrl","endsWith","reverse","_savedStackTrace","chain","server","remoteString","query_string","user_ip","nav","scr","screen","runtime_ms","round","javascript","browser","cookie_enabled","cookieEnabled","width","height","cur","plugins","navPlugins","traces","traceChainLength","trace_chain","addBodyTraceChain","className","addBodyTrace","scrubFn","StackFrame","FIREFOX_SAFARI_STACK_REGEXP","CHROME_IE_STACK_REGEXP","SAFARI_NATIVE_CODE_REGEXP","stacktrace","parseOpera","parseV8OrIE","parseFFOrSafari","extractLocation","urlLike","filter","map","sanitizedLine","tokens","locationParts","functionNameRegex","matches","parseOpera9","parseOpera11","parseOpera10","lineRE","lines","argsRaw","functionCall","_capitalize","charAt","toUpperCase","_getter","booleanProps","numericProps","stringProps","props","getArgs","setArgs","TypeError","getEvalOrigin","evalOrigin","setEvalOrigin","getFileName","getLineNumber","getColumnNumber","getFunctionName","getIsEval","fromString","argsStartIndex","argsEndIndex","lastIndexOf","locationString","Boolean","isNaN","parseFloat","addFunctionOption","payloadOptions","tracePath","newExtra","newItem","response","promisedItem","configuredOptions","configured_options","is_anonymous","is_uncaught","raw_error","constructor_name","failed","settings","matchFrames","list","block","listLength","frameLength","urlIsOnAList","safeOrBlock","tracesLength","listName","levelVal","isUncaught","onSendCallback","ignoredMessages","rIgnoredMessage","messages","messagesFromItem","itemsPerMin","maxTelemetryEvents","maxQueueSize","max","min","getLevel","manual","newMaxEvents","deleteCount","events","filterTelemetry","capture","rollbarUUID","timestamp_ms","captureError","captureLog","captureNetwork","subtype","levelFromStatus","status_code","statusCode","captureDom","element","checked","captureNavigation","from","to","captureConnectivityChange","change","urlparser","domUtil","network","networkResponseHeaders","networkResponseBody","networkRequestHeaders","networkRequestBody","networkErrorOnHttp5xx","networkErrorOnHttp4xx","networkErrorOnHttp0","dom","navigation","connectivity","contentSecurityPolicy","errorOnContentSecurityPolicy","replacements","orig","restore","b","_window","_document","autoInstrument","scrubTelemetryInputs","telemetryScrubber","defaultValueScrubber","patterns","attributes","attrs","a","nameFromDescription","eventRemovers","contentsecuritypolicy","_location","_lastHref","oldSettings","deinstrumentNetwork","instrumentNetwork","deinstrumentConsole","instrumentConsole","deinstrumentDom","instrumentDom","deinstrumentNavigation","instrumentNavigation","deinstrumentConnectivity","instrumentConnectivity","deinstrumentContentSecurityPolicy","instrumentContentSecurityPolicy","wrapProp","xhr","xhrp","__rollbar_xhr","start_time_ms","end_time_ms","header","request_headers","request_content_type","onreadystatechangeHandler","__rollbar_event","headers","response_content_type","getResponseHeader","headersConfig","allHeaders","getAllResponseHeaders","trim","isJsonContentType","scrubJson","errorOnHttpStatus","trackHttpErrors","reqHeaders","Headers","fetchHeaders","text","contentType","inHeaders","outHeaders","entries","currentHeader","next","done","wrapConsole","origConsole","removeListeners","clickHandler","handleClick","blurHandler","handleBlur","addListener","getElementFromEvent","hasTag","tagName","anchorOrButton","isDescribedElement","captureDomEvent","handleSelectInputChanged","elem","multiple","selected","selectedIndex","isChecked","getElementType","describeElement","elementString","elementArrayToString","treeToArray","app","history","pushState","handleUrlChange","parsedHref","parsedTo","parsedFrom","handleCspEvent","cspEvent","blockedURI","violatedDirective","effectiveDirective","sourceFile","originalPolicy","handleCspError","cspHandler","section","altType","attachEvent","detachEvent","getAttribute","descriptionToString","desc","out","id","classes","attr","nextStr","totalLength","separatorLength","MAX_LENGTH","nextDescription","parentNode","doc","target","elementFromPoint","clientX","clientY","subtypes","gap","indent","meta","rep","state","container","escapes","number","action","rx_escapable","this_value","valueOf","quote","lastIndex","toJSON","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","\"","replacer","space","holder","partial","mind","go","firstokey","okey","ovalue","firstavalue","avalue","ocomma","acomma","colon","SyntaxError","reviver","tx","ignore","fromCharCode","walk","_extendListenerPrototype","oldAddEventListener","_rollbarOldAdd","addFn","bubble","oldRemoveEventListener","_rollbarOldRemove","removeFn","selectFrames","range","truncateFrames","maybeTruncateValue","truncateStrings","truncator","truncateTraceData","traceData","minBody","needsTruncation","maxSize","strategy","results","strategies"],"mappings":"mDACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QA0Df,OArDAF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQrB,EAAoBqB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,iBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,EAChF,IAAII,EAAKX,OAAOY,OAAO,MAGvB,GAFA1B,EAAoBkB,EAAEO,GACtBX,OAAOC,eAAeU,EAAI,UAAW,CAAET,YAAY,EAAMK,MAAOA,IACtD,EAAPE,GAA4B,iBAATF,EAAmB,IAAI,IAAIM,KAAON,EAAOrB,EAAoBU,EAAEe,EAAIE,EAAK,SAASA,GAAO,OAAON,EAAMM,IAAQC,KAAK,KAAMD,IAC9I,OAAOF,GAIRzB,EAAoB6B,EAAI,SAAS1B,GAChC,IAAIS,E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AAUgG,EAASqX,IAGxC,SAASob,EAAkBC,GAMzB,OALIA,EAAU7sB,mBACL6sB,EAAU7sB,UAAU4W,YAC3BiW,EAAU7sB,UAAU1K,QAAUm3B,EAAmB,IAAKI,EAAU7sB,UAAU1K,UAE5Eu3B,EAAUxV,OAASiV,EAAaO,EAAUxV,OAAQ,GAC3CwV,EAGT,SAASC,EAAQ3yB,EAASqX,GACxB,IAAIxD,EAAO7T,EAAQ3B,KAAKwV,KACxB,GAAIA,EAAKgL,YAEP,IADA,IAAIrB,EAAQ3J,EAAKgL,YACR5oB,EAAI,EAAGA,EAAIunB,EAAM9hB,OAAQzF,IAChCunB,EAAMvnB,GAAKw8B,EAAkBjV,EAAMvnB,SAE5B4d,EAAK8I,QACd9I,EAAK8I,MAAQ8V,EAAkB5e,EAAK8I,QAEtC,MAAO,CAAC3c,EAASoE,EAAEpK,UAAUgG,EAASqX,IAGxC,SAASub,EAAgB5yB,EAAS6yB,GAChC,OAAOzuB,EAAEN,YAAY9D,GAAW6yB,EA0BlC78B,EAAOD,QAAU,CACf6hB,SAxBF,SAAkB5X,EAASqX,EAAYwb,GACrCA,OAA8B,IAAZA,EAA2B,OAAeA,EAW5D,IAVA,IAQIC,EAAUC,EAASh4B,EARnBi4B,EAAa,CACf/V,EACAoV,EACAE,EAAgB96B,KAAK,KAAM,MAC3B86B,EAAgB96B,KAAK,KAAM,KAC3B86B,EAAgB96B,KAAK,KAAM,KAC3Bk7B,GAIMG,EAAWE,EAAWnc,SAI5B,GAFA7W,GADA+yB,EAAUD,EAAS9yB,EAASqX,IACV,IAClBtc,EAASg4B,EAAQ,IACN54B,QAAUy4B,EAAgB73B,EAAO7D,MAAO27B,GACjD,OAAO93B,EAGX,OAAOA,GAOPkiB,IAAKA,EACLoV,eAAgBA,EAChBE,gBAAiBA,EACjBD,mBAAoBA","file":"rollbar.named-amd.min.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n","'use strict';\n\nvar merge = require('./merge');\n\nvar RollbarJSON = {};\nfunction setupJSON(polyfillJSON) {\n if (isFunction(RollbarJSON.stringify) && isFunction(RollbarJSON.parse)) {\n return;\n }\n\n if (isDefined(JSON)) {\n // If polyfill is provided, prefer it over existing non-native shims.\n if(polyfillJSON) {\n if (isNativeFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isNativeFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n } else { // else accept any interface that is present.\n if (isFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n }\n }\n if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {\n polyfillJSON && polyfillJSON(RollbarJSON);\n }\n}\n\n/*\n * isType - Given a Javascript value and a string, returns true if the type of the value matches the\n * given string.\n *\n * @param x - any value\n * @param t - a lowercase string containing one of the following type names:\n * - undefined\n * - null\n * - error\n * - number\n * - boolean\n * - string\n * - symbol\n * - function\n * - object\n * - array\n * @returns true if x is of type t, otherwise false\n */\nfunction isType(x, t) {\n return t === typeName(x);\n}\n\n/*\n * typeName - Given a Javascript value, returns the type of the object as a string\n */\nfunction typeName(x) {\n var name = typeof x;\n if (name !== 'object') {\n return name;\n }\n if (!x) {\n return 'null';\n }\n if (x instanceof Error) {\n return 'error';\n }\n return ({}).toString.call(x).match(/\\s([a-zA-Z]+)/)[1].toLowerCase();\n}\n\n/* isFunction - a convenience function for checking if a value is a function\n *\n * @param f - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isFunction(f) {\n return isType(f, 'function');\n}\n\n/* isNativeFunction - a convenience function for checking if a value is a native JS function\n *\n * @param f - any value\n * @returns true if f is a native JS function, otherwise false\n */\nfunction isNativeFunction(f) {\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n var funcMatchString = Function.prototype.toString.call(Object.prototype.hasOwnProperty)\n .replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?');\n var reIsNative = RegExp('^' + funcMatchString + '$');\n return isObject(f) && reIsNative.test(f);\n}\n\n/* isObject - Checks if the argument is an object\n *\n * @param value - any value\n * @returns true is value is an object function is an object)\n*/\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/* isString - Checks if the argument is a string\n *\n * @param value - any value\n * @returns true if value is a string\n*/\nfunction isString(value) {\n return typeof value === 'string' || value instanceof String\n}\n\n/**\n * isFiniteNumber - determines whether the passed value is a finite number\n *\n * @param {*} n - any value\n * @returns true if value is a finite number\n */\n function isFiniteNumber(n) {\n return Number.isFinite(n);\n}\n\n/*\n * isDefined - a convenience function for checking if a value is not equal to undefined\n *\n * @param u - any value\n * @returns true if u is anything other than undefined\n */\nfunction isDefined(u) {\n return !isType(u, 'undefined');\n}\n\n/*\n * isIterable - convenience function for checking if a value can be iterated, essentially\n * whether it is an object or an array.\n *\n * @param i - any value\n * @returns true if i is an object or an array as determined by `typeName`\n */\nfunction isIterable(i) {\n var type = typeName(i);\n return (type === 'object' || type === 'array');\n}\n\n/*\n * isError - convenience function for checking if a value is of an error type\n *\n * @param e - any value\n * @returns true if e is an error\n */\nfunction isError(e) {\n // Detect both Error and Firefox Exception type\n return isType(e, 'error') || isType(e, 'exception');\n}\n\n/* isPromise - a convenience function for checking if a value is a promise\n *\n * @param p - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isPromise(p) {\n return isObject(p) && isType(p.then, 'function');\n}\n\nfunction redact() {\n return '********';\n}\n\n// from http://stackoverflow.com/a/8809472/1138191\nfunction uuid4() {\n var d = now();\n var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n var r = (d + Math.random() * 16) % 16 | 0;\n d = Math.floor(d / 16);\n return (c === 'x' ? r : (r & 0x7 | 0x8)).toString(16);\n });\n return uuid;\n}\n\nvar LEVELS = {\n debug: 0,\n info: 1,\n warning: 2,\n error: 3,\n critical: 4\n};\n\nfunction sanitizeUrl(url) {\n var baseUrlParts = parseUri(url);\n if (!baseUrlParts) {\n return '(unknown)';\n }\n\n // remove a trailing # if there is no anchor\n if (baseUrlParts.anchor === '') {\n baseUrlParts.source = baseUrlParts.source.replace('#', '');\n }\n\n url = baseUrlParts.source.replace('?' + baseUrlParts.query, '');\n return url;\n}\n\nvar parseUriOptions = {\n strictMode: false,\n key: [\n 'source',\n 'protocol',\n 'authority',\n 'userInfo',\n 'user',\n 'password',\n 'host',\n 'port',\n 'relative',\n 'path',\n 'directory',\n 'file',\n 'query',\n 'anchor'\n ],\n q: {\n name: 'queryKey',\n parser: /(?:^|&)([^&=]*)=?([^&]*)/g\n },\n parser: {\n strict: /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n loose: /^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/\n }\n};\n\nfunction parseUri(str) {\n if (!isType(str, 'string')) {\n return undefined;\n }\n\n var o = parseUriOptions;\n var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);\n var uri = {};\n\n for (var i = 0, l = o.key.length; i < l; ++i) {\n uri[o.key[i]] = m[i] || '';\n }\n\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) {\n uri[o.q.name][$1] = $2;\n }\n });\n\n return uri;\n}\n\nfunction addParamsAndAccessTokenToPath(accessToken, options, params) {\n params = params || {};\n params.access_token = accessToken;\n var paramsArray = [];\n var k;\n for (k in params) {\n if (Object.prototype.hasOwnProperty.call(params, k)) {\n paramsArray.push([k, params[k]].join('='));\n }\n }\n var query = '?' + paramsArray.sort().join('&');\n\n options = options || {};\n options.path = options.path || '';\n var qs = options.path.indexOf('?');\n var h = options.path.indexOf('#');\n var p;\n if (qs !== -1 && (h === -1 || h > qs)) {\n p = options.path;\n options.path = p.substring(0,qs) + query + '&' + p.substring(qs+1);\n } else {\n if (h !== -1) {\n p = options.path;\n options.path = p.substring(0,h) + query + p.substring(h);\n } else {\n options.path = options.path + query;\n }\n }\n}\n\nfunction formatUrl(u, protocol) {\n protocol = protocol || u.protocol;\n if (!protocol && u.port) {\n if (u.port === 80) {\n protocol = 'http:';\n } else if (u.port === 443) {\n protocol = 'https:';\n }\n }\n protocol = protocol || 'https:';\n\n if (!u.hostname) {\n return null;\n }\n var result = protocol + '//' + u.hostname;\n if (u.port) {\n result = result + ':' + u.port;\n }\n if (u.path) {\n result = result + u.path;\n }\n return result;\n}\n\nfunction stringify(obj, backup) {\n var value, error;\n try {\n value = RollbarJSON.stringify(obj);\n } catch (jsonError) {\n if (backup && isFunction(backup)) {\n try {\n value = backup(obj);\n } catch (backupError) {\n error = backupError;\n }\n } else {\n error = jsonError;\n }\n }\n return {error: error, value: value};\n}\n\nfunction maxByteSize(string) {\n // The transport will use utf-8, so assume utf-8 encoding.\n //\n // This minimal implementation will accurately count bytes for all UCS-2 and\n // single code point UTF-16. If presented with multi code point UTF-16,\n // which should be rare, it will safely overcount, not undercount.\n //\n // While robust utf-8 encoders exist, this is far smaller and far more performant.\n // For quickly counting payload size for truncation, smaller is better.\n\n var count = 0;\n var length = string.length;\n\n for (var i = 0; i < length; i++) {\n var code = string.charCodeAt(i);\n if (code < 128) { // up to 7 bits\n count = count + 1;\n } else if (code < 2048) { // up to 11 bits\n count = count + 2;\n } else if (code < 65536) { // up to 16 bits\n count = count + 3;\n }\n }\n\n return count;\n}\n\nfunction jsonParse(s) {\n var value, error;\n try {\n value = RollbarJSON.parse(s);\n } catch (e) {\n error = e;\n }\n return {error: error, value: value};\n}\n\nfunction makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n mode,\n backupMessage,\n errorParser\n) {\n var location = {\n url: url || '',\n line: lineno,\n column: colno\n };\n location.func = errorParser.guessFunctionName(location.url, location.line);\n location.context = errorParser.gatherContext(location.url, location.line);\n var href = typeof document !== 'undefined' && document && document.location && document.location.href;\n var useragent = typeof window !== 'undefined' && window && window.navigator && window.navigator.userAgent;\n return {\n 'mode': mode,\n 'message': error ? String(error) : (message || backupMessage),\n 'url': href,\n 'stack': [location],\n 'useragent': useragent\n };\n}\n\nfunction wrapCallback(logger, f) {\n return function(err, resp) {\n try {\n f(err, resp);\n } catch (e) {\n logger.error(e);\n }\n };\n}\n\nfunction nonCircularClone(obj) {\n var seen = [obj];\n\n function clone(obj, seen) {\n var value, name, newSeen, result = {};\n\n try {\n for (name in obj) {\n value = obj[name];\n\n if (value && (isType(value, 'object') || isType(value, 'array'))) {\n if (seen.includes(value)) {\n result[name] = 'Removed circular reference: ' + typeName(value);\n } else {\n newSeen = seen.slice();\n newSeen.push(value);\n result[name] = clone(value, newSeen);\n }\n continue;\n }\n\n result[name] = value;\n }\n } catch (e) {\n result = 'Failed cloning custom data: ' + e.message;\n }\n return result;\n }\n return clone(obj, seen);\n}\n\nfunction createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\n var diagnostic = {};\n var argTypes = [];\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n argTypes.push(typ);\n switch (typ) {\n case 'undefined':\n break;\n case 'string':\n message ? extraArgs.push(arg) : message = arg;\n break;\n case 'function':\n callback = wrapCallback(logger, arg);\n break;\n case 'date':\n extraArgs.push(arg);\n break;\n case 'error':\n case 'domexception':\n case 'exception': // Firefox Exception type\n err ? extraArgs.push(arg) : err = arg;\n break;\n case 'object':\n case 'array':\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n if (requestKeys && typ === 'object' && !request) {\n for (var j = 0, len = requestKeys.length; j < len; ++j) {\n if (arg[requestKeys[j]] !== undefined) {\n request = arg;\n break;\n }\n }\n if (request) {\n break;\n }\n }\n custom ? extraArgs.push(arg) : custom = arg;\n break;\n default:\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n extraArgs.push(arg);\n }\n }\n\n // if custom is an array this turns it into an object with integer keys\n if (custom) custom = nonCircularClone(custom);\n\n if (extraArgs.length > 0) {\n if (!custom) custom = nonCircularClone({});\n custom.extraArgs = nonCircularClone(extraArgs);\n }\n\n var item = {\n message: message,\n err: err,\n custom: custom,\n timestamp: now(),\n callback: callback,\n notifier: notifier,\n diagnostic: diagnostic,\n uuid: uuid4()\n };\n\n setCustomItemKeys(item, custom);\n\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n item.diagnostic.original_arg_types = argTypes;\n return item;\n}\n\nfunction setCustomItemKeys(item, custom) {\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (custom && custom.skipFrames !== undefined) {\n item.skipFrames = custom.skipFrames;\n delete custom.skipFrames;\n }\n}\n\nfunction addErrorContext(item, errors) {\n var custom = item.data.custom || {};\n var contextAdded = false;\n\n try {\n for (var i = 0; i < errors.length; ++i) {\n if (errors[i].hasOwnProperty('rollbarContext')) {\n custom = merge(custom, nonCircularClone(errors[i].rollbarContext));\n contextAdded = true;\n }\n }\n\n // Avoid adding an empty object to the data.\n if (contextAdded) {\n item.data.custom = custom;\n }\n } catch (e) {\n item.diagnostic.error_context = 'Failed: ' + e.message;\n }\n}\n\nvar TELEMETRY_TYPES = ['log', 'network', 'dom', 'navigation', 'error', 'manual'];\nvar TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];\n\nfunction arrayIncludes(arr, val) {\n for (var k = 0; k < arr.length; ++k) {\n if (arr[k] === val) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction createTelemetryEvent(args) {\n var type, metadata, level;\n var arg;\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n switch (typ) {\n case 'string':\n if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {\n type = arg;\n } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {\n level = arg;\n }\n break;\n case 'object':\n metadata = arg;\n break;\n default:\n break;\n }\n }\n var event = {\n type: type || 'manual',\n metadata: metadata || {},\n level: level\n };\n\n return event;\n}\n\n/*\n * get - given an obj/array and a keypath, return the value at that keypath or\n * undefined if not possible.\n *\n * @param obj - an object or array\n * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'\n * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`\n */\nfunction get(obj, path) {\n if (!obj) {\n return undefined;\n }\n var keys = path.split('.');\n var result = obj;\n try {\n for (var i = 0, len = keys.length; i < len; ++i) {\n result = result[keys[i]];\n }\n } catch (e) {\n result = undefined;\n }\n return result;\n}\n\nfunction set(obj, path, value) {\n if (!obj) {\n return;\n }\n var keys = path.split('.');\n var len = keys.length;\n if (len < 1) {\n return;\n }\n if (len === 1) {\n obj[keys[0]] = value;\n return;\n }\n try {\n var temp = obj[keys[0]] || {};\n var replacement = temp;\n for (var i = 1; i < len - 1; ++i) {\n temp[keys[i]] = temp[keys[i]] || {};\n temp = temp[keys[i]];\n }\n temp[keys[len-1]] = value;\n obj[keys[0]] = replacement;\n } catch (e) {\n return;\n }\n}\n\nfunction formatArgsAsString(args) {\n var i, len, arg;\n var result = [];\n for (i = 0, len = args.length; i < len; ++i) {\n arg = args[i];\n switch (typeName(arg)) {\n case 'object':\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500) {\n arg = arg.substr(0, 497) + '...';\n }\n break;\n case 'null':\n arg = 'null';\n break;\n case 'undefined':\n arg = 'undefined';\n break;\n case 'symbol':\n arg = arg.toString();\n break;\n }\n result.push(arg);\n }\n return result.join(' ');\n}\n\nfunction now() {\n if (Date.now) {\n return +Date.now();\n }\n return +new Date();\n}\n\nfunction filterIp(requestData, captureIp) {\n if (!requestData || !requestData['user_ip'] || captureIp === true) {\n return;\n }\n var newIp = requestData['user_ip'];\n if (!captureIp) {\n newIp = null;\n } else {\n try {\n var parts;\n if (newIp.indexOf('.') !== -1) {\n parts = newIp.split('.');\n parts.pop();\n parts.push('0');\n newIp = parts.join('.');\n } else if (newIp.indexOf(':') !== -1) {\n parts = newIp.split(':');\n if (parts.length > 2) {\n var beginning = parts.slice(0, 3);\n var slashIdx = beginning[2].indexOf('/');\n if (slashIdx !== -1) {\n beginning[2] = beginning[2].substring(0, slashIdx);\n }\n var terminal = '0000:0000:0000:0000:0000';\n newIp = beginning.concat(terminal).join(':');\n }\n } else {\n newIp = null;\n }\n } catch (e) {\n newIp = null;\n }\n }\n requestData['user_ip'] = newIp;\n}\n\nfunction handleOptions(current, input, payload, logger) {\n var result = merge(current, input, payload);\n result = updateDeprecatedOptions(result, logger);\n if (!input || input.overwriteScrubFields) {\n return result;\n }\n if (input.scrubFields) {\n result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);\n }\n return result;\n}\n\nfunction updateDeprecatedOptions(options, logger) {\n if(options.hostWhiteList && !options.hostSafeList) {\n options.hostSafeList = options.hostWhiteList;\n options.hostWhiteList = undefined;\n logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');\n }\n if(options.hostBlackList && !options.hostBlockList) {\n options.hostBlockList = options.hostBlackList;\n options.hostBlackList = undefined;\n logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');\n }\n return options;\n}\n\nmodule.exports = {\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n createItem: createItem,\n addErrorContext: addErrorContext,\n createTelemetryEvent: createTelemetryEvent,\n filterIp: filterIp,\n formatArgsAsString: formatArgsAsString,\n formatUrl: formatUrl,\n get: get,\n handleOptions: handleOptions,\n isError: isError,\n isFiniteNumber: isFiniteNumber,\n isFunction: isFunction,\n isIterable: isIterable,\n isNativeFunction: isNativeFunction,\n isObject: isObject,\n isString: isString,\n isType: isType,\n isPromise: isPromise,\n jsonParse: jsonParse,\n LEVELS: LEVELS,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n merge: merge,\n now: now,\n redact: redact,\n RollbarJSON: RollbarJSON,\n sanitizeUrl: sanitizeUrl,\n set: set,\n setupJSON: setupJSON,\n stringify: stringify,\n maxByteSize: maxByteSize,\n typeName: typeName,\n uuid4: uuid4\n};\n","'use strict';\n\n/* eslint-disable no-console */\nrequire('console-polyfill');\nvar detection = require('./detection');\nvar _ = require('../utility');\n\nfunction error() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.error(_.formatArgsAsString(args));\n } else {\n console.error.apply(console, args);\n }\n}\n\nfunction info() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.info(_.formatArgsAsString(args));\n } else {\n console.info.apply(console, args);\n }\n}\n\nfunction log() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.log(_.formatArgsAsString(args));\n } else {\n console.log.apply(console, args);\n }\n}\n\n/* eslint-enable no-console */\n\nmodule.exports = {\n error: error,\n info: info,\n log: log\n};\n","'use strict';\n\n// See https://nodejs.org/docs/latest/api/url.html\nfunction parse(url) {\n var result = {\n protocol: null, auth: null, host: null, path: null,\n hash: null, href: url, hostname: null, port: null,\n pathname: null, search: null, query: null\n };\n\n var i, last;\n i = url.indexOf('//');\n if (i !== -1) {\n result.protocol = url.substring(0,i);\n last = i+2;\n } else {\n last = 0;\n }\n \n i = url.indexOf('@', last);\n if (i !== -1) {\n result.auth = url.substring(last, i);\n last = i+1;\n }\n\n i = url.indexOf('/', last);\n if (i === -1) {\n i = url.indexOf('?', last);\n if (i === -1) {\n i = url.indexOf('#', last);\n if (i === -1) {\n result.host = url.substring(last);\n } else {\n result.host = url.substring(last, i);\n result.hash = url.substring(i);\n }\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n return result;\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n\n i = url.indexOf('#', last);\n if (i === -1) {\n result.path = url.substring(last);\n } else {\n result.path = url.substring(last, i);\n result.hash = url.substring(i);\n }\n\n if (result.path) {\n var pathParts = result.path.split('?');\n result.pathname = pathParts[0];\n result.query = pathParts[1];\n result.search = result.query ? '?' + result.query : null;\n }\n return result;\n}\n\nmodule.exports = {\n parse: parse\n};\n","'use strict';\n\nvar ErrorStackParser = require('error-stack-parser');\n\nvar UNKNOWN_FUNCTION = '?';\nvar ERR_CLASS_REGEXP = new RegExp('^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ');\n\nfunction guessFunctionName() {\n return UNKNOWN_FUNCTION;\n}\n\n\nfunction gatherContext() {\n return null;\n}\n\n\nfunction Frame(stackFrame) {\n var data = {};\n\n data._stackFrame = stackFrame;\n\n data.url = stackFrame.fileName;\n data.line = stackFrame.lineNumber;\n data.func = stackFrame.functionName;\n data.column = stackFrame.columnNumber;\n data.args = stackFrame.args;\n\n data.context = gatherContext();\n\n return data;\n}\n\n\nfunction Stack(exception, skip) {\n function getStack() {\n var parserStack = [];\n\n skip = skip || 0;\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch(e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = skip; i < parserStack.length; i++) {\n stack.push(new Frame(parserStack[i]));\n }\n\n return stack;\n }\n\n return {\n stack: getStack(),\n message: exception.message,\n name: _mostSpecificErrorName(exception),\n rawStack: exception.stack,\n rawException: exception\n };\n}\n\n\nfunction parse(e, skip) {\n var err = e;\n\n if (err.nested) {\n var traceChain = [];\n while (err) {\n traceChain.push(new Stack(err, skip));\n err = err.nested;\n\n skip = 0; // Only apply skip value to primary error\n }\n\n // Return primary error with full trace chain attached.\n traceChain[0].traceChain = traceChain;\n return traceChain[0];\n } else {\n return new Stack(err, skip);\n }\n}\n\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg || !errMsg.match) {\n return ['Unknown error. There was no error message to display.', ''];\n }\n var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);\n var errClass = '(unknown)';\n\n if (errClassMatch) {\n errClass = errClassMatch[errClassMatch.length - 1];\n errMsg = errMsg.replace((errClassMatch[errClassMatch.length - 2] || '') + errClass + ':', '');\n errMsg = errMsg.replace(/(^[\\s]+|[\\s]+$)/g, '');\n }\n return [errClass, errMsg];\n}\n\n// * Prefers any value over an empty string\n// * Prefers any value over 'Error' where possible\n// * Prefers name over constructor.name when both are more specific than 'Error'\nfunction _mostSpecificErrorName(error) {\n var name = error.name && error.name.length && error.name;\n var constructorName = error.constructor.name && error.constructor.name.length && error.constructor.name;\n\n if (!name || !constructorName) {\n return name || constructorName;\n }\n\n if (name === 'Error') {\n return constructorName;\n }\n return name;\n}\n\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame\n};\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction scrub(data, scrubFields, scrubPaths) {\n scrubFields = scrubFields || [];\n\n if (scrubPaths) {\n for (var i = 0; i < scrubPaths.length; ++i) {\n scrubPath(data, scrubPaths[i]);\n }\n }\n\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart) {\n return paramPart + _.redact();\n }\n\n function paramScrubber(v) {\n var i;\n if (_.isType(v, 'string')) {\n for (i = 0; i < queryRes.length; ++i) {\n v = v.replace(queryRes[i], redactQueryParam);\n }\n }\n return v;\n }\n\n function valScrubber(k, v) {\n var i;\n for (i = 0; i < paramRes.length; ++i) {\n if (paramRes[i].test(k)) {\n v = _.redact();\n break;\n }\n }\n return v;\n }\n\n function scrubber(k, v, seen) {\n var tmpV = valScrubber(k, v);\n if (tmpV === v) {\n if (_.isType(v, 'object') || _.isType(v, 'array')) {\n return traverse(v, scrubber, seen);\n }\n return paramScrubber(tmpV);\n } else {\n return tmpV;\n }\n }\n\n return traverse(data, scrubber);\n}\n\nfunction scrubPath(obj, path) {\n var keys = path.split('.');\n var last = keys.length - 1;\n try {\n for (var i = 0; i <= last; ++i) {\n if (i < last) {\n obj = obj[keys[i]];\n } else {\n obj[keys[i]] = _.redact();\n }\n }\n } catch (e) {\n // Missing key is OK;\n }\n}\n\nfunction _getScrubFieldRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '^\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?$';\n ret.push(new RegExp(pat, 'i'));\n }\n return ret;\n}\n\n\nfunction _getScrubQueryParamRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?';\n ret.push(new RegExp('(' + pat + '=)([^&\\\\n]+)', 'igm'));\n }\n return ret;\n}\n\nmodule.exports = scrub;\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction traverse(obj, func, seen) {\n var k, v, i;\n var isObj = _.isType(obj, 'object');\n var isArray = _.isType(obj, 'array');\n var keys = [];\n var seenIndex;\n\n // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.\n seen = seen || { obj: [], mapped: []};\n\n if (isObj) {\n seenIndex = seen.obj.indexOf(obj);\n\n if (isObj && seenIndex !== -1) {\n // Prefer the mapped object if there is one.\n return seen.mapped[seenIndex] || seen.obj[seenIndex];\n }\n\n seen.obj.push(obj);\n seenIndex = seen.obj.length - 1;\n }\n\n if (isObj) {\n for (k in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, k)) {\n keys.push(k);\n }\n }\n } else if (isArray) {\n for (i = 0; i < obj.length; ++i) {\n keys.push(i);\n }\n }\n\n var result = isObj ? {} : [];\n var same = true;\n for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n result[k] = func(k, v, seen);\n same = same && result[k] === obj[k];\n }\n\n if (isObj && !same) {\n seen.mapped[seenIndex] = result;\n }\n\n return !same ? result : obj;\n}\n\nmodule.exports = traverse;\n","'use strict';\n\nvar rollbar = require('../rollbar');\n\nvar options = (typeof window !== 'undefined') && window._rollbarConfig;\nvar alias = options && options.globalAlias || 'Rollbar';\nvar shimRunning = (typeof window !== 'undefined') && window[alias] && typeof window[alias].shimId === 'function' && window[alias].shimId() !== undefined;\n\nif ((typeof window !== 'undefined') && !window._rollbarStartTime) {\n window._rollbarStartTime = (new Date()).getTime();\n}\n\nif (!shimRunning && options) {\n var Rollbar = new rollbar(options);\n window[alias] = Rollbar;\n} else if (typeof window !== 'undefined') {\n window.rollbar = rollbar;\n window._rollbarDidLoad = true;\n} else if (typeof self !== 'undefined') {\n self.rollbar = rollbar;\n self._rollbarDidLoad = true;\n}\n\nmodule.exports = rollbar;\n","'use strict';\n\nvar Rollbar = require('./core');\nvar telemeter = require('../telemetry');\nvar instrumenter = require('./telemetry');\nvar polyfillJSON = require('../utility/polyfillJSON');\nvar wrapGlobals = require('./wrapGlobals');\nvar scrub = require('../scrub');\nvar truncation = require('../truncation');\n\nRollbar.setComponents({\n telemeter: telemeter,\n instrumenter: instrumenter,\n polyfillJSON: polyfillJSON,\n wrapGlobals: wrapGlobals,\n scrub: scrub,\n truncation: truncation\n});\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar Client = require('../rollbar');\nvar _ = require('../utility');\nvar API = require('../api');\nvar logger = require('./logger');\nvar globals = require('./globalSetup');\n\nvar Transport = require('./transport');\nvar urllib = require('./url');\n\nvar transforms = require('./transforms');\nvar sharedTransforms = require('../transforms');\nvar predicates = require('./predicates');\nvar sharedPredicates = require('../predicates');\nvar errorParser = require('../errorParser');\n\nfunction Rollbar(options, client) {\n this.options = _.handleOptions(defaultOptions, options, null, logger);\n this.options._configuredOptions = options;\n var Telemeter = this.components.telemeter;\n var Instrumenter = this.components.instrumenter;\n var polyfillJSON = this.components.polyfillJSON;\n this.wrapGlobals = this.components.wrapGlobals;\n this.scrub = this.components.scrub;\n var truncation = this.components.truncation;\n\n var transport = new Transport(truncation);\n var api = new API(this.options, transport, urllib, truncation);\n if (Telemeter) {\n this.telemeter = new Telemeter(this.options);\n }\n this.client = client || new Client(this.options, api, logger, this.telemeter, 'browser');\n var gWindow = _gWindow();\n var gDocument = (typeof document != 'undefined') && document;\n this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers\n this.anonymousErrorsPending = 0;\n addTransformsToNotifier(this.client.notifier, this, gWindow);\n addPredicatesToQueue(this.client.queue);\n this.setupUnhandledCapture();\n if (Instrumenter) {\n this.instrumenter = new Instrumenter(this.options, this.client.telemeter, this, gWindow, gDocument);\n this.instrumenter.instrument();\n }\n _.setupJSON(polyfillJSON);\n}\n\nvar _instance = null;\nRollbar.init = function(options, client) {\n if (_instance) {\n return _instance.global(options).configure(options);\n }\n _instance = new Rollbar(options, client);\n return _instance;\n};\n\nRollbar.prototype.components = {};\n\nRollbar.setComponents = function(components) {\n Rollbar.prototype.components = components;\n}\n\nfunction handleUninitialized(maybeCallback) {\n var message = 'Rollbar is not initialized';\n logger.error(message);\n if (maybeCallback) {\n maybeCallback(new Error(message));\n }\n}\n\nRollbar.prototype.global = function(options) {\n this.client.global(options);\n return this;\n};\nRollbar.global = function(options) {\n if (_instance) {\n return _instance.global(options);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.configure = function(options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = {payload: payloadData};\n }\n this.options = _.handleOptions(oldOptions, options, payload, logger);\n this.options._configuredOptions = _.handleOptions(oldOptions._configuredOptions, options, payload);\n this.client.configure(this.options, payloadData);\n this.instrumenter && this.instrumenter.configure(this.options);\n this.setupUnhandledCapture();\n return this;\n};\nRollbar.configure = function(options, payloadData) {\n if (_instance) {\n return _instance.configure(options, payloadData);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.lastError = function() {\n return this.client.lastError;\n};\nRollbar.lastError = function() {\n if (_instance) {\n return _instance.lastError();\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.log = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.log(item);\n return {uuid: uuid};\n};\nRollbar.log = function() {\n if (_instance) {\n return _instance.log.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.debug = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.debug(item);\n return {uuid: uuid};\n};\nRollbar.debug = function() {\n if (_instance) {\n return _instance.debug.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.info = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.info(item);\n return {uuid: uuid};\n};\nRollbar.info = function() {\n if (_instance) {\n return _instance.info.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warn = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warn(item);\n return {uuid: uuid};\n};\nRollbar.warn = function() {\n if (_instance) {\n return _instance.warn.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warning = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warning(item);\n return {uuid: uuid};\n};\nRollbar.warning = function() {\n if (_instance) {\n return _instance.warning.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.error = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.error(item);\n return {uuid: uuid};\n};\nRollbar.error = function() {\n if (_instance) {\n return _instance.error.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.critical = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.critical(item);\n return {uuid: uuid};\n};\nRollbar.critical = function() {\n if (_instance) {\n return _instance.critical.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.buildJsonPayload = function(item) {\n return this.client.buildJsonPayload(item);\n};\nRollbar.buildJsonPayload = function() {\n if (_instance) {\n return _instance.buildJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.sendJsonPayload = function(jsonPayload) {\n return this.client.sendJsonPayload(jsonPayload);\n};\nRollbar.sendJsonPayload = function() {\n if (_instance) {\n return _instance.sendJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.setupUnhandledCapture = function() {\n var gWindow = _gWindow();\n\n if (!this.unhandledExceptionsInitialized) {\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(gWindow, this);\n if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {\n this.wrapGlobals(gWindow, this);\n }\n this.unhandledExceptionsInitialized = true;\n }\n }\n if (!this.unhandledRejectionsInitialized) {\n if (this.options.captureUnhandledRejections || this.options.handleUnhandledRejections) {\n globals.captureUnhandledRejections(gWindow, this);\n this.unhandledRejectionsInitialized = true;\n }\n }\n};\n\nRollbar.prototype.handleUncaughtException = function(message, url, lineno, colno, error, context) {\n if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {\n return;\n }\n\n // Chrome will always send 5+ arguments and error will be valid or null, not undefined.\n // If error is undefined, we have a different caller.\n // Chrome also sends errors from web workers with null error, but does not invoke\n // prepareStackTrace() for these. Test for empty url to skip them.\n if (this.options.inspectAnonymousErrors && this.isChrome && error === null && url === '') {\n return 'anonymous';\n }\n\n var item;\n var stackInfo = _.makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n 'onerror',\n 'uncaught exception',\n errorParser\n );\n if (_.isError(error)) {\n item = this._createItem([message, error, context]);\n item._unhandledStackInfo = stackInfo;\n } else if (_.isError(url)) {\n item = this._createItem([message, url, context]);\n item._unhandledStackInfo = stackInfo;\n } else {\n item = this._createItem([message, context]);\n item.stackInfo = stackInfo;\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n this.client.log(item);\n};\n\n/**\n * Chrome only. Other browsers will ignore.\n *\n * Use Error.prepareStackTrace to extract information about errors that\n * do not have a valid error object in onerror().\n *\n * In tested version of Chrome, onerror is called first but has no way\n * to communicate with prepareStackTrace. Use a counter to let this\n * handler know which errors to send to Rollbar.\n *\n * In config options, set inspectAnonymousErrors to enable.\n */\nRollbar.prototype.handleAnonymousErrors = function() {\n if (!this.options.inspectAnonymousErrors || !this.isChrome) {\n return;\n }\n\n var r = this;\n function prepareStackTrace(error, _stack) { // eslint-disable-line no-unused-vars\n if (r.options.inspectAnonymousErrors) {\n if (r.anonymousErrorsPending) {\n // This is the only known way to detect that onerror saw an anonymous error.\n // It depends on onerror reliably being called before Error.prepareStackTrace,\n // which so far holds true on tested versions of Chrome. If versions of Chrome\n // are tested that behave differently, this logic will need to be updated\n // accordingly.\n r.anonymousErrorsPending -= 1;\n\n if (!error) {\n // Not likely to get here, but calling handleUncaughtException from here\n // without an error object would throw off the anonymousErrorsPending counter,\n // so return now.\n return;\n }\n\n // Allow this to be tracked later.\n error._isAnonymous = true;\n\n // url, lineno, colno shouldn't be needed for these errors.\n // If that changes, update this accordingly, using the unused\n // _stack param as needed (rather than parse error.toString()).\n r.handleUncaughtException(error.message, null, null, null, error);\n }\n }\n\n // Workaround to ensure stack is preserved for normal errors.\n return error.stack;\n }\n\n // https://v8.dev/docs/stack-trace-api\n try {\n Error.prepareStackTrace = prepareStackTrace;\n } catch (e) {\n this.options.inspectAnonymousErrors = false;\n this.error('anonymous error handler failed', e);\n }\n}\n\nRollbar.prototype.handleUnhandledRejection = function(reason, promise) {\n if (!this.options.captureUnhandledRejections && !this.options.handleUnhandledRejections) {\n return;\n }\n\n var message = 'unhandled rejection was null or undefined!';\n if (reason) {\n if (reason.message) {\n message = reason.message;\n } else {\n var reasonResult = _.stringify(reason);\n if (reasonResult.value) {\n message = reasonResult.value;\n }\n }\n }\n var context = (reason && reason._rollbarContext) || (promise && promise._rollbarContext);\n\n var item;\n if (_.isError(reason)) {\n item = this._createItem([message, reason, context]);\n } else {\n item = this._createItem([message, reason, context]);\n item.stackInfo = _.makeUnhandledStackInfo(\n message,\n '',\n 0,\n 0,\n null,\n 'unhandledrejection',\n '',\n errorParser\n );\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n item._originalArgs = item._originalArgs || [];\n item._originalArgs.push(promise);\n this.client.log(item);\n};\n\nRollbar.prototype.wrap = function(f, context, _before) {\n try {\n var ctxFn;\n if(_.isFunction(context)) {\n ctxFn = context;\n } else {\n ctxFn = function() { return context || {}; };\n }\n\n if (!_.isFunction(f)) {\n return f;\n }\n\n if (f._isWrap) {\n return f;\n }\n\n if (!f._rollbar_wrapped) {\n f._rollbar_wrapped = function () {\n if (_before && _.isFunction(_before)) {\n _before.apply(this, arguments);\n }\n try {\n return f.apply(this, arguments);\n } catch(exc) {\n var e = exc;\n if (e && window._rollbarWrappedError !== e) {\n if (_.isType(e, 'string')) {\n e = new String(e);\n }\n e._rollbarContext = ctxFn() || {};\n e._rollbarContext._wrappedSource = f.toString();\n\n window._rollbarWrappedError = e;\n }\n throw e;\n }\n };\n\n f._rollbar_wrapped._isWrap = true;\n\n if (f.hasOwnProperty) {\n for (var prop in f) {\n if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {\n f._rollbar_wrapped[prop] = f[prop];\n }\n }\n }\n }\n\n return f._rollbar_wrapped;\n } catch (e) {\n // Return the original function if the wrap fails.\n return f;\n }\n};\nRollbar.wrap = function(f, context) {\n if (_instance) {\n return _instance.wrap(f, context);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.captureEvent = function() {\n var event = _.createTelemetryEvent(arguments);\n return this.client.captureEvent(event.type, event.metadata, event.level);\n};\nRollbar.captureEvent = function() {\n if (_instance) {\n return _instance.captureEvent.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\n// The following two methods are used internally and are not meant for public use\nRollbar.prototype.captureDomContentLoaded = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureLoad(ts);\n};\n\n/* Internal */\n\nfunction addTransformsToNotifier(notifier, rollbar, gWindow) {\n notifier\n .addTransform(transforms.handleDomException)\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(gWindow))\n .addTransform(transforms.addClientInfo(gWindow))\n .addTransform(transforms.addPluginInfo(gWindow))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(sharedTransforms.addConfigToPayload)\n .addTransform(transforms.addScrubber(rollbar.scrub))\n .addTransform(sharedTransforms.userTransform(logger))\n .addTransform(sharedTransforms.addConfiguredOptions)\n .addTransform(sharedTransforms.addDiagnosticKeys)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(sharedPredicates.checkLevel)\n .addPredicate(predicates.checkIgnore)\n .addPredicate(sharedPredicates.userCheckIgnore(logger))\n .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))\n .addPredicate(sharedPredicates.urlIsSafeListed(logger))\n .addPredicate(sharedPredicates.messageIsIgnored(logger));\n}\n\nRollbar.prototype.loadFull = function() {\n logger.info('Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.');\n};\n\nRollbar.prototype._createItem = function(args) {\n return _.createItem(args, logger, this);\n};\n\nfunction _getFirstFunction(args) {\n for (var i = 0, len = args.length; i < len; ++i) {\n if (_.isFunction(args[i])) {\n return args[i];\n }\n }\n return undefined;\n}\n\nfunction _gWindow() {\n return ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n}\n\nvar defaults = require('../defaults');\nvar scrubFields = require('./defaults/scrubFields');\n\nvar defaultOptions = {\n version: defaults.version,\n scrubFields: scrubFields.scrubFields,\n logLevel: defaults.logLevel,\n reportLevel: defaults.reportLevel,\n uncaughtErrorLevel: defaults.uncaughtErrorLevel,\n endpoint: defaults.endpoint,\n verbose: false,\n enabled: true,\n transmit: true,\n sendConfig: false,\n includeItemsInTelemetry: true,\n captureIp: true,\n inspectAnonymousErrors: true,\n ignoreDuplicateErrors: true,\n wrapGlobalEventHandlers: false\n};\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar _ = require('./utility');\n\n/*\n * Rollbar - the interface to Rollbar\n *\n * @param options\n * @param api\n * @param logger\n */\nfunction Rollbar(options, api, logger, telemeter, platform) {\n this.options = _.merge(options);\n this.logger = logger;\n Rollbar.rateLimiter.configureGlobal(this.options);\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.api = api;\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n\n // This must happen before the Notifier is created\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = telemeter;\n setStackTraceLimit(options);\n this.lastError = null;\n this.lastErrorHash = 'none';\n}\n\nvar defaultOptions = {\n maxItems: 0,\n itemsPerMinute: 60\n};\n\nRollbar.rateLimiter = new RateLimiter(defaultOptions);\n\nRollbar.prototype.global = function (options) {\n Rollbar.rateLimiter.configureGlobal(options);\n return this;\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n\n this.options = _.merge(oldOptions, options, payload);\n\n // This must happen before the Notifier is configured\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier && this.notifier.configure(this.options);\n this.telemeter && this.telemeter.configure(this.options);\n setStackTraceLimit(options);\n this.global(this.options);\n\n if (validateTracer(options.tracer)) {\n this.tracer = options.tracer\n }\n\n return this;\n};\n\nRollbar.prototype.log = function (item) {\n var level = this._defaultLogLevel();\n return this._log(level, item);\n};\n\nRollbar.prototype.debug = function (item) {\n this._log('debug', item);\n};\n\nRollbar.prototype.info = function (item) {\n this._log('info', item);\n};\n\nRollbar.prototype.warn = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.warning = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.error = function (item) {\n this._log('error', item);\n};\n\nRollbar.prototype.critical = function (item) {\n this._log('critical', item);\n};\n\nRollbar.prototype.wait = function (callback) {\n this.queue.wait(callback);\n};\n\nRollbar.prototype.captureEvent = function (type, metadata, level) {\n return this.telemeter && this.telemeter.captureEvent(type, metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function (ts) {\n return this.telemeter && this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (ts) {\n return this.telemeter && this.telemeter.captureLoad(ts);\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.api.buildJsonPayload(item);\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n this.api.postJsonPayload(jsonPayload);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function (defaultLevel, item) {\n var callback;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {\n if (callback) {\n var error = new Error('ignored identical item');\n error.item = item;\n callback(error);\n }\n return;\n }\n try {\n this._addTracingInfo(item);\n item.level = item.level || defaultLevel;\n this.telemeter && this.telemeter._captureRollbarItem(item);\n item.telemetryEvents = (this.telemeter && this.telemeter.copyEvents()) || [];\n this.notifier.log(item, callback);\n } catch (e) {\n if (callback) {\n callback(e);\n }\n this.logger.error(e);\n }\n};\n\nRollbar.prototype._defaultLogLevel = function () {\n return this.options.logLevel || 'debug';\n};\n\nRollbar.prototype._sameAsLastError = function (item) {\n if (!item._isUncaught) {\n return false;\n }\n var itemHash = generateItemHash(item);\n if (this.lastErrorHash === itemHash) {\n return true;\n }\n this.lastError = item.err;\n this.lastErrorHash = itemHash;\n return false;\n};\n\nRollbar.prototype._addTracingInfo = function (item) {\n // Tracer validation occurs in the constructor\n // or in the Rollbar.prototype.configure methods\n if (this.tracer) {\n // add rollbar occurrence uuid to span\n var span = this.tracer.scope().active();\n\n if (validateSpan(span)) {\n span.setTag('rollbar.error_uuid', item.uuid);\n span.setTag('rollbar.has_error', true);\n span.setTag('error', true);\n span.setTag('rollbar.item_url', `https://rollbar.com/item/uuid/?uuid=${item.uuid}`);\n span.setTag('rollbar.occurrence_url', `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`);\n\n // add span ID & trace ID to occurrence\n var opentracingSpanId = span.context().toSpanId();\n var opentracingTraceId = span.context().toTraceId();\n\n if (item.custom) {\n item.custom.opentracing_span_id = opentracingSpanId;\n item.custom.opentracing_trace_id = opentracingTraceId;\n } else {\n item.custom = {\n opentracing_span_id: opentracingSpanId,\n opentracing_trace_id: opentracingTraceId\n };\n }\n }\n }\n}\n\nfunction generateItemHash(item) {\n var message = item.message || '';\n var stack = (item.err || {}).stack || String(item.err);\n return message + '::' + stack;\n}\n\n// Node.js, Chrome, Safari, and some other browsers support this property\n// which globally sets the number of stack frames returned in an Error object.\n// If a browser can't use it, no harm done.\nfunction setStackTraceLimit(options) {\n if (options.stackTraceLimit) {\n Error.stackTraceLimit = options.stackTraceLimit;\n }\n}\n\n/**\n * Validate the Tracer object provided to the Client\n * is valid for our Opentracing use case.\n * @param {opentracer.Tracer} tracer\n */\nfunction validateTracer(tracer) {\n if (!tracer) {\n return false;\n }\n\n if (!tracer.scope || typeof tracer.scope !== 'function') {\n return false;\n }\n\n var scope = tracer.scope();\n\n if (!scope || !scope.active || typeof scope.active !== 'function') {\n return false;\n }\n\n return true;\n}\n\n/**\n * Validate the Span object provided\n * @param {opentracer.Span} span\n */\nfunction validateSpan(span) {\n if (!span || !span.context || typeof span.context !== 'function') {\n return false;\n }\n\n var spanContext = span.context();\n\n if (!spanContext\n || !spanContext.toSpanId\n || !spanContext.toTraceId\n || typeof spanContext.toSpanId !== 'function'\n || typeof spanContext.toTraceId !== 'function') {\n return false\n }\n\n return true;\n}\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar\n *\n * @param options - the same options that are accepted by configureGlobal offered as a convenience\n */\nfunction RateLimiter(options) {\n this.startTime = _.now();\n this.counter = 0;\n this.perMinCounter = 0;\n this.platform = null;\n this.platformOptions = {};\n this.configureGlobal(options);\n}\n\nRateLimiter.globalSettings = {\n startTime: _.now(),\n maxItems: undefined,\n itemsPerMinute: undefined\n};\n\n/*\n * configureGlobal - set the global rate limiter options\n *\n * @param options - Only the following values are recognized:\n * startTime: a timestamp of the form returned by (new Date()).getTime()\n * maxItems: the maximum items\n * itemsPerMinute: the max number of items to send in a given minute\n */\nRateLimiter.prototype.configureGlobal = function(options) {\n if (options.startTime !== undefined) {\n RateLimiter.globalSettings.startTime = options.startTime;\n }\n if (options.maxItems !== undefined) {\n RateLimiter.globalSettings.maxItems = options.maxItems;\n }\n if (options.itemsPerMinute !== undefined) {\n RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;\n }\n};\n\n/*\n * shouldSend - determine if we should send a given item based on rate limit settings\n *\n * @param item - the item we are about to send\n * @returns An object with the following structure:\n * error: (Error|null)\n * shouldSend: bool\n * payload: (Object|null)\n * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and\n * exactly one of error or payload will be non-null. If error is non-null, the returned Error will\n * describe the situation, but it means that we were already over a rate limit (either globally or\n * per minute) when this item was checked. If error is null, and therefore payload is non-null, it\n * means this item put us over the global rate limit and the payload should be sent to Rollbar in\n * place of the passed in item.\n */\nRateLimiter.prototype.shouldSend = function(item, now) {\n now = now || _.now();\n var elapsedTime = now - this.startTime;\n if (elapsedTime < 0 || elapsedTime >= 60000) {\n this.startTime = now;\n this.perMinCounter = 0;\n }\n\n var globalRateLimit = RateLimiter.globalSettings.maxItems;\n var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;\n\n if (checkRate(item, globalRateLimit, this.counter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimit + ' max items reached', false);\n } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimitPerMin + ' items per minute reached', false);\n }\n this.counter++;\n this.perMinCounter++;\n\n var shouldSend = !checkRate(item, globalRateLimit, this.counter);\n var perMinute = shouldSend;\n shouldSend = shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);\n return shouldSendValue(this.platform, this.platformOptions, null, shouldSend, globalRateLimit, globalRateLimitPerMin, perMinute);\n};\n\nRateLimiter.prototype.setPlatformOptions = function(platform, options) {\n this.platform = platform;\n this.platformOptions = options;\n};\n\n/* Helpers */\n\nfunction checkRate(item, limit, counter) {\n return !item.ignoreRateLimit && limit >= 1 && counter > limit;\n}\n\nfunction shouldSendValue(platform, options, error, shouldSend, globalRateLimit, limitPerMin, perMinute) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute);\n }\n return {error: error, shouldSend: shouldSend, payload: payload};\n}\n\nfunction rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute) {\n var environment = options.environment || (options.payload && options.payload.environment);\n var msg;\n if (perMinute) {\n msg = 'item per minute limit reached, ignoring errors until timeout';\n } else {\n msg = 'maxItems has been hit, ignoring errors until reset.';\n }\n var item = {\n body: {\n message: {\n body: msg,\n extra: {\n maxItems: globalRateLimit,\n itemsPerMinute: limitPerMin\n }\n }\n },\n language: 'javascript',\n environment: environment,\n notifier: {\n version: (options.notifier && options.notifier.version) || options.version\n }\n };\n if (platform === 'browser') {\n item.platform = 'browser';\n item.framework = 'browser-js';\n item.notifier.name = 'rollbar-browser-js';\n } else if (platform === 'server') {\n item.framework = options.framework || 'node-js';\n item.notifier.name = options.notifier.name;\n } else if (platform === 'react-native') {\n item.framework = options.framework || 'react-native';\n item.notifier.name = options.notifier.name;\n }\n return item;\n}\n\nmodule.exports = RateLimiter;\n","'use strict';\n\n'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isPlainObject = function isPlainObject(obj) {\n\tif (!obj || toStr.call(obj) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tvar hasOwnConstructor = hasOwn.call(obj, 'constructor');\n\tvar hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n\t// Not own constructor property must be Object\n\tif (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n\t\treturn false;\n\t}\n\n\t// Own properties are enumerated firstly, so to speed up,\n\t// if last one is own, then all properties are own.\n\tvar key;\n\tfor (key in obj) {/**/}\n\n\treturn typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\nfunction merge() {\n var i, src, copy, clone, name,\n result = {},\n current = null,\n length = arguments.length;\n\n for (i=0; i < length; i++) {\n current = arguments[i];\n if (current == null) {\n continue;\n }\n\n for (name in current) {\n src = result[name];\n copy = current[name];\n if (result !== copy) {\n if (copy && isPlainObject(copy)) {\n clone = src && isPlainObject(src) ? src : {};\n result[name] = merge(clone, copy);\n } else if (typeof copy !== 'undefined') {\n result[name] = copy;\n }\n }\n }\n }\n return result;\n}\n\nmodule.exports = merge;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Queue - an object which handles which handles a queue of items to be sent to Rollbar.\n * This object handles rate limiting via a passed in rate limiter, retries based on connection\n * errors, and filtering of items based on a set of configurable predicates. The communication to\n * the backend is performed via a given API object.\n *\n * @param rateLimiter - An object which conforms to the interface\n * rateLimiter.shouldSend(item) -> bool\n * @param api - An object which conforms to the interface\n * api.postItem(payload, function(err, response))\n * @param logger - An object used to log verbose messages if desired\n * @param options - see Queue.prototype.configure\n */\nfunction Queue(rateLimiter, api, logger, options) {\n this.rateLimiter = rateLimiter;\n this.api = api;\n this.logger = logger;\n this.options = options;\n this.predicates = [];\n this.pendingItems = [];\n this.pendingRequests = [];\n this.retryQueue = [];\n this.retryHandle = null;\n this.waitCallback = null;\n this.waitIntervalID = null;\n}\n\n/*\n * configure - updates the options this queue uses\n *\n * @param options\n */\nQueue.prototype.configure = function(options) {\n this.api && this.api.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addPredicate - adds a predicate to the end of the list of predicates for this queue\n *\n * @param predicate - function(item, options) -> (bool|{err: Error})\n * Returning true means that this predicate passes and the item is okay to go on the queue\n * Returning false means do not add the item to the queue, but it is not an error\n * Returning {err: Error} means do not add the item to the queue, and the given error explains why\n * Returning {err: undefined} is equivalent to returning true but don't do that\n */\nQueue.prototype.addPredicate = function(predicate) {\n if (_.isFunction(predicate)) {\n this.predicates.push(predicate);\n }\n return this;\n};\n\nQueue.prototype.addPendingItem = function(item) {\n this.pendingItems.push(item);\n};\n\nQueue.prototype.removePendingItem = function(item) {\n var idx = this.pendingItems.indexOf(item);\n if (idx !== -1) {\n this.pendingItems.splice(idx, 1);\n }\n};\n\n/*\n * addItem - Send an item to the Rollbar API if all of the predicates are satisfied\n *\n * @param item - The payload to send to the backend\n * @param callback - function(error, repsonse) which will be called with the response from the API\n * in the case of a success, otherwise response will be null and error will have a value. If both\n * error and response are null then the item was stopped by a predicate which did not consider this\n * to be an error condition, but nonetheless did not send the item to the API.\n * @param originalError - The original error before any transformations that is to be logged if any\n */\nQueue.prototype.addItem = function(item, callback, originalError, originalItem) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() { return; };\n }\n var predicateResult = this._applyPredicates(item);\n if (predicateResult.stop) {\n this.removePendingItem(originalItem);\n callback(predicateResult.err);\n return;\n }\n this._maybeLog(item, originalError);\n this.removePendingItem(originalItem);\n if (!this.options.transmit) {\n callback(new Error('Transmit disabled'));\n return;\n }\n this.pendingRequests.push(item);\n try {\n this._makeApiRequest(item, function(err, resp) {\n this._dequeuePendingRequest(item);\n callback(err, resp);\n }.bind(this));\n } catch (e) {\n this._dequeuePendingRequest(item);\n callback(e);\n }\n};\n\n/*\n * wait - Stop any further errors from being added to the queue, and get called back when all items\n * currently processing have finished sending to the backend.\n *\n * @param callback - function() called when all pending items have been sent\n */\nQueue.prototype.wait = function(callback) {\n if (!_.isFunction(callback)) {\n return;\n }\n this.waitCallback = callback;\n if (this._maybeCallWait()) {\n return;\n }\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitIntervalID = setInterval(function() {\n this._maybeCallWait();\n }.bind(this), 500);\n};\n\n/* _applyPredicates - Sequentially applies the predicates that have been added to the queue to the\n * given item with the currently configured options.\n *\n * @param item - An item in the queue\n * @returns {stop: bool, err: (Error|null)} - stop being true means do not add item to the queue,\n * the error value should be passed up to a callbak if we are stopping.\n */\nQueue.prototype._applyPredicates = function(item) {\n var p = null;\n for (var i = 0, len = this.predicates.length; i < len; i++) {\n p = this.predicates[i](item, this.options);\n if (!p || p.err !== undefined) {\n return {stop: true, err: p.err};\n }\n }\n return {stop: false, err: null};\n};\n\n/*\n * _makeApiRequest - Send an item to Rollbar, callback when done, if there is an error make an\n * effort to retry if we are configured to do so.\n *\n * @param item - an item ready to send to the backend\n * @param callback - function(err, response)\n */\nQueue.prototype._makeApiRequest = function(item, callback) {\n var rateLimitResponse = this.rateLimiter.shouldSend(item);\n if (rateLimitResponse.shouldSend) {\n this.api.postItem(item, function(err, resp) {\n if (err) {\n this._maybeRetry(err, item, callback);\n } else {\n callback(err, resp);\n }\n }.bind(this));\n } else if (rateLimitResponse.error) {\n callback(rateLimitResponse.error);\n } else {\n this.api.postItem(rateLimitResponse.payload, callback);\n }\n};\n\n// These are errors basically mean there is no internet connection\nvar RETRIABLE_ERRORS = ['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED', 'EHOSTUNREACH', 'EPIPE', 'EAI_AGAIN'];\n\n/*\n * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback\n * with the error.\n *\n * @param err - an error returned by the API transport\n * @param item - the item that was trying to be sent when this error occured\n * @param callback - function(err, response)\n */\nQueue.prototype._maybeRetry = function(err, item, callback) {\n var shouldRetry = false;\n if (this.options.retryInterval) {\n for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {\n if (err.code === RETRIABLE_ERRORS[i]) {\n shouldRetry = true;\n break;\n }\n }\n if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {\n item.retries = item.retries ? item.retries + 1 : 1;\n if (item.retries > this.options.maxRetries) {\n shouldRetry = false;\n }\n }\n }\n if (shouldRetry) {\n this._retryApiRequest(item, callback);\n } else {\n callback(err);\n }\n};\n\n/*\n * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process\n * that queue based on the retryInterval in the options for this queue.\n *\n * @param item - an item that failed to send due to an error we deem retriable\n * @param callback - function(err, response)\n */\nQueue.prototype._retryApiRequest = function(item, callback) {\n this.retryQueue.push({item: item, callback: callback});\n\n if (!this.retryHandle) {\n this.retryHandle = setInterval(function() {\n while (this.retryQueue.length) {\n var retryObject = this.retryQueue.shift();\n this._makeApiRequest(retryObject.item, retryObject.callback);\n }\n }.bind(this), this.options.retryInterval);\n }\n};\n\n/*\n * _dequeuePendingRequest - Removes the item from the pending request queue, this queue is used to\n * enable to functionality of providing a callback that clients can pass to `wait` to be notified\n * when the pending request queue has been emptied. This must be called when the API finishes\n * processing this item. If a `wait` callback is configured, it is called by this function.\n *\n * @param item - the item previously added to the pending request queue\n */\nQueue.prototype._dequeuePendingRequest = function(item) {\n var idx = this.pendingRequests.indexOf(item);\n if (idx !== -1) {\n this.pendingRequests.splice(idx, 1);\n this._maybeCallWait();\n }\n};\n\nQueue.prototype._maybeLog = function(data, originalError) {\n if (this.logger && this.options.verbose) {\n var message = originalError;\n message = message || _.get(data, 'body.trace.exception.message');\n message = message || _.get(data, 'body.trace_chain.0.exception.message');\n if (message) {\n this.logger.error(message);\n return;\n }\n message = _.get(data, 'body.message.body');\n if (message) {\n this.logger.log(message);\n }\n }\n};\n\nQueue.prototype._maybeCallWait = function() {\n if (_.isFunction(this.waitCallback) && this.pendingItems.length === 0 && this.pendingRequests.length === 0) {\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitCallback();\n return true;\n }\n return false;\n};\n\nmodule.exports = Queue;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Notifier - the internal object responsible for delegating between the client exposed API, the\n * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the\n * queue which handles the communcation with the Rollbar API servers.\n *\n * @param queue - an object that conforms to the interface: addItem(item, callback)\n * @param options - an object representing the options to be set for this notifier, this should have\n * any defaults already set by the caller\n */\nfunction Notifier(queue, options) {\n this.queue = queue;\n this.options = options;\n this.transforms = [];\n this.diagnostic = {};\n}\n\n/*\n * configure - updates the options for this notifier with the passed in object\n *\n * @param options - an object which gets merged with the current options set on this notifier\n * @returns this\n */\nNotifier.prototype.configure = function(options) {\n this.queue && this.queue.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addTransform - adds a transform onto the end of the queue of transforms for this notifier\n *\n * @param transform - a function which takes three arguments:\n * * item: An Object representing the data to eventually be sent to Rollbar\n * * options: The current value of the options for this notifier\n * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this\n * callback with a null value for error if it wants the processing chain to continue, otherwise\n * with an error to terminate the processing. The item should be the updated item after this\n * transform is finished modifying it.\n */\nNotifier.prototype.addTransform = function(transform) {\n if (_.isFunction(transform)) {\n this.transforms.push(transform);\n }\n return this;\n};\n\n/*\n * log - the internal log function which applies the configured transforms and then pushes onto the\n * queue to be sent to the backend.\n *\n * @param item - An object with the following structure:\n * message [String] - An optional string to be sent to rollbar\n * error [Error] - An optional error\n *\n * @param callback - A function of type function(err, resp) which will be called with exactly one\n * null argument and one non-null argument. The callback will be called once, either during the\n * transform stage if an error occurs inside a transform, or in response to the communication with\n * the backend. The second argument will be the response from the backend in case of success.\n */\nNotifier.prototype.log = function(item, callback) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!this.options.enabled) {\n return callback(new Error('Rollbar is not enabled'));\n }\n\n this.queue.addPendingItem(item);\n var originalError = item.err;\n this._applyTransforms(item, function(err, i) {\n if (err) {\n this.queue.removePendingItem(item);\n return callback(err, null);\n }\n this.queue.addItem(i, callback, originalError, item);\n }.bind(this));\n};\n\n/* Internal */\n\n/*\n * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See\n * `addTransform` for more information.\n *\n * @param item - An item to be transformed\n * @param callback - A function of type function(err, item) which will be called with a non-null\n * error and a null item in the case of a transform failure, or a null error and non-null item after\n * all transforms have been applied.\n */\nNotifier.prototype._applyTransforms = function(item, callback) {\n var transformIndex = -1;\n var transformsLength = this.transforms.length;\n var transforms = this.transforms;\n var options = this.options;\n\n var cb = function(err, i) {\n if (err) {\n callback(err, null);\n return;\n }\n\n transformIndex++;\n\n if (transformIndex === transformsLength) {\n callback(null, i);\n return;\n }\n\n transforms[transformIndex](i, options, cb);\n };\n\n cb(null, item);\n};\n\nmodule.exports = Notifier;\n","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1/item/',\n search: null,\n version: '1',\n protocol: 'https:',\n port: 443\n};\n\n/**\n * Api is an object that encapsulates methods of communicating with\n * the Rollbar API. It is a standard interface with some parts implemented\n * differently for server or browser contexts. It is an object that should\n * be instantiated when used so it can contain non-global options that may\n * be different for another instance of RollbarApi.\n *\n * @param options {\n * accessToken: the accessToken to use for posting items to rollbar\n * endpoint: an alternative endpoint to send errors to\n * must be a valid, fully qualified URL.\n * The default is: https://api.rollbar.com/api/1/item\n * proxy: if you wish to proxy requests provide an object\n * with the following keys:\n * host or hostname (required): foo.example.com\n * port (optional): 123\n * protocol (optional): https\n * }\n */\nfunction Api(options, transport, urllib, truncation, jsonBackup) {\n this.options = options;\n this.transport = transport;\n this.url = urllib;\n this.truncation = truncation;\n this.jsonBackup = jsonBackup;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, urllib);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function(data, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n this.transport.post(this.accessToken, transportOptions, payload, callback);\n};\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.buildJsonPayload = function(data, callback) {\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n\n if (stringifyResult.error) {\n if (callback) {\n callback(stringifyResult.error);\n }\n return null;\n }\n\n return stringifyResult.value;\n};\n\n/**\n *\n * @param jsonPayload\n * @param callback\n */\nApi.prototype.postJsonPayload = function(jsonPayload, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n this.transport.postJsonPayload(this.accessToken, transportOptions, jsonPayload, callback);\n};\n\nApi.prototype.configure = function(options) {\n var oldOptions = this.oldOptions;\n this.options = _.merge(oldOptions, options);\n this.transportOptions = _getTransport(this.options, this.url);\n if (this.options.accessToken !== undefined) {\n this.accessToken = this.options.accessToken;\n }\n return this;\n};\n\nfunction _getTransport(options, url) {\n return helpers.getTransportFromOptions(options, defaultOptions, url);\n}\n\nmodule.exports = Api;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (!_.isType(data.context, 'string')) {\n var contextResult = _.stringify(data.context, jsonBackup);\n if (contextResult.error) {\n data.context = 'Error: could not serialize \\'context\\'';\n } else {\n data.context = contextResult.value || '';\n }\n if (data.context.length > 255) {\n data.context = data.context.substr(0, 255);\n }\n }\n return {\n access_token: accessToken,\n data: data\n };\n}\n\nfunction getTransportFromOptions(options, defaults, url) {\n var hostname = defaults.hostname;\n var protocol = defaults.protocol;\n var port = defaults.port;\n var path = defaults.path;\n var search = defaults.search;\n var timeout = options.timeout;\n\n var proxy = options.proxy;\n if (options.endpoint) {\n var opts = url.parse(options.endpoint);\n hostname = opts.hostname;\n protocol = opts.protocol;\n port = opts.port;\n path = opts.pathname;\n search = opts.search;\n }\n return {\n timeout: timeout,\n hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy\n };\n}\n\nfunction transportOptions(transport, method) {\n var protocol = transport.protocol || 'https:';\n var port = transport.port || (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);\n var hostname = transport.hostname;\n var path = transport.path;\n var timeout = transport.timeout;\n if (transport.search) {\n path = path + transport.search;\n }\n if (transport.proxy) {\n path = protocol + '//' + hostname + path;\n hostname = transport.proxy.host || transport.proxy.hostname;\n port = transport.proxy.port;\n protocol = transport.proxy.protocol || protocol;\n }\n return {\n timeout: timeout,\n protocol: protocol,\n hostname: hostname,\n path: path,\n port: port,\n method: method\n };\n}\n\nfunction appendPathToPath(base, path) {\n var baseTrailingSlash = /\\/$/.test(base);\n var pathBeginningSlash = /^\\//.test(path);\n\n if (baseTrailingSlash && pathBeginningSlash) {\n path = path.substring(1);\n } else if (!baseTrailingSlash && !pathBeginningSlash) {\n path = '/' + path;\n }\n\n return base + path;\n}\n\nmodule.exports = {\n buildPayload: buildPayload,\n getTransportFromOptions: getTransportFromOptions,\n transportOptions: transportOptions,\n appendPathToPath: appendPathToPath\n};\n","// Console-polyfill. MIT license.\n// https://github.com/paulmillr/console-polyfill\n// Make it safe to do console.log() always.\n(function(global) {\n 'use strict';\n if (!global.console) {\n global.console = {};\n }\n var con = global.console;\n var prop, method;\n var dummy = function() {};\n var properties = ['memory'];\n var methods = ('assert,clear,count,debug,dir,dirxml,error,exception,group,' +\n 'groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,' +\n 'show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn').split(',');\n while (prop = properties.pop()) if (!con[prop]) con[prop] = {};\n while (method = methods.pop()) if (!con[method]) con[method] = dummy;\n // Using `this` for web workers & supports Browserify / Webpack.\n})(typeof window === 'undefined' ? this : window);\n","'use strict';\n\n// This detection.js module is used to encapsulate any ugly browser/feature\n// detection we may need to do.\n\n// Figure out which version of IE we're using, if any.\n// This is gleaned from http://stackoverflow.com/questions/5574842/best-way-to-check-for-ie-less-than-9-in-javascript-without-library\n// Will return an integer on IE (i.e. 8)\n// Will return undefined otherwise\nfunction getIEVersion() {\n\tvar undef;\n\tif (typeof document === 'undefined') {\n\t\treturn undef;\n\t}\n\n var v = 3,\n div = document.createElement('div'),\n all = div.getElementsByTagName('i');\n\n while (\n div.innerHTML = '',\n all[0]\n );\n\n return v > 4 ? v : undef;\n}\n\nvar Detection = {\n ieVersion: getIEVersion\n};\n\nmodule.exports = Detection;\n","'use strict';\n\nfunction captureUncaughtExceptions(window, handler, shim) {\n if (!window) { return; }\n var oldOnError;\n\n if (typeof handler._rollbarOldOnError === 'function') {\n oldOnError = handler._rollbarOldOnError;\n } else if (window.onerror) {\n oldOnError = window.onerror;\n while (oldOnError._rollbarOldOnError) {\n oldOnError = oldOnError._rollbarOldOnError;\n }\n handler._rollbarOldOnError = oldOnError;\n }\n\n handler.handleAnonymousErrors();\n\n var fn = function() {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n if (shim) {\n fn._rollbarOldOnError = oldOnError;\n }\n window.onerror = fn;\n}\n\nfunction _rollbarWindowOnError(window, r, old, args) {\n if (window._rollbarWrappedError) {\n if (!args[4]) {\n args[4] = window._rollbarWrappedError;\n }\n if (!args[5]) {\n args[5] = window._rollbarWrappedError._rollbarContext;\n }\n window._rollbarWrappedError = null;\n }\n\n var ret = r.handleUncaughtException.apply(r, args);\n\n if (old) {\n old.apply(window, args);\n }\n\n // Let other chained onerror handlers above run before setting this.\n // If an error is thrown and caught within a chained onerror handler,\n // Error.prepareStackTrace() will see that one before the one we want.\n if (ret === 'anonymous') {\n r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()\n }\n}\n\nfunction captureUnhandledRejections(window, handler, shim) {\n if (!window) { return; }\n\n if (typeof window._rollbarURH === 'function' && window._rollbarURH.belongsToShim) {\n window.removeEventListener('unhandledrejection', window._rollbarURH);\n }\n\n var rejectionHandler = function (evt) {\n var reason, promise, detail;\n try {\n reason = evt.reason;\n } catch (e) {\n reason = undefined;\n }\n try {\n promise = evt.promise;\n } catch (e) {\n promise = '[unhandledrejection] error getting `promise` from event';\n }\n try {\n detail = evt.detail;\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\n }\n } catch (e) {\n // Ignore\n }\n if (!reason) {\n reason = '[unhandledrejection] error getting `reason` from event';\n }\n\n if (handler && handler.handleUnhandledRejection) {\n handler.handleUnhandledRejection(reason, promise);\n }\n };\n rejectionHandler.belongsToShim = shim;\n window._rollbarURH = rejectionHandler;\n window.addEventListener('unhandledrejection', rejectionHandler);\n}\n\n\nmodule.exports = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections\n};\n","'use strict';\n\n/*global XDomainRequest*/\n\nvar _ = require('../utility');\nvar logger = require('./logger');\n\n/*\n * accessToken may be embedded in payload but that should not\n * be assumed\n *\n * options: {\n * hostname\n * protocol\n * path\n * port\n * method\n * }\n *\n * params is an object containing key/value pairs. These\n * will be appended to the path as 'key=value&key=value'\n *\n * payload is an unserialized object\n */\nfunction Transport(truncation) {\n this.truncation = truncation;\n}\n\nTransport.prototype.get = function(accessToken, options, params, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n _.addParamsAndAccessTokenToPath(accessToken, options, params);\n\n var method = 'GET';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, null, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.post = function(accessToken, options, payload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!payload) {\n return callback(new Error('Cannot send empty request'));\n }\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n if (stringifyResult.error) {\n return callback(stringifyResult.error);\n }\n\n var writeData = stringifyResult.value;\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, writeData, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.postJsonPayload = function (accessToken, options, jsonPayload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, jsonPayload, callback, requestFactory, options.timeout);\n}\n\n\n// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope\n// so Angular change detection isn't triggered on each API call.\n// This is the equivalent of runOutsideAngular().\n//\nfunction _makeZoneRequest() {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;\n var args = Array.prototype.slice.call(arguments);\n\n if (currentZone && currentZone._name === 'angular') {\n var rootZone = currentZone._parent;\n rootZone.run(function () {\n _makeRequest.apply(undefined, args);\n });\n } else {\n _makeRequest.apply(undefined, args);\n }\n}\n\n/* global RollbarProxy */\nfunction _proxyRequest(json, callback) {\n var rollbarProxy = new RollbarProxy();\n rollbarProxy.sendJsonPayload(\n json,\n function(_msg) { /* do nothing */ }, // eslint-disable-line no-unused-vars\n function(err) {\n callback(new Error(err));\n }\n );\n}\n\nfunction _makeRequest(accessToken, url, method, data, callback, requestFactory, timeout) {\n if (typeof RollbarProxy !== 'undefined') {\n return _proxyRequest(data, callback);\n }\n\n var request;\n if (requestFactory) {\n request = requestFactory();\n } else {\n request = _createXMLHTTPObject();\n }\n if (!request) {\n // Give up, no way to send requests\n return callback(new Error('No way to send a request'));\n }\n try {\n try {\n var onreadystatechange = function() {\n try {\n if (onreadystatechange && request.readyState === 4) {\n onreadystatechange = undefined;\n\n var parseResponse = _.jsonParse(request.responseText);\n if (_isSuccess(request)) {\n callback(parseResponse.error, parseResponse.value);\n return;\n } else if (_isNormalFailure(request)) {\n if (request.status === 403) {\n // likely caused by using a server access token\n var message = parseResponse.value && parseResponse.value.message;\n logger.error(message);\n }\n // return valid http status codes\n callback(new Error(String(request.status)));\n } else {\n // IE will return a status 12000+ on some sort of connection failure,\n // so we return a blank error\n // http://msdn.microsoft.com/en-us/library/aa383770%28VS.85%29.aspx\n var msg = 'XHR response had no status code (likely connection failure)';\n callback(_newRetriableError(msg));\n }\n }\n } catch (ex) {\n //jquery source mentions firefox may error out while accessing the\n //request members if there is a network error\n //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111\n var exc;\n if (ex && ex.stack) {\n exc = ex;\n } else {\n exc = new Error(ex);\n }\n callback(exc);\n }\n };\n\n request.open(method, url, true);\n if (request.setRequestHeader) {\n request.setRequestHeader('Content-Type', 'application/json');\n request.setRequestHeader('X-Rollbar-Access-Token', accessToken);\n }\n\n if(_.isFiniteNumber(timeout)) {\n request.timeout = timeout;\n }\n\n request.onreadystatechange = onreadystatechange;\n request.send(data);\n } catch (e1) {\n // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest\n if (typeof XDomainRequest !== 'undefined') {\n\n // Assume we are in a really old browser which has a bunch of limitations:\n // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx\n\n // Extreme paranoia: if we have XDomainRequest then we have a window, but just in case\n if (!window || !window.location) {\n return callback(new Error('No window available during request, unknown environment'));\n }\n\n // If the current page is http, try and send over http\n if (window.location.href.substring(0, 5) === 'http:' && url.substring(0, 5) === 'https') {\n url = 'http' + url.substring(5);\n }\n\n var xdomainrequest = new XDomainRequest();\n xdomainrequest.onprogress = function() {};\n xdomainrequest.ontimeout = function() {\n var msg = 'Request timed out';\n var code = 'ETIMEDOUT';\n callback(_newRetriableError(msg, code));\n };\n xdomainrequest.onerror = function() {\n callback(new Error('Error during request'));\n };\n xdomainrequest.onload = function() {\n var parseResponse = _.jsonParse(xdomainrequest.responseText);\n callback(parseResponse.error, parseResponse.value);\n };\n xdomainrequest.open(method, url, true);\n xdomainrequest.send(data);\n } else {\n callback(new Error('Cannot find a method to transport a request'));\n }\n }\n } catch (e2) {\n callback(e2);\n }\n}\n\nfunction _createXMLHTTPObject() {\n /* global ActiveXObject:false */\n\n var factories = [\n function () {\n return new XMLHttpRequest();\n },\n function () {\n return new ActiveXObject('Msxml2.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Msxml3.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Microsoft.XMLHTTP');\n }\n ];\n var xmlhttp;\n var i;\n var numFactories = factories.length;\n for (i = 0; i < numFactories; i++) {\n /* eslint-disable no-empty */\n try {\n xmlhttp = factories[i]();\n break;\n } catch (e) {\n // pass\n }\n /* eslint-enable no-empty */\n }\n return xmlhttp;\n}\n\nfunction _isSuccess(r) {\n return r && r.status && r.status === 200;\n}\n\nfunction _isNormalFailure(r) {\n return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;\n}\n\nfunction _newRetriableError(message, code) {\n var err = new Error(message);\n err.code = code || 'ENOTFOUND';\n return err;\n}\n\nmodule.exports = Transport;\n","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('../errorParser');\nvar logger = require('./logger');\n\nfunction handleDomException(item, options, callback) {\n if(item.err && errorParser.Stack(item.err).name === 'DOMException') {\n var originalError = new Error();\n originalError.name = item.err.name;\n originalError.message = item.err.message;\n originalError.stack = item.err.stack;\n originalError.nested = item.err;\n item.err = originalError;\n }\n callback(null, item);\n}\n\nfunction handleItemWithError(item, options, callback) {\n item.data = item.data || {};\n if (item.err) {\n try {\n item.stackInfo = item.err._savedStackTrace || errorParser.parse(item.err, item.skipFrames);\n\n if (options.addErrorContext) {\n addErrorContext(item);\n }\n } catch (e) {\n logger.error('Error while parsing the error object.', e);\n try {\n item.message = item.err.message || item.err.description || item.message || String(item.err);\n } catch (e2) {\n item.message = String(item.err) || String(e2);\n }\n delete item.err;\n }\n }\n callback(null, item);\n}\n\nfunction addErrorContext(item) {\n var chain = [];\n var err = item.err;\n\n chain.push(err);\n\n while (err.nested) {\n err = err.nested;\n chain.push(err);\n }\n\n _.addErrorContext(item, chain);\n}\n\nfunction ensureItemHasSomethingToSay(item, options, callback) {\n if (!item.message && !item.stackInfo && !item.custom) {\n callback(new Error('No message, stack info, or custom data'), null);\n }\n callback(null, item);\n}\n\nfunction addBaseInfo(item, options, callback) {\n var environment = (options.payload && options.payload.environment) || options.environment;\n item.data = _.merge(item.data, {\n environment: environment,\n level: item.level,\n endpoint: options.endpoint,\n platform: 'browser',\n framework: 'browser-js',\n language: 'javascript',\n server: {},\n uuid: item.uuid,\n notifier: {\n name: 'rollbar-browser-js',\n version: options.version\n },\n custom: item.custom\n });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.location) {\n return callback(null, item);\n }\n var remoteString = '$remote_ip';\n if (!options.captureIp) {\n remoteString = null;\n } else if (options.captureIp !== true) {\n remoteString += '_anonymize';\n }\n _.set(item, 'data.request', {\n url: window.location.href,\n query_string: window.location.search,\n user_ip: remoteString\n });\n callback(null, item);\n };\n}\n\nfunction addClientInfo(window) {\n return function(item, options, callback) {\n if (!window) {\n return callback(null, item);\n }\n var nav = window.navigator || {};\n var scr = window.screen || {};\n _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: nav.userAgent,\n language: nav.language,\n cookie_enabled: nav.cookieEnabled,\n screen: {\n width: scr.width,\n height: scr.height\n }\n }\n });\n callback(null, item);\n };\n}\n\nfunction addPluginInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.navigator) {\n return callback(null, item);\n }\n var plugins = [];\n var navPlugins = window.navigator.plugins || [];\n var cur;\n for (var i=0, l=navPlugins.length; i < l; ++i) {\n cur = navPlugins[i];\n plugins.push({name: cur.name, description: cur.description});\n }\n _.set(item, 'data.client.javascript.plugins', plugins);\n callback(null, item);\n };\n}\n\nfunction addBody(item, options, callback) {\n if (item.stackInfo) {\n if (item.stackInfo.traceChain) {\n addBodyTraceChain(item, options, callback);\n } else {\n addBodyTrace(item, options, callback);\n }\n } else {\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction addBodyMessage(item, options, callback) {\n var message = item.message;\n var custom = item.custom;\n\n if (!message) {\n message = 'Item sent with null or missing arguments.';\n }\n var result = {\n body: message\n };\n\n if (custom) {\n result.extra = _.merge(custom);\n }\n\n _.set(item, 'data.body', {message: result});\n callback(null, item);\n}\n\nfunction stackFromItem(item) {\n // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = item.stackInfo.stack;\n if (stack && stack.length === 0 && item._unhandledStackInfo && item._unhandledStackInfo.stack) {\n stack = item._unhandledStackInfo.stack;\n }\n return stack;\n}\n\nfunction addBodyTraceChain(item, options, callback) {\n var traceChain = item.stackInfo.traceChain;\n var traces = [];\n\n var traceChainLength = traceChain.length;\n for (var i = 0; i < traceChainLength; i++) {\n var trace = buildTrace(item, traceChain[i], options);\n traces.push(trace);\n }\n\n _.set(item, 'data.body', {trace_chain: traces});\n callback(null, item);\n}\n\nfunction addBodyTrace(item, options, callback) {\n var stack = stackFromItem(item);\n\n if (stack) {\n var trace = buildTrace(item, item.stackInfo, options);\n _.set(item, 'data.body', {trace: trace});\n callback(null, item);\n } else {\n var stackInfo = item.stackInfo;\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction buildTrace(item, stackInfo, options) {\n var description = item && item.data.description;\n var custom = item && item.custom;\n var stack = stackFromItem(item);\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n var trace = {\n exception: {\n 'class': className,\n message: message\n }\n };\n\n if (description) {\n trace.exception.description = description;\n }\n\n if (stack) {\n if (stack.length === 0) {\n trace.exception.stack = stackInfo.rawStack;\n trace.exception.raw = String(stackInfo.rawException);\n }\n var stackFrame;\n var frame;\n var code;\n var pre;\n var post;\n var contextLength;\n var i, mid;\n\n trace.frames = [];\n for (i = 0; i < stack.length; ++i) {\n stackFrame = stack[i];\n frame = {\n filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',\n lineno: stackFrame.line || null,\n method: (!stackFrame.func || stackFrame.func === '?') ? '[anonymous]' : stackFrame.func,\n colno: stackFrame.column\n };\n if (options.sendFrameUrl) {\n frame.url = stackFrame.url;\n }\n if (frame.method && frame.method.endsWith && frame.method.endsWith('_rollbar_wrapped')) {\n continue;\n }\n\n code = pre = post = null;\n contextLength = stackFrame.context ? stackFrame.context.length : 0;\n if (contextLength) {\n mid = Math.floor(contextLength / 2);\n pre = stackFrame.context.slice(0, mid);\n code = stackFrame.context[mid];\n post = stackFrame.context.slice(mid);\n }\n\n if (code) {\n frame.code = code;\n }\n\n if (pre || post) {\n frame.context = {};\n if (pre && pre.length) {\n frame.context.pre = pre;\n }\n if (post && post.length) {\n frame.context.post = post;\n }\n }\n\n if (stackFrame.args) {\n frame.args = stackFrame.args;\n }\n\n trace.frames.push(frame);\n }\n\n // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last\n trace.frames.reverse();\n\n if (custom) {\n trace.extra = _.merge(custom);\n }\n }\n\n return trace;\n}\n\nfunction errorClass(stackInfo, guess, options) {\n if (stackInfo.name) {\n return stackInfo.name;\n } else if (options.guessErrorClass) {\n return guess;\n } else {\n return '(unknown)';\n }\n}\n\nfunction addScrubber(scrubFn) {\n return function (item, options, callback) {\n if (scrubFn) {\n var scrubFields = options.scrubFields || [];\n var scrubPaths = options.scrubPaths || [];\n item.data = scrubFn(item.data, scrubFields, scrubPaths);\n }\n callback(null, item);\n }\n}\n\nmodule.exports = {\n handleDomException: handleDomException,\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n addScrubber: addScrubber\n};\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('error-stack-parser', ['stackframe'], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory(require('stackframe'));\n } else {\n root.ErrorStackParser = factory(root.StackFrame);\n }\n}(this, function ErrorStackParser(StackFrame) {\n 'use strict';\n\n var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\\S+:\\d+/;\n var CHROME_IE_STACK_REGEXP = /^\\s*at .*(\\S+:\\d+|\\(native\\))/m;\n var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\\[native code])?$/;\n\n return {\n /**\n * Given an Error object, extract the most information from it.\n *\n * @param {Error} error object\n * @return {Array} of StackFrames\n */\n parse: function ErrorStackParser$$parse(error) {\n if (typeof error.stacktrace !== 'undefined' || typeof error['opera#sourceloc'] !== 'undefined') {\n return this.parseOpera(error);\n } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {\n return this.parseV8OrIE(error);\n } else if (error.stack) {\n return this.parseFFOrSafari(error);\n } else {\n throw new Error('Cannot parse given Error object');\n }\n },\n\n // Separate line and column numbers from a string of the form: (URI:Line:Column)\n extractLocation: function ErrorStackParser$$extractLocation(urlLike) {\n // Fail-fast but return locations like \"(native)\"\n if (urlLike.indexOf(':') === -1) {\n return [urlLike];\n }\n\n var regExp = /(.+?)(?::(\\d+))?(?::(\\d+))?$/;\n var parts = regExp.exec(urlLike.replace(/[()]/g, ''));\n return [parts[1], parts[2] || undefined, parts[3] || undefined];\n },\n\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(CHROME_IE_STACK_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n if (line.indexOf('(eval ') > -1) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n line = line.replace(/eval code/g, 'eval').replace(/(\\(eval at [^()]*)|(\\),.*$)/g, '');\n }\n var sanitizedLine = line.replace(/^\\s+/, '').replace(/\\(eval code/g, '(');\n\n // capture and preseve the parenthesized location \"(/foo/my bar.js:12:87)\" in\n // case it has spaces in it, as the string is split on \\s+ later on\n var location = sanitizedLine.match(/ (\\((.+):(\\d+):(\\d+)\\)$)/);\n\n // remove the parenthesized location from the line, if it was matched\n sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;\n\n var tokens = sanitizedLine.split(/\\s+/).slice(1);\n // if a location was matched, pass it to extractLocation() otherwise pop the last token\n var locationParts = this.extractLocation(location ? location[1] : tokens.pop());\n var functionName = tokens.join(' ') || undefined;\n var fileName = ['eval', ''].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];\n\n return new StackFrame({\n functionName: functionName,\n fileName: fileName,\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n },\n\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n if (line.indexOf(' > eval') > -1) {\n line = line.replace(/ line (\\d+)(?: > eval line \\d+)* > eval:\\d+:\\d+/g, ':$1');\n }\n\n if (line.indexOf('@') === -1 && line.indexOf(':') === -1) {\n // Safari eval frames only have function names and nothing else\n return new StackFrame({\n functionName: line\n });\n } else {\n var functionNameRegex = /((.*\".+\"[^@]*)?[^@]*)(?:@)/;\n var matches = line.match(functionNameRegex);\n var functionName = matches && matches[1] ? matches[1] : undefined;\n var locationParts = this.extractLocation(line.replace(functionNameRegex, ''));\n\n return new StackFrame({\n functionName: functionName,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }\n }, this);\n },\n\n parseOpera: function ErrorStackParser$$parseOpera(e) {\n if (!e.stacktrace || (e.message.indexOf('\\n') > -1 &&\n e.message.split('\\n').length > e.stacktrace.split('\\n').length)) {\n return this.parseOpera9(e);\n } else if (!e.stack) {\n return this.parseOpera10(e);\n } else {\n return this.parseOpera11(e);\n }\n },\n\n parseOpera9: function ErrorStackParser$$parseOpera9(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)/i;\n var lines = e.message.split('\\n');\n var result = [];\n\n for (var i = 2, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(new StackFrame({\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n }));\n }\n }\n\n return result;\n },\n\n parseOpera10: function ErrorStackParser$$parseOpera10(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)(?:: In function (\\S+))?$/i;\n var lines = e.stacktrace.split('\\n');\n var result = [];\n\n for (var i = 0, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(\n new StackFrame({\n functionName: match[3] || undefined,\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n })\n );\n }\n }\n\n return result;\n },\n\n // Opera 10.65+ Error.stack very similar to FF/Safari\n parseOpera11: function ErrorStackParser$$parseOpera11(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);\n }, this);\n\n return filtered.map(function(line) {\n var tokens = line.split('@');\n var locationParts = this.extractLocation(tokens.pop());\n var functionCall = (tokens.shift() || '');\n var functionName = functionCall\n .replace(//, '$2')\n .replace(/\\([^)]*\\)/g, '') || undefined;\n var argsRaw;\n if (functionCall.match(/\\(([^)]*)\\)/)) {\n argsRaw = functionCall.replace(/^[^(]+\\(([^)]*)\\)$/, '$1');\n }\n var args = (argsRaw === undefined || argsRaw === '[arguments not available]') ?\n undefined : argsRaw.split(',');\n\n return new StackFrame({\n functionName: functionName,\n args: args,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n }\n };\n}));\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('stackframe', [], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.StackFrame = factory();\n }\n}(this, function() {\n 'use strict';\n function _isNumber(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n }\n\n function _capitalize(str) {\n return str.charAt(0).toUpperCase() + str.substring(1);\n }\n\n function _getter(p) {\n return function() {\n return this[p];\n };\n }\n\n var booleanProps = ['isConstructor', 'isEval', 'isNative', 'isToplevel'];\n var numericProps = ['columnNumber', 'lineNumber'];\n var stringProps = ['fileName', 'functionName', 'source'];\n var arrayProps = ['args'];\n var objectProps = ['evalOrigin'];\n\n var props = booleanProps.concat(numericProps, stringProps, arrayProps, objectProps);\n\n function StackFrame(obj) {\n if (!obj) return;\n for (var i = 0; i < props.length; i++) {\n if (obj[props[i]] !== undefined) {\n this['set' + _capitalize(props[i])](obj[props[i]]);\n }\n }\n }\n\n StackFrame.prototype = {\n getArgs: function() {\n return this.args;\n },\n setArgs: function(v) {\n if (Object.prototype.toString.call(v) !== '[object Array]') {\n throw new TypeError('Args must be an Array');\n }\n this.args = v;\n },\n\n getEvalOrigin: function() {\n return this.evalOrigin;\n },\n setEvalOrigin: function(v) {\n if (v instanceof StackFrame) {\n this.evalOrigin = v;\n } else if (v instanceof Object) {\n this.evalOrigin = new StackFrame(v);\n } else {\n throw new TypeError('Eval Origin must be an Object or StackFrame');\n }\n },\n\n toString: function() {\n var fileName = this.getFileName() || '';\n var lineNumber = this.getLineNumber() || '';\n var columnNumber = this.getColumnNumber() || '';\n var functionName = this.getFunctionName() || '';\n if (this.getIsEval()) {\n if (fileName) {\n return '[eval] (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return '[eval]:' + lineNumber + ':' + columnNumber;\n }\n if (functionName) {\n return functionName + ' (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return fileName + ':' + lineNumber + ':' + columnNumber;\n }\n };\n\n StackFrame.fromString = function StackFrame$$fromString(str) {\n var argsStartIndex = str.indexOf('(');\n var argsEndIndex = str.lastIndexOf(')');\n\n var functionName = str.substring(0, argsStartIndex);\n var args = str.substring(argsStartIndex + 1, argsEndIndex).split(',');\n var locationString = str.substring(argsEndIndex + 1);\n\n if (locationString.indexOf('@') === 0) {\n var parts = /@(.+?)(?::(\\d+))?(?::(\\d+))?$/.exec(locationString, '');\n var fileName = parts[1];\n var lineNumber = parts[2];\n var columnNumber = parts[3];\n }\n\n return new StackFrame({\n functionName: functionName,\n args: args || undefined,\n fileName: fileName,\n lineNumber: lineNumber || undefined,\n columnNumber: columnNumber || undefined\n });\n };\n\n for (var i = 0; i < booleanProps.length; i++) {\n StackFrame.prototype['get' + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);\n StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function(p) {\n return function(v) {\n this[p] = Boolean(v);\n };\n })(booleanProps[i]);\n }\n\n for (var j = 0; j < numericProps.length; j++) {\n StackFrame.prototype['get' + _capitalize(numericProps[j])] = _getter(numericProps[j]);\n StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function(p) {\n return function(v) {\n if (!_isNumber(v)) {\n throw new TypeError(p + ' must be a Number');\n }\n this[p] = Number(v);\n };\n })(numericProps[j]);\n }\n\n for (var k = 0; k < stringProps.length; k++) {\n StackFrame.prototype['get' + _capitalize(stringProps[k])] = _getter(stringProps[k]);\n StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function(p) {\n return function(v) {\n this[p] = String(v);\n };\n })(stringProps[k]);\n }\n\n return StackFrame;\n}));\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction itemToPayload(item, options, callback) {\n var payloadOptions = options.payload || {};\n if (payloadOptions.body) {\n delete payloadOptions.body;\n }\n\n var data = _.merge(item.data, payloadOptions);\n if (item._isUncaught) {\n data._isUncaught = true;\n }\n if (item._originalArgs) {\n data._originalArgs = item._originalArgs;\n }\n callback(null, data);\n}\n\nfunction addTelemetryData(item, options, callback) {\n if (item.telemetryEvents) {\n _.set(item, 'data.body.telemetry', item.telemetryEvents);\n }\n callback(null, item);\n}\n\nfunction addMessageWithError(item, options, callback) {\n if (!item.message) {\n callback(null, item);\n return;\n }\n var tracePath = 'data.body.trace_chain.0';\n var trace = _.get(item, tracePath);\n if (!trace) {\n tracePath = 'data.body.trace';\n trace = _.get(item, tracePath);\n }\n if (trace) {\n if (!(trace.exception && trace.exception.description)) {\n _.set(item, tracePath+'.exception.description', item.message);\n callback(null, item);\n return;\n }\n var extra = _.get(item, tracePath+'.extra') || {};\n var newExtra = _.merge(extra, {message: item.message});\n _.set(item, tracePath+'.extra', newExtra);\n }\n callback(null, item);\n}\n\nfunction userTransform(logger) {\n return function(item, options, callback) {\n var newItem = _.merge(item);\n var response = null;\n try {\n if (_.isFunction(options.transform)) {\n response = options.transform(newItem.data, item);\n }\n } catch (e) {\n options.transform = null;\n logger.error('Error while calling custom transform() function. Removing custom transform().', e);\n callback(null, item);\n return;\n }\n if(_.isPromise(response)) {\n response.then(function (promisedItem) {\n if(promisedItem) {\n newItem.data = promisedItem;\n }\n callback(null, newItem);\n }, function (error) {\n callback(error, item);\n });\n } else {\n callback(null, newItem);\n }\n }\n}\n\nfunction addConfigToPayload(item, options, callback) {\n if (!options.sendConfig) {\n return callback(null, item);\n }\n var configKey = '_rollbarConfig';\n var custom = _.get(item, 'data.custom') || {};\n custom[configKey] = options;\n item.data.custom = custom;\n callback(null, item);\n}\n\nfunction addFunctionOption(options, name) {\n if(_.isFunction(options[name])) {\n options[name] = options[name].toString();\n }\n}\n\nfunction addConfiguredOptions(item, options, callback) {\n var configuredOptions = options._configuredOptions;\n\n // These must be stringified or they'll get dropped during serialization.\n addFunctionOption(configuredOptions, 'transform');\n addFunctionOption(configuredOptions, 'checkIgnore');\n addFunctionOption(configuredOptions, 'onSendCallback');\n\n delete configuredOptions.accessToken;\n item.data.notifier.configured_options = configuredOptions;\n callback(null, item);\n}\n\nfunction addDiagnosticKeys(item, options, callback) {\n var diagnostic = _.merge(item.notifier.client.notifier.diagnostic, item.diagnostic);\n\n if (_.get(item, 'err._isAnonymous')) {\n diagnostic.is_anonymous = true;\n }\n\n if (item._isUncaught) {\n diagnostic.is_uncaught = item._isUncaught;\n }\n\n if (item.err) {\n try {\n diagnostic.raw_error = {\n message: item.err.message,\n name: item.err.name,\n constructor_name: item.err.constructor && item.err.constructor.name,\n filename: item.err.fileName,\n line: item.err.lineNumber,\n column: item.err.columnNumber,\n stack: item.err.stack\n };\n } catch (e) {\n diagnostic.raw_error = { failed: String(e) };\n }\n }\n\n item.data.notifier.diagnostic = _.merge(item.data.notifier.diagnostic, diagnostic);\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError,\n userTransform: userTransform,\n addConfigToPayload: addConfigToPayload,\n addConfiguredOptions: addConfiguredOptions,\n addDiagnosticKeys: addDiagnosticKeys\n};\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction checkIgnore(item, settings) {\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore\n};\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction checkLevel(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = settings.reportLevel;\n var reportLevelVal = _.LEVELS[reportLevel] || 0;\n\n if (levelVal < reportLevelVal) {\n return false;\n }\n return true;\n}\n\nfunction userCheckIgnore(logger) {\n return function(item, settings) {\n var isUncaught = !!item._isUncaught;\n delete item._isUncaught;\n var args = item._originalArgs;\n delete item._originalArgs;\n try {\n if (_.isFunction(settings.onSendCallback)) {\n settings.onSendCallback(isUncaught, args, item);\n }\n } catch (e) {\n settings.onSendCallback = null;\n logger.error('Error while calling onSendCallback, removing', e);\n }\n try {\n if (_.isFunction(settings.checkIgnore) && settings.checkIgnore(isUncaught, args, item)) {\n return false;\n }\n } catch (e) {\n settings.checkIgnore = null;\n logger.error('Error while calling custom checkIgnore(), removing', e);\n }\n return true;\n }\n}\n\nfunction urlIsNotBlockListed(logger) {\n return function(item, settings) {\n return !urlIsOnAList(item, settings, 'blocklist', logger);\n }\n}\n\nfunction urlIsSafeListed(logger) {\n return function(item, settings) {\n return urlIsOnAList(item, settings, 'safelist', logger);\n }\n}\n\nfunction matchFrames(trace, list, block) {\n if (!trace) { return !block }\n\n var frames = trace.frames;\n\n if (!frames || frames.length === 0) { return !block; }\n\n var frame, filename, url, urlRegex;\n var listLength = list.length;\n var frameLength = frames.length;\n for (var i = 0; i < frameLength; i++) {\n frame = frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) { return !block; }\n\n for (var j = 0; j < listLength; j++) {\n url = list[j];\n urlRegex = new RegExp(url);\n\n if (urlRegex.test(filename)) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction urlIsOnAList(item, settings, safeOrBlock, logger) {\n // safelist is the default\n var block = false;\n if (safeOrBlock === 'blocklist') {\n block = true;\n }\n\n var list, traces;\n try {\n list = block ? settings.hostBlockList : settings.hostSafeList;\n traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];\n\n // These two checks are important to come first as they are defaults\n // in case the list is missing or the trace is missing or not well-formed\n if (!list || list.length === 0) {\n return !block;\n }\n if (traces.length === 0 || !traces[0]) {\n return !block;\n }\n\n var tracesLength = traces.length;\n for (var i = 0; i < tracesLength; i++) {\n if(matchFrames(traces[i], list, block)) {\n return true;\n }\n }\n } catch (e)\n /* istanbul ignore next */\n {\n if (block) {\n settings.hostBlockList = null;\n } else {\n settings.hostSafeList = null;\n }\n var listName = block ? 'hostBlockList' : 'hostSafeList';\n logger.error('Error while reading your configuration\\'s ' + listName + ' option. Removing custom ' + listName + '.', e);\n return !block;\n }\n return false;\n}\n\nfunction messageIsIgnored(logger) {\n return function(item, settings) {\n var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n messages = messagesFromItem(item);\n\n if (messages.length === 0){\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n\n for (j = 0; j < messages.length; j++) {\n messageIsIgnored = rIgnoredMessage.test(messages[j]);\n\n if (messageIsIgnored) {\n return false;\n }\n }\n }\n } catch(e)\n /* istanbul ignore next */\n {\n settings.ignoredMessages = null;\n logger.error('Error while reading your configuration\\'s ignoredMessages option. Removing custom ignoredMessages.');\n }\n\n return true;\n }\n}\n\nfunction messagesFromItem(item) {\n var body = item.body;\n var messages = [];\n\n // The payload schema only allows one of trace_chain, message, or trace.\n // However, existing test cases are based on having both trace and message present.\n // So here we preserve the ability to collect strings from any combination of these keys.\n if (body.trace_chain) {\n var traceChain = body.trace_chain;\n for (var i = 0; i < traceChain.length; i++) {\n var trace = traceChain[i];\n messages.push(_.get(trace, 'exception.message'));\n }\n }\n if (body.trace) {\n messages.push(_.get(body, 'trace.exception.message'));\n }\n if (body.message) {\n messages.push(_.get(body, 'message.body'));\n }\n return messages;\n}\n\nmodule.exports = {\n checkLevel: checkLevel,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlockListed: urlIsNotBlockListed,\n urlIsSafeListed: urlIsSafeListed,\n messageIsIgnored: messageIsIgnored\n};\n","'use strict';\n\nmodule.exports = {\n version: '2.24.1',\n endpoint: 'api.rollbar.com/api/1/item/',\n logLevel: 'debug',\n reportLevel: 'debug',\n uncaughtErrorLevel: 'error',\n maxItems: 0,\n itemsPerMin: 60\n}\n","'use strict';\n\nmodule.exports = {\n scrubFields: [\n 'pw',\n 'pass',\n 'passwd',\n 'password',\n 'secret',\n 'confirm_password',\n 'confirmPassword',\n 'password_confirmation',\n 'passwordConfirmation',\n 'access_token',\n 'accessToken',\n 'X-Rollbar-Access-Token',\n 'secret_key',\n 'secretKey',\n 'secretToken',\n 'cc-number',\n 'card number',\n 'cardnumber',\n 'cardnum',\n 'ccnum',\n 'ccnumber',\n 'cc num',\n 'creditcardnumber',\n 'credit card number',\n 'newcreditcardnumber',\n 'new credit card',\n 'creditcardno',\n 'credit card no',\n 'card#',\n 'card #',\n 'cc-csc',\n 'cvc',\n 'cvc2',\n 'cvv2',\n 'ccv2',\n 'security code',\n 'card verification',\n 'name on credit card',\n 'name on card',\n 'nameoncard',\n 'cardholder',\n 'card holder',\n 'name des karteninhabers',\n 'ccname',\n 'card type',\n 'cardtype',\n 'cc type',\n 'cctype',\n 'payment type',\n 'expiration date',\n 'expirationdate',\n 'expdate',\n 'cc-exp',\n 'ccmonth',\n 'ccyear'\n ]\n}\n","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.merge(options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n}\n\nTelemeter.prototype.configure = function(options) {\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n var deleteCount = 0;\n if (this.maxQueueSize > newMaxEvents) {\n deleteCount = this.maxQueueSize - newMaxEvents;\n }\n this.maxQueueSize = newMaxEvents;\n this.queue.splice(0, deleteCount);\n};\n\nTelemeter.prototype.copyEvents = function() {\n var events = Array.prototype.slice.call(this.queue, 0);\n if (_.isFunction(this.options.filterTelemetry)) {\n try {\n var i = events.length;\n while (i--) {\n if (this.options.filterTelemetry(events[i])) {\n events.splice(i, 1);\n }\n }\n } catch (e) {\n this.options.filterTelemetry = null;\n }\n }\n return events;\n};\n\nTelemeter.prototype.capture = function(type, metadata, level, rollbarUUID, timestamp) {\n var e = {\n level: getLevel(type, level),\n type: type,\n timestamp_ms: timestamp || _.now(),\n body: metadata,\n source: 'client'\n };\n if (rollbarUUID) {\n e.uuid = rollbarUUID;\n }\n\n try {\n if (_.isFunction(this.options.filterTelemetry) && this.options.filterTelemetry(e)) {\n return false;\n }\n } catch (exc) {\n this.options.filterTelemetry = null;\n }\n\n this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function(type, metadata, level, rollbarUUID) {\n return this.capture(type, metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.captureError = function(err, level, rollbarUUID, timestamp) {\n var metadata = {\n message: err.message || String(err)\n };\n if (err.stack) {\n metadata.stack = err.stack;\n }\n return this.capture('error', metadata, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureLog = function(message, level, rollbarUUID, timestamp) {\n return this.capture('log', {\n message: message\n }, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID, requestData) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\n if (requestData) {\n metadata.request = requestData;\n }\n var level = this.levelFromStatus(metadata.status_code);\n return this.capture('network', metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.levelFromStatus = function(statusCode) {\n if (statusCode >= 200 && statusCode < 400) {\n return 'info';\n }\n if (statusCode === 0 || statusCode >= 400) {\n return 'error';\n }\n return 'info';\n};\n\nTelemeter.prototype.captureDom = function(subtype, element, value, checked, rollbarUUID) {\n var metadata = {\n subtype: subtype,\n element: element\n };\n if (value !== undefined) {\n metadata.value = value;\n }\n if (checked !== undefined) {\n metadata.checked = checked;\n }\n return this.capture('dom', metadata, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureNavigation = function(from, to, rollbarUUID) {\n return this.capture('navigation', {from: from, to: to}, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureDomContentLoaded = function(ts) {\n return this.capture('navigation', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n */\n};\nTelemeter.prototype.captureLoad = function(ts) {\n return this.capture('navigation', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n */\n};\n\nTelemeter.prototype.captureConnectivityChange = function(type, rollbarUUID) {\n return this.captureNetwork({change: type}, 'connectivity', rollbarUUID);\n};\n\n// Only intended to be used internally by the notifier\nTelemeter.prototype._captureRollbarItem = function(item) {\n if (!this.options.includeItemsInTelemetry) {\n return;\n }\n if (item.err) {\n return this.captureError(item.err, item.level, item.uuid, item.timestamp);\n }\n if (item.message) {\n return this.captureLog(item.message, item.level, item.uuid, item.timestamp);\n }\n if (item.custom) {\n return this.capture('log', item.custom, item.level, item.uuid, item.timestamp);\n }\n};\n\nTelemeter.prototype.push = function(e) {\n this.queue.push(e);\n if (this.queue.length > this.maxQueueSize) {\n this.queue.shift();\n }\n};\n\nfunction getLevel(type, level) {\n if (level) {\n return level;\n }\n var defaultLevel = {\n error: 'error',\n manual: 'info'\n };\n return defaultLevel[type] || 'info';\n}\n\nmodule.exports = Telemeter;\n","'use strict';\n\nvar _ = require('../utility');\nvar scrub = require('../scrub');\nvar urlparser = require('./url');\nvar domUtil = require('./domUtility');\n\nvar defaults = {\n network: true,\n networkResponseHeaders: false,\n networkResponseBody: false,\n networkRequestHeaders: false,\n networkRequestBody: false,\n networkErrorOnHttp5xx: false,\n networkErrorOnHttp4xx: false,\n networkErrorOnHttp0: false,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true,\n contentSecurityPolicy: true,\n errorOnContentSecurityPolicy: false\n};\n\nfunction replace(obj, name, replacement, replacements, type) {\n var orig = obj[name];\n obj[name] = replacement(orig);\n if (replacements) {\n replacements[type].push([obj, name, orig]);\n }\n}\n\nfunction restore(replacements, type) {\n var b;\n while (replacements[type].length) {\n b = replacements[type].shift();\n b[0][b[1]] = b[2];\n }\n}\n\nfunction nameFromDescription(description) {\n if (!description || !description.attributes) { return null; }\n var attrs = description.attributes;\n for (var a = 0; a < attrs.length; ++a) {\n if (attrs[a].key === 'name') {\n return attrs[a].value;\n }\n }\n return null;\n}\n\nfunction defaultValueScrubber(scrubFields) {\n var patterns = [];\n for (var i = 0; i < scrubFields.length; ++i) {\n patterns.push(new RegExp(scrubFields[i], 'i'));\n }\n return function(description) {\n var name = nameFromDescription(description);\n if (!name) { return false; }\n for (var i = 0; i < patterns.length; ++i) {\n if (patterns[i].test(name)) {\n return true;\n }\n }\n return false;\n };\n}\n\nfunction Instrumenter(options, telemeter, rollbar, _window, _document) {\n this.options = options;\n var autoInstrument = options.autoInstrument;\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);\n this.telemeter = telemeter;\n this.rollbar = rollbar;\n this.diagnostic = rollbar.client.notifier.diagnostic;\n this._window = _window || {};\n this._document = _document || {};\n this.replacements = {\n network: [],\n log: [],\n navigation: [],\n connectivity: []\n };\n this.eventRemovers = {\n dom: [],\n connectivity: [],\n contentsecuritypolicy: []\n };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function(options) {\n this.options = _.merge(this.options, options);\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.merge(this.autoInstrument);\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n if (options.scrubTelemetryInputs !== undefined) {\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n }\n if (options.telemetryScrubber !== undefined) {\n this.telemetryScrubber = options.telemetryScrubber;\n }\n};\n\n// eslint-disable-next-line complexity\nInstrumenter.prototype.instrument = function(oldSettings) {\n if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {\n this.instrumentNetwork();\n } else if (!this.autoInstrument.network && oldSettings && oldSettings.network) {\n this.deinstrumentNetwork();\n }\n\n if (this.autoInstrument.log && !(oldSettings && oldSettings.log)) {\n this.instrumentConsole();\n } else if (!this.autoInstrument.log && oldSettings && oldSettings.log) {\n this.deinstrumentConsole();\n }\n\n if (this.autoInstrument.dom && !(oldSettings && oldSettings.dom)) {\n this.instrumentDom();\n } else if (!this.autoInstrument.dom && oldSettings && oldSettings.dom) {\n this.deinstrumentDom();\n }\n\n if (this.autoInstrument.navigation && !(oldSettings && oldSettings.navigation)) {\n this.instrumentNavigation();\n } else if (!this.autoInstrument.navigation && oldSettings && oldSettings.navigation) {\n this.deinstrumentNavigation();\n }\n\n if (this.autoInstrument.connectivity && !(oldSettings && oldSettings.connectivity)) {\n this.instrumentConnectivity();\n } else if (!this.autoInstrument.connectivity && oldSettings && oldSettings.connectivity) {\n this.deinstrumentConnectivity();\n }\n\n if (this.autoInstrument.contentSecurityPolicy && !(oldSettings && oldSettings.contentSecurityPolicy)) {\n this.instrumentContentSecurityPolicy();\n } else if (!this.autoInstrument.contentSecurityPolicy && oldSettings && oldSettings.contentSecurityPolicy) {\n this.deinstrumentContentSecurityPolicy();\n }\n};\n\nInstrumenter.prototype.deinstrumentNetwork = function() {\n restore(this.replacements, 'network');\n};\n\nInstrumenter.prototype.instrumentNetwork = function() {\n var self = this;\n\n function wrapProp(prop, xhr) {\n if (prop in xhr && _.isFunction(xhr[prop])) {\n replace(xhr, prop, function(orig) {\n return self.rollbar.wrap(orig);\n });\n }\n }\n\n if ('XMLHttpRequest' in this._window) {\n var xhrp = this._window.XMLHttpRequest.prototype;\n replace(xhrp, 'open', function(orig) {\n return function(method, url) {\n if (_.isType(url, 'string')) {\n if (this.__rollbar_xhr) {\n this.__rollbar_xhr.method = method;\n this.__rollbar_xhr.url = url;\n this.__rollbar_xhr.status_code = null;\n this.__rollbar_xhr.start_time_ms = _.now();\n this.__rollbar_xhr.end_time_ms = null;\n } else {\n this.__rollbar_xhr = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'setRequestHeader', function(orig) {\n return function(header, value) {\n // If xhr.open is async, __rollbar_xhr may not be initialized yet.\n if (!this.__rollbar_xhr) {\n this.__rollbar_xhr = {};\n }\n if (_.isType(header, 'string') && _.isType(value, 'string')) {\n if (self.autoInstrument.networkRequestHeaders) {\n if (!this.__rollbar_xhr.request_headers) {\n this.__rollbar_xhr.request_headers = {};\n }\n this.__rollbar_xhr.request_headers[header] = value;\n }\n // We want the content type even if request header telemetry is off.\n if (header.toLowerCase() === 'content-type') {\n this.__rollbar_xhr.request_content_type = value;\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'send', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(data) {\n /* eslint-enable no-unused-vars */\n var xhr = this;\n\n function onreadystatechangeHandler() {\n if (xhr.__rollbar_xhr) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n if (self.autoInstrument.networkRequestBody) {\n xhr.__rollbar_xhr.request = data;\n }\n xhr.__rollbar_event = self.captureNetwork(xhr.__rollbar_xhr, 'xhr', undefined);\n }\n if (xhr.readyState < 2) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n }\n if (xhr.readyState > 3) {\n xhr.__rollbar_xhr.end_time_ms = _.now();\n\n var headers = null;\n xhr.__rollbar_xhr.response_content_type = xhr.getResponseHeader('Content-Type');\n if (self.autoInstrument.networkResponseHeaders) {\n var headersConfig = self.autoInstrument.networkResponseHeaders;\n headers = {};\n try {\n var header, i;\n if (headersConfig === true) {\n var allHeaders = xhr.getAllResponseHeaders();\n if (allHeaders) {\n var arr = allHeaders.trim().split(/[\\r\\n]+/);\n var parts, value;\n for (i=0; i < arr.length; i++) {\n parts = arr[i].split(': ');\n header = parts.shift();\n value = parts.join(': ');\n headers[header] = value;\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n header = headersConfig[i];\n headers[header] = xhr.getResponseHeader(header);\n }\n }\n } catch (e) {\n /* we ignore the errors here that could come from different\n * browser issues with the xhr methods */\n }\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n try {\n body = xhr.responseText;\n } catch (e) {\n /* ignore errors from reading responseText */\n }\n }\n var response = null;\n if (body || headers) {\n response = {};\n if (body) {\n if (self.isJsonContentType(xhr.__rollbar_xhr.response_content_type)) {\n response.body = self.scrubJson(body);\n } else {\n response.body = body;\n }\n }\n if (headers) {\n response.headers = headers;\n }\n }\n if (response) {\n xhr.__rollbar_xhr.response = response;\n }\n try {\n var code = xhr.status;\n code = code === 1223 ? 204 : code;\n xhr.__rollbar_xhr.status_code = code;\n xhr.__rollbar_event.level = self.telemeter.levelFromStatus(code);\n self.errorOnHttpStatus(xhr.__rollbar_xhr);\n } catch (e) {\n /* ignore possible exception from xhr.status */\n }\n }\n }\n }\n\n wrapProp('onload', xhr);\n wrapProp('onerror', xhr);\n wrapProp('onprogress', xhr);\n\n if ('onreadystatechange' in xhr && _.isFunction(xhr.onreadystatechange)) {\n replace(xhr, 'onreadystatechange', function(orig) {\n return self.rollbar.wrap(orig, undefined, onreadystatechangeHandler);\n });\n } else {\n xhr.onreadystatechange = onreadystatechangeHandler;\n }\n if (xhr.__rollbar_xhr && self.trackHttpErrors()) {\n xhr.__rollbar_xhr.stack = (new Error()).stack;\n }\n return orig.apply(this, arguments);\n }\n }, this.replacements, 'network');\n }\n\n if ('fetch' in this._window) {\n replace(this._window, 'fetch', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(fn, t) {\n /* eslint-enable no-unused-vars */\n var args = new Array(arguments.length);\n for (var i=0, len=args.length; i < len; i++) {\n args[i] = arguments[i];\n }\n var input = args[0];\n var method = 'GET';\n var url;\n if (_.isType(input, 'string')) {\n url = input;\n } else if (input) {\n url = input.url;\n if (input.method) {\n method = input.method;\n }\n }\n if (args[1] && args[1].method) {\n method = args[1].method;\n }\n var metadata = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n if (args[1] && args[1].headers) {\n // Argument may be a Headers object, or plain object. Ensure here that\n // we are working with a Headers object with case-insensitive keys.\n var reqHeaders = new Headers(args[1].headers);\n\n metadata.request_content_type = reqHeaders.get('Content-Type');\n\n if (self.autoInstrument.networkRequestHeaders) {\n metadata.request_headers = self.fetchHeaders(reqHeaders, self.autoInstrument.networkRequestHeaders)\n }\n }\n\n if (self.autoInstrument.networkRequestBody) {\n if (args[1] && args[1].body) {\n metadata.request = args[1].body;\n } else if (args[0] && !_.isType(args[0], 'string') && args[0].body) {\n metadata.request = args[0].body;\n }\n }\n self.captureNetwork(metadata, 'fetch', undefined);\n if (self.trackHttpErrors()) {\n metadata.stack = (new Error()).stack;\n }\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n metadata.response_content_type = resp.headers.get('Content-Type');\n var headers = null;\n if (self.autoInstrument.networkResponseHeaders) {\n headers = self.fetchHeaders(resp.headers, self.autoInstrument.networkResponseHeaders);\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n if (typeof resp.text === 'function') { // Response.text() is not implemented on some platforms\n // The response must be cloned to prevent reading (and locking) the original stream.\n body = resp.clone().text(); //returns a Promise\n }\n }\n if (headers || body) {\n metadata.response = {};\n if (body) {\n // Test to ensure body is a Promise, which it should always be.\n if (typeof body.then === 'function') {\n body.then(function (text) {\n if (self.isJsonContentType(metadata.response_content_type)) {\n metadata.response.body = self.scrubJson(text);\n }\n });\n } else {\n metadata.response.body = body;\n }\n }\n if (headers) {\n metadata.response.headers = headers;\n }\n }\n self.errorOnHttpStatus(metadata);\n return resp;\n });\n };\n }, this.replacements, 'network');\n }\n};\n\nInstrumenter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID) {\n if (metadata.request && this.isJsonContentType(metadata.request_content_type)) {\n metadata.request = this.scrubJson(metadata.request);\n }\n return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);\n};\n\nInstrumenter.prototype.isJsonContentType = function(contentType) {\n return (contentType && _.isType(contentType, 'string') && contentType.toLowerCase().includes('json')) ? true : false;\n}\n\nInstrumenter.prototype.scrubJson = function(json) {\n return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));\n}\n\nInstrumenter.prototype.fetchHeaders = function(inHeaders, headersConfig) {\n var outHeaders = {};\n try {\n var i;\n if (headersConfig === true) {\n if (typeof inHeaders.entries === 'function') { // Headers.entries() is not implemented in IE\n var allHeaders = inHeaders.entries();\n var currentHeader = allHeaders.next();\n while (!currentHeader.done) {\n outHeaders[currentHeader.value[0]] = currentHeader.value[1];\n currentHeader = allHeaders.next();\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n var header = headersConfig[i];\n outHeaders[header] = inHeaders.get(header);\n }\n }\n } catch (e) {\n /* ignore probable IE errors */\n }\n return outHeaders;\n}\n\nInstrumenter.prototype.trackHttpErrors = function() {\n return this.autoInstrument.networkErrorOnHttp5xx ||\n this.autoInstrument.networkErrorOnHttp4xx ||\n this.autoInstrument.networkErrorOnHttp0;\n}\n\nInstrumenter.prototype.errorOnHttpStatus = function(metadata) {\n var status = metadata.status_code;\n\n if ((status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||\n (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||\n (status === 0 && this.autoInstrument.networkErrorOnHttp0)) {\n var error = new Error('HTTP request failed with Status ' + status);\n error.stack = metadata.stack;\n this.rollbar.error(error, { skipFrames: 1 });\n }\n}\n\nInstrumenter.prototype.deinstrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n var b;\n while (this.replacements['log'].length) {\n b = this.replacements['log'].shift();\n this._window.console[b[0]] = b[1];\n }\n};\n\nInstrumenter.prototype.instrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n\n var self = this;\n var c = this._window.console;\n\n function wrapConsole(method) {\n 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778\n\n var orig = c[method];\n var origConsole = c;\n var level = method === 'warn' ? 'warning' : method;\n c[method] = function() {\n var args = Array.prototype.slice.call(arguments);\n var message = _.formatArgsAsString(args);\n self.telemeter.captureLog(message, level);\n if (orig) {\n Function.prototype.apply.call(orig, origConsole, args);\n }\n };\n self.replacements['log'].push([method, orig]);\n }\n var methods = ['debug','info','warn','error','log'];\n try {\n for (var i=0, len=methods.length; i < len; i++) {\n wrapConsole(methods[i]);\n }\n } catch (e) {\n this.diagnostic.instrumentConsole = { error: e.message };\n }\n};\n\nInstrumenter.prototype.deinstrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n this.removeListeners('dom');\n};\n\nInstrumenter.prototype.instrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n var clickHandler = this.handleClick.bind(this);\n var blurHandler = this.handleBlur.bind(this);\n this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);\n this.addListener('dom', this._window, 'blur', 'onfocusout', blurHandler, true);\n};\n\nInstrumenter.prototype.handleClick = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n var hasTag = e && e.tagName;\n var anchorOrButton = domUtil.isDescribedElement(e, 'a') || domUtil.isDescribedElement(e, 'button');\n if (hasTag && (anchorOrButton || domUtil.isDescribedElement(e, 'input', ['button', 'submit']))) {\n this.captureDomEvent('click', e);\n } else if (domUtil.isDescribedElement(e, 'input', ['checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value, e.checked);\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleBlur = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n if (e && e.tagName) {\n if (domUtil.isDescribedElement(e, 'textarea')) {\n this.captureDomEvent('input', e, e.value);\n } else if (domUtil.isDescribedElement(e, 'select') && e.options && e.options.length) {\n this.handleSelectInputChanged(e);\n } else if (domUtil.isDescribedElement(e, 'input') && !domUtil.isDescribedElement(e, 'input', ['button', 'submit', 'hidden', 'checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value);\n }\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleSelectInputChanged = function(elem) {\n if (elem.multiple) {\n for (var i = 0; i < elem.options.length; i++) {\n if (elem.options[i].selected) {\n this.captureDomEvent('input', elem, elem.options[i].value);\n }\n }\n } else if (elem.selectedIndex >= 0 && elem.options[elem.selectedIndex]) {\n this.captureDomEvent('input', elem, elem.options[elem.selectedIndex].value);\n }\n};\n\nInstrumenter.prototype.captureDomEvent = function(subtype, element, value, isChecked) {\n if (value !== undefined) {\n if (this.scrubTelemetryInputs || (domUtil.getElementType(element) === 'password')) {\n value = '[scrubbed]';\n } else {\n var description = domUtil.describeElement(element);\n if (this.telemetryScrubber) {\n if (this.telemetryScrubber(description)) {\n value = '[scrubbed]';\n }\n } else if (this.defaultValueScrubber(description)) {\n value = '[scrubbed]';\n }\n }\n }\n var elementString = domUtil.elementArrayToString(domUtil.treeToArray(element));\n this.telemeter.captureDom(subtype, elementString, value, isChecked);\n};\n\nInstrumenter.prototype.deinstrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n restore(this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.instrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n var self = this;\n replace(this._window, 'onpopstate', function(orig) {\n return function() {\n var current = self._location.href;\n self.handleUrlChange(self._lastHref, current);\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n }, this.replacements, 'navigation');\n\n replace(this._window.history, 'pushState', function(orig) {\n return function() {\n var url = arguments.length > 2 ? arguments[2] : undefined;\n if (url) {\n self.handleUrlChange(self._lastHref, url + '');\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.handleUrlChange = function(from, to) {\n var parsedHref = urlparser.parse(this._location.href);\n var parsedTo = urlparser.parse(to);\n var parsedFrom = urlparser.parse(from);\n this._lastHref = to;\n if (parsedHref.protocol === parsedTo.protocol && parsedHref.host === parsedTo.host) {\n to = parsedTo.path + (parsedTo.hash || '');\n }\n if (parsedHref.protocol === parsedFrom.protocol && parsedHref.host === parsedFrom.host) {\n from = parsedFrom.path + (parsedFrom.hash || '');\n }\n this.telemeter.captureNavigation(from, to);\n};\n\nInstrumenter.prototype.deinstrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.removeListeners('connectivity');\n } else {\n restore(this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.instrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.addListener('connectivity', this._window, 'online', undefined, function() {\n this.telemeter.captureConnectivityChange('online');\n }.bind(this), true);\n this.addListener('connectivity', this._window, 'offline', undefined, function() {\n this.telemeter.captureConnectivityChange('offline');\n }.bind(this), true);\n } else {\n var self = this;\n replace(this._document.body, 'ononline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('online');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n replace(this._document.body, 'onoffline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('offline');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.handleCspEvent = function(cspEvent) {\n var message = 'Security Policy Violation: ' +\n 'blockedURI: ' + cspEvent.blockedURI + ', ' +\n 'violatedDirective: ' + cspEvent.violatedDirective + ', ' +\n 'effectiveDirective: ' + cspEvent.effectiveDirective + ', ';\n\n if (cspEvent.sourceFile) {\n message += 'location: ' + cspEvent.sourceFile + ', ' +\n 'line: ' + cspEvent.lineNumber + ', ' +\n 'col: ' + cspEvent.columnNumber + ', ';\n }\n\n message += 'originalPolicy: ' + cspEvent.originalPolicy;\n\n this.telemeter.captureLog(message, 'error');\n this.handleCspError(message);\n}\n\nInstrumenter.prototype.handleCspError = function(message) {\n if (this.autoInstrument.errorOnContentSecurityPolicy) {\n this.rollbar.error(message);\n }\n}\n\nInstrumenter.prototype.deinstrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._window)) { return; }\n\n this.removeListeners('contentsecuritypolicy');\n};\n\nInstrumenter.prototype.instrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._window)) { return; }\n\n var cspHandler = this.handleCspEvent.bind(this);\n this.addListener('contentsecuritypolicy', this._window, 'securitypolicyviolation', null, cspHandler, false);\n};\n\nInstrumenter.prototype.addListener = function(section, obj, type, altType, handler, capture) {\n if (obj.addEventListener) {\n obj.addEventListener(type, handler, capture);\n this.eventRemovers[section].push(function() {\n obj.removeEventListener(type, handler, capture);\n });\n } else if (altType) {\n obj.attachEvent(altType, handler);\n this.eventRemovers[section].push(function() {\n obj.detachEvent(altType, handler);\n });\n }\n};\n\nInstrumenter.prototype.removeListeners = function(section) {\n var r;\n while (this.eventRemovers[section].length) {\n r = this.eventRemovers[section].shift();\n r();\n }\n};\n\nmodule.exports = Instrumenter;\n","'use strict';\n\nfunction getElementType(e) {\n return (e.getAttribute('type') || '').toLowerCase();\n}\n\nfunction isDescribedElement(element, type, subtypes) {\n if (element.tagName.toLowerCase() !== type.toLowerCase()) {\n return false;\n }\n if (!subtypes) {\n return true;\n }\n element = getElementType(element);\n for (var i = 0; i < subtypes.length; i++) {\n if (subtypes[i] === element) {\n return true;\n }\n }\n return false;\n}\n\nfunction getElementFromEvent(evt, doc) {\n if (evt.target) {\n return evt.target;\n }\n if (doc && doc.elementFromPoint) {\n return doc.elementFromPoint(evt.clientX, evt.clientY);\n }\n return undefined;\n}\n\nfunction treeToArray(elem) {\n var MAX_HEIGHT = 5;\n var out = [];\n var nextDescription;\n for (var height = 0; elem && height < MAX_HEIGHT; height++) {\n nextDescription = describeElement(elem);\n if (nextDescription.tagName === 'html') {\n break;\n }\n out.unshift(nextDescription);\n elem = elem.parentNode;\n }\n return out;\n}\n\nfunction elementArrayToString(a) {\n var MAX_LENGTH = 80;\n var separator = ' > ', separatorLength = separator.length;\n var out = [], len = 0, nextStr, totalLength;\n\n for (var i = a.length - 1; i >= 0; i--) {\n nextStr = descriptionToString(a[i]);\n totalLength = len + (out.length * separatorLength) + nextStr.length;\n if (i < a.length - 1 && totalLength >= MAX_LENGTH + 3) {\n out.unshift('...');\n break;\n }\n out.unshift(nextStr);\n len += nextStr.length;\n }\n return out.join(separator);\n}\n\nfunction descriptionToString(desc) {\n if (!desc || !desc.tagName) {\n return '';\n }\n var out = [desc.tagName];\n if (desc.id) {\n out.push('#' + desc.id);\n }\n if (desc.classes) {\n out.push('.' + desc.classes.join('.'));\n }\n for (var i = 0; i < desc.attributes.length; i++) {\n out.push('[' + desc.attributes[i].key + '=\"' + desc.attributes[i].value + '\"]');\n }\n\n return out.join('');\n}\n\n/**\n * Input: a dom element\n * Output: null if tagName is falsey or input is falsey, else\n * {\n * tagName: String,\n * id: String | undefined,\n * classes: [String] | undefined,\n * attributes: [\n * {\n * key: OneOf(type, name, title, alt),\n * value: String\n * }\n * ]\n * }\n */\nfunction describeElement(elem) {\n if (!elem || !elem.tagName) {\n return null;\n }\n var out = {}, className, key, attr, i;\n out.tagName = elem.tagName.toLowerCase();\n if (elem.id) {\n out.id = elem.id;\n }\n className = elem.className;\n if (className && (typeof className === 'string')) {\n out.classes = className.split(/\\s+/);\n }\n var attributes = ['type', 'name', 'title', 'alt'];\n out.attributes = [];\n for (i = 0; i < attributes.length; i++) {\n key = attributes[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.attributes.push({key: key, value: attr});\n }\n }\n return out;\n}\n\nmodule.exports = {\n describeElement: describeElement,\n descriptionToString: descriptionToString,\n elementArrayToString: elementArrayToString,\n treeToArray: treeToArray,\n getElementFromEvent: getElementFromEvent,\n isDescribedElement: isDescribedElement,\n getElementType: getElementType\n};\n","'use strict';\n\nvar polyfillJSON = require('../../vendor/JSON-js/json3');\n\nmodule.exports = polyfillJSON;\n","// json3.js\n// 2017-02-21\n// Public Domain.\n// NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.\n// See http://www.JSON.org/js.html\n// This code should be minified before deployment.\n// See http://javascript.crockford.com/jsmin.html\n\n// USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO\n// NOT CONTROL.\n\n// This file creates a global JSON object containing two methods: stringify\n// and parse. This file provides the ES5 JSON capability to ES3 systems.\n// If a project might run on IE8 or earlier, then this file should be included.\n// This file does nothing on ES5 systems.\n\n// JSON.stringify(value, replacer, space)\n// value any JavaScript value, usually an object or array.\n// replacer an optional parameter that determines how object\n// values are stringified for objects. It can be a\n// function or an array of strings.\n// space an optional parameter that specifies the indentation\n// of nested structures. If it is omitted, the text will\n// be packed without extra whitespace. If it is a number,\n// it will specify the number of spaces to indent at each\n// level. If it is a string (such as \"\\t\" or \" \"),\n// it contains the characters used to indent at each level.\n// This method produces a JSON text from a JavaScript value.\n// When an object value is found, if the object contains a toJSON\n// method, its toJSON method will be called and the result will be\n// stringified. A toJSON method does not serialize: it returns the\n// value represented by the name/value pair that should be serialized,\n// or undefined if nothing should be serialized. The toJSON method\n// will be passed the key associated with the value, and this will be\n// bound to the value.\n\n// For example, this would serialize Dates as ISO strings.\n\n// Date.prototype.toJSON = function (key) {\n// function f(n) {\n// // Format integers to have at least two digits.\n// return (n < 10)\n// ? \"0\" + n\n// : n;\n// }\n// return this.getUTCFullYear() + \"-\" +\n// f(this.getUTCMonth() + 1) + \"-\" +\n// f(this.getUTCDate()) + \"T\" +\n// f(this.getUTCHours()) + \":\" +\n// f(this.getUTCMinutes()) + \":\" +\n// f(this.getUTCSeconds()) + \"Z\";\n// };\n\n// You can provide an optional replacer method. It will be passed the\n// key and value of each member, with this bound to the containing\n// object. The value that is returned from your method will be\n// serialized. If your method returns undefined, then the member will\n// be excluded from the serialization.\n\n// If the replacer parameter is an array of strings, then it will be\n// used to select the members to be serialized. It filters the results\n// such that only members with keys listed in the replacer array are\n// stringified.\n\n// Values that do not have JSON representations, such as undefined or\n// functions, will not be serialized. Such values in objects will be\n// dropped; in arrays they will be replaced with null. You can use\n// a replacer function to replace those with JSON values.\n\n// JSON.stringify(undefined) returns undefined.\n\n// The optional space parameter produces a stringification of the\n// value that is filled with line breaks and indentation to make it\n// easier to read.\n\n// If the space parameter is a non-empty string, then that string will\n// be used for indentation. If the space parameter is a number, then\n// the indentation will be that many spaces.\n\n// Example:\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}]);\n// // text is '[\"e\",{\"pluribus\":\"unum\"}]'\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}], null, \"\\t\");\n// // text is '[\\n\\t\"e\",\\n\\t{\\n\\t\\t\"pluribus\": \"unum\"\\n\\t}\\n]'\n\n// text = JSON.stringify([new Date()], function (key, value) {\n// return this[key] instanceof Date\n// ? \"Date(\" + this[key] + \")\"\n// : value;\n// });\n// // text is '[\"Date(---current time---)\"]'\n\n// JSON.parse(text, reviver)\n// This method parses a JSON text to produce an object or array.\n// It can throw a SyntaxError exception.\n// This has been modified to use JSON-js/json_parse_state.js as the\n// parser instead of the one built around eval found in JSON-js/json2.js\n\n// The optional reviver parameter is a function that can filter and\n// transform the results. It receives each of the keys and values,\n// and its return value is used instead of the original value.\n// If it returns what it received, then the structure is not modified.\n// If it returns undefined then the member is deleted.\n\n// Example:\n\n// // Parse the text. Values that look like ISO date strings will\n// // be converted to Date objects.\n\n// myData = JSON.parse(text, function (key, value) {\n// var a;\n// if (typeof value === \"string\") {\n// a =\n// /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2}(?:\\.\\d*)?)Z$/.exec(value);\n// if (a) {\n// return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],\n// +a[5], +a[6]));\n// }\n// }\n// return value;\n// });\n\n// myData = JSON.parse('[\"Date(09/09/2001)\"]', function (key, value) {\n// var d;\n// if (typeof value === \"string\" &&\n// value.slice(0, 5) === \"Date(\" &&\n// value.slice(-1) === \")\") {\n// d = new Date(value.slice(5, -1));\n// if (d) {\n// return d;\n// }\n// }\n// return value;\n// });\n\n// This is a reference implementation. You are free to copy, modify, or\n// redistribute.\n\n/*jslint\n for, this\n */\n\n/*property\n JSON, apply, call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,\n getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,\n lastIndex, length, parse, prototype, push, replace, slice, stringify,\n test, toJSON, toString, valueOf\n */\n\nvar setupCustomJSON = function(JSON) {\n\n var rx_one = /^[\\],:{}\\s]*$/;\n var rx_two = /\\\\(?:[\"\\\\\\/bfnrt]|u[0-9a-fA-F]{4})/g;\n var rx_three = /\"[^\"\\\\\\n\\r]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g;\n var rx_four = /(?:^|:|,)(?:\\s*\\[)+/g;\n var rx_escapable = /[\\\\\"\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n var rx_dangerous = /[\\u0000\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n\n function f(n) {\n // Format integers to have at least two digits.\n return n < 10\n ? \"0\" + n\n : n;\n }\n\n function this_value() {\n return this.valueOf();\n }\n\n if (typeof Date.prototype.toJSON !== \"function\") {\n\n Date.prototype.toJSON = function () {\n\n return isFinite(this.valueOf())\n ? this.getUTCFullYear() + \"-\" +\n f(this.getUTCMonth() + 1) + \"-\" +\n f(this.getUTCDate()) + \"T\" +\n f(this.getUTCHours()) + \":\" +\n f(this.getUTCMinutes()) + \":\" +\n f(this.getUTCSeconds()) + \"Z\"\n : null;\n };\n\n Boolean.prototype.toJSON = this_value;\n Number.prototype.toJSON = this_value;\n String.prototype.toJSON = this_value;\n }\n\n var gap;\n var indent;\n var meta;\n var rep;\n\n\n function quote(string) {\n\n // If the string contains no control characters, no quote characters, and no\n // backslash characters, then we can safely slap some quotes around it.\n // Otherwise we must also replace the offending characters with safe escape\n // sequences.\n\n rx_escapable.lastIndex = 0;\n return rx_escapable.test(string)\n ? \"\\\"\" + string.replace(rx_escapable, function (a) {\n var c = meta[a];\n return typeof c === \"string\"\n ? c\n : \"\\\\u\" + (\"0000\" + a.charCodeAt(0).toString(16)).slice(-4);\n }) + \"\\\"\"\n : \"\\\"\" + string + \"\\\"\";\n }\n\n\n function str(key, holder) {\n\n // Produce a string from holder[key].\n\n var i; // The loop counter.\n var k; // The member key.\n var v; // The member value.\n var length;\n var mind = gap;\n var partial;\n var value = holder[key];\n\n // If the value has a toJSON method, call it to obtain a replacement value.\n\n if (value && typeof value === \"object\" &&\n typeof value.toJSON === \"function\") {\n value = value.toJSON(key);\n }\n\n // If we were called with a replacer function, then call the replacer to\n // obtain a replacement value.\n\n if (typeof rep === \"function\") {\n value = rep.call(holder, key, value);\n }\n\n // What happens next depends on the value's type.\n\n switch (typeof value) {\n case \"string\":\n return quote(value);\n\n case \"number\":\n\n // JSON numbers must be finite. Encode non-finite numbers as null.\n\n return isFinite(value)\n ? String(value)\n : \"null\";\n\n case \"boolean\":\n case \"null\":\n\n // If the value is a boolean or null, convert it to a string. Note:\n // typeof null does not produce \"null\". The case is included here in\n // the remote chance that this gets fixed someday.\n\n return String(value);\n\n // If the type is \"object\", we might be dealing with an object or an array or\n // null.\n\n case \"object\":\n\n // Due to a specification blunder in ECMAScript, typeof null is \"object\",\n // so watch out for that case.\n\n if (!value) {\n return \"null\";\n }\n\n // Make an array to hold the partial results of stringifying this object value.\n\n gap += indent;\n partial = [];\n\n // Is the value an array?\n\n if (Object.prototype.toString.apply(value) === \"[object Array]\") {\n\n // The value is an array. Stringify every element. Use null as a placeholder\n // for non-JSON values.\n\n length = value.length;\n for (i = 0; i < length; i += 1) {\n partial[i] = str(i, value) || \"null\";\n }\n\n // Join all of the elements together, separated with commas, and wrap them in\n // brackets.\n\n v = partial.length === 0\n ? \"[]\"\n : gap\n ? \"[\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"]\"\n : \"[\" + partial.join(\",\") + \"]\";\n gap = mind;\n return v;\n }\n\n // If the replacer is an array, use it to select the members to be stringified.\n\n if (rep && typeof rep === \"object\") {\n length = rep.length;\n for (i = 0; i < length; i += 1) {\n if (typeof rep[i] === \"string\") {\n k = rep[i];\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n } else {\n\n // Otherwise, iterate through all of the keys in the object.\n\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(value, k)) {\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n }\n\n // Join all of the member texts together, separated with commas,\n // and wrap them in braces.\n\n v = partial.length === 0\n ? \"{}\"\n : gap\n ? \"{\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"}\"\n : \"{\" + partial.join(\",\") + \"}\";\n gap = mind;\n return v;\n }\n }\n\n // If the JSON object does not yet have a stringify method, give it one.\n\n if (typeof JSON.stringify !== \"function\") {\n meta = { // table of character substitutions\n \"\\b\": \"\\\\b\",\n \"\\t\": \"\\\\t\",\n \"\\n\": \"\\\\n\",\n \"\\f\": \"\\\\f\",\n \"\\r\": \"\\\\r\",\n \"\\\"\": \"\\\\\\\"\",\n \"\\\\\": \"\\\\\\\\\"\n };\n JSON.stringify = function (value, replacer, space) {\n\n // The stringify method takes a value and an optional replacer, and an optional\n // space parameter, and returns a JSON text. The replacer can be a function\n // that can replace values, or an array of strings that will select the keys.\n // A default replacer method can be provided. Use of the space parameter can\n // produce text that is more easily readable.\n\n var i;\n gap = \"\";\n indent = \"\";\n\n // If the space parameter is a number, make an indent string containing that\n // many spaces.\n\n if (typeof space === \"number\") {\n for (i = 0; i < space; i += 1) {\n indent += \" \";\n }\n\n // If the space parameter is a string, it will be used as the indent string.\n\n } else if (typeof space === \"string\") {\n indent = space;\n }\n\n // If there is a replacer, it must be a function or an array.\n // Otherwise, throw an error.\n\n rep = replacer;\n if (replacer && typeof replacer !== \"function\" &&\n (typeof replacer !== \"object\" ||\n typeof replacer.length !== \"number\")) {\n throw new Error(\"JSON.stringify\");\n }\n\n // Make a fake root object containing our value under the key of \"\".\n // Return the result of stringifying the value.\n\n return str(\"\", {\"\": value});\n };\n }\n\n\n // If the JSON object does not yet have a parse method, give it one.\n\n if (typeof JSON.parse !== \"function\") {\n JSON.parse = (function () {\n\n // This function creates a JSON parse function that uses a state machine rather\n // than the dangerous eval function to parse a JSON text.\n\n var state; // The state of the parser, one of\n // 'go' The starting state\n // 'ok' The final, accepting state\n // 'firstokey' Ready for the first key of the object or\n // the closing of an empty object\n // 'okey' Ready for the next key of the object\n // 'colon' Ready for the colon\n // 'ovalue' Ready for the value half of a key/value pair\n // 'ocomma' Ready for a comma or closing }\n // 'firstavalue' Ready for the first value of an array or\n // an empty array\n // 'avalue' Ready for the next value of an array\n // 'acomma' Ready for a comma or closing ]\n var stack; // The stack, for controlling nesting.\n var container; // The current container object or array\n var key; // The current key\n var value; // The current value\n var escapes = { // Escapement translation table\n \"\\\\\": \"\\\\\",\n \"\\\"\": \"\\\"\",\n \"/\": \"/\",\n \"t\": \"\\t\",\n \"n\": \"\\n\",\n \"r\": \"\\r\",\n \"f\": \"\\f\",\n \"b\": \"\\b\"\n };\n var string = { // The actions for string tokens\n go: function () {\n state = \"ok\";\n },\n firstokey: function () {\n key = value;\n state = \"colon\";\n },\n okey: function () {\n key = value;\n state = \"colon\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var number = { // The actions for number tokens\n go: function () {\n state = \"ok\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var action = {\n\n // The action table describes the behavior of the machine. It contains an\n // object for each token. Each object contains a method that is called when\n // a token is matched in a state. An object will lack a method for illegal\n // states.\n\n \"{\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = {};\n state = \"firstokey\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = {};\n state = \"firstokey\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n }\n },\n \"}\": {\n firstokey: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n ocomma: function () {\n var pop = stack.pop();\n container[key] = value;\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \"[\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = [];\n state = \"firstavalue\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = [];\n state = \"firstavalue\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n }\n },\n \"]\": {\n firstavalue: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n acomma: function () {\n var pop = stack.pop();\n container.push(value);\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \":\": {\n colon: function () {\n if (Object.hasOwnProperty.call(container, key)) {\n throw new SyntaxError(\"Duplicate key '\" + key + \"\\\"\");\n }\n state = \"ovalue\";\n }\n },\n \",\": {\n ocomma: function () {\n container[key] = value;\n state = \"okey\";\n },\n acomma: function () {\n container.push(value);\n state = \"avalue\";\n }\n },\n \"true\": {\n go: function () {\n value = true;\n state = \"ok\";\n },\n ovalue: function () {\n value = true;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = true;\n state = \"acomma\";\n },\n avalue: function () {\n value = true;\n state = \"acomma\";\n }\n },\n \"false\": {\n go: function () {\n value = false;\n state = \"ok\";\n },\n ovalue: function () {\n value = false;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = false;\n state = \"acomma\";\n },\n avalue: function () {\n value = false;\n state = \"acomma\";\n }\n },\n \"null\": {\n go: function () {\n value = null;\n state = \"ok\";\n },\n ovalue: function () {\n value = null;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = null;\n state = \"acomma\";\n },\n avalue: function () {\n value = null;\n state = \"acomma\";\n }\n }\n };\n\n function debackslashify(text) {\n\n // Remove and replace any backslash escapement.\n\n return text.replace(/\\\\(?:u(.{4})|([^u]))/g, function (ignore, b, c) {\n return b\n ? String.fromCharCode(parseInt(b, 16))\n : escapes[c];\n });\n }\n\n return function (source, reviver) {\n\n // A regular expression is used to extract tokens from the JSON text.\n // The extraction process is cautious.\n\n var result;\n var tx = /^[\\u0020\\t\\n\\r]*(?:([,:\\[\\]{}]|true|false|null)|(-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?)|\"((?:[^\\r\\n\\t\\\\\\\"]|\\\\(?:[\"\\\\\\/trnfb]|u[0-9a-fA-F]{4}))*)\")/;\n\n // Set the starting state.\n\n state = \"go\";\n\n // The stack records the container, key, and state for each object or array\n // that contains another object or array while processing nested structures.\n\n stack = [];\n\n // If any error occurs, we will catch it and ultimately throw a syntax error.\n\n try {\n\n // For each token...\n\n while (true) {\n result = tx.exec(source);\n if (!result) {\n break;\n }\n\n // result is the result array from matching the tokenizing regular expression.\n // result[0] contains everything that matched, including any initial whitespace.\n // result[1] contains any punctuation that was matched, or true, false, or null.\n // result[2] contains a matched number, still in string form.\n // result[3] contains a matched string, without quotes but with escapement.\n\n if (result[1]) {\n\n // Token: Execute the action for this state and token.\n\n action[result[1]][state]();\n\n } else if (result[2]) {\n\n // Number token: Convert the number string into a number value and execute\n // the action for this state and number.\n\n value = +result[2];\n number[state]();\n } else {\n\n // String token: Replace the escapement sequences and execute the action for\n // this state and string.\n\n value = debackslashify(result[3]);\n string[state]();\n }\n\n // Remove the token from the string. The loop will continue as long as there\n // are tokens. This is a slow process, but it allows the use of ^ matching,\n // which assures that no illegal tokens slip through.\n\n source = source.slice(result[0].length);\n }\n\n // If we find a state/token combination that is illegal, then the action will\n // cause an error. We handle the error by simply changing the state.\n\n } catch (e) {\n state = e;\n }\n\n // The parsing is finished. If we are not in the final \"ok\" state, or if the\n // remaining source contains anything except whitespace, then we did not have\n //a well-formed JSON text.\n\n if (state !== \"ok\" || (/[^\\u0020\\t\\n\\r]/.test(source))) {\n throw (state instanceof SyntaxError)\n ? state\n : new SyntaxError(\"JSON\");\n }\n\n // If there is a reviver function, we recursively walk the new structure,\n // passing each name/value pair to the reviver function for possible\n // transformation, starting with a temporary root object that holds the current\n // value in an empty key. If there is not a reviver function, we simply return\n // that value.\n\n return (typeof reviver === \"function\")\n ? (function walk(holder, key) {\n var k;\n var v;\n var val = holder[key];\n if (val && typeof val === \"object\") {\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(val, k)) {\n v = walk(val, k);\n if (v !== undefined) {\n val[k] = v;\n } else {\n delete val[k];\n }\n }\n }\n }\n return reviver.call(holder, key, val);\n }({\"\": value}, \"\"))\n : value;\n };\n }());\n }\n}\n\nmodule.exports = setupCustomJSON;\n","'use strict';\n\nfunction wrapGlobals(window, handler, shim) {\n if (!window) { return; }\n // Adapted from https://github.com/bugsnag/bugsnag-js\n var globals = 'EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload'.split(',');\n var i, global;\n for (i = 0; i < globals.length; ++i) {\n global = globals[i];\n\n if (window[global] && window[global].prototype) {\n _extendListenerPrototype(handler, window[global].prototype, shim);\n }\n }\n}\n\nfunction _extendListenerPrototype(handler, prototype, shim) {\n if (prototype.hasOwnProperty && prototype.hasOwnProperty('addEventListener')) {\n var oldAddEventListener = prototype.addEventListener;\n while (oldAddEventListener._rollbarOldAdd && oldAddEventListener.belongsToShim) {\n oldAddEventListener = oldAddEventListener._rollbarOldAdd;\n }\n var addFn = function(event, callback, bubble) {\n oldAddEventListener.call(this, event, handler.wrap(callback), bubble);\n };\n addFn._rollbarOldAdd = oldAddEventListener;\n addFn.belongsToShim = shim;\n prototype.addEventListener = addFn;\n\n var oldRemoveEventListener = prototype.removeEventListener;\n while (oldRemoveEventListener._rollbarOldRemove && oldRemoveEventListener.belongsToShim) {\n oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;\n }\n var removeFn = function(event, callback, bubble) {\n oldRemoveEventListener.call(this, event, callback && callback._rollbar_wrapped || callback, bubble);\n };\n removeFn._rollbarOldRemove = oldRemoveEventListener;\n removeFn.belongsToShim = shim;\n prototype.removeEventListener = removeFn;\n }\n}\n\nmodule.exports = wrapGlobals;\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction raw(payload, jsonBackup) {\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction selectFrames(frames, range) {\n var len = frames.length;\n if (len > range * 2) {\n return frames.slice(0, range).concat(frames.slice(len - range));\n }\n return frames;\n}\n\nfunction truncateFrames(payload, jsonBackup, range) {\n range = (typeof range === 'undefined') ? 30 : range;\n var body = payload.data.body;\n var frames;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n frames = chain[i].frames;\n frames = selectFrames(frames, range);\n chain[i].frames = frames;\n }\n } else if (body.trace) {\n frames = body.trace.frames;\n frames = selectFrames(frames, range);\n body.trace.frames = frames;\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction maybeTruncateValue(len, val) {\n if (!val) {\n return val;\n }\n if (val.length > len) {\n return val.slice(0, len - 3).concat('...');\n }\n return val;\n}\n\nfunction truncateStrings(len, payload, jsonBackup) {\n function truncator(k, v, seen) {\n switch (_.typeName(v)) {\n case 'string':\n return maybeTruncateValue(len, v);\n case 'object':\n case 'array':\n return traverse(v, truncator, seen);\n default:\n return v;\n }\n }\n payload = traverse(payload, truncator);\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction truncateTraceData(traceData) {\n if (traceData.exception) {\n delete traceData.exception.description;\n traceData.exception.message = maybeTruncateValue(255, traceData.exception.message);\n }\n traceData.frames = selectFrames(traceData.frames, 1);\n return traceData;\n}\n\nfunction minBody(payload, jsonBackup) {\n var body = payload.data.body;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n chain[i] = truncateTraceData(chain[i]);\n }\n } else if (body.trace) {\n body.trace = truncateTraceData(body.trace);\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction needsTruncation(payload, maxSize) {\n return _.maxByteSize(payload) > maxSize;\n}\n\nfunction truncate(payload, jsonBackup, maxSize) {\n maxSize = (typeof maxSize === 'undefined') ? (512 * 1024) : maxSize;\n var strategies = [\n raw,\n truncateFrames,\n truncateStrings.bind(null, 1024),\n truncateStrings.bind(null, 512),\n truncateStrings.bind(null, 256),\n minBody\n ];\n var strategy, results, result;\n\n while ((strategy = strategies.shift())) {\n results = strategy(payload, jsonBackup);\n payload = results[0];\n result = results[1];\n if (result.error || !needsTruncation(result.value, maxSize)) {\n return result;\n }\n }\n return result;\n}\n\nmodule.exports = {\n truncate: truncate,\n\n /* for testing */\n raw: raw,\n truncateFrames: truncateFrames,\n truncateStrings: truncateStrings,\n maybeTruncateValue: maybeTruncateValue\n};\n"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/rollbar.noconflict.umd.js b/dist/rollbar.noconflict.umd.js index 3b723739a..0db395f83 100644 --- a/dist/rollbar.noconflict.umd.js +++ b/dist/rollbar.noconflict.umd.js @@ -501,6 +501,37 @@ function wrapCallback(logger, f) { }; } +function nonCircularClone(obj) { + var seen = [obj]; + + function clone(obj, seen) { + var value, name, newSeen, result = {}; + + try { + for (name in obj) { + value = obj[name]; + + if (value && (isType(value, 'object') || isType(value, 'array'))) { + if (seen.includes(value)) { + result[name] = 'Removed circular reference: ' + typeName(value); + } else { + newSeen = seen.slice(); + newSeen.push(value); + result[name] = clone(value, newSeen); + } + continue; + } + + result[name] = value; + } + } catch (e) { + result = 'Failed cloning custom data: ' + e.message; + } + return result; + } + return clone(obj, seen); +} + function createItem(args, logger, notifier, requestKeys, lambdaContext) { var message, err, custom, callback, request; var arg; @@ -558,10 +589,12 @@ function createItem(args, logger, notifier, requestKeys, lambdaContext) { } } + // if custom is an array this turns it into an object with integer keys + if (custom) custom = nonCircularClone(custom); + if (extraArgs.length > 0) { - // if custom is an array this turns it into an object with integer keys - custom = merge(custom); - custom.extraArgs = extraArgs; + if (!custom) custom = nonCircularClone({}); + custom.extraArgs = nonCircularClone(extraArgs); } var item = { @@ -606,7 +639,7 @@ function addErrorContext(item, errors) { try { for (var i = 0; i < errors.length; ++i) { if (errors[i].hasOwnProperty('rollbarContext')) { - custom = merge(custom, errors[i].rollbarContext); + custom = merge(custom, nonCircularClone(errors[i].rollbarContext)); contextAdded = true; } } @@ -4548,7 +4581,7 @@ module.exports = { module.exports = { - version: '2.24.0', + version: '2.24.1', endpoint: 'api.rollbar.com/api/1/item/', logLevel: 'debug', reportLevel: 'debug', diff --git a/dist/rollbar.noconflict.umd.js.map b/dist/rollbar.noconflict.umd.js.map index f5a4727f8..066da80c3 100644 --- a/dist/rollbar.noconflict.umd.js.map +++ b/dist/rollbar.noconflict.umd.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://rollbar/webpack/universalModuleDefinition","webpack://rollbar/webpack/bootstrap","webpack://rollbar/./src/utility.js","webpack://rollbar/./src/browser/logger.js","webpack://rollbar/./src/browser/url.js","webpack://rollbar/./src/errorParser.js","webpack://rollbar/./src/scrub.js","webpack://rollbar/./src/utility/traverse.js","webpack://rollbar/./src/browser/bundles/rollbar.noconflict.js","webpack://rollbar/./src/browser/rollbar.js","webpack://rollbar/./src/browser/core.js","webpack://rollbar/./src/rollbar.js","webpack://rollbar/./src/rateLimiter.js","webpack://rollbar/./src/merge.js","webpack://rollbar/./src/queue.js","webpack://rollbar/./src/notifier.js","webpack://rollbar/./src/api.js","webpack://rollbar/./src/apiUtility.js","webpack://rollbar/./node_modules/console-polyfill/index.js","webpack://rollbar/./src/browser/detection.js","webpack://rollbar/./src/browser/globalSetup.js","webpack://rollbar/./src/browser/transport.js","webpack://rollbar/./src/browser/transforms.js","webpack://rollbar/./node_modules/error-stack-parser/error-stack-parser.js","webpack://rollbar/./node_modules/error-stack-parser/node_modules/stackframe/stackframe.js","webpack://rollbar/./src/transforms.js","webpack://rollbar/./src/browser/predicates.js","webpack://rollbar/./src/predicates.js","webpack://rollbar/./src/defaults.js","webpack://rollbar/./src/browser/defaults/scrubFields.js","webpack://rollbar/./src/telemetry.js","webpack://rollbar/./src/browser/telemetry.js","webpack://rollbar/./src/browser/domUtility.js","webpack://rollbar/./src/utility/polyfillJSON.js","webpack://rollbar/./vendor/JSON-js/json3.js","webpack://rollbar/./src/browser/wrapGlobals.js","webpack://rollbar/./src/truncation.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;QCVA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;AClFa;;AAEb,YAAY,mBAAO,CAAC,EAAS;;AAE7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,OAAO;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,EAAE;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,mCAAmC,OAAO;AAC1C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,iBAAiB,YAAY;AAC7B;AACA,qBAAqB;AACrB;AACA,KAAK,wBAAwB;AAC7B;AACA,KAAK,yBAAyB;AAC9B;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kCAAkC,OAAO;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,SAAS;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,kCAAkC,OAAO;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,SAAS,UAAU,YAAY,GAAG;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,aAAa;AAChC;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3uBa;;AAEb;AACA,mBAAO,CAAC,EAAkB;AAC1B,gBAAgB,mBAAO,CAAC,EAAa;AACrC,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;AC3Ca;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;AChFa;;AAEb,uBAAuB,mBAAO,CAAC,EAAoB;;AAEnD;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;;AAEA,sBAAsB,wBAAwB;AAC9C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,eAAe;AACf;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7Ha;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,eAAe,mBAAO,CAAC,CAAoB;;AAE3C;AACA;;AAEA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,WAAW;AAC9B;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC9Fa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;;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ACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,0BAA0B,sBAAsB;AAChD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,oCAAoC,SAAS;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,eAAe,mBAAO,CAAC,EAAa;AACpC,kBAAkB,mBAAO,CAAC,EAAwB;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACpjBa;;AAEb,kBAAkB,mBAAO,CAAC,EAAe;AACzC,YAAY,mBAAO,CAAC,EAAS;AAC7B,eAAe,mBAAO,CAAC,EAAY;AACnC,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,6EAA6E,UAAU;AACvF,yFAAyF,UAAU;;AAEnG;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,6BAA6B;AAC7B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACnRa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AChJa;;AAEb;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA,WAAW,YAAY;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACvDa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wDAAwD,WAAW;AACnE;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,QAAQ;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,aAAa,8BAA8B;AAC3C;AACA;AACA;AACA;AACA,+CAA+C,SAAS;AACxD;AACA;AACA,cAAc;AACd;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,SAAS;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,+BAA+B;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC7Qa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACxHa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,cAAc,mBAAO,CAAC,EAAc;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;ACvGa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC7FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;AClBY;;AAEb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;AC/Ba;;AAEb;AACA,gBAAgB,QAAQ;AACxB;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;;AAEA;AACA,gBAAgB,QAAQ;;AAExB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;;;;;;;AClGa;;AAEb;;AAEA,QAAQ,mBAAO,CAAC,CAAY;AAC5B,aAAa,mBAAO,CAAC,CAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACvQa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,kBAAkB,mBAAO,CAAC,CAAgB;AAC1C,aAAa,mBAAO,CAAC,CAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,OAAO;AAC7C;AACA,oBAAoB,6CAA6C;AACjE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,4BAA4B,gBAAgB;AAC5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,sBAAsB;AACvC;AACA;AACA;;AAEA,4BAA4B,oBAAoB;AAChD;AACA;;AAEA;AACA;;AAEA;AACA;AACA,8BAA8B,aAAa;AAC3C;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,kBAAkB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC9UA;AACA;AACA;;AAEA;AACA,QAAQ,IAA0C;AAClD,QAAQ,iCAA6B,CAAC,uBAAY,CAAC,oCAAE,OAAO;AAAA;AAAA;AAAA,oGAAC;AAC7D,KAAK,MAAM,EAIN;AACL,CAAC;AACD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,MAAM;AACzB,oBAAoB,MAAM;AAC1B;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA,CAAC;;;;;;;ACzMD;AACA;AACA;;AAEA;AACA,QAAQ,IAA0C;AAClD,QAAQ,iCAAqB,EAAE,oCAAE,OAAO;AAAA;AAAA;AAAA,oGAAC;AACzC,KAAK,MAAM,EAIN;AACL,CAAC;AACD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,wBAAwB;AAC3C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA,CAAC;;;;;;;;AC9IY;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,sBAAsB;AAC1D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,8BAA8B;AAC9B;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrJa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;ACba;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe;;AAEf;;AAEA,uCAAuC,eAAe;;AAEtD;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA;;AAEA,wCAAwC,eAAe;;AAEvD,mBAAmB,gBAAgB;AACnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,SAAS;AAC1B;;AAEA,mBAAmB,qBAAqB;AACxC;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClMa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACVa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5Da;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qCAAqC,mBAAmB;AACxD;;AAEA;AACA,qCAAqC,4BAA4B;AACjE;AACA;AACA,8BAA8B,4BAA4B;AAC1D;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD;AACA;AACA,8BAA8B,gBAAgB;AAC9C;AACA;;AAEA;AACA,8BAA8B,aAAa;AAC3C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AClLa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,YAAY,mBAAO,CAAC,CAAU;AAC9B,gBAAgB,mBAAO,CAAC,CAAO;AAC/B,cAAc,mBAAO,CAAC,EAAc;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gDAAgD,aAAa;AAC7D;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B,mBAAmB,qBAAqB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,6BAA6B,0BAA0B;AACvD;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,eAAe,0BAA0B;AACzC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB;;AAEjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,SAAS;AAC9C;AACA;AACA,GAAG;AACH,yCAAyC;AACzC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,8CAA8C,QAAQ;;AAEtD;AACA;;AAEA;AACA,8CAA8C,QAAQ;;AAEtD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC/vBa;;AAEb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,6BAA6B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,4BAA4B,QAAQ;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,4BAA4B;AAC7C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,uBAAuB;AACpC;AACA;AACA;AACA,2BAA2B,sBAAsB;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnIa;;AAEb,mBAAmB,mBAAO,CAAC,EAA4B;;AAEvD;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB;AACpB;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,yCAAyC,iBAAiB;AAC1D,8BAA8B,kBAAkB;;AAEhD,yCAAyC,iBAAiB;AAC1D,sCAAsC,6BAA6B;;AAEnE;AACA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,wBAAwB;AACxB,+CAA+C,EAAE;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;;AAGA;;AAEA;;AAEA,UAAU;AACV,UAAU;AACV,UAAU;AACV;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA,qBAAqB,YAAY;AACjC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,qBAAqB,YAAY;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,eAAe;AACf;AACA,cAAc,wDAAwD;AACtE,cAAc,0BAA0B;AACxC;AACA;AACA;AACA;;AAEA;;AAEA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,mBAAmB,WAAW;AAC9B;AACA;;AAEA;;AAEA,OAAO;AACP;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,sBAAsB,UAAU;AAChC;AACA;;;AAGA;;AAEA;AACA;;AAEA;AACA;;AAEA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB,oBAAoB;AACpB,cAAc;AACd,gBAAgB;AAChB,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,UAAU;AACV;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,WAAW;AACX;AACA,wBAAwB,gDAAgD;AACxE;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,SAAS;AACT,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,WAAW;AACX;AACA,wBAAwB,gDAAgD;AACxE;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,sCAAsC,EAAE;AACxC;AACA;AACA;AACA,SAAS;AACT;;AAEA;;AAEA;AACA;;AAEA;AACA,+CAA+C,yGAAyG,EAAE;;AAE1J;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,SAAS;AACT;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE,UAAU;AACvB;AACA;AACA,KAAK;AACL;AACA;;AAEA;;;;;;;;AC1vBa;;AAEb;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,aAAa,oBAAoB;AACjC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC1Ca;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,eAAe,mBAAO,CAAC,CAAoB;;AAE3C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA","file":"rollbar.noconflict.umd.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"rollbar\"] = factory();\n\telse\n\t\troot[\"rollbar\"] = factory();\n})(this, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n","'use strict';\n\nvar merge = require('./merge');\n\nvar RollbarJSON = {};\nfunction setupJSON(polyfillJSON) {\n if (isFunction(RollbarJSON.stringify) && isFunction(RollbarJSON.parse)) {\n return;\n }\n\n if (isDefined(JSON)) {\n // If polyfill is provided, prefer it over existing non-native shims.\n if(polyfillJSON) {\n if (isNativeFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isNativeFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n } else { // else accept any interface that is present.\n if (isFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n }\n }\n if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {\n polyfillJSON && polyfillJSON(RollbarJSON);\n }\n}\n\n/*\n * isType - Given a Javascript value and a string, returns true if the type of the value matches the\n * given string.\n *\n * @param x - any value\n * @param t - a lowercase string containing one of the following type names:\n * - undefined\n * - null\n * - error\n * - number\n * - boolean\n * - string\n * - symbol\n * - function\n * - object\n * - array\n * @returns true if x is of type t, otherwise false\n */\nfunction isType(x, t) {\n return t === typeName(x);\n}\n\n/*\n * typeName - Given a Javascript value, returns the type of the object as a string\n */\nfunction typeName(x) {\n var name = typeof x;\n if (name !== 'object') {\n return name;\n }\n if (!x) {\n return 'null';\n }\n if (x instanceof Error) {\n return 'error';\n }\n return ({}).toString.call(x).match(/\\s([a-zA-Z]+)/)[1].toLowerCase();\n}\n\n/* isFunction - a convenience function for checking if a value is a function\n *\n * @param f - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isFunction(f) {\n return isType(f, 'function');\n}\n\n/* isNativeFunction - a convenience function for checking if a value is a native JS function\n *\n * @param f - any value\n * @returns true if f is a native JS function, otherwise false\n */\nfunction isNativeFunction(f) {\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n var funcMatchString = Function.prototype.toString.call(Object.prototype.hasOwnProperty)\n .replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?');\n var reIsNative = RegExp('^' + funcMatchString + '$');\n return isObject(f) && reIsNative.test(f);\n}\n\n/* isObject - Checks if the argument is an object\n *\n * @param value - any value\n * @returns true is value is an object function is an object)\n*/\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/* isString - Checks if the argument is a string\n *\n * @param value - any value\n * @returns true if value is a string\n*/\nfunction isString(value) {\n return typeof value === 'string' || value instanceof String\n}\n\n/**\n * isFiniteNumber - determines whether the passed value is a finite number\n *\n * @param {*} n - any value\n * @returns true if value is a finite number\n */\n function isFiniteNumber(n) {\n return Number.isFinite(n);\n}\n\n/*\n * isDefined - a convenience function for checking if a value is not equal to undefined\n *\n * @param u - any value\n * @returns true if u is anything other than undefined\n */\nfunction isDefined(u) {\n return !isType(u, 'undefined');\n}\n\n/*\n * isIterable - convenience function for checking if a value can be iterated, essentially\n * whether it is an object or an array.\n *\n * @param i - any value\n * @returns true if i is an object or an array as determined by `typeName`\n */\nfunction isIterable(i) {\n var type = typeName(i);\n return (type === 'object' || type === 'array');\n}\n\n/*\n * isError - convenience function for checking if a value is of an error type\n *\n * @param e - any value\n * @returns true if e is an error\n */\nfunction isError(e) {\n // Detect both Error and Firefox Exception type\n return isType(e, 'error') || isType(e, 'exception');\n}\n\n/* isPromise - a convenience function for checking if a value is a promise\n *\n * @param p - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isPromise(p) {\n return isObject(p) && isType(p.then, 'function');\n}\n\nfunction redact() {\n return '********';\n}\n\n// from http://stackoverflow.com/a/8809472/1138191\nfunction uuid4() {\n var d = now();\n var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n var r = (d + Math.random() * 16) % 16 | 0;\n d = Math.floor(d / 16);\n return (c === 'x' ? r : (r & 0x7 | 0x8)).toString(16);\n });\n return uuid;\n}\n\nvar LEVELS = {\n debug: 0,\n info: 1,\n warning: 2,\n error: 3,\n critical: 4\n};\n\nfunction sanitizeUrl(url) {\n var baseUrlParts = parseUri(url);\n if (!baseUrlParts) {\n return '(unknown)';\n }\n\n // remove a trailing # if there is no anchor\n if (baseUrlParts.anchor === '') {\n baseUrlParts.source = baseUrlParts.source.replace('#', '');\n }\n\n url = baseUrlParts.source.replace('?' + baseUrlParts.query, '');\n return url;\n}\n\nvar parseUriOptions = {\n strictMode: false,\n key: [\n 'source',\n 'protocol',\n 'authority',\n 'userInfo',\n 'user',\n 'password',\n 'host',\n 'port',\n 'relative',\n 'path',\n 'directory',\n 'file',\n 'query',\n 'anchor'\n ],\n q: {\n name: 'queryKey',\n parser: /(?:^|&)([^&=]*)=?([^&]*)/g\n },\n parser: {\n strict: /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n loose: /^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/\n }\n};\n\nfunction parseUri(str) {\n if (!isType(str, 'string')) {\n return undefined;\n }\n\n var o = parseUriOptions;\n var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);\n var uri = {};\n\n for (var i = 0, l = o.key.length; i < l; ++i) {\n uri[o.key[i]] = m[i] || '';\n }\n\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) {\n uri[o.q.name][$1] = $2;\n }\n });\n\n return uri;\n}\n\nfunction addParamsAndAccessTokenToPath(accessToken, options, params) {\n params = params || {};\n params.access_token = accessToken;\n var paramsArray = [];\n var k;\n for (k in params) {\n if (Object.prototype.hasOwnProperty.call(params, k)) {\n paramsArray.push([k, params[k]].join('='));\n }\n }\n var query = '?' + paramsArray.sort().join('&');\n\n options = options || {};\n options.path = options.path || '';\n var qs = options.path.indexOf('?');\n var h = options.path.indexOf('#');\n var p;\n if (qs !== -1 && (h === -1 || h > qs)) {\n p = options.path;\n options.path = p.substring(0,qs) + query + '&' + p.substring(qs+1);\n } else {\n if (h !== -1) {\n p = options.path;\n options.path = p.substring(0,h) + query + p.substring(h);\n } else {\n options.path = options.path + query;\n }\n }\n}\n\nfunction formatUrl(u, protocol) {\n protocol = protocol || u.protocol;\n if (!protocol && u.port) {\n if (u.port === 80) {\n protocol = 'http:';\n } else if (u.port === 443) {\n protocol = 'https:';\n }\n }\n protocol = protocol || 'https:';\n\n if (!u.hostname) {\n return null;\n }\n var result = protocol + '//' + u.hostname;\n if (u.port) {\n result = result + ':' + u.port;\n }\n if (u.path) {\n result = result + u.path;\n }\n return result;\n}\n\nfunction stringify(obj, backup) {\n var value, error;\n try {\n value = RollbarJSON.stringify(obj);\n } catch (jsonError) {\n if (backup && isFunction(backup)) {\n try {\n value = backup(obj);\n } catch (backupError) {\n error = backupError;\n }\n } else {\n error = jsonError;\n }\n }\n return {error: error, value: value};\n}\n\nfunction maxByteSize(string) {\n // The transport will use utf-8, so assume utf-8 encoding.\n //\n // This minimal implementation will accurately count bytes for all UCS-2 and\n // single code point UTF-16. If presented with multi code point UTF-16,\n // which should be rare, it will safely overcount, not undercount.\n //\n // While robust utf-8 encoders exist, this is far smaller and far more performant.\n // For quickly counting payload size for truncation, smaller is better.\n\n var count = 0;\n var length = string.length;\n\n for (var i = 0; i < length; i++) {\n var code = string.charCodeAt(i);\n if (code < 128) { // up to 7 bits\n count = count + 1;\n } else if (code < 2048) { // up to 11 bits\n count = count + 2;\n } else if (code < 65536) { // up to 16 bits\n count = count + 3;\n }\n }\n\n return count;\n}\n\nfunction jsonParse(s) {\n var value, error;\n try {\n value = RollbarJSON.parse(s);\n } catch (e) {\n error = e;\n }\n return {error: error, value: value};\n}\n\nfunction makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n mode,\n backupMessage,\n errorParser\n) {\n var location = {\n url: url || '',\n line: lineno,\n column: colno\n };\n location.func = errorParser.guessFunctionName(location.url, location.line);\n location.context = errorParser.gatherContext(location.url, location.line);\n var href = typeof document !== 'undefined' && document && document.location && document.location.href;\n var useragent = typeof window !== 'undefined' && window && window.navigator && window.navigator.userAgent;\n return {\n 'mode': mode,\n 'message': error ? String(error) : (message || backupMessage),\n 'url': href,\n 'stack': [location],\n 'useragent': useragent\n };\n}\n\nfunction wrapCallback(logger, f) {\n return function(err, resp) {\n try {\n f(err, resp);\n } catch (e) {\n logger.error(e);\n }\n };\n}\n\nfunction createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\n var diagnostic = {};\n var argTypes = [];\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n argTypes.push(typ);\n switch (typ) {\n case 'undefined':\n break;\n case 'string':\n message ? extraArgs.push(arg) : message = arg;\n break;\n case 'function':\n callback = wrapCallback(logger, arg);\n break;\n case 'date':\n extraArgs.push(arg);\n break;\n case 'error':\n case 'domexception':\n case 'exception': // Firefox Exception type\n err ? extraArgs.push(arg) : err = arg;\n break;\n case 'object':\n case 'array':\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n if (requestKeys && typ === 'object' && !request) {\n for (var j = 0, len = requestKeys.length; j < len; ++j) {\n if (arg[requestKeys[j]] !== undefined) {\n request = arg;\n break;\n }\n }\n if (request) {\n break;\n }\n }\n custom ? extraArgs.push(arg) : custom = arg;\n break;\n default:\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n extraArgs.push(arg);\n }\n }\n\n if (extraArgs.length > 0) {\n // if custom is an array this turns it into an object with integer keys\n custom = merge(custom);\n custom.extraArgs = extraArgs;\n }\n\n var item = {\n message: message,\n err: err,\n custom: custom,\n timestamp: now(),\n callback: callback,\n notifier: notifier,\n diagnostic: diagnostic,\n uuid: uuid4()\n };\n\n setCustomItemKeys(item, custom);\n\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n item.diagnostic.original_arg_types = argTypes;\n return item;\n}\n\nfunction setCustomItemKeys(item, custom) {\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (custom && custom.skipFrames !== undefined) {\n item.skipFrames = custom.skipFrames;\n delete custom.skipFrames;\n }\n}\n\nfunction addErrorContext(item, errors) {\n var custom = item.data.custom || {};\n var contextAdded = false;\n\n try {\n for (var i = 0; i < errors.length; ++i) {\n if (errors[i].hasOwnProperty('rollbarContext')) {\n custom = merge(custom, errors[i].rollbarContext);\n contextAdded = true;\n }\n }\n\n // Avoid adding an empty object to the data.\n if (contextAdded) {\n item.data.custom = custom;\n }\n } catch (e) {\n item.diagnostic.error_context = 'Failed: ' + e.message;\n }\n}\n\nvar TELEMETRY_TYPES = ['log', 'network', 'dom', 'navigation', 'error', 'manual'];\nvar TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];\n\nfunction arrayIncludes(arr, val) {\n for (var k = 0; k < arr.length; ++k) {\n if (arr[k] === val) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction createTelemetryEvent(args) {\n var type, metadata, level;\n var arg;\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n switch (typ) {\n case 'string':\n if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {\n type = arg;\n } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {\n level = arg;\n }\n break;\n case 'object':\n metadata = arg;\n break;\n default:\n break;\n }\n }\n var event = {\n type: type || 'manual',\n metadata: metadata || {},\n level: level\n };\n\n return event;\n}\n\n/*\n * get - given an obj/array and a keypath, return the value at that keypath or\n * undefined if not possible.\n *\n * @param obj - an object or array\n * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'\n * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`\n */\nfunction get(obj, path) {\n if (!obj) {\n return undefined;\n }\n var keys = path.split('.');\n var result = obj;\n try {\n for (var i = 0, len = keys.length; i < len; ++i) {\n result = result[keys[i]];\n }\n } catch (e) {\n result = undefined;\n }\n return result;\n}\n\nfunction set(obj, path, value) {\n if (!obj) {\n return;\n }\n var keys = path.split('.');\n var len = keys.length;\n if (len < 1) {\n return;\n }\n if (len === 1) {\n obj[keys[0]] = value;\n return;\n }\n try {\n var temp = obj[keys[0]] || {};\n var replacement = temp;\n for (var i = 1; i < len - 1; ++i) {\n temp[keys[i]] = temp[keys[i]] || {};\n temp = temp[keys[i]];\n }\n temp[keys[len-1]] = value;\n obj[keys[0]] = replacement;\n } catch (e) {\n return;\n }\n}\n\nfunction formatArgsAsString(args) {\n var i, len, arg;\n var result = [];\n for (i = 0, len = args.length; i < len; ++i) {\n arg = args[i];\n switch (typeName(arg)) {\n case 'object':\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500) {\n arg = arg.substr(0, 497) + '...';\n }\n break;\n case 'null':\n arg = 'null';\n break;\n case 'undefined':\n arg = 'undefined';\n break;\n case 'symbol':\n arg = arg.toString();\n break;\n }\n result.push(arg);\n }\n return result.join(' ');\n}\n\nfunction now() {\n if (Date.now) {\n return +Date.now();\n }\n return +new Date();\n}\n\nfunction filterIp(requestData, captureIp) {\n if (!requestData || !requestData['user_ip'] || captureIp === true) {\n return;\n }\n var newIp = requestData['user_ip'];\n if (!captureIp) {\n newIp = null;\n } else {\n try {\n var parts;\n if (newIp.indexOf('.') !== -1) {\n parts = newIp.split('.');\n parts.pop();\n parts.push('0');\n newIp = parts.join('.');\n } else if (newIp.indexOf(':') !== -1) {\n parts = newIp.split(':');\n if (parts.length > 2) {\n var beginning = parts.slice(0, 3);\n var slashIdx = beginning[2].indexOf('/');\n if (slashIdx !== -1) {\n beginning[2] = beginning[2].substring(0, slashIdx);\n }\n var terminal = '0000:0000:0000:0000:0000';\n newIp = beginning.concat(terminal).join(':');\n }\n } else {\n newIp = null;\n }\n } catch (e) {\n newIp = null;\n }\n }\n requestData['user_ip'] = newIp;\n}\n\nfunction handleOptions(current, input, payload, logger) {\n var result = merge(current, input, payload);\n result = updateDeprecatedOptions(result, logger);\n if (!input || input.overwriteScrubFields) {\n return result;\n }\n if (input.scrubFields) {\n result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);\n }\n return result;\n}\n\nfunction updateDeprecatedOptions(options, logger) {\n if(options.hostWhiteList && !options.hostSafeList) {\n options.hostSafeList = options.hostWhiteList;\n options.hostWhiteList = undefined;\n logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');\n }\n if(options.hostBlackList && !options.hostBlockList) {\n options.hostBlockList = options.hostBlackList;\n options.hostBlackList = undefined;\n logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');\n }\n return options;\n}\n\nmodule.exports = {\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n createItem: createItem,\n addErrorContext: addErrorContext,\n createTelemetryEvent: createTelemetryEvent,\n filterIp: filterIp,\n formatArgsAsString: formatArgsAsString,\n formatUrl: formatUrl,\n get: get,\n handleOptions: handleOptions,\n isError: isError,\n isFiniteNumber: isFiniteNumber,\n isFunction: isFunction,\n isIterable: isIterable,\n isNativeFunction: isNativeFunction,\n isObject: isObject,\n isString: isString,\n isType: isType,\n isPromise: isPromise,\n jsonParse: jsonParse,\n LEVELS: LEVELS,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n merge: merge,\n now: now,\n redact: redact,\n RollbarJSON: RollbarJSON,\n sanitizeUrl: sanitizeUrl,\n set: set,\n setupJSON: setupJSON,\n stringify: stringify,\n maxByteSize: maxByteSize,\n typeName: typeName,\n uuid4: uuid4\n};\n","'use strict';\n\n/* eslint-disable no-console */\nrequire('console-polyfill');\nvar detection = require('./detection');\nvar _ = require('../utility');\n\nfunction error() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.error(_.formatArgsAsString(args));\n } else {\n console.error.apply(console, args);\n }\n}\n\nfunction info() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.info(_.formatArgsAsString(args));\n } else {\n console.info.apply(console, args);\n }\n}\n\nfunction log() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.log(_.formatArgsAsString(args));\n } else {\n console.log.apply(console, args);\n }\n}\n\n/* eslint-enable no-console */\n\nmodule.exports = {\n error: error,\n info: info,\n log: log\n};\n","'use strict';\n\n// See https://nodejs.org/docs/latest/api/url.html\nfunction parse(url) {\n var result = {\n protocol: null, auth: null, host: null, path: null,\n hash: null, href: url, hostname: null, port: null,\n pathname: null, search: null, query: null\n };\n\n var i, last;\n i = url.indexOf('//');\n if (i !== -1) {\n result.protocol = url.substring(0,i);\n last = i+2;\n } else {\n last = 0;\n }\n \n i = url.indexOf('@', last);\n if (i !== -1) {\n result.auth = url.substring(last, i);\n last = i+1;\n }\n\n i = url.indexOf('/', last);\n if (i === -1) {\n i = url.indexOf('?', last);\n if (i === -1) {\n i = url.indexOf('#', last);\n if (i === -1) {\n result.host = url.substring(last);\n } else {\n result.host = url.substring(last, i);\n result.hash = url.substring(i);\n }\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n return result;\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n\n i = url.indexOf('#', last);\n if (i === -1) {\n result.path = url.substring(last);\n } else {\n result.path = url.substring(last, i);\n result.hash = url.substring(i);\n }\n\n if (result.path) {\n var pathParts = result.path.split('?');\n result.pathname = pathParts[0];\n result.query = pathParts[1];\n result.search = result.query ? '?' + result.query : null;\n }\n return result;\n}\n\nmodule.exports = {\n parse: parse\n};\n","'use strict';\n\nvar ErrorStackParser = require('error-stack-parser');\n\nvar UNKNOWN_FUNCTION = '?';\nvar ERR_CLASS_REGEXP = new RegExp('^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ');\n\nfunction guessFunctionName() {\n return UNKNOWN_FUNCTION;\n}\n\n\nfunction gatherContext() {\n return null;\n}\n\n\nfunction Frame(stackFrame) {\n var data = {};\n\n data._stackFrame = stackFrame;\n\n data.url = stackFrame.fileName;\n data.line = stackFrame.lineNumber;\n data.func = stackFrame.functionName;\n data.column = stackFrame.columnNumber;\n data.args = stackFrame.args;\n\n data.context = gatherContext();\n\n return data;\n}\n\n\nfunction Stack(exception, skip) {\n function getStack() {\n var parserStack = [];\n\n skip = skip || 0;\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch(e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = skip; i < parserStack.length; i++) {\n stack.push(new Frame(parserStack[i]));\n }\n\n return stack;\n }\n\n return {\n stack: getStack(),\n message: exception.message,\n name: _mostSpecificErrorName(exception),\n rawStack: exception.stack,\n rawException: exception\n };\n}\n\n\nfunction parse(e, skip) {\n var err = e;\n\n if (err.nested) {\n var traceChain = [];\n while (err) {\n traceChain.push(new Stack(err, skip));\n err = err.nested;\n\n skip = 0; // Only apply skip value to primary error\n }\n\n // Return primary error with full trace chain attached.\n traceChain[0].traceChain = traceChain;\n return traceChain[0];\n } else {\n return new Stack(err, skip);\n }\n}\n\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg || !errMsg.match) {\n return ['Unknown error. There was no error message to display.', ''];\n }\n var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);\n var errClass = '(unknown)';\n\n if (errClassMatch) {\n errClass = errClassMatch[errClassMatch.length - 1];\n errMsg = errMsg.replace((errClassMatch[errClassMatch.length - 2] || '') + errClass + ':', '');\n errMsg = errMsg.replace(/(^[\\s]+|[\\s]+$)/g, '');\n }\n return [errClass, errMsg];\n}\n\n// * Prefers any value over an empty string\n// * Prefers any value over 'Error' where possible\n// * Prefers name over constructor.name when both are more specific than 'Error'\nfunction _mostSpecificErrorName(error) {\n var name = error.name && error.name.length && error.name;\n var constructorName = error.constructor.name && error.constructor.name.length && error.constructor.name;\n\n if (!name || !constructorName) {\n return name || constructorName;\n }\n\n if (name === 'Error') {\n return constructorName;\n }\n return name;\n}\n\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame\n};\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction scrub(data, scrubFields, scrubPaths) {\n scrubFields = scrubFields || [];\n\n if (scrubPaths) {\n for (var i = 0; i < scrubPaths.length; ++i) {\n scrubPath(data, scrubPaths[i]);\n }\n }\n\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart) {\n return paramPart + _.redact();\n }\n\n function paramScrubber(v) {\n var i;\n if (_.isType(v, 'string')) {\n for (i = 0; i < queryRes.length; ++i) {\n v = v.replace(queryRes[i], redactQueryParam);\n }\n }\n return v;\n }\n\n function valScrubber(k, v) {\n var i;\n for (i = 0; i < paramRes.length; ++i) {\n if (paramRes[i].test(k)) {\n v = _.redact();\n break;\n }\n }\n return v;\n }\n\n function scrubber(k, v, seen) {\n var tmpV = valScrubber(k, v);\n if (tmpV === v) {\n if (_.isType(v, 'object') || _.isType(v, 'array')) {\n return traverse(v, scrubber, seen);\n }\n return paramScrubber(tmpV);\n } else {\n return tmpV;\n }\n }\n\n return traverse(data, scrubber);\n}\n\nfunction scrubPath(obj, path) {\n var keys = path.split('.');\n var last = keys.length - 1;\n try {\n for (var i = 0; i <= last; ++i) {\n if (i < last) {\n obj = obj[keys[i]];\n } else {\n obj[keys[i]] = _.redact();\n }\n }\n } catch (e) {\n // Missing key is OK;\n }\n}\n\nfunction _getScrubFieldRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '^\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?$';\n ret.push(new RegExp(pat, 'i'));\n }\n return ret;\n}\n\n\nfunction _getScrubQueryParamRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?';\n ret.push(new RegExp('(' + pat + '=)([^&\\\\n]+)', 'igm'));\n }\n return ret;\n}\n\nmodule.exports = scrub;\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction traverse(obj, func, seen) {\n var k, v, i;\n var isObj = _.isType(obj, 'object');\n var isArray = _.isType(obj, 'array');\n var keys = [];\n var seenIndex;\n\n // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.\n seen = seen || { obj: [], mapped: []};\n\n if (isObj) {\n seenIndex = seen.obj.indexOf(obj);\n\n if (isObj && seenIndex !== -1) {\n // Prefer the mapped object if there is one.\n return seen.mapped[seenIndex] || seen.obj[seenIndex];\n }\n\n seen.obj.push(obj);\n seenIndex = seen.obj.length - 1;\n }\n\n if (isObj) {\n for (k in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, k)) {\n keys.push(k);\n }\n }\n } else if (isArray) {\n for (i = 0; i < obj.length; ++i) {\n keys.push(i);\n }\n }\n\n var result = isObj ? {} : [];\n var same = true;\n for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n result[k] = func(k, v, seen);\n same = same && result[k] === obj[k];\n }\n\n if (isObj && !same) {\n seen.mapped[seenIndex] = result;\n }\n\n return !same ? result : obj;\n}\n\nmodule.exports = traverse;\n","'use strict';\n\nvar rollbar = require('../rollbar');\n\nif ((typeof window !== 'undefined') && !window._rollbarStartTime) {\n window._rollbarStartTime = (new Date()).getTime();\n}\n\nmodule.exports = rollbar;\n","'use strict';\n\nvar Rollbar = require('./core');\nvar telemeter = require('../telemetry');\nvar instrumenter = require('./telemetry');\nvar polyfillJSON = require('../utility/polyfillJSON');\nvar wrapGlobals = require('./wrapGlobals');\nvar scrub = require('../scrub');\nvar truncation = require('../truncation');\n\nRollbar.setComponents({\n telemeter: telemeter,\n instrumenter: instrumenter,\n polyfillJSON: polyfillJSON,\n wrapGlobals: wrapGlobals,\n scrub: scrub,\n truncation: truncation\n});\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar Client = require('../rollbar');\nvar _ = require('../utility');\nvar API = require('../api');\nvar logger = require('./logger');\nvar globals = require('./globalSetup');\n\nvar Transport = require('./transport');\nvar urllib = require('./url');\n\nvar transforms = require('./transforms');\nvar sharedTransforms = require('../transforms');\nvar predicates = require('./predicates');\nvar sharedPredicates = require('../predicates');\nvar errorParser = require('../errorParser');\n\nfunction Rollbar(options, client) {\n this.options = _.handleOptions(defaultOptions, options, null, logger);\n this.options._configuredOptions = options;\n var Telemeter = this.components.telemeter;\n var Instrumenter = this.components.instrumenter;\n var polyfillJSON = this.components.polyfillJSON;\n this.wrapGlobals = this.components.wrapGlobals;\n this.scrub = this.components.scrub;\n var truncation = this.components.truncation;\n\n var transport = new Transport(truncation);\n var api = new API(this.options, transport, urllib, truncation);\n if (Telemeter) {\n this.telemeter = new Telemeter(this.options);\n }\n this.client = client || new Client(this.options, api, logger, this.telemeter, 'browser');\n var gWindow = _gWindow();\n var gDocument = (typeof document != 'undefined') && document;\n this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers\n this.anonymousErrorsPending = 0;\n addTransformsToNotifier(this.client.notifier, this, gWindow);\n addPredicatesToQueue(this.client.queue);\n this.setupUnhandledCapture();\n if (Instrumenter) {\n this.instrumenter = new Instrumenter(this.options, this.client.telemeter, this, gWindow, gDocument);\n this.instrumenter.instrument();\n }\n _.setupJSON(polyfillJSON);\n}\n\nvar _instance = null;\nRollbar.init = function(options, client) {\n if (_instance) {\n return _instance.global(options).configure(options);\n }\n _instance = new Rollbar(options, client);\n return _instance;\n};\n\nRollbar.prototype.components = {};\n\nRollbar.setComponents = function(components) {\n Rollbar.prototype.components = components;\n}\n\nfunction handleUninitialized(maybeCallback) {\n var message = 'Rollbar is not initialized';\n logger.error(message);\n if (maybeCallback) {\n maybeCallback(new Error(message));\n }\n}\n\nRollbar.prototype.global = function(options) {\n this.client.global(options);\n return this;\n};\nRollbar.global = function(options) {\n if (_instance) {\n return _instance.global(options);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.configure = function(options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = {payload: payloadData};\n }\n this.options = _.handleOptions(oldOptions, options, payload, logger);\n this.options._configuredOptions = _.handleOptions(oldOptions._configuredOptions, options, payload);\n this.client.configure(this.options, payloadData);\n this.instrumenter && this.instrumenter.configure(this.options);\n this.setupUnhandledCapture();\n return this;\n};\nRollbar.configure = function(options, payloadData) {\n if (_instance) {\n return _instance.configure(options, payloadData);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.lastError = function() {\n return this.client.lastError;\n};\nRollbar.lastError = function() {\n if (_instance) {\n return _instance.lastError();\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.log = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.log(item);\n return {uuid: uuid};\n};\nRollbar.log = function() {\n if (_instance) {\n return _instance.log.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.debug = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.debug(item);\n return {uuid: uuid};\n};\nRollbar.debug = function() {\n if (_instance) {\n return _instance.debug.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.info = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.info(item);\n return {uuid: uuid};\n};\nRollbar.info = function() {\n if (_instance) {\n return _instance.info.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warn = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warn(item);\n return {uuid: uuid};\n};\nRollbar.warn = function() {\n if (_instance) {\n return _instance.warn.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warning = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warning(item);\n return {uuid: uuid};\n};\nRollbar.warning = function() {\n if (_instance) {\n return _instance.warning.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.error = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.error(item);\n return {uuid: uuid};\n};\nRollbar.error = function() {\n if (_instance) {\n return _instance.error.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.critical = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.critical(item);\n return {uuid: uuid};\n};\nRollbar.critical = function() {\n if (_instance) {\n return _instance.critical.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.buildJsonPayload = function(item) {\n return this.client.buildJsonPayload(item);\n};\nRollbar.buildJsonPayload = function() {\n if (_instance) {\n return _instance.buildJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.sendJsonPayload = function(jsonPayload) {\n return this.client.sendJsonPayload(jsonPayload);\n};\nRollbar.sendJsonPayload = function() {\n if (_instance) {\n return _instance.sendJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.setupUnhandledCapture = function() {\n var gWindow = _gWindow();\n\n if (!this.unhandledExceptionsInitialized) {\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(gWindow, this);\n if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {\n this.wrapGlobals(gWindow, this);\n }\n this.unhandledExceptionsInitialized = true;\n }\n }\n if (!this.unhandledRejectionsInitialized) {\n if (this.options.captureUnhandledRejections || this.options.handleUnhandledRejections) {\n globals.captureUnhandledRejections(gWindow, this);\n this.unhandledRejectionsInitialized = true;\n }\n }\n};\n\nRollbar.prototype.handleUncaughtException = function(message, url, lineno, colno, error, context) {\n if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {\n return;\n }\n\n // Chrome will always send 5+ arguments and error will be valid or null, not undefined.\n // If error is undefined, we have a different caller.\n // Chrome also sends errors from web workers with null error, but does not invoke\n // prepareStackTrace() for these. Test for empty url to skip them.\n if (this.options.inspectAnonymousErrors && this.isChrome && error === null && url === '') {\n return 'anonymous';\n }\n\n var item;\n var stackInfo = _.makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n 'onerror',\n 'uncaught exception',\n errorParser\n );\n if (_.isError(error)) {\n item = this._createItem([message, error, context]);\n item._unhandledStackInfo = stackInfo;\n } else if (_.isError(url)) {\n item = this._createItem([message, url, context]);\n item._unhandledStackInfo = stackInfo;\n } else {\n item = this._createItem([message, context]);\n item.stackInfo = stackInfo;\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n this.client.log(item);\n};\n\n/**\n * Chrome only. Other browsers will ignore.\n *\n * Use Error.prepareStackTrace to extract information about errors that\n * do not have a valid error object in onerror().\n *\n * In tested version of Chrome, onerror is called first but has no way\n * to communicate with prepareStackTrace. Use a counter to let this\n * handler know which errors to send to Rollbar.\n *\n * In config options, set inspectAnonymousErrors to enable.\n */\nRollbar.prototype.handleAnonymousErrors = function() {\n if (!this.options.inspectAnonymousErrors || !this.isChrome) {\n return;\n }\n\n var r = this;\n function prepareStackTrace(error, _stack) { // eslint-disable-line no-unused-vars\n if (r.options.inspectAnonymousErrors) {\n if (r.anonymousErrorsPending) {\n // This is the only known way to detect that onerror saw an anonymous error.\n // It depends on onerror reliably being called before Error.prepareStackTrace,\n // which so far holds true on tested versions of Chrome. If versions of Chrome\n // are tested that behave differently, this logic will need to be updated\n // accordingly.\n r.anonymousErrorsPending -= 1;\n\n if (!error) {\n // Not likely to get here, but calling handleUncaughtException from here\n // without an error object would throw off the anonymousErrorsPending counter,\n // so return now.\n return;\n }\n\n // Allow this to be tracked later.\n error._isAnonymous = true;\n\n // url, lineno, colno shouldn't be needed for these errors.\n // If that changes, update this accordingly, using the unused\n // _stack param as needed (rather than parse error.toString()).\n r.handleUncaughtException(error.message, null, null, null, error);\n }\n }\n\n // Workaround to ensure stack is preserved for normal errors.\n return error.stack;\n }\n\n // https://v8.dev/docs/stack-trace-api\n try {\n Error.prepareStackTrace = prepareStackTrace;\n } catch (e) {\n this.options.inspectAnonymousErrors = false;\n this.error('anonymous error handler failed', e);\n }\n}\n\nRollbar.prototype.handleUnhandledRejection = function(reason, promise) {\n if (!this.options.captureUnhandledRejections && !this.options.handleUnhandledRejections) {\n return;\n }\n\n var message = 'unhandled rejection was null or undefined!';\n if (reason) {\n if (reason.message) {\n message = reason.message;\n } else {\n var reasonResult = _.stringify(reason);\n if (reasonResult.value) {\n message = reasonResult.value;\n }\n }\n }\n var context = (reason && reason._rollbarContext) || (promise && promise._rollbarContext);\n\n var item;\n if (_.isError(reason)) {\n item = this._createItem([message, reason, context]);\n } else {\n item = this._createItem([message, reason, context]);\n item.stackInfo = _.makeUnhandledStackInfo(\n message,\n '',\n 0,\n 0,\n null,\n 'unhandledrejection',\n '',\n errorParser\n );\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n item._originalArgs = item._originalArgs || [];\n item._originalArgs.push(promise);\n this.client.log(item);\n};\n\nRollbar.prototype.wrap = function(f, context, _before) {\n try {\n var ctxFn;\n if(_.isFunction(context)) {\n ctxFn = context;\n } else {\n ctxFn = function() { return context || {}; };\n }\n\n if (!_.isFunction(f)) {\n return f;\n }\n\n if (f._isWrap) {\n return f;\n }\n\n if (!f._rollbar_wrapped) {\n f._rollbar_wrapped = function () {\n if (_before && _.isFunction(_before)) {\n _before.apply(this, arguments);\n }\n try {\n return f.apply(this, arguments);\n } catch(exc) {\n var e = exc;\n if (e && window._rollbarWrappedError !== e) {\n if (_.isType(e, 'string')) {\n e = new String(e);\n }\n e._rollbarContext = ctxFn() || {};\n e._rollbarContext._wrappedSource = f.toString();\n\n window._rollbarWrappedError = e;\n }\n throw e;\n }\n };\n\n f._rollbar_wrapped._isWrap = true;\n\n if (f.hasOwnProperty) {\n for (var prop in f) {\n if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {\n f._rollbar_wrapped[prop] = f[prop];\n }\n }\n }\n }\n\n return f._rollbar_wrapped;\n } catch (e) {\n // Return the original function if the wrap fails.\n return f;\n }\n};\nRollbar.wrap = function(f, context) {\n if (_instance) {\n return _instance.wrap(f, context);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.captureEvent = function() {\n var event = _.createTelemetryEvent(arguments);\n return this.client.captureEvent(event.type, event.metadata, event.level);\n};\nRollbar.captureEvent = function() {\n if (_instance) {\n return _instance.captureEvent.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\n// The following two methods are used internally and are not meant for public use\nRollbar.prototype.captureDomContentLoaded = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureLoad(ts);\n};\n\n/* Internal */\n\nfunction addTransformsToNotifier(notifier, rollbar, gWindow) {\n notifier\n .addTransform(transforms.handleDomException)\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(gWindow))\n .addTransform(transforms.addClientInfo(gWindow))\n .addTransform(transforms.addPluginInfo(gWindow))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(sharedTransforms.addConfigToPayload)\n .addTransform(transforms.addScrubber(rollbar.scrub))\n .addTransform(sharedTransforms.userTransform(logger))\n .addTransform(sharedTransforms.addConfiguredOptions)\n .addTransform(sharedTransforms.addDiagnosticKeys)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(sharedPredicates.checkLevel)\n .addPredicate(predicates.checkIgnore)\n .addPredicate(sharedPredicates.userCheckIgnore(logger))\n .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))\n .addPredicate(sharedPredicates.urlIsSafeListed(logger))\n .addPredicate(sharedPredicates.messageIsIgnored(logger));\n}\n\nRollbar.prototype.loadFull = function() {\n logger.info('Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.');\n};\n\nRollbar.prototype._createItem = function(args) {\n return _.createItem(args, logger, this);\n};\n\nfunction _getFirstFunction(args) {\n for (var i = 0, len = args.length; i < len; ++i) {\n if (_.isFunction(args[i])) {\n return args[i];\n }\n }\n return undefined;\n}\n\nfunction _gWindow() {\n return ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n}\n\nvar defaults = require('../defaults');\nvar scrubFields = require('./defaults/scrubFields');\n\nvar defaultOptions = {\n version: defaults.version,\n scrubFields: scrubFields.scrubFields,\n logLevel: defaults.logLevel,\n reportLevel: defaults.reportLevel,\n uncaughtErrorLevel: defaults.uncaughtErrorLevel,\n endpoint: defaults.endpoint,\n verbose: false,\n enabled: true,\n transmit: true,\n sendConfig: false,\n includeItemsInTelemetry: true,\n captureIp: true,\n inspectAnonymousErrors: true,\n ignoreDuplicateErrors: true,\n wrapGlobalEventHandlers: false\n};\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar _ = require('./utility');\n\n/*\n * Rollbar - the interface to Rollbar\n *\n * @param options\n * @param api\n * @param logger\n */\nfunction Rollbar(options, api, logger, telemeter, platform) {\n this.options = _.merge(options);\n this.logger = logger;\n Rollbar.rateLimiter.configureGlobal(this.options);\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.api = api;\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n\n // This must happen before the Notifier is created\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = telemeter;\n setStackTraceLimit(options);\n this.lastError = null;\n this.lastErrorHash = 'none';\n}\n\nvar defaultOptions = {\n maxItems: 0,\n itemsPerMinute: 60\n};\n\nRollbar.rateLimiter = new RateLimiter(defaultOptions);\n\nRollbar.prototype.global = function (options) {\n Rollbar.rateLimiter.configureGlobal(options);\n return this;\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n\n this.options = _.merge(oldOptions, options, payload);\n\n // This must happen before the Notifier is configured\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier && this.notifier.configure(this.options);\n this.telemeter && this.telemeter.configure(this.options);\n setStackTraceLimit(options);\n this.global(this.options);\n\n if (validateTracer(options.tracer)) {\n this.tracer = options.tracer\n }\n\n return this;\n};\n\nRollbar.prototype.log = function (item) {\n var level = this._defaultLogLevel();\n return this._log(level, item);\n};\n\nRollbar.prototype.debug = function (item) {\n this._log('debug', item);\n};\n\nRollbar.prototype.info = function (item) {\n this._log('info', item);\n};\n\nRollbar.prototype.warn = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.warning = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.error = function (item) {\n this._log('error', item);\n};\n\nRollbar.prototype.critical = function (item) {\n this._log('critical', item);\n};\n\nRollbar.prototype.wait = function (callback) {\n this.queue.wait(callback);\n};\n\nRollbar.prototype.captureEvent = function (type, metadata, level) {\n return this.telemeter && this.telemeter.captureEvent(type, metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function (ts) {\n return this.telemeter && this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (ts) {\n return this.telemeter && this.telemeter.captureLoad(ts);\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.api.buildJsonPayload(item);\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n this.api.postJsonPayload(jsonPayload);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function (defaultLevel, item) {\n var callback;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {\n if (callback) {\n var error = new Error('ignored identical item');\n error.item = item;\n callback(error);\n }\n return;\n }\n try {\n this._addTracingInfo(item);\n item.level = item.level || defaultLevel;\n this.telemeter && this.telemeter._captureRollbarItem(item);\n item.telemetryEvents = (this.telemeter && this.telemeter.copyEvents()) || [];\n this.notifier.log(item, callback);\n } catch (e) {\n if (callback) {\n callback(e);\n }\n this.logger.error(e);\n }\n};\n\nRollbar.prototype._defaultLogLevel = function () {\n return this.options.logLevel || 'debug';\n};\n\nRollbar.prototype._sameAsLastError = function (item) {\n if (!item._isUncaught) {\n return false;\n }\n var itemHash = generateItemHash(item);\n if (this.lastErrorHash === itemHash) {\n return true;\n }\n this.lastError = item.err;\n this.lastErrorHash = itemHash;\n return false;\n};\n\nRollbar.prototype._addTracingInfo = function (item) {\n // Tracer validation occurs in the constructor\n // or in the Rollbar.prototype.configure methods\n if (this.tracer) {\n // add rollbar occurrence uuid to span\n var span = this.tracer.scope().active();\n\n if (validateSpan(span)) {\n span.setTag('rollbar.error_uuid', item.uuid);\n span.setTag('rollbar.has_error', true);\n span.setTag('error', true);\n span.setTag('rollbar.item_url', `https://rollbar.com/item/uuid/?uuid=${item.uuid}`);\n span.setTag('rollbar.occurrence_url', `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`);\n\n // add span ID & trace ID to occurrence\n var opentracingSpanId = span.context().toSpanId();\n var opentracingTraceId = span.context().toTraceId();\n\n if (item.custom) {\n item.custom.opentracing_span_id = opentracingSpanId;\n item.custom.opentracing_trace_id = opentracingTraceId;\n } else {\n item.custom = {\n opentracing_span_id: opentracingSpanId,\n opentracing_trace_id: opentracingTraceId\n };\n }\n }\n }\n}\n\nfunction generateItemHash(item) {\n var message = item.message || '';\n var stack = (item.err || {}).stack || String(item.err);\n return message + '::' + stack;\n}\n\n// Node.js, Chrome, Safari, and some other browsers support this property\n// which globally sets the number of stack frames returned in an Error object.\n// If a browser can't use it, no harm done.\nfunction setStackTraceLimit(options) {\n if (options.stackTraceLimit) {\n Error.stackTraceLimit = options.stackTraceLimit;\n }\n}\n\n/**\n * Validate the Tracer object provided to the Client\n * is valid for our Opentracing use case.\n * @param {opentracer.Tracer} tracer\n */\nfunction validateTracer(tracer) {\n if (!tracer) {\n return false;\n }\n\n if (!tracer.scope || typeof tracer.scope !== 'function') {\n return false;\n }\n\n var scope = tracer.scope();\n\n if (!scope || !scope.active || typeof scope.active !== 'function') {\n return false;\n }\n\n return true;\n}\n\n/**\n * Validate the Span object provided\n * @param {opentracer.Span} span\n */\nfunction validateSpan(span) {\n if (!span || !span.context || typeof span.context !== 'function') {\n return false;\n }\n\n var spanContext = span.context();\n\n if (!spanContext\n || !spanContext.toSpanId\n || !spanContext.toTraceId\n || typeof spanContext.toSpanId !== 'function'\n || typeof spanContext.toTraceId !== 'function') {\n return false\n }\n\n return true;\n}\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar\n *\n * @param options - the same options that are accepted by configureGlobal offered as a convenience\n */\nfunction RateLimiter(options) {\n this.startTime = _.now();\n this.counter = 0;\n this.perMinCounter = 0;\n this.platform = null;\n this.platformOptions = {};\n this.configureGlobal(options);\n}\n\nRateLimiter.globalSettings = {\n startTime: _.now(),\n maxItems: undefined,\n itemsPerMinute: undefined\n};\n\n/*\n * configureGlobal - set the global rate limiter options\n *\n * @param options - Only the following values are recognized:\n * startTime: a timestamp of the form returned by (new Date()).getTime()\n * maxItems: the maximum items\n * itemsPerMinute: the max number of items to send in a given minute\n */\nRateLimiter.prototype.configureGlobal = function(options) {\n if (options.startTime !== undefined) {\n RateLimiter.globalSettings.startTime = options.startTime;\n }\n if (options.maxItems !== undefined) {\n RateLimiter.globalSettings.maxItems = options.maxItems;\n }\n if (options.itemsPerMinute !== undefined) {\n RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;\n }\n};\n\n/*\n * shouldSend - determine if we should send a given item based on rate limit settings\n *\n * @param item - the item we are about to send\n * @returns An object with the following structure:\n * error: (Error|null)\n * shouldSend: bool\n * payload: (Object|null)\n * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and\n * exactly one of error or payload will be non-null. If error is non-null, the returned Error will\n * describe the situation, but it means that we were already over a rate limit (either globally or\n * per minute) when this item was checked. If error is null, and therefore payload is non-null, it\n * means this item put us over the global rate limit and the payload should be sent to Rollbar in\n * place of the passed in item.\n */\nRateLimiter.prototype.shouldSend = function(item, now) {\n now = now || _.now();\n var elapsedTime = now - this.startTime;\n if (elapsedTime < 0 || elapsedTime >= 60000) {\n this.startTime = now;\n this.perMinCounter = 0;\n }\n\n var globalRateLimit = RateLimiter.globalSettings.maxItems;\n var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;\n\n if (checkRate(item, globalRateLimit, this.counter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimit + ' max items reached', false);\n } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimitPerMin + ' items per minute reached', false);\n }\n this.counter++;\n this.perMinCounter++;\n\n var shouldSend = !checkRate(item, globalRateLimit, this.counter);\n var perMinute = shouldSend;\n shouldSend = shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);\n return shouldSendValue(this.platform, this.platformOptions, null, shouldSend, globalRateLimit, globalRateLimitPerMin, perMinute);\n};\n\nRateLimiter.prototype.setPlatformOptions = function(platform, options) {\n this.platform = platform;\n this.platformOptions = options;\n};\n\n/* Helpers */\n\nfunction checkRate(item, limit, counter) {\n return !item.ignoreRateLimit && limit >= 1 && counter > limit;\n}\n\nfunction shouldSendValue(platform, options, error, shouldSend, globalRateLimit, limitPerMin, perMinute) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute);\n }\n return {error: error, shouldSend: shouldSend, payload: payload};\n}\n\nfunction rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute) {\n var environment = options.environment || (options.payload && options.payload.environment);\n var msg;\n if (perMinute) {\n msg = 'item per minute limit reached, ignoring errors until timeout';\n } else {\n msg = 'maxItems has been hit, ignoring errors until reset.';\n }\n var item = {\n body: {\n message: {\n body: msg,\n extra: {\n maxItems: globalRateLimit,\n itemsPerMinute: limitPerMin\n }\n }\n },\n language: 'javascript',\n environment: environment,\n notifier: {\n version: (options.notifier && options.notifier.version) || options.version\n }\n };\n if (platform === 'browser') {\n item.platform = 'browser';\n item.framework = 'browser-js';\n item.notifier.name = 'rollbar-browser-js';\n } else if (platform === 'server') {\n item.framework = options.framework || 'node-js';\n item.notifier.name = options.notifier.name;\n } else if (platform === 'react-native') {\n item.framework = options.framework || 'react-native';\n item.notifier.name = options.notifier.name;\n }\n return item;\n}\n\nmodule.exports = RateLimiter;\n","'use strict';\n\n'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isPlainObject = function isPlainObject(obj) {\n\tif (!obj || toStr.call(obj) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tvar hasOwnConstructor = hasOwn.call(obj, 'constructor');\n\tvar hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n\t// Not own constructor property must be Object\n\tif (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n\t\treturn false;\n\t}\n\n\t// Own properties are enumerated firstly, so to speed up,\n\t// if last one is own, then all properties are own.\n\tvar key;\n\tfor (key in obj) {/**/}\n\n\treturn typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\nfunction merge() {\n var i, src, copy, clone, name,\n result = {},\n current = null,\n length = arguments.length;\n\n for (i=0; i < length; i++) {\n current = arguments[i];\n if (current == null) {\n continue;\n }\n\n for (name in current) {\n src = result[name];\n copy = current[name];\n if (result !== copy) {\n if (copy && isPlainObject(copy)) {\n clone = src && isPlainObject(src) ? src : {};\n result[name] = merge(clone, copy);\n } else if (typeof copy !== 'undefined') {\n result[name] = copy;\n }\n }\n }\n }\n return result;\n}\n\nmodule.exports = merge;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Queue - an object which handles which handles a queue of items to be sent to Rollbar.\n * This object handles rate limiting via a passed in rate limiter, retries based on connection\n * errors, and filtering of items based on a set of configurable predicates. The communication to\n * the backend is performed via a given API object.\n *\n * @param rateLimiter - An object which conforms to the interface\n * rateLimiter.shouldSend(item) -> bool\n * @param api - An object which conforms to the interface\n * api.postItem(payload, function(err, response))\n * @param logger - An object used to log verbose messages if desired\n * @param options - see Queue.prototype.configure\n */\nfunction Queue(rateLimiter, api, logger, options) {\n this.rateLimiter = rateLimiter;\n this.api = api;\n this.logger = logger;\n this.options = options;\n this.predicates = [];\n this.pendingItems = [];\n this.pendingRequests = [];\n this.retryQueue = [];\n this.retryHandle = null;\n this.waitCallback = null;\n this.waitIntervalID = null;\n}\n\n/*\n * configure - updates the options this queue uses\n *\n * @param options\n */\nQueue.prototype.configure = function(options) {\n this.api && this.api.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addPredicate - adds a predicate to the end of the list of predicates for this queue\n *\n * @param predicate - function(item, options) -> (bool|{err: Error})\n * Returning true means that this predicate passes and the item is okay to go on the queue\n * Returning false means do not add the item to the queue, but it is not an error\n * Returning {err: Error} means do not add the item to the queue, and the given error explains why\n * Returning {err: undefined} is equivalent to returning true but don't do that\n */\nQueue.prototype.addPredicate = function(predicate) {\n if (_.isFunction(predicate)) {\n this.predicates.push(predicate);\n }\n return this;\n};\n\nQueue.prototype.addPendingItem = function(item) {\n this.pendingItems.push(item);\n};\n\nQueue.prototype.removePendingItem = function(item) {\n var idx = this.pendingItems.indexOf(item);\n if (idx !== -1) {\n this.pendingItems.splice(idx, 1);\n }\n};\n\n/*\n * addItem - Send an item to the Rollbar API if all of the predicates are satisfied\n *\n * @param item - The payload to send to the backend\n * @param callback - function(error, repsonse) which will be called with the response from the API\n * in the case of a success, otherwise response will be null and error will have a value. If both\n * error and response are null then the item was stopped by a predicate which did not consider this\n * to be an error condition, but nonetheless did not send the item to the API.\n * @param originalError - The original error before any transformations that is to be logged if any\n */\nQueue.prototype.addItem = function(item, callback, originalError, originalItem) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() { return; };\n }\n var predicateResult = this._applyPredicates(item);\n if (predicateResult.stop) {\n this.removePendingItem(originalItem);\n callback(predicateResult.err);\n return;\n }\n this._maybeLog(item, originalError);\n this.removePendingItem(originalItem);\n if (!this.options.transmit) {\n callback(new Error('Transmit disabled'));\n return;\n }\n this.pendingRequests.push(item);\n try {\n this._makeApiRequest(item, function(err, resp) {\n this._dequeuePendingRequest(item);\n callback(err, resp);\n }.bind(this));\n } catch (e) {\n this._dequeuePendingRequest(item);\n callback(e);\n }\n};\n\n/*\n * wait - Stop any further errors from being added to the queue, and get called back when all items\n * currently processing have finished sending to the backend.\n *\n * @param callback - function() called when all pending items have been sent\n */\nQueue.prototype.wait = function(callback) {\n if (!_.isFunction(callback)) {\n return;\n }\n this.waitCallback = callback;\n if (this._maybeCallWait()) {\n return;\n }\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitIntervalID = setInterval(function() {\n this._maybeCallWait();\n }.bind(this), 500);\n};\n\n/* _applyPredicates - Sequentially applies the predicates that have been added to the queue to the\n * given item with the currently configured options.\n *\n * @param item - An item in the queue\n * @returns {stop: bool, err: (Error|null)} - stop being true means do not add item to the queue,\n * the error value should be passed up to a callbak if we are stopping.\n */\nQueue.prototype._applyPredicates = function(item) {\n var p = null;\n for (var i = 0, len = this.predicates.length; i < len; i++) {\n p = this.predicates[i](item, this.options);\n if (!p || p.err !== undefined) {\n return {stop: true, err: p.err};\n }\n }\n return {stop: false, err: null};\n};\n\n/*\n * _makeApiRequest - Send an item to Rollbar, callback when done, if there is an error make an\n * effort to retry if we are configured to do so.\n *\n * @param item - an item ready to send to the backend\n * @param callback - function(err, response)\n */\nQueue.prototype._makeApiRequest = function(item, callback) {\n var rateLimitResponse = this.rateLimiter.shouldSend(item);\n if (rateLimitResponse.shouldSend) {\n this.api.postItem(item, function(err, resp) {\n if (err) {\n this._maybeRetry(err, item, callback);\n } else {\n callback(err, resp);\n }\n }.bind(this));\n } else if (rateLimitResponse.error) {\n callback(rateLimitResponse.error);\n } else {\n this.api.postItem(rateLimitResponse.payload, callback);\n }\n};\n\n// These are errors basically mean there is no internet connection\nvar RETRIABLE_ERRORS = ['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED', 'EHOSTUNREACH', 'EPIPE', 'EAI_AGAIN'];\n\n/*\n * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback\n * with the error.\n *\n * @param err - an error returned by the API transport\n * @param item - the item that was trying to be sent when this error occured\n * @param callback - function(err, response)\n */\nQueue.prototype._maybeRetry = function(err, item, callback) {\n var shouldRetry = false;\n if (this.options.retryInterval) {\n for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {\n if (err.code === RETRIABLE_ERRORS[i]) {\n shouldRetry = true;\n break;\n }\n }\n if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {\n item.retries = item.retries ? item.retries + 1 : 1;\n if (item.retries > this.options.maxRetries) {\n shouldRetry = false;\n }\n }\n }\n if (shouldRetry) {\n this._retryApiRequest(item, callback);\n } else {\n callback(err);\n }\n};\n\n/*\n * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process\n * that queue based on the retryInterval in the options for this queue.\n *\n * @param item - an item that failed to send due to an error we deem retriable\n * @param callback - function(err, response)\n */\nQueue.prototype._retryApiRequest = function(item, callback) {\n this.retryQueue.push({item: item, callback: callback});\n\n if (!this.retryHandle) {\n this.retryHandle = setInterval(function() {\n while (this.retryQueue.length) {\n var retryObject = this.retryQueue.shift();\n this._makeApiRequest(retryObject.item, retryObject.callback);\n }\n }.bind(this), this.options.retryInterval);\n }\n};\n\n/*\n * _dequeuePendingRequest - Removes the item from the pending request queue, this queue is used to\n * enable to functionality of providing a callback that clients can pass to `wait` to be notified\n * when the pending request queue has been emptied. This must be called when the API finishes\n * processing this item. If a `wait` callback is configured, it is called by this function.\n *\n * @param item - the item previously added to the pending request queue\n */\nQueue.prototype._dequeuePendingRequest = function(item) {\n var idx = this.pendingRequests.indexOf(item);\n if (idx !== -1) {\n this.pendingRequests.splice(idx, 1);\n this._maybeCallWait();\n }\n};\n\nQueue.prototype._maybeLog = function(data, originalError) {\n if (this.logger && this.options.verbose) {\n var message = originalError;\n message = message || _.get(data, 'body.trace.exception.message');\n message = message || _.get(data, 'body.trace_chain.0.exception.message');\n if (message) {\n this.logger.error(message);\n return;\n }\n message = _.get(data, 'body.message.body');\n if (message) {\n this.logger.log(message);\n }\n }\n};\n\nQueue.prototype._maybeCallWait = function() {\n if (_.isFunction(this.waitCallback) && this.pendingItems.length === 0 && this.pendingRequests.length === 0) {\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitCallback();\n return true;\n }\n return false;\n};\n\nmodule.exports = Queue;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Notifier - the internal object responsible for delegating between the client exposed API, the\n * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the\n * queue which handles the communcation with the Rollbar API servers.\n *\n * @param queue - an object that conforms to the interface: addItem(item, callback)\n * @param options - an object representing the options to be set for this notifier, this should have\n * any defaults already set by the caller\n */\nfunction Notifier(queue, options) {\n this.queue = queue;\n this.options = options;\n this.transforms = [];\n this.diagnostic = {};\n}\n\n/*\n * configure - updates the options for this notifier with the passed in object\n *\n * @param options - an object which gets merged with the current options set on this notifier\n * @returns this\n */\nNotifier.prototype.configure = function(options) {\n this.queue && this.queue.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addTransform - adds a transform onto the end of the queue of transforms for this notifier\n *\n * @param transform - a function which takes three arguments:\n * * item: An Object representing the data to eventually be sent to Rollbar\n * * options: The current value of the options for this notifier\n * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this\n * callback with a null value for error if it wants the processing chain to continue, otherwise\n * with an error to terminate the processing. The item should be the updated item after this\n * transform is finished modifying it.\n */\nNotifier.prototype.addTransform = function(transform) {\n if (_.isFunction(transform)) {\n this.transforms.push(transform);\n }\n return this;\n};\n\n/*\n * log - the internal log function which applies the configured transforms and then pushes onto the\n * queue to be sent to the backend.\n *\n * @param item - An object with the following structure:\n * message [String] - An optional string to be sent to rollbar\n * error [Error] - An optional error\n *\n * @param callback - A function of type function(err, resp) which will be called with exactly one\n * null argument and one non-null argument. The callback will be called once, either during the\n * transform stage if an error occurs inside a transform, or in response to the communication with\n * the backend. The second argument will be the response from the backend in case of success.\n */\nNotifier.prototype.log = function(item, callback) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!this.options.enabled) {\n return callback(new Error('Rollbar is not enabled'));\n }\n\n this.queue.addPendingItem(item);\n var originalError = item.err;\n this._applyTransforms(item, function(err, i) {\n if (err) {\n this.queue.removePendingItem(item);\n return callback(err, null);\n }\n this.queue.addItem(i, callback, originalError, item);\n }.bind(this));\n};\n\n/* Internal */\n\n/*\n * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See\n * `addTransform` for more information.\n *\n * @param item - An item to be transformed\n * @param callback - A function of type function(err, item) which will be called with a non-null\n * error and a null item in the case of a transform failure, or a null error and non-null item after\n * all transforms have been applied.\n */\nNotifier.prototype._applyTransforms = function(item, callback) {\n var transformIndex = -1;\n var transformsLength = this.transforms.length;\n var transforms = this.transforms;\n var options = this.options;\n\n var cb = function(err, i) {\n if (err) {\n callback(err, null);\n return;\n }\n\n transformIndex++;\n\n if (transformIndex === transformsLength) {\n callback(null, i);\n return;\n }\n\n transforms[transformIndex](i, options, cb);\n };\n\n cb(null, item);\n};\n\nmodule.exports = Notifier;\n","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1/item/',\n search: null,\n version: '1',\n protocol: 'https:',\n port: 443\n};\n\n/**\n * Api is an object that encapsulates methods of communicating with\n * the Rollbar API. It is a standard interface with some parts implemented\n * differently for server or browser contexts. It is an object that should\n * be instantiated when used so it can contain non-global options that may\n * be different for another instance of RollbarApi.\n *\n * @param options {\n * accessToken: the accessToken to use for posting items to rollbar\n * endpoint: an alternative endpoint to send errors to\n * must be a valid, fully qualified URL.\n * The default is: https://api.rollbar.com/api/1/item\n * proxy: if you wish to proxy requests provide an object\n * with the following keys:\n * host or hostname (required): foo.example.com\n * port (optional): 123\n * protocol (optional): https\n * }\n */\nfunction Api(options, transport, urllib, truncation, jsonBackup) {\n this.options = options;\n this.transport = transport;\n this.url = urllib;\n this.truncation = truncation;\n this.jsonBackup = jsonBackup;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, urllib);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function(data, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n this.transport.post(this.accessToken, transportOptions, payload, callback);\n};\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.buildJsonPayload = function(data, callback) {\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n\n if (stringifyResult.error) {\n if (callback) {\n callback(stringifyResult.error);\n }\n return null;\n }\n\n return stringifyResult.value;\n};\n\n/**\n *\n * @param jsonPayload\n * @param callback\n */\nApi.prototype.postJsonPayload = function(jsonPayload, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n this.transport.postJsonPayload(this.accessToken, transportOptions, jsonPayload, callback);\n};\n\nApi.prototype.configure = function(options) {\n var oldOptions = this.oldOptions;\n this.options = _.merge(oldOptions, options);\n this.transportOptions = _getTransport(this.options, this.url);\n if (this.options.accessToken !== undefined) {\n this.accessToken = this.options.accessToken;\n }\n return this;\n};\n\nfunction _getTransport(options, url) {\n return helpers.getTransportFromOptions(options, defaultOptions, url);\n}\n\nmodule.exports = Api;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (!_.isType(data.context, 'string')) {\n var contextResult = _.stringify(data.context, jsonBackup);\n if (contextResult.error) {\n data.context = 'Error: could not serialize \\'context\\'';\n } else {\n data.context = contextResult.value || '';\n }\n if (data.context.length > 255) {\n data.context = data.context.substr(0, 255);\n }\n }\n return {\n access_token: accessToken,\n data: data\n };\n}\n\nfunction getTransportFromOptions(options, defaults, url) {\n var hostname = defaults.hostname;\n var protocol = defaults.protocol;\n var port = defaults.port;\n var path = defaults.path;\n var search = defaults.search;\n var timeout = options.timeout;\n\n var proxy = options.proxy;\n if (options.endpoint) {\n var opts = url.parse(options.endpoint);\n hostname = opts.hostname;\n protocol = opts.protocol;\n port = opts.port;\n path = opts.pathname;\n search = opts.search;\n }\n return {\n timeout: timeout,\n hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy\n };\n}\n\nfunction transportOptions(transport, method) {\n var protocol = transport.protocol || 'https:';\n var port = transport.port || (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);\n var hostname = transport.hostname;\n var path = transport.path;\n var timeout = transport.timeout;\n if (transport.search) {\n path = path + transport.search;\n }\n if (transport.proxy) {\n path = protocol + '//' + hostname + path;\n hostname = transport.proxy.host || transport.proxy.hostname;\n port = transport.proxy.port;\n protocol = transport.proxy.protocol || protocol;\n }\n return {\n timeout: timeout,\n protocol: protocol,\n hostname: hostname,\n path: path,\n port: port,\n method: method\n };\n}\n\nfunction appendPathToPath(base, path) {\n var baseTrailingSlash = /\\/$/.test(base);\n var pathBeginningSlash = /^\\//.test(path);\n\n if (baseTrailingSlash && pathBeginningSlash) {\n path = path.substring(1);\n } else if (!baseTrailingSlash && !pathBeginningSlash) {\n path = '/' + path;\n }\n\n return base + path;\n}\n\nmodule.exports = {\n buildPayload: buildPayload,\n getTransportFromOptions: getTransportFromOptions,\n transportOptions: transportOptions,\n appendPathToPath: appendPathToPath\n};\n","// Console-polyfill. MIT license.\n// https://github.com/paulmillr/console-polyfill\n// Make it safe to do console.log() always.\n(function(global) {\n 'use strict';\n if (!global.console) {\n global.console = {};\n }\n var con = global.console;\n var prop, method;\n var dummy = function() {};\n var properties = ['memory'];\n var methods = ('assert,clear,count,debug,dir,dirxml,error,exception,group,' +\n 'groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,' +\n 'show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn').split(',');\n while (prop = properties.pop()) if (!con[prop]) con[prop] = {};\n while (method = methods.pop()) if (!con[method]) con[method] = dummy;\n // Using `this` for web workers & supports Browserify / Webpack.\n})(typeof window === 'undefined' ? this : window);\n","'use strict';\n\n// This detection.js module is used to encapsulate any ugly browser/feature\n// detection we may need to do.\n\n// Figure out which version of IE we're using, if any.\n// This is gleaned from http://stackoverflow.com/questions/5574842/best-way-to-check-for-ie-less-than-9-in-javascript-without-library\n// Will return an integer on IE (i.e. 8)\n// Will return undefined otherwise\nfunction getIEVersion() {\n\tvar undef;\n\tif (typeof document === 'undefined') {\n\t\treturn undef;\n\t}\n\n var v = 3,\n div = document.createElement('div'),\n all = div.getElementsByTagName('i');\n\n while (\n div.innerHTML = '',\n all[0]\n );\n\n return v > 4 ? v : undef;\n}\n\nvar Detection = {\n ieVersion: getIEVersion\n};\n\nmodule.exports = Detection;\n","'use strict';\n\nfunction captureUncaughtExceptions(window, handler, shim) {\n if (!window) { return; }\n var oldOnError;\n\n if (typeof handler._rollbarOldOnError === 'function') {\n oldOnError = handler._rollbarOldOnError;\n } else if (window.onerror) {\n oldOnError = window.onerror;\n while (oldOnError._rollbarOldOnError) {\n oldOnError = oldOnError._rollbarOldOnError;\n }\n handler._rollbarOldOnError = oldOnError;\n }\n\n handler.handleAnonymousErrors();\n\n var fn = function() {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n if (shim) {\n fn._rollbarOldOnError = oldOnError;\n }\n window.onerror = fn;\n}\n\nfunction _rollbarWindowOnError(window, r, old, args) {\n if (window._rollbarWrappedError) {\n if (!args[4]) {\n args[4] = window._rollbarWrappedError;\n }\n if (!args[5]) {\n args[5] = window._rollbarWrappedError._rollbarContext;\n }\n window._rollbarWrappedError = null;\n }\n\n var ret = r.handleUncaughtException.apply(r, args);\n\n if (old) {\n old.apply(window, args);\n }\n\n // Let other chained onerror handlers above run before setting this.\n // If an error is thrown and caught within a chained onerror handler,\n // Error.prepareStackTrace() will see that one before the one we want.\n if (ret === 'anonymous') {\n r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()\n }\n}\n\nfunction captureUnhandledRejections(window, handler, shim) {\n if (!window) { return; }\n\n if (typeof window._rollbarURH === 'function' && window._rollbarURH.belongsToShim) {\n window.removeEventListener('unhandledrejection', window._rollbarURH);\n }\n\n var rejectionHandler = function (evt) {\n var reason, promise, detail;\n try {\n reason = evt.reason;\n } catch (e) {\n reason = undefined;\n }\n try {\n promise = evt.promise;\n } catch (e) {\n promise = '[unhandledrejection] error getting `promise` from event';\n }\n try {\n detail = evt.detail;\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\n }\n } catch (e) {\n // Ignore\n }\n if (!reason) {\n reason = '[unhandledrejection] error getting `reason` from event';\n }\n\n if (handler && handler.handleUnhandledRejection) {\n handler.handleUnhandledRejection(reason, promise);\n }\n };\n rejectionHandler.belongsToShim = shim;\n window._rollbarURH = rejectionHandler;\n window.addEventListener('unhandledrejection', rejectionHandler);\n}\n\n\nmodule.exports = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections\n};\n","'use strict';\n\n/*global XDomainRequest*/\n\nvar _ = require('../utility');\nvar logger = require('./logger');\n\n/*\n * accessToken may be embedded in payload but that should not\n * be assumed\n *\n * options: {\n * hostname\n * protocol\n * path\n * port\n * method\n * }\n *\n * params is an object containing key/value pairs. These\n * will be appended to the path as 'key=value&key=value'\n *\n * payload is an unserialized object\n */\nfunction Transport(truncation) {\n this.truncation = truncation;\n}\n\nTransport.prototype.get = function(accessToken, options, params, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n _.addParamsAndAccessTokenToPath(accessToken, options, params);\n\n var method = 'GET';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, null, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.post = function(accessToken, options, payload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!payload) {\n return callback(new Error('Cannot send empty request'));\n }\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n if (stringifyResult.error) {\n return callback(stringifyResult.error);\n }\n\n var writeData = stringifyResult.value;\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, writeData, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.postJsonPayload = function (accessToken, options, jsonPayload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, jsonPayload, callback, requestFactory, options.timeout);\n}\n\n\n// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope\n// so Angular change detection isn't triggered on each API call.\n// This is the equivalent of runOutsideAngular().\n//\nfunction _makeZoneRequest() {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;\n var args = Array.prototype.slice.call(arguments);\n\n if (currentZone && currentZone._name === 'angular') {\n var rootZone = currentZone._parent;\n rootZone.run(function () {\n _makeRequest.apply(undefined, args);\n });\n } else {\n _makeRequest.apply(undefined, args);\n }\n}\n\n/* global RollbarProxy */\nfunction _proxyRequest(json, callback) {\n var rollbarProxy = new RollbarProxy();\n rollbarProxy.sendJsonPayload(\n json,\n function(_msg) { /* do nothing */ }, // eslint-disable-line no-unused-vars\n function(err) {\n callback(new Error(err));\n }\n );\n}\n\nfunction _makeRequest(accessToken, url, method, data, callback, requestFactory, timeout) {\n if (typeof RollbarProxy !== 'undefined') {\n return _proxyRequest(data, callback);\n }\n\n var request;\n if (requestFactory) {\n request = requestFactory();\n } else {\n request = _createXMLHTTPObject();\n }\n if (!request) {\n // Give up, no way to send requests\n return callback(new Error('No way to send a request'));\n }\n try {\n try {\n var onreadystatechange = function() {\n try {\n if (onreadystatechange && request.readyState === 4) {\n onreadystatechange = undefined;\n\n var parseResponse = _.jsonParse(request.responseText);\n if (_isSuccess(request)) {\n callback(parseResponse.error, parseResponse.value);\n return;\n } else if (_isNormalFailure(request)) {\n if (request.status === 403) {\n // likely caused by using a server access token\n var message = parseResponse.value && parseResponse.value.message;\n logger.error(message);\n }\n // return valid http status codes\n callback(new Error(String(request.status)));\n } else {\n // IE will return a status 12000+ on some sort of connection failure,\n // so we return a blank error\n // http://msdn.microsoft.com/en-us/library/aa383770%28VS.85%29.aspx\n var msg = 'XHR response had no status code (likely connection failure)';\n callback(_newRetriableError(msg));\n }\n }\n } catch (ex) {\n //jquery source mentions firefox may error out while accessing the\n //request members if there is a network error\n //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111\n var exc;\n if (ex && ex.stack) {\n exc = ex;\n } else {\n exc = new Error(ex);\n }\n callback(exc);\n }\n };\n\n request.open(method, url, true);\n if (request.setRequestHeader) {\n request.setRequestHeader('Content-Type', 'application/json');\n request.setRequestHeader('X-Rollbar-Access-Token', accessToken);\n }\n\n if(_.isFiniteNumber(timeout)) {\n request.timeout = timeout;\n }\n\n request.onreadystatechange = onreadystatechange;\n request.send(data);\n } catch (e1) {\n // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest\n if (typeof XDomainRequest !== 'undefined') {\n\n // Assume we are in a really old browser which has a bunch of limitations:\n // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx\n\n // Extreme paranoia: if we have XDomainRequest then we have a window, but just in case\n if (!window || !window.location) {\n return callback(new Error('No window available during request, unknown environment'));\n }\n\n // If the current page is http, try and send over http\n if (window.location.href.substring(0, 5) === 'http:' && url.substring(0, 5) === 'https') {\n url = 'http' + url.substring(5);\n }\n\n var xdomainrequest = new XDomainRequest();\n xdomainrequest.onprogress = function() {};\n xdomainrequest.ontimeout = function() {\n var msg = 'Request timed out';\n var code = 'ETIMEDOUT';\n callback(_newRetriableError(msg, code));\n };\n xdomainrequest.onerror = function() {\n callback(new Error('Error during request'));\n };\n xdomainrequest.onload = function() {\n var parseResponse = _.jsonParse(xdomainrequest.responseText);\n callback(parseResponse.error, parseResponse.value);\n };\n xdomainrequest.open(method, url, true);\n xdomainrequest.send(data);\n } else {\n callback(new Error('Cannot find a method to transport a request'));\n }\n }\n } catch (e2) {\n callback(e2);\n }\n}\n\nfunction _createXMLHTTPObject() {\n /* global ActiveXObject:false */\n\n var factories = [\n function () {\n return new XMLHttpRequest();\n },\n function () {\n return new ActiveXObject('Msxml2.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Msxml3.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Microsoft.XMLHTTP');\n }\n ];\n var xmlhttp;\n var i;\n var numFactories = factories.length;\n for (i = 0; i < numFactories; i++) {\n /* eslint-disable no-empty */\n try {\n xmlhttp = factories[i]();\n break;\n } catch (e) {\n // pass\n }\n /* eslint-enable no-empty */\n }\n return xmlhttp;\n}\n\nfunction _isSuccess(r) {\n return r && r.status && r.status === 200;\n}\n\nfunction _isNormalFailure(r) {\n return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;\n}\n\nfunction _newRetriableError(message, code) {\n var err = new Error(message);\n err.code = code || 'ENOTFOUND';\n return err;\n}\n\nmodule.exports = Transport;\n","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('../errorParser');\nvar logger = require('./logger');\n\nfunction handleDomException(item, options, callback) {\n if(item.err && errorParser.Stack(item.err).name === 'DOMException') {\n var originalError = new Error();\n originalError.name = item.err.name;\n originalError.message = item.err.message;\n originalError.stack = item.err.stack;\n originalError.nested = item.err;\n item.err = originalError;\n }\n callback(null, item);\n}\n\nfunction handleItemWithError(item, options, callback) {\n item.data = item.data || {};\n if (item.err) {\n try {\n item.stackInfo = item.err._savedStackTrace || errorParser.parse(item.err, item.skipFrames);\n\n if (options.addErrorContext) {\n addErrorContext(item);\n }\n } catch (e) {\n logger.error('Error while parsing the error object.', e);\n try {\n item.message = item.err.message || item.err.description || item.message || String(item.err);\n } catch (e2) {\n item.message = String(item.err) || String(e2);\n }\n delete item.err;\n }\n }\n callback(null, item);\n}\n\nfunction addErrorContext(item) {\n var chain = [];\n var err = item.err;\n\n chain.push(err);\n\n while (err.nested) {\n err = err.nested;\n chain.push(err);\n }\n\n _.addErrorContext(item, chain);\n}\n\nfunction ensureItemHasSomethingToSay(item, options, callback) {\n if (!item.message && !item.stackInfo && !item.custom) {\n callback(new Error('No message, stack info, or custom data'), null);\n }\n callback(null, item);\n}\n\nfunction addBaseInfo(item, options, callback) {\n var environment = (options.payload && options.payload.environment) || options.environment;\n item.data = _.merge(item.data, {\n environment: environment,\n level: item.level,\n endpoint: options.endpoint,\n platform: 'browser',\n framework: 'browser-js',\n language: 'javascript',\n server: {},\n uuid: item.uuid,\n notifier: {\n name: 'rollbar-browser-js',\n version: options.version\n },\n custom: item.custom\n });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.location) {\n return callback(null, item);\n }\n var remoteString = '$remote_ip';\n if (!options.captureIp) {\n remoteString = null;\n } else if (options.captureIp !== true) {\n remoteString += '_anonymize';\n }\n _.set(item, 'data.request', {\n url: window.location.href,\n query_string: window.location.search,\n user_ip: remoteString\n });\n callback(null, item);\n };\n}\n\nfunction addClientInfo(window) {\n return function(item, options, callback) {\n if (!window) {\n return callback(null, item);\n }\n var nav = window.navigator || {};\n var scr = window.screen || {};\n _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: nav.userAgent,\n language: nav.language,\n cookie_enabled: nav.cookieEnabled,\n screen: {\n width: scr.width,\n height: scr.height\n }\n }\n });\n callback(null, item);\n };\n}\n\nfunction addPluginInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.navigator) {\n return callback(null, item);\n }\n var plugins = [];\n var navPlugins = window.navigator.plugins || [];\n var cur;\n for (var i=0, l=navPlugins.length; i < l; ++i) {\n cur = navPlugins[i];\n plugins.push({name: cur.name, description: cur.description});\n }\n _.set(item, 'data.client.javascript.plugins', plugins);\n callback(null, item);\n };\n}\n\nfunction addBody(item, options, callback) {\n if (item.stackInfo) {\n if (item.stackInfo.traceChain) {\n addBodyTraceChain(item, options, callback);\n } else {\n addBodyTrace(item, options, callback);\n }\n } else {\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction addBodyMessage(item, options, callback) {\n var message = item.message;\n var custom = item.custom;\n\n if (!message) {\n message = 'Item sent with null or missing arguments.';\n }\n var result = {\n body: message\n };\n\n if (custom) {\n result.extra = _.merge(custom);\n }\n\n _.set(item, 'data.body', {message: result});\n callback(null, item);\n}\n\nfunction stackFromItem(item) {\n // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = item.stackInfo.stack;\n if (stack && stack.length === 0 && item._unhandledStackInfo && item._unhandledStackInfo.stack) {\n stack = item._unhandledStackInfo.stack;\n }\n return stack;\n}\n\nfunction addBodyTraceChain(item, options, callback) {\n var traceChain = item.stackInfo.traceChain;\n var traces = [];\n\n var traceChainLength = traceChain.length;\n for (var i = 0; i < traceChainLength; i++) {\n var trace = buildTrace(item, traceChain[i], options);\n traces.push(trace);\n }\n\n _.set(item, 'data.body', {trace_chain: traces});\n callback(null, item);\n}\n\nfunction addBodyTrace(item, options, callback) {\n var stack = stackFromItem(item);\n\n if (stack) {\n var trace = buildTrace(item, item.stackInfo, options);\n _.set(item, 'data.body', {trace: trace});\n callback(null, item);\n } else {\n var stackInfo = item.stackInfo;\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction buildTrace(item, stackInfo, options) {\n var description = item && item.data.description;\n var custom = item && item.custom;\n var stack = stackFromItem(item);\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n var trace = {\n exception: {\n 'class': className,\n message: message\n }\n };\n\n if (description) {\n trace.exception.description = description;\n }\n\n if (stack) {\n if (stack.length === 0) {\n trace.exception.stack = stackInfo.rawStack;\n trace.exception.raw = String(stackInfo.rawException);\n }\n var stackFrame;\n var frame;\n var code;\n var pre;\n var post;\n var contextLength;\n var i, mid;\n\n trace.frames = [];\n for (i = 0; i < stack.length; ++i) {\n stackFrame = stack[i];\n frame = {\n filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',\n lineno: stackFrame.line || null,\n method: (!stackFrame.func || stackFrame.func === '?') ? '[anonymous]' : stackFrame.func,\n colno: stackFrame.column\n };\n if (options.sendFrameUrl) {\n frame.url = stackFrame.url;\n }\n if (frame.method && frame.method.endsWith && frame.method.endsWith('_rollbar_wrapped')) {\n continue;\n }\n\n code = pre = post = null;\n contextLength = stackFrame.context ? stackFrame.context.length : 0;\n if (contextLength) {\n mid = Math.floor(contextLength / 2);\n pre = stackFrame.context.slice(0, mid);\n code = stackFrame.context[mid];\n post = stackFrame.context.slice(mid);\n }\n\n if (code) {\n frame.code = code;\n }\n\n if (pre || post) {\n frame.context = {};\n if (pre && pre.length) {\n frame.context.pre = pre;\n }\n if (post && post.length) {\n frame.context.post = post;\n }\n }\n\n if (stackFrame.args) {\n frame.args = stackFrame.args;\n }\n\n trace.frames.push(frame);\n }\n\n // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last\n trace.frames.reverse();\n\n if (custom) {\n trace.extra = _.merge(custom);\n }\n }\n\n return trace;\n}\n\nfunction errorClass(stackInfo, guess, options) {\n if (stackInfo.name) {\n return stackInfo.name;\n } else if (options.guessErrorClass) {\n return guess;\n } else {\n return '(unknown)';\n }\n}\n\nfunction addScrubber(scrubFn) {\n return function (item, options, callback) {\n if (scrubFn) {\n var scrubFields = options.scrubFields || [];\n var scrubPaths = options.scrubPaths || [];\n item.data = scrubFn(item.data, scrubFields, scrubPaths);\n }\n callback(null, item);\n }\n}\n\nmodule.exports = {\n handleDomException: handleDomException,\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n addScrubber: addScrubber\n};\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('error-stack-parser', ['stackframe'], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory(require('stackframe'));\n } else {\n root.ErrorStackParser = factory(root.StackFrame);\n }\n}(this, function ErrorStackParser(StackFrame) {\n 'use strict';\n\n var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\\S+:\\d+/;\n var CHROME_IE_STACK_REGEXP = /^\\s*at .*(\\S+:\\d+|\\(native\\))/m;\n var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\\[native code])?$/;\n\n return {\n /**\n * Given an Error object, extract the most information from it.\n *\n * @param {Error} error object\n * @return {Array} of StackFrames\n */\n parse: function ErrorStackParser$$parse(error) {\n if (typeof error.stacktrace !== 'undefined' || typeof error['opera#sourceloc'] !== 'undefined') {\n return this.parseOpera(error);\n } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {\n return this.parseV8OrIE(error);\n } else if (error.stack) {\n return this.parseFFOrSafari(error);\n } else {\n throw new Error('Cannot parse given Error object');\n }\n },\n\n // Separate line and column numbers from a string of the form: (URI:Line:Column)\n extractLocation: function ErrorStackParser$$extractLocation(urlLike) {\n // Fail-fast but return locations like \"(native)\"\n if (urlLike.indexOf(':') === -1) {\n return [urlLike];\n }\n\n var regExp = /(.+?)(?::(\\d+))?(?::(\\d+))?$/;\n var parts = regExp.exec(urlLike.replace(/[()]/g, ''));\n return [parts[1], parts[2] || undefined, parts[3] || undefined];\n },\n\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(CHROME_IE_STACK_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n if (line.indexOf('(eval ') > -1) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n line = line.replace(/eval code/g, 'eval').replace(/(\\(eval at [^()]*)|(\\),.*$)/g, '');\n }\n var sanitizedLine = line.replace(/^\\s+/, '').replace(/\\(eval code/g, '(');\n\n // capture and preseve the parenthesized location \"(/foo/my bar.js:12:87)\" in\n // case it has spaces in it, as the string is split on \\s+ later on\n var location = sanitizedLine.match(/ (\\((.+):(\\d+):(\\d+)\\)$)/);\n\n // remove the parenthesized location from the line, if it was matched\n sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;\n\n var tokens = sanitizedLine.split(/\\s+/).slice(1);\n // if a location was matched, pass it to extractLocation() otherwise pop the last token\n var locationParts = this.extractLocation(location ? location[1] : tokens.pop());\n var functionName = tokens.join(' ') || undefined;\n var fileName = ['eval', ''].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];\n\n return new StackFrame({\n functionName: functionName,\n fileName: fileName,\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n },\n\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n if (line.indexOf(' > eval') > -1) {\n line = line.replace(/ line (\\d+)(?: > eval line \\d+)* > eval:\\d+:\\d+/g, ':$1');\n }\n\n if (line.indexOf('@') === -1 && line.indexOf(':') === -1) {\n // Safari eval frames only have function names and nothing else\n return new StackFrame({\n functionName: line\n });\n } else {\n var functionNameRegex = /((.*\".+\"[^@]*)?[^@]*)(?:@)/;\n var matches = line.match(functionNameRegex);\n var functionName = matches && matches[1] ? matches[1] : undefined;\n var locationParts = this.extractLocation(line.replace(functionNameRegex, ''));\n\n return new StackFrame({\n functionName: functionName,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }\n }, this);\n },\n\n parseOpera: function ErrorStackParser$$parseOpera(e) {\n if (!e.stacktrace || (e.message.indexOf('\\n') > -1 &&\n e.message.split('\\n').length > e.stacktrace.split('\\n').length)) {\n return this.parseOpera9(e);\n } else if (!e.stack) {\n return this.parseOpera10(e);\n } else {\n return this.parseOpera11(e);\n }\n },\n\n parseOpera9: function ErrorStackParser$$parseOpera9(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)/i;\n var lines = e.message.split('\\n');\n var result = [];\n\n for (var i = 2, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(new StackFrame({\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n }));\n }\n }\n\n return result;\n },\n\n parseOpera10: function ErrorStackParser$$parseOpera10(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)(?:: In function (\\S+))?$/i;\n var lines = e.stacktrace.split('\\n');\n var result = [];\n\n for (var i = 0, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(\n new StackFrame({\n functionName: match[3] || undefined,\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n })\n );\n }\n }\n\n return result;\n },\n\n // Opera 10.65+ Error.stack very similar to FF/Safari\n parseOpera11: function ErrorStackParser$$parseOpera11(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);\n }, this);\n\n return filtered.map(function(line) {\n var tokens = line.split('@');\n var locationParts = this.extractLocation(tokens.pop());\n var functionCall = (tokens.shift() || '');\n var functionName = functionCall\n .replace(//, '$2')\n .replace(/\\([^)]*\\)/g, '') || undefined;\n var argsRaw;\n if (functionCall.match(/\\(([^)]*)\\)/)) {\n argsRaw = functionCall.replace(/^[^(]+\\(([^)]*)\\)$/, '$1');\n }\n var args = (argsRaw === undefined || argsRaw === '[arguments not available]') ?\n undefined : argsRaw.split(',');\n\n return new StackFrame({\n functionName: functionName,\n args: args,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n }\n };\n}));\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('stackframe', [], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.StackFrame = factory();\n }\n}(this, function() {\n 'use strict';\n function _isNumber(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n }\n\n function _capitalize(str) {\n return str.charAt(0).toUpperCase() + str.substring(1);\n }\n\n function _getter(p) {\n return function() {\n return this[p];\n };\n }\n\n var booleanProps = ['isConstructor', 'isEval', 'isNative', 'isToplevel'];\n var numericProps = ['columnNumber', 'lineNumber'];\n var stringProps = ['fileName', 'functionName', 'source'];\n var arrayProps = ['args'];\n var objectProps = ['evalOrigin'];\n\n var props = booleanProps.concat(numericProps, stringProps, arrayProps, objectProps);\n\n function StackFrame(obj) {\n if (!obj) return;\n for (var i = 0; i < props.length; i++) {\n if (obj[props[i]] !== undefined) {\n this['set' + _capitalize(props[i])](obj[props[i]]);\n }\n }\n }\n\n StackFrame.prototype = {\n getArgs: function() {\n return this.args;\n },\n setArgs: function(v) {\n if (Object.prototype.toString.call(v) !== '[object Array]') {\n throw new TypeError('Args must be an Array');\n }\n this.args = v;\n },\n\n getEvalOrigin: function() {\n return this.evalOrigin;\n },\n setEvalOrigin: function(v) {\n if (v instanceof StackFrame) {\n this.evalOrigin = v;\n } else if (v instanceof Object) {\n this.evalOrigin = new StackFrame(v);\n } else {\n throw new TypeError('Eval Origin must be an Object or StackFrame');\n }\n },\n\n toString: function() {\n var fileName = this.getFileName() || '';\n var lineNumber = this.getLineNumber() || '';\n var columnNumber = this.getColumnNumber() || '';\n var functionName = this.getFunctionName() || '';\n if (this.getIsEval()) {\n if (fileName) {\n return '[eval] (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return '[eval]:' + lineNumber + ':' + columnNumber;\n }\n if (functionName) {\n return functionName + ' (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return fileName + ':' + lineNumber + ':' + columnNumber;\n }\n };\n\n StackFrame.fromString = function StackFrame$$fromString(str) {\n var argsStartIndex = str.indexOf('(');\n var argsEndIndex = str.lastIndexOf(')');\n\n var functionName = str.substring(0, argsStartIndex);\n var args = str.substring(argsStartIndex + 1, argsEndIndex).split(',');\n var locationString = str.substring(argsEndIndex + 1);\n\n if (locationString.indexOf('@') === 0) {\n var parts = /@(.+?)(?::(\\d+))?(?::(\\d+))?$/.exec(locationString, '');\n var fileName = parts[1];\n var lineNumber = parts[2];\n var columnNumber = parts[3];\n }\n\n return new StackFrame({\n functionName: functionName,\n args: args || undefined,\n fileName: fileName,\n lineNumber: lineNumber || undefined,\n columnNumber: columnNumber || undefined\n });\n };\n\n for (var i = 0; i < booleanProps.length; i++) {\n StackFrame.prototype['get' + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);\n StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function(p) {\n return function(v) {\n this[p] = Boolean(v);\n };\n })(booleanProps[i]);\n }\n\n for (var j = 0; j < numericProps.length; j++) {\n StackFrame.prototype['get' + _capitalize(numericProps[j])] = _getter(numericProps[j]);\n StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function(p) {\n return function(v) {\n if (!_isNumber(v)) {\n throw new TypeError(p + ' must be a Number');\n }\n this[p] = Number(v);\n };\n })(numericProps[j]);\n }\n\n for (var k = 0; k < stringProps.length; k++) {\n StackFrame.prototype['get' + _capitalize(stringProps[k])] = _getter(stringProps[k]);\n StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function(p) {\n return function(v) {\n this[p] = String(v);\n };\n })(stringProps[k]);\n }\n\n return StackFrame;\n}));\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction itemToPayload(item, options, callback) {\n var payloadOptions = options.payload || {};\n if (payloadOptions.body) {\n delete payloadOptions.body;\n }\n\n var data = _.merge(item.data, payloadOptions);\n if (item._isUncaught) {\n data._isUncaught = true;\n }\n if (item._originalArgs) {\n data._originalArgs = item._originalArgs;\n }\n callback(null, data);\n}\n\nfunction addTelemetryData(item, options, callback) {\n if (item.telemetryEvents) {\n _.set(item, 'data.body.telemetry', item.telemetryEvents);\n }\n callback(null, item);\n}\n\nfunction addMessageWithError(item, options, callback) {\n if (!item.message) {\n callback(null, item);\n return;\n }\n var tracePath = 'data.body.trace_chain.0';\n var trace = _.get(item, tracePath);\n if (!trace) {\n tracePath = 'data.body.trace';\n trace = _.get(item, tracePath);\n }\n if (trace) {\n if (!(trace.exception && trace.exception.description)) {\n _.set(item, tracePath+'.exception.description', item.message);\n callback(null, item);\n return;\n }\n var extra = _.get(item, tracePath+'.extra') || {};\n var newExtra = _.merge(extra, {message: item.message});\n _.set(item, tracePath+'.extra', newExtra);\n }\n callback(null, item);\n}\n\nfunction userTransform(logger) {\n return function(item, options, callback) {\n var newItem = _.merge(item);\n var response = null;\n try {\n if (_.isFunction(options.transform)) {\n response = options.transform(newItem.data, item);\n }\n } catch (e) {\n options.transform = null;\n logger.error('Error while calling custom transform() function. Removing custom transform().', e);\n callback(null, item);\n return;\n }\n if(_.isPromise(response)) {\n response.then(function (promisedItem) {\n if(promisedItem) {\n newItem.data = promisedItem;\n }\n callback(null, newItem);\n }, function (error) {\n callback(error, item);\n });\n } else {\n callback(null, newItem);\n }\n }\n}\n\nfunction addConfigToPayload(item, options, callback) {\n if (!options.sendConfig) {\n return callback(null, item);\n }\n var configKey = '_rollbarConfig';\n var custom = _.get(item, 'data.custom') || {};\n custom[configKey] = options;\n item.data.custom = custom;\n callback(null, item);\n}\n\nfunction addFunctionOption(options, name) {\n if(_.isFunction(options[name])) {\n options[name] = options[name].toString();\n }\n}\n\nfunction addConfiguredOptions(item, options, callback) {\n var configuredOptions = options._configuredOptions;\n\n // These must be stringified or they'll get dropped during serialization.\n addFunctionOption(configuredOptions, 'transform');\n addFunctionOption(configuredOptions, 'checkIgnore');\n addFunctionOption(configuredOptions, 'onSendCallback');\n\n delete configuredOptions.accessToken;\n item.data.notifier.configured_options = configuredOptions;\n callback(null, item);\n}\n\nfunction addDiagnosticKeys(item, options, callback) {\n var diagnostic = _.merge(item.notifier.client.notifier.diagnostic, item.diagnostic);\n\n if (_.get(item, 'err._isAnonymous')) {\n diagnostic.is_anonymous = true;\n }\n\n if (item._isUncaught) {\n diagnostic.is_uncaught = item._isUncaught;\n }\n\n if (item.err) {\n try {\n diagnostic.raw_error = {\n message: item.err.message,\n name: item.err.name,\n constructor_name: item.err.constructor && item.err.constructor.name,\n filename: item.err.fileName,\n line: item.err.lineNumber,\n column: item.err.columnNumber,\n stack: item.err.stack\n };\n } catch (e) {\n diagnostic.raw_error = { failed: String(e) };\n }\n }\n\n item.data.notifier.diagnostic = _.merge(item.data.notifier.diagnostic, diagnostic);\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError,\n userTransform: userTransform,\n addConfigToPayload: addConfigToPayload,\n addConfiguredOptions: addConfiguredOptions,\n addDiagnosticKeys: addDiagnosticKeys\n};\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction checkIgnore(item, settings) {\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore\n};\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction checkLevel(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = settings.reportLevel;\n var reportLevelVal = _.LEVELS[reportLevel] || 0;\n\n if (levelVal < reportLevelVal) {\n return false;\n }\n return true;\n}\n\nfunction userCheckIgnore(logger) {\n return function(item, settings) {\n var isUncaught = !!item._isUncaught;\n delete item._isUncaught;\n var args = item._originalArgs;\n delete item._originalArgs;\n try {\n if (_.isFunction(settings.onSendCallback)) {\n settings.onSendCallback(isUncaught, args, item);\n }\n } catch (e) {\n settings.onSendCallback = null;\n logger.error('Error while calling onSendCallback, removing', e);\n }\n try {\n if (_.isFunction(settings.checkIgnore) && settings.checkIgnore(isUncaught, args, item)) {\n return false;\n }\n } catch (e) {\n settings.checkIgnore = null;\n logger.error('Error while calling custom checkIgnore(), removing', e);\n }\n return true;\n }\n}\n\nfunction urlIsNotBlockListed(logger) {\n return function(item, settings) {\n return !urlIsOnAList(item, settings, 'blocklist', logger);\n }\n}\n\nfunction urlIsSafeListed(logger) {\n return function(item, settings) {\n return urlIsOnAList(item, settings, 'safelist', logger);\n }\n}\n\nfunction matchFrames(trace, list, block) {\n if (!trace) { return !block }\n\n var frames = trace.frames;\n\n if (!frames || frames.length === 0) { return !block; }\n\n var frame, filename, url, urlRegex;\n var listLength = list.length;\n var frameLength = frames.length;\n for (var i = 0; i < frameLength; i++) {\n frame = frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) { return !block; }\n\n for (var j = 0; j < listLength; j++) {\n url = list[j];\n urlRegex = new RegExp(url);\n\n if (urlRegex.test(filename)) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction urlIsOnAList(item, settings, safeOrBlock, logger) {\n // safelist is the default\n var block = false;\n if (safeOrBlock === 'blocklist') {\n block = true;\n }\n\n var list, traces;\n try {\n list = block ? settings.hostBlockList : settings.hostSafeList;\n traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];\n\n // These two checks are important to come first as they are defaults\n // in case the list is missing or the trace is missing or not well-formed\n if (!list || list.length === 0) {\n return !block;\n }\n if (traces.length === 0 || !traces[0]) {\n return !block;\n }\n\n var tracesLength = traces.length;\n for (var i = 0; i < tracesLength; i++) {\n if(matchFrames(traces[i], list, block)) {\n return true;\n }\n }\n } catch (e)\n /* istanbul ignore next */\n {\n if (block) {\n settings.hostBlockList = null;\n } else {\n settings.hostSafeList = null;\n }\n var listName = block ? 'hostBlockList' : 'hostSafeList';\n logger.error('Error while reading your configuration\\'s ' + listName + ' option. Removing custom ' + listName + '.', e);\n return !block;\n }\n return false;\n}\n\nfunction messageIsIgnored(logger) {\n return function(item, settings) {\n var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n messages = messagesFromItem(item);\n\n if (messages.length === 0){\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n\n for (j = 0; j < messages.length; j++) {\n messageIsIgnored = rIgnoredMessage.test(messages[j]);\n\n if (messageIsIgnored) {\n return false;\n }\n }\n }\n } catch(e)\n /* istanbul ignore next */\n {\n settings.ignoredMessages = null;\n logger.error('Error while reading your configuration\\'s ignoredMessages option. Removing custom ignoredMessages.');\n }\n\n return true;\n }\n}\n\nfunction messagesFromItem(item) {\n var body = item.body;\n var messages = [];\n\n // The payload schema only allows one of trace_chain, message, or trace.\n // However, existing test cases are based on having both trace and message present.\n // So here we preserve the ability to collect strings from any combination of these keys.\n if (body.trace_chain) {\n var traceChain = body.trace_chain;\n for (var i = 0; i < traceChain.length; i++) {\n var trace = traceChain[i];\n messages.push(_.get(trace, 'exception.message'));\n }\n }\n if (body.trace) {\n messages.push(_.get(body, 'trace.exception.message'));\n }\n if (body.message) {\n messages.push(_.get(body, 'message.body'));\n }\n return messages;\n}\n\nmodule.exports = {\n checkLevel: checkLevel,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlockListed: urlIsNotBlockListed,\n urlIsSafeListed: urlIsSafeListed,\n messageIsIgnored: messageIsIgnored\n};\n","'use strict';\n\nmodule.exports = {\n version: '2.24.0',\n endpoint: 'api.rollbar.com/api/1/item/',\n logLevel: 'debug',\n reportLevel: 'debug',\n uncaughtErrorLevel: 'error',\n maxItems: 0,\n itemsPerMin: 60\n}\n","'use strict';\n\nmodule.exports = {\n scrubFields: [\n 'pw',\n 'pass',\n 'passwd',\n 'password',\n 'secret',\n 'confirm_password',\n 'confirmPassword',\n 'password_confirmation',\n 'passwordConfirmation',\n 'access_token',\n 'accessToken',\n 'X-Rollbar-Access-Token',\n 'secret_key',\n 'secretKey',\n 'secretToken',\n 'cc-number',\n 'card number',\n 'cardnumber',\n 'cardnum',\n 'ccnum',\n 'ccnumber',\n 'cc num',\n 'creditcardnumber',\n 'credit card number',\n 'newcreditcardnumber',\n 'new credit card',\n 'creditcardno',\n 'credit card no',\n 'card#',\n 'card #',\n 'cc-csc',\n 'cvc',\n 'cvc2',\n 'cvv2',\n 'ccv2',\n 'security code',\n 'card verification',\n 'name on credit card',\n 'name on card',\n 'nameoncard',\n 'cardholder',\n 'card holder',\n 'name des karteninhabers',\n 'ccname',\n 'card type',\n 'cardtype',\n 'cc type',\n 'cctype',\n 'payment type',\n 'expiration date',\n 'expirationdate',\n 'expdate',\n 'cc-exp',\n 'ccmonth',\n 'ccyear'\n ]\n}\n","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.merge(options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n}\n\nTelemeter.prototype.configure = function(options) {\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n var deleteCount = 0;\n if (this.maxQueueSize > newMaxEvents) {\n deleteCount = this.maxQueueSize - newMaxEvents;\n }\n this.maxQueueSize = newMaxEvents;\n this.queue.splice(0, deleteCount);\n};\n\nTelemeter.prototype.copyEvents = function() {\n var events = Array.prototype.slice.call(this.queue, 0);\n if (_.isFunction(this.options.filterTelemetry)) {\n try {\n var i = events.length;\n while (i--) {\n if (this.options.filterTelemetry(events[i])) {\n events.splice(i, 1);\n }\n }\n } catch (e) {\n this.options.filterTelemetry = null;\n }\n }\n return events;\n};\n\nTelemeter.prototype.capture = function(type, metadata, level, rollbarUUID, timestamp) {\n var e = {\n level: getLevel(type, level),\n type: type,\n timestamp_ms: timestamp || _.now(),\n body: metadata,\n source: 'client'\n };\n if (rollbarUUID) {\n e.uuid = rollbarUUID;\n }\n\n try {\n if (_.isFunction(this.options.filterTelemetry) && this.options.filterTelemetry(e)) {\n return false;\n }\n } catch (exc) {\n this.options.filterTelemetry = null;\n }\n\n this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function(type, metadata, level, rollbarUUID) {\n return this.capture(type, metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.captureError = function(err, level, rollbarUUID, timestamp) {\n var metadata = {\n message: err.message || String(err)\n };\n if (err.stack) {\n metadata.stack = err.stack;\n }\n return this.capture('error', metadata, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureLog = function(message, level, rollbarUUID, timestamp) {\n return this.capture('log', {\n message: message\n }, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID, requestData) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\n if (requestData) {\n metadata.request = requestData;\n }\n var level = this.levelFromStatus(metadata.status_code);\n return this.capture('network', metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.levelFromStatus = function(statusCode) {\n if (statusCode >= 200 && statusCode < 400) {\n return 'info';\n }\n if (statusCode === 0 || statusCode >= 400) {\n return 'error';\n }\n return 'info';\n};\n\nTelemeter.prototype.captureDom = function(subtype, element, value, checked, rollbarUUID) {\n var metadata = {\n subtype: subtype,\n element: element\n };\n if (value !== undefined) {\n metadata.value = value;\n }\n if (checked !== undefined) {\n metadata.checked = checked;\n }\n return this.capture('dom', metadata, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureNavigation = function(from, to, rollbarUUID) {\n return this.capture('navigation', {from: from, to: to}, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureDomContentLoaded = function(ts) {\n return this.capture('navigation', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n */\n};\nTelemeter.prototype.captureLoad = function(ts) {\n return this.capture('navigation', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n */\n};\n\nTelemeter.prototype.captureConnectivityChange = function(type, rollbarUUID) {\n return this.captureNetwork({change: type}, 'connectivity', rollbarUUID);\n};\n\n// Only intended to be used internally by the notifier\nTelemeter.prototype._captureRollbarItem = function(item) {\n if (!this.options.includeItemsInTelemetry) {\n return;\n }\n if (item.err) {\n return this.captureError(item.err, item.level, item.uuid, item.timestamp);\n }\n if (item.message) {\n return this.captureLog(item.message, item.level, item.uuid, item.timestamp);\n }\n if (item.custom) {\n return this.capture('log', item.custom, item.level, item.uuid, item.timestamp);\n }\n};\n\nTelemeter.prototype.push = function(e) {\n this.queue.push(e);\n if (this.queue.length > this.maxQueueSize) {\n this.queue.shift();\n }\n};\n\nfunction getLevel(type, level) {\n if (level) {\n return level;\n }\n var defaultLevel = {\n error: 'error',\n manual: 'info'\n };\n return defaultLevel[type] || 'info';\n}\n\nmodule.exports = Telemeter;\n","'use strict';\n\nvar _ = require('../utility');\nvar scrub = require('../scrub');\nvar urlparser = require('./url');\nvar domUtil = require('./domUtility');\n\nvar defaults = {\n network: true,\n networkResponseHeaders: false,\n networkResponseBody: false,\n networkRequestHeaders: false,\n networkRequestBody: false,\n networkErrorOnHttp5xx: false,\n networkErrorOnHttp4xx: false,\n networkErrorOnHttp0: false,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true,\n contentSecurityPolicy: true,\n errorOnContentSecurityPolicy: false\n};\n\nfunction replace(obj, name, replacement, replacements, type) {\n var orig = obj[name];\n obj[name] = replacement(orig);\n if (replacements) {\n replacements[type].push([obj, name, orig]);\n }\n}\n\nfunction restore(replacements, type) {\n var b;\n while (replacements[type].length) {\n b = replacements[type].shift();\n b[0][b[1]] = b[2];\n }\n}\n\nfunction nameFromDescription(description) {\n if (!description || !description.attributes) { return null; }\n var attrs = description.attributes;\n for (var a = 0; a < attrs.length; ++a) {\n if (attrs[a].key === 'name') {\n return attrs[a].value;\n }\n }\n return null;\n}\n\nfunction defaultValueScrubber(scrubFields) {\n var patterns = [];\n for (var i = 0; i < scrubFields.length; ++i) {\n patterns.push(new RegExp(scrubFields[i], 'i'));\n }\n return function(description) {\n var name = nameFromDescription(description);\n if (!name) { return false; }\n for (var i = 0; i < patterns.length; ++i) {\n if (patterns[i].test(name)) {\n return true;\n }\n }\n return false;\n };\n}\n\nfunction Instrumenter(options, telemeter, rollbar, _window, _document) {\n this.options = options;\n var autoInstrument = options.autoInstrument;\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);\n this.telemeter = telemeter;\n this.rollbar = rollbar;\n this.diagnostic = rollbar.client.notifier.diagnostic;\n this._window = _window || {};\n this._document = _document || {};\n this.replacements = {\n network: [],\n log: [],\n navigation: [],\n connectivity: []\n };\n this.eventRemovers = {\n dom: [],\n connectivity: [],\n contentsecuritypolicy: []\n };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function(options) {\n this.options = _.merge(this.options, options);\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.merge(this.autoInstrument);\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n if (options.scrubTelemetryInputs !== undefined) {\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n }\n if (options.telemetryScrubber !== undefined) {\n this.telemetryScrubber = options.telemetryScrubber;\n }\n};\n\n// eslint-disable-next-line complexity\nInstrumenter.prototype.instrument = function(oldSettings) {\n if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {\n this.instrumentNetwork();\n } else if (!this.autoInstrument.network && oldSettings && oldSettings.network) {\n this.deinstrumentNetwork();\n }\n\n if (this.autoInstrument.log && !(oldSettings && oldSettings.log)) {\n this.instrumentConsole();\n } else if (!this.autoInstrument.log && oldSettings && oldSettings.log) {\n this.deinstrumentConsole();\n }\n\n if (this.autoInstrument.dom && !(oldSettings && oldSettings.dom)) {\n this.instrumentDom();\n } else if (!this.autoInstrument.dom && oldSettings && oldSettings.dom) {\n this.deinstrumentDom();\n }\n\n if (this.autoInstrument.navigation && !(oldSettings && oldSettings.navigation)) {\n this.instrumentNavigation();\n } else if (!this.autoInstrument.navigation && oldSettings && oldSettings.navigation) {\n this.deinstrumentNavigation();\n }\n\n if (this.autoInstrument.connectivity && !(oldSettings && oldSettings.connectivity)) {\n this.instrumentConnectivity();\n } else if (!this.autoInstrument.connectivity && oldSettings && oldSettings.connectivity) {\n this.deinstrumentConnectivity();\n }\n\n if (this.autoInstrument.contentSecurityPolicy && !(oldSettings && oldSettings.contentSecurityPolicy)) {\n this.instrumentContentSecurityPolicy();\n } else if (!this.autoInstrument.contentSecurityPolicy && oldSettings && oldSettings.contentSecurityPolicy) {\n this.deinstrumentContentSecurityPolicy();\n }\n};\n\nInstrumenter.prototype.deinstrumentNetwork = function() {\n restore(this.replacements, 'network');\n};\n\nInstrumenter.prototype.instrumentNetwork = function() {\n var self = this;\n\n function wrapProp(prop, xhr) {\n if (prop in xhr && _.isFunction(xhr[prop])) {\n replace(xhr, prop, function(orig) {\n return self.rollbar.wrap(orig);\n });\n }\n }\n\n if ('XMLHttpRequest' in this._window) {\n var xhrp = this._window.XMLHttpRequest.prototype;\n replace(xhrp, 'open', function(orig) {\n return function(method, url) {\n if (_.isType(url, 'string')) {\n if (this.__rollbar_xhr) {\n this.__rollbar_xhr.method = method;\n this.__rollbar_xhr.url = url;\n this.__rollbar_xhr.status_code = null;\n this.__rollbar_xhr.start_time_ms = _.now();\n this.__rollbar_xhr.end_time_ms = null;\n } else {\n this.__rollbar_xhr = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'setRequestHeader', function(orig) {\n return function(header, value) {\n // If xhr.open is async, __rollbar_xhr may not be initialized yet.\n if (!this.__rollbar_xhr) {\n this.__rollbar_xhr = {};\n }\n if (_.isType(header, 'string') && _.isType(value, 'string')) {\n if (self.autoInstrument.networkRequestHeaders) {\n if (!this.__rollbar_xhr.request_headers) {\n this.__rollbar_xhr.request_headers = {};\n }\n this.__rollbar_xhr.request_headers[header] = value;\n }\n // We want the content type even if request header telemetry is off.\n if (header.toLowerCase() === 'content-type') {\n this.__rollbar_xhr.request_content_type = value;\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'send', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(data) {\n /* eslint-enable no-unused-vars */\n var xhr = this;\n\n function onreadystatechangeHandler() {\n if (xhr.__rollbar_xhr) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n if (self.autoInstrument.networkRequestBody) {\n xhr.__rollbar_xhr.request = data;\n }\n xhr.__rollbar_event = self.captureNetwork(xhr.__rollbar_xhr, 'xhr', undefined);\n }\n if (xhr.readyState < 2) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n }\n if (xhr.readyState > 3) {\n xhr.__rollbar_xhr.end_time_ms = _.now();\n\n var headers = null;\n xhr.__rollbar_xhr.response_content_type = xhr.getResponseHeader('Content-Type');\n if (self.autoInstrument.networkResponseHeaders) {\n var headersConfig = self.autoInstrument.networkResponseHeaders;\n headers = {};\n try {\n var header, i;\n if (headersConfig === true) {\n var allHeaders = xhr.getAllResponseHeaders();\n if (allHeaders) {\n var arr = allHeaders.trim().split(/[\\r\\n]+/);\n var parts, value;\n for (i=0; i < arr.length; i++) {\n parts = arr[i].split(': ');\n header = parts.shift();\n value = parts.join(': ');\n headers[header] = value;\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n header = headersConfig[i];\n headers[header] = xhr.getResponseHeader(header);\n }\n }\n } catch (e) {\n /* we ignore the errors here that could come from different\n * browser issues with the xhr methods */\n }\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n try {\n body = xhr.responseText;\n } catch (e) {\n /* ignore errors from reading responseText */\n }\n }\n var response = null;\n if (body || headers) {\n response = {};\n if (body) {\n if (self.isJsonContentType(xhr.__rollbar_xhr.response_content_type)) {\n response.body = self.scrubJson(body);\n } else {\n response.body = body;\n }\n }\n if (headers) {\n response.headers = headers;\n }\n }\n if (response) {\n xhr.__rollbar_xhr.response = response;\n }\n try {\n var code = xhr.status;\n code = code === 1223 ? 204 : code;\n xhr.__rollbar_xhr.status_code = code;\n xhr.__rollbar_event.level = self.telemeter.levelFromStatus(code);\n self.errorOnHttpStatus(xhr.__rollbar_xhr);\n } catch (e) {\n /* ignore possible exception from xhr.status */\n }\n }\n }\n }\n\n wrapProp('onload', xhr);\n wrapProp('onerror', xhr);\n wrapProp('onprogress', xhr);\n\n if ('onreadystatechange' in xhr && _.isFunction(xhr.onreadystatechange)) {\n replace(xhr, 'onreadystatechange', function(orig) {\n return self.rollbar.wrap(orig, undefined, onreadystatechangeHandler);\n });\n } else {\n xhr.onreadystatechange = onreadystatechangeHandler;\n }\n if (xhr.__rollbar_xhr && self.trackHttpErrors()) {\n xhr.__rollbar_xhr.stack = (new Error()).stack;\n }\n return orig.apply(this, arguments);\n }\n }, this.replacements, 'network');\n }\n\n if ('fetch' in this._window) {\n replace(this._window, 'fetch', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(fn, t) {\n /* eslint-enable no-unused-vars */\n var args = new Array(arguments.length);\n for (var i=0, len=args.length; i < len; i++) {\n args[i] = arguments[i];\n }\n var input = args[0];\n var method = 'GET';\n var url;\n if (_.isType(input, 'string')) {\n url = input;\n } else if (input) {\n url = input.url;\n if (input.method) {\n method = input.method;\n }\n }\n if (args[1] && args[1].method) {\n method = args[1].method;\n }\n var metadata = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n if (args[1] && args[1].headers) {\n // Argument may be a Headers object, or plain object. Ensure here that\n // we are working with a Headers object with case-insensitive keys.\n var reqHeaders = new Headers(args[1].headers);\n\n metadata.request_content_type = reqHeaders.get('Content-Type');\n\n if (self.autoInstrument.networkRequestHeaders) {\n metadata.request_headers = self.fetchHeaders(reqHeaders, self.autoInstrument.networkRequestHeaders)\n }\n }\n\n if (self.autoInstrument.networkRequestBody) {\n if (args[1] && args[1].body) {\n metadata.request = args[1].body;\n } else if (args[0] && !_.isType(args[0], 'string') && args[0].body) {\n metadata.request = args[0].body;\n }\n }\n self.captureNetwork(metadata, 'fetch', undefined);\n if (self.trackHttpErrors()) {\n metadata.stack = (new Error()).stack;\n }\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n metadata.response_content_type = resp.headers.get('Content-Type');\n var headers = null;\n if (self.autoInstrument.networkResponseHeaders) {\n headers = self.fetchHeaders(resp.headers, self.autoInstrument.networkResponseHeaders);\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n if (typeof resp.text === 'function') { // Response.text() is not implemented on some platforms\n // The response must be cloned to prevent reading (and locking) the original stream.\n body = resp.clone().text(); //returns a Promise\n }\n }\n if (headers || body) {\n metadata.response = {};\n if (body) {\n // Test to ensure body is a Promise, which it should always be.\n if (typeof body.then === 'function') {\n body.then(function (text) {\n if (self.isJsonContentType(metadata.response_content_type)) {\n metadata.response.body = self.scrubJson(text);\n }\n });\n } else {\n metadata.response.body = body;\n }\n }\n if (headers) {\n metadata.response.headers = headers;\n }\n }\n self.errorOnHttpStatus(metadata);\n return resp;\n });\n };\n }, this.replacements, 'network');\n }\n};\n\nInstrumenter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID) {\n if (metadata.request && this.isJsonContentType(metadata.request_content_type)) {\n metadata.request = this.scrubJson(metadata.request);\n }\n return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);\n};\n\nInstrumenter.prototype.isJsonContentType = function(contentType) {\n return (contentType && _.isType(contentType, 'string') && contentType.toLowerCase().includes('json')) ? true : false;\n}\n\nInstrumenter.prototype.scrubJson = function(json) {\n return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));\n}\n\nInstrumenter.prototype.fetchHeaders = function(inHeaders, headersConfig) {\n var outHeaders = {};\n try {\n var i;\n if (headersConfig === true) {\n if (typeof inHeaders.entries === 'function') { // Headers.entries() is not implemented in IE\n var allHeaders = inHeaders.entries();\n var currentHeader = allHeaders.next();\n while (!currentHeader.done) {\n outHeaders[currentHeader.value[0]] = currentHeader.value[1];\n currentHeader = allHeaders.next();\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n var header = headersConfig[i];\n outHeaders[header] = inHeaders.get(header);\n }\n }\n } catch (e) {\n /* ignore probable IE errors */\n }\n return outHeaders;\n}\n\nInstrumenter.prototype.trackHttpErrors = function() {\n return this.autoInstrument.networkErrorOnHttp5xx ||\n this.autoInstrument.networkErrorOnHttp4xx ||\n this.autoInstrument.networkErrorOnHttp0;\n}\n\nInstrumenter.prototype.errorOnHttpStatus = function(metadata) {\n var status = metadata.status_code;\n\n if ((status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||\n (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||\n (status === 0 && this.autoInstrument.networkErrorOnHttp0)) {\n var error = new Error('HTTP request failed with Status ' + status);\n error.stack = metadata.stack;\n this.rollbar.error(error, { skipFrames: 1 });\n }\n}\n\nInstrumenter.prototype.deinstrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n var b;\n while (this.replacements['log'].length) {\n b = this.replacements['log'].shift();\n this._window.console[b[0]] = b[1];\n }\n};\n\nInstrumenter.prototype.instrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n\n var self = this;\n var c = this._window.console;\n\n function wrapConsole(method) {\n 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778\n\n var orig = c[method];\n var origConsole = c;\n var level = method === 'warn' ? 'warning' : method;\n c[method] = function() {\n var args = Array.prototype.slice.call(arguments);\n var message = _.formatArgsAsString(args);\n self.telemeter.captureLog(message, level);\n if (orig) {\n Function.prototype.apply.call(orig, origConsole, args);\n }\n };\n self.replacements['log'].push([method, orig]);\n }\n var methods = ['debug','info','warn','error','log'];\n try {\n for (var i=0, len=methods.length; i < len; i++) {\n wrapConsole(methods[i]);\n }\n } catch (e) {\n this.diagnostic.instrumentConsole = { error: e.message };\n }\n};\n\nInstrumenter.prototype.deinstrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n this.removeListeners('dom');\n};\n\nInstrumenter.prototype.instrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n var clickHandler = this.handleClick.bind(this);\n var blurHandler = this.handleBlur.bind(this);\n this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);\n this.addListener('dom', this._window, 'blur', 'onfocusout', blurHandler, true);\n};\n\nInstrumenter.prototype.handleClick = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n var hasTag = e && e.tagName;\n var anchorOrButton = domUtil.isDescribedElement(e, 'a') || domUtil.isDescribedElement(e, 'button');\n if (hasTag && (anchorOrButton || domUtil.isDescribedElement(e, 'input', ['button', 'submit']))) {\n this.captureDomEvent('click', e);\n } else if (domUtil.isDescribedElement(e, 'input', ['checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value, e.checked);\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleBlur = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n if (e && e.tagName) {\n if (domUtil.isDescribedElement(e, 'textarea')) {\n this.captureDomEvent('input', e, e.value);\n } else if (domUtil.isDescribedElement(e, 'select') && e.options && e.options.length) {\n this.handleSelectInputChanged(e);\n } else if (domUtil.isDescribedElement(e, 'input') && !domUtil.isDescribedElement(e, 'input', ['button', 'submit', 'hidden', 'checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value);\n }\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleSelectInputChanged = function(elem) {\n if (elem.multiple) {\n for (var i = 0; i < elem.options.length; i++) {\n if (elem.options[i].selected) {\n this.captureDomEvent('input', elem, elem.options[i].value);\n }\n }\n } else if (elem.selectedIndex >= 0 && elem.options[elem.selectedIndex]) {\n this.captureDomEvent('input', elem, elem.options[elem.selectedIndex].value);\n }\n};\n\nInstrumenter.prototype.captureDomEvent = function(subtype, element, value, isChecked) {\n if (value !== undefined) {\n if (this.scrubTelemetryInputs || (domUtil.getElementType(element) === 'password')) {\n value = '[scrubbed]';\n } else {\n var description = domUtil.describeElement(element);\n if (this.telemetryScrubber) {\n if (this.telemetryScrubber(description)) {\n value = '[scrubbed]';\n }\n } else if (this.defaultValueScrubber(description)) {\n value = '[scrubbed]';\n }\n }\n }\n var elementString = domUtil.elementArrayToString(domUtil.treeToArray(element));\n this.telemeter.captureDom(subtype, elementString, value, isChecked);\n};\n\nInstrumenter.prototype.deinstrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n restore(this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.instrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n var self = this;\n replace(this._window, 'onpopstate', function(orig) {\n return function() {\n var current = self._location.href;\n self.handleUrlChange(self._lastHref, current);\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n }, this.replacements, 'navigation');\n\n replace(this._window.history, 'pushState', function(orig) {\n return function() {\n var url = arguments.length > 2 ? arguments[2] : undefined;\n if (url) {\n self.handleUrlChange(self._lastHref, url + '');\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.handleUrlChange = function(from, to) {\n var parsedHref = urlparser.parse(this._location.href);\n var parsedTo = urlparser.parse(to);\n var parsedFrom = urlparser.parse(from);\n this._lastHref = to;\n if (parsedHref.protocol === parsedTo.protocol && parsedHref.host === parsedTo.host) {\n to = parsedTo.path + (parsedTo.hash || '');\n }\n if (parsedHref.protocol === parsedFrom.protocol && parsedHref.host === parsedFrom.host) {\n from = parsedFrom.path + (parsedFrom.hash || '');\n }\n this.telemeter.captureNavigation(from, to);\n};\n\nInstrumenter.prototype.deinstrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.removeListeners('connectivity');\n } else {\n restore(this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.instrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.addListener('connectivity', this._window, 'online', undefined, function() {\n this.telemeter.captureConnectivityChange('online');\n }.bind(this), true);\n this.addListener('connectivity', this._window, 'offline', undefined, function() {\n this.telemeter.captureConnectivityChange('offline');\n }.bind(this), true);\n } else {\n var self = this;\n replace(this._document.body, 'ononline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('online');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n replace(this._document.body, 'onoffline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('offline');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.handleCspEvent = function(cspEvent) {\n var message = 'Security Policy Violation: ' +\n 'blockedURI: ' + cspEvent.blockedURI + ', ' +\n 'violatedDirective: ' + cspEvent.violatedDirective + ', ' +\n 'effectiveDirective: ' + cspEvent.effectiveDirective + ', ';\n\n if (cspEvent.sourceFile) {\n message += 'location: ' + cspEvent.sourceFile + ', ' +\n 'line: ' + cspEvent.lineNumber + ', ' +\n 'col: ' + cspEvent.columnNumber + ', ';\n }\n\n message += 'originalPolicy: ' + cspEvent.originalPolicy;\n\n this.telemeter.captureLog(message, 'error');\n this.handleCspError(message);\n}\n\nInstrumenter.prototype.handleCspError = function(message) {\n if (this.autoInstrument.errorOnContentSecurityPolicy) {\n this.rollbar.error(message);\n }\n}\n\nInstrumenter.prototype.deinstrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._window)) { return; }\n\n this.removeListeners('contentsecuritypolicy');\n};\n\nInstrumenter.prototype.instrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._window)) { return; }\n\n var cspHandler = this.handleCspEvent.bind(this);\n this.addListener('contentsecuritypolicy', this._window, 'securitypolicyviolation', null, cspHandler, false);\n};\n\nInstrumenter.prototype.addListener = function(section, obj, type, altType, handler, capture) {\n if (obj.addEventListener) {\n obj.addEventListener(type, handler, capture);\n this.eventRemovers[section].push(function() {\n obj.removeEventListener(type, handler, capture);\n });\n } else if (altType) {\n obj.attachEvent(altType, handler);\n this.eventRemovers[section].push(function() {\n obj.detachEvent(altType, handler);\n });\n }\n};\n\nInstrumenter.prototype.removeListeners = function(section) {\n var r;\n while (this.eventRemovers[section].length) {\n r = this.eventRemovers[section].shift();\n r();\n }\n};\n\nmodule.exports = Instrumenter;\n","'use strict';\n\nfunction getElementType(e) {\n return (e.getAttribute('type') || '').toLowerCase();\n}\n\nfunction isDescribedElement(element, type, subtypes) {\n if (element.tagName.toLowerCase() !== type.toLowerCase()) {\n return false;\n }\n if (!subtypes) {\n return true;\n }\n element = getElementType(element);\n for (var i = 0; i < subtypes.length; i++) {\n if (subtypes[i] === element) {\n return true;\n }\n }\n return false;\n}\n\nfunction getElementFromEvent(evt, doc) {\n if (evt.target) {\n return evt.target;\n }\n if (doc && doc.elementFromPoint) {\n return doc.elementFromPoint(evt.clientX, evt.clientY);\n }\n return undefined;\n}\n\nfunction treeToArray(elem) {\n var MAX_HEIGHT = 5;\n var out = [];\n var nextDescription;\n for (var height = 0; elem && height < MAX_HEIGHT; height++) {\n nextDescription = describeElement(elem);\n if (nextDescription.tagName === 'html') {\n break;\n }\n out.unshift(nextDescription);\n elem = elem.parentNode;\n }\n return out;\n}\n\nfunction elementArrayToString(a) {\n var MAX_LENGTH = 80;\n var separator = ' > ', separatorLength = separator.length;\n var out = [], len = 0, nextStr, totalLength;\n\n for (var i = a.length - 1; i >= 0; i--) {\n nextStr = descriptionToString(a[i]);\n totalLength = len + (out.length * separatorLength) + nextStr.length;\n if (i < a.length - 1 && totalLength >= MAX_LENGTH + 3) {\n out.unshift('...');\n break;\n }\n out.unshift(nextStr);\n len += nextStr.length;\n }\n return out.join(separator);\n}\n\nfunction descriptionToString(desc) {\n if (!desc || !desc.tagName) {\n return '';\n }\n var out = [desc.tagName];\n if (desc.id) {\n out.push('#' + desc.id);\n }\n if (desc.classes) {\n out.push('.' + desc.classes.join('.'));\n }\n for (var i = 0; i < desc.attributes.length; i++) {\n out.push('[' + desc.attributes[i].key + '=\"' + desc.attributes[i].value + '\"]');\n }\n\n return out.join('');\n}\n\n/**\n * Input: a dom element\n * Output: null if tagName is falsey or input is falsey, else\n * {\n * tagName: String,\n * id: String | undefined,\n * classes: [String] | undefined,\n * attributes: [\n * {\n * key: OneOf(type, name, title, alt),\n * value: String\n * }\n * ]\n * }\n */\nfunction describeElement(elem) {\n if (!elem || !elem.tagName) {\n return null;\n }\n var out = {}, className, key, attr, i;\n out.tagName = elem.tagName.toLowerCase();\n if (elem.id) {\n out.id = elem.id;\n }\n className = elem.className;\n if (className && (typeof className === 'string')) {\n out.classes = className.split(/\\s+/);\n }\n var attributes = ['type', 'name', 'title', 'alt'];\n out.attributes = [];\n for (i = 0; i < attributes.length; i++) {\n key = attributes[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.attributes.push({key: key, value: attr});\n }\n }\n return out;\n}\n\nmodule.exports = {\n describeElement: describeElement,\n descriptionToString: descriptionToString,\n elementArrayToString: elementArrayToString,\n treeToArray: treeToArray,\n getElementFromEvent: getElementFromEvent,\n isDescribedElement: isDescribedElement,\n getElementType: getElementType\n};\n","'use strict';\n\nvar polyfillJSON = require('../../vendor/JSON-js/json3');\n\nmodule.exports = polyfillJSON;\n","// json3.js\n// 2017-02-21\n// Public Domain.\n// NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.\n// See http://www.JSON.org/js.html\n// This code should be minified before deployment.\n// See http://javascript.crockford.com/jsmin.html\n\n// USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO\n// NOT CONTROL.\n\n// This file creates a global JSON object containing two methods: stringify\n// and parse. This file provides the ES5 JSON capability to ES3 systems.\n// If a project might run on IE8 or earlier, then this file should be included.\n// This file does nothing on ES5 systems.\n\n// JSON.stringify(value, replacer, space)\n// value any JavaScript value, usually an object or array.\n// replacer an optional parameter that determines how object\n// values are stringified for objects. It can be a\n// function or an array of strings.\n// space an optional parameter that specifies the indentation\n// of nested structures. If it is omitted, the text will\n// be packed without extra whitespace. If it is a number,\n// it will specify the number of spaces to indent at each\n// level. If it is a string (such as \"\\t\" or \" \"),\n// it contains the characters used to indent at each level.\n// This method produces a JSON text from a JavaScript value.\n// When an object value is found, if the object contains a toJSON\n// method, its toJSON method will be called and the result will be\n// stringified. A toJSON method does not serialize: it returns the\n// value represented by the name/value pair that should be serialized,\n// or undefined if nothing should be serialized. The toJSON method\n// will be passed the key associated with the value, and this will be\n// bound to the value.\n\n// For example, this would serialize Dates as ISO strings.\n\n// Date.prototype.toJSON = function (key) {\n// function f(n) {\n// // Format integers to have at least two digits.\n// return (n < 10)\n// ? \"0\" + n\n// : n;\n// }\n// return this.getUTCFullYear() + \"-\" +\n// f(this.getUTCMonth() + 1) + \"-\" +\n// f(this.getUTCDate()) + \"T\" +\n// f(this.getUTCHours()) + \":\" +\n// f(this.getUTCMinutes()) + \":\" +\n// f(this.getUTCSeconds()) + \"Z\";\n// };\n\n// You can provide an optional replacer method. It will be passed the\n// key and value of each member, with this bound to the containing\n// object. The value that is returned from your method will be\n// serialized. If your method returns undefined, then the member will\n// be excluded from the serialization.\n\n// If the replacer parameter is an array of strings, then it will be\n// used to select the members to be serialized. It filters the results\n// such that only members with keys listed in the replacer array are\n// stringified.\n\n// Values that do not have JSON representations, such as undefined or\n// functions, will not be serialized. Such values in objects will be\n// dropped; in arrays they will be replaced with null. You can use\n// a replacer function to replace those with JSON values.\n\n// JSON.stringify(undefined) returns undefined.\n\n// The optional space parameter produces a stringification of the\n// value that is filled with line breaks and indentation to make it\n// easier to read.\n\n// If the space parameter is a non-empty string, then that string will\n// be used for indentation. If the space parameter is a number, then\n// the indentation will be that many spaces.\n\n// Example:\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}]);\n// // text is '[\"e\",{\"pluribus\":\"unum\"}]'\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}], null, \"\\t\");\n// // text is '[\\n\\t\"e\",\\n\\t{\\n\\t\\t\"pluribus\": \"unum\"\\n\\t}\\n]'\n\n// text = JSON.stringify([new Date()], function (key, value) {\n// return this[key] instanceof Date\n// ? \"Date(\" + this[key] + \")\"\n// : value;\n// });\n// // text is '[\"Date(---current time---)\"]'\n\n// JSON.parse(text, reviver)\n// This method parses a JSON text to produce an object or array.\n// It can throw a SyntaxError exception.\n// This has been modified to use JSON-js/json_parse_state.js as the\n// parser instead of the one built around eval found in JSON-js/json2.js\n\n// The optional reviver parameter is a function that can filter and\n// transform the results. It receives each of the keys and values,\n// and its return value is used instead of the original value.\n// If it returns what it received, then the structure is not modified.\n// If it returns undefined then the member is deleted.\n\n// Example:\n\n// // Parse the text. Values that look like ISO date strings will\n// // be converted to Date objects.\n\n// myData = JSON.parse(text, function (key, value) {\n// var a;\n// if (typeof value === \"string\") {\n// a =\n// /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2}(?:\\.\\d*)?)Z$/.exec(value);\n// if (a) {\n// return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],\n// +a[5], +a[6]));\n// }\n// }\n// return value;\n// });\n\n// myData = JSON.parse('[\"Date(09/09/2001)\"]', function (key, value) {\n// var d;\n// if (typeof value === \"string\" &&\n// value.slice(0, 5) === \"Date(\" &&\n// value.slice(-1) === \")\") {\n// d = new Date(value.slice(5, -1));\n// if (d) {\n// return d;\n// }\n// }\n// return value;\n// });\n\n// This is a reference implementation. You are free to copy, modify, or\n// redistribute.\n\n/*jslint\n for, this\n */\n\n/*property\n JSON, apply, call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,\n getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,\n lastIndex, length, parse, prototype, push, replace, slice, stringify,\n test, toJSON, toString, valueOf\n */\n\nvar setupCustomJSON = function(JSON) {\n\n var rx_one = /^[\\],:{}\\s]*$/;\n var rx_two = /\\\\(?:[\"\\\\\\/bfnrt]|u[0-9a-fA-F]{4})/g;\n var rx_three = /\"[^\"\\\\\\n\\r]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g;\n var rx_four = /(?:^|:|,)(?:\\s*\\[)+/g;\n var rx_escapable = /[\\\\\"\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n var rx_dangerous = /[\\u0000\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n\n function f(n) {\n // Format integers to have at least two digits.\n return n < 10\n ? \"0\" + n\n : n;\n }\n\n function this_value() {\n return this.valueOf();\n }\n\n if (typeof Date.prototype.toJSON !== \"function\") {\n\n Date.prototype.toJSON = function () {\n\n return isFinite(this.valueOf())\n ? this.getUTCFullYear() + \"-\" +\n f(this.getUTCMonth() + 1) + \"-\" +\n f(this.getUTCDate()) + \"T\" +\n f(this.getUTCHours()) + \":\" +\n f(this.getUTCMinutes()) + \":\" +\n f(this.getUTCSeconds()) + \"Z\"\n : null;\n };\n\n Boolean.prototype.toJSON = this_value;\n Number.prototype.toJSON = this_value;\n String.prototype.toJSON = this_value;\n }\n\n var gap;\n var indent;\n var meta;\n var rep;\n\n\n function quote(string) {\n\n // If the string contains no control characters, no quote characters, and no\n // backslash characters, then we can safely slap some quotes around it.\n // Otherwise we must also replace the offending characters with safe escape\n // sequences.\n\n rx_escapable.lastIndex = 0;\n return rx_escapable.test(string)\n ? \"\\\"\" + string.replace(rx_escapable, function (a) {\n var c = meta[a];\n return typeof c === \"string\"\n ? c\n : \"\\\\u\" + (\"0000\" + a.charCodeAt(0).toString(16)).slice(-4);\n }) + \"\\\"\"\n : \"\\\"\" + string + \"\\\"\";\n }\n\n\n function str(key, holder) {\n\n // Produce a string from holder[key].\n\n var i; // The loop counter.\n var k; // The member key.\n var v; // The member value.\n var length;\n var mind = gap;\n var partial;\n var value = holder[key];\n\n // If the value has a toJSON method, call it to obtain a replacement value.\n\n if (value && typeof value === \"object\" &&\n typeof value.toJSON === \"function\") {\n value = value.toJSON(key);\n }\n\n // If we were called with a replacer function, then call the replacer to\n // obtain a replacement value.\n\n if (typeof rep === \"function\") {\n value = rep.call(holder, key, value);\n }\n\n // What happens next depends on the value's type.\n\n switch (typeof value) {\n case \"string\":\n return quote(value);\n\n case \"number\":\n\n // JSON numbers must be finite. Encode non-finite numbers as null.\n\n return isFinite(value)\n ? String(value)\n : \"null\";\n\n case \"boolean\":\n case \"null\":\n\n // If the value is a boolean or null, convert it to a string. Note:\n // typeof null does not produce \"null\". The case is included here in\n // the remote chance that this gets fixed someday.\n\n return String(value);\n\n // If the type is \"object\", we might be dealing with an object or an array or\n // null.\n\n case \"object\":\n\n // Due to a specification blunder in ECMAScript, typeof null is \"object\",\n // so watch out for that case.\n\n if (!value) {\n return \"null\";\n }\n\n // Make an array to hold the partial results of stringifying this object value.\n\n gap += indent;\n partial = [];\n\n // Is the value an array?\n\n if (Object.prototype.toString.apply(value) === \"[object Array]\") {\n\n // The value is an array. Stringify every element. Use null as a placeholder\n // for non-JSON values.\n\n length = value.length;\n for (i = 0; i < length; i += 1) {\n partial[i] = str(i, value) || \"null\";\n }\n\n // Join all of the elements together, separated with commas, and wrap them in\n // brackets.\n\n v = partial.length === 0\n ? \"[]\"\n : gap\n ? \"[\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"]\"\n : \"[\" + partial.join(\",\") + \"]\";\n gap = mind;\n return v;\n }\n\n // If the replacer is an array, use it to select the members to be stringified.\n\n if (rep && typeof rep === \"object\") {\n length = rep.length;\n for (i = 0; i < length; i += 1) {\n if (typeof rep[i] === \"string\") {\n k = rep[i];\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n } else {\n\n // Otherwise, iterate through all of the keys in the object.\n\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(value, k)) {\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n }\n\n // Join all of the member texts together, separated with commas,\n // and wrap them in braces.\n\n v = partial.length === 0\n ? \"{}\"\n : gap\n ? \"{\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"}\"\n : \"{\" + partial.join(\",\") + \"}\";\n gap = mind;\n return v;\n }\n }\n\n // If the JSON object does not yet have a stringify method, give it one.\n\n if (typeof JSON.stringify !== \"function\") {\n meta = { // table of character substitutions\n \"\\b\": \"\\\\b\",\n \"\\t\": \"\\\\t\",\n \"\\n\": \"\\\\n\",\n \"\\f\": \"\\\\f\",\n \"\\r\": \"\\\\r\",\n \"\\\"\": \"\\\\\\\"\",\n \"\\\\\": \"\\\\\\\\\"\n };\n JSON.stringify = function (value, replacer, space) {\n\n // The stringify method takes a value and an optional replacer, and an optional\n // space parameter, and returns a JSON text. The replacer can be a function\n // that can replace values, or an array of strings that will select the keys.\n // A default replacer method can be provided. Use of the space parameter can\n // produce text that is more easily readable.\n\n var i;\n gap = \"\";\n indent = \"\";\n\n // If the space parameter is a number, make an indent string containing that\n // many spaces.\n\n if (typeof space === \"number\") {\n for (i = 0; i < space; i += 1) {\n indent += \" \";\n }\n\n // If the space parameter is a string, it will be used as the indent string.\n\n } else if (typeof space === \"string\") {\n indent = space;\n }\n\n // If there is a replacer, it must be a function or an array.\n // Otherwise, throw an error.\n\n rep = replacer;\n if (replacer && typeof replacer !== \"function\" &&\n (typeof replacer !== \"object\" ||\n typeof replacer.length !== \"number\")) {\n throw new Error(\"JSON.stringify\");\n }\n\n // Make a fake root object containing our value under the key of \"\".\n // Return the result of stringifying the value.\n\n return str(\"\", {\"\": value});\n };\n }\n\n\n // If the JSON object does not yet have a parse method, give it one.\n\n if (typeof JSON.parse !== \"function\") {\n JSON.parse = (function () {\n\n // This function creates a JSON parse function that uses a state machine rather\n // than the dangerous eval function to parse a JSON text.\n\n var state; // The state of the parser, one of\n // 'go' The starting state\n // 'ok' The final, accepting state\n // 'firstokey' Ready for the first key of the object or\n // the closing of an empty object\n // 'okey' Ready for the next key of the object\n // 'colon' Ready for the colon\n // 'ovalue' Ready for the value half of a key/value pair\n // 'ocomma' Ready for a comma or closing }\n // 'firstavalue' Ready for the first value of an array or\n // an empty array\n // 'avalue' Ready for the next value of an array\n // 'acomma' Ready for a comma or closing ]\n var stack; // The stack, for controlling nesting.\n var container; // The current container object or array\n var key; // The current key\n var value; // The current value\n var escapes = { // Escapement translation table\n \"\\\\\": \"\\\\\",\n \"\\\"\": \"\\\"\",\n \"/\": \"/\",\n \"t\": \"\\t\",\n \"n\": \"\\n\",\n \"r\": \"\\r\",\n \"f\": \"\\f\",\n \"b\": \"\\b\"\n };\n var string = { // The actions for string tokens\n go: function () {\n state = \"ok\";\n },\n firstokey: function () {\n key = value;\n state = \"colon\";\n },\n okey: function () {\n key = value;\n state = \"colon\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var number = { // The actions for number tokens\n go: function () {\n state = \"ok\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var action = {\n\n // The action table describes the behavior of the machine. It contains an\n // object for each token. Each object contains a method that is called when\n // a token is matched in a state. An object will lack a method for illegal\n // states.\n\n \"{\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = {};\n state = \"firstokey\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = {};\n state = \"firstokey\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n }\n },\n \"}\": {\n firstokey: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n ocomma: function () {\n var pop = stack.pop();\n container[key] = value;\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \"[\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = [];\n state = \"firstavalue\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = [];\n state = \"firstavalue\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n }\n },\n \"]\": {\n firstavalue: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n acomma: function () {\n var pop = stack.pop();\n container.push(value);\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \":\": {\n colon: function () {\n if (Object.hasOwnProperty.call(container, key)) {\n throw new SyntaxError(\"Duplicate key '\" + key + \"\\\"\");\n }\n state = \"ovalue\";\n }\n },\n \",\": {\n ocomma: function () {\n container[key] = value;\n state = \"okey\";\n },\n acomma: function () {\n container.push(value);\n state = \"avalue\";\n }\n },\n \"true\": {\n go: function () {\n value = true;\n state = \"ok\";\n },\n ovalue: function () {\n value = true;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = true;\n state = \"acomma\";\n },\n avalue: function () {\n value = true;\n state = \"acomma\";\n }\n },\n \"false\": {\n go: function () {\n value = false;\n state = \"ok\";\n },\n ovalue: function () {\n value = false;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = false;\n state = \"acomma\";\n },\n avalue: function () {\n value = false;\n state = \"acomma\";\n }\n },\n \"null\": {\n go: function () {\n value = null;\n state = \"ok\";\n },\n ovalue: function () {\n value = null;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = null;\n state = \"acomma\";\n },\n avalue: function () {\n value = null;\n state = \"acomma\";\n }\n }\n };\n\n function debackslashify(text) {\n\n // Remove and replace any backslash escapement.\n\n return text.replace(/\\\\(?:u(.{4})|([^u]))/g, function (ignore, b, c) {\n return b\n ? String.fromCharCode(parseInt(b, 16))\n : escapes[c];\n });\n }\n\n return function (source, reviver) {\n\n // A regular expression is used to extract tokens from the JSON text.\n // The extraction process is cautious.\n\n var result;\n var tx = /^[\\u0020\\t\\n\\r]*(?:([,:\\[\\]{}]|true|false|null)|(-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?)|\"((?:[^\\r\\n\\t\\\\\\\"]|\\\\(?:[\"\\\\\\/trnfb]|u[0-9a-fA-F]{4}))*)\")/;\n\n // Set the starting state.\n\n state = \"go\";\n\n // The stack records the container, key, and state for each object or array\n // that contains another object or array while processing nested structures.\n\n stack = [];\n\n // If any error occurs, we will catch it and ultimately throw a syntax error.\n\n try {\n\n // For each token...\n\n while (true) {\n result = tx.exec(source);\n if (!result) {\n break;\n }\n\n // result is the result array from matching the tokenizing regular expression.\n // result[0] contains everything that matched, including any initial whitespace.\n // result[1] contains any punctuation that was matched, or true, false, or null.\n // result[2] contains a matched number, still in string form.\n // result[3] contains a matched string, without quotes but with escapement.\n\n if (result[1]) {\n\n // Token: Execute the action for this state and token.\n\n action[result[1]][state]();\n\n } else if (result[2]) {\n\n // Number token: Convert the number string into a number value and execute\n // the action for this state and number.\n\n value = +result[2];\n number[state]();\n } else {\n\n // String token: Replace the escapement sequences and execute the action for\n // this state and string.\n\n value = debackslashify(result[3]);\n string[state]();\n }\n\n // Remove the token from the string. The loop will continue as long as there\n // are tokens. This is a slow process, but it allows the use of ^ matching,\n // which assures that no illegal tokens slip through.\n\n source = source.slice(result[0].length);\n }\n\n // If we find a state/token combination that is illegal, then the action will\n // cause an error. We handle the error by simply changing the state.\n\n } catch (e) {\n state = e;\n }\n\n // The parsing is finished. If we are not in the final \"ok\" state, or if the\n // remaining source contains anything except whitespace, then we did not have\n //a well-formed JSON text.\n\n if (state !== \"ok\" || (/[^\\u0020\\t\\n\\r]/.test(source))) {\n throw (state instanceof SyntaxError)\n ? state\n : new SyntaxError(\"JSON\");\n }\n\n // If there is a reviver function, we recursively walk the new structure,\n // passing each name/value pair to the reviver function for possible\n // transformation, starting with a temporary root object that holds the current\n // value in an empty key. If there is not a reviver function, we simply return\n // that value.\n\n return (typeof reviver === \"function\")\n ? (function walk(holder, key) {\n var k;\n var v;\n var val = holder[key];\n if (val && typeof val === \"object\") {\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(val, k)) {\n v = walk(val, k);\n if (v !== undefined) {\n val[k] = v;\n } else {\n delete val[k];\n }\n }\n }\n }\n return reviver.call(holder, key, val);\n }({\"\": value}, \"\"))\n : value;\n };\n }());\n }\n}\n\nmodule.exports = setupCustomJSON;\n","'use strict';\n\nfunction wrapGlobals(window, handler, shim) {\n if (!window) { return; }\n // Adapted from https://github.com/bugsnag/bugsnag-js\n var globals = 'EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload'.split(',');\n var i, global;\n for (i = 0; i < globals.length; ++i) {\n global = globals[i];\n\n if (window[global] && window[global].prototype) {\n _extendListenerPrototype(handler, window[global].prototype, shim);\n }\n }\n}\n\nfunction _extendListenerPrototype(handler, prototype, shim) {\n if (prototype.hasOwnProperty && prototype.hasOwnProperty('addEventListener')) {\n var oldAddEventListener = prototype.addEventListener;\n while (oldAddEventListener._rollbarOldAdd && oldAddEventListener.belongsToShim) {\n oldAddEventListener = oldAddEventListener._rollbarOldAdd;\n }\n var addFn = function(event, callback, bubble) {\n oldAddEventListener.call(this, event, handler.wrap(callback), bubble);\n };\n addFn._rollbarOldAdd = oldAddEventListener;\n addFn.belongsToShim = shim;\n prototype.addEventListener = addFn;\n\n var oldRemoveEventListener = prototype.removeEventListener;\n while (oldRemoveEventListener._rollbarOldRemove && oldRemoveEventListener.belongsToShim) {\n oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;\n }\n var removeFn = function(event, callback, bubble) {\n oldRemoveEventListener.call(this, event, callback && callback._rollbar_wrapped || callback, bubble);\n };\n removeFn._rollbarOldRemove = oldRemoveEventListener;\n removeFn.belongsToShim = shim;\n prototype.removeEventListener = removeFn;\n }\n}\n\nmodule.exports = wrapGlobals;\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction raw(payload, jsonBackup) {\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction selectFrames(frames, range) {\n var len = frames.length;\n if (len > range * 2) {\n return frames.slice(0, range).concat(frames.slice(len - range));\n }\n return frames;\n}\n\nfunction truncateFrames(payload, jsonBackup, range) {\n range = (typeof range === 'undefined') ? 30 : range;\n var body = payload.data.body;\n var frames;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n frames = chain[i].frames;\n frames = selectFrames(frames, range);\n chain[i].frames = frames;\n }\n } else if (body.trace) {\n frames = body.trace.frames;\n frames = selectFrames(frames, range);\n body.trace.frames = frames;\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction maybeTruncateValue(len, val) {\n if (!val) {\n return val;\n }\n if (val.length > len) {\n return val.slice(0, len - 3).concat('...');\n }\n return val;\n}\n\nfunction truncateStrings(len, payload, jsonBackup) {\n function truncator(k, v, seen) {\n switch (_.typeName(v)) {\n case 'string':\n return maybeTruncateValue(len, v);\n case 'object':\n case 'array':\n return traverse(v, truncator, seen);\n default:\n return v;\n }\n }\n payload = traverse(payload, truncator);\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction truncateTraceData(traceData) {\n if (traceData.exception) {\n delete traceData.exception.description;\n traceData.exception.message = maybeTruncateValue(255, traceData.exception.message);\n }\n traceData.frames = selectFrames(traceData.frames, 1);\n return traceData;\n}\n\nfunction minBody(payload, jsonBackup) {\n var body = payload.data.body;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n chain[i] = truncateTraceData(chain[i]);\n }\n } else if (body.trace) {\n body.trace = truncateTraceData(body.trace);\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction needsTruncation(payload, maxSize) {\n return _.maxByteSize(payload) > maxSize;\n}\n\nfunction truncate(payload, jsonBackup, maxSize) {\n maxSize = (typeof maxSize === 'undefined') ? (512 * 1024) : maxSize;\n var strategies = [\n raw,\n truncateFrames,\n truncateStrings.bind(null, 1024),\n truncateStrings.bind(null, 512),\n truncateStrings.bind(null, 256),\n minBody\n ];\n var strategy, results, result;\n\n while ((strategy = strategies.shift())) {\n results = strategy(payload, jsonBackup);\n payload = results[0];\n result = results[1];\n if (result.error || !needsTruncation(result.value, maxSize)) {\n return result;\n }\n }\n return result;\n}\n\nmodule.exports = {\n truncate: truncate,\n\n /* for testing */\n raw: raw,\n truncateFrames: truncateFrames,\n truncateStrings: truncateStrings,\n maybeTruncateValue: maybeTruncateValue\n};\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://rollbar/webpack/universalModuleDefinition","webpack://rollbar/webpack/bootstrap","webpack://rollbar/./src/utility.js","webpack://rollbar/./src/browser/logger.js","webpack://rollbar/./src/browser/url.js","webpack://rollbar/./src/errorParser.js","webpack://rollbar/./src/scrub.js","webpack://rollbar/./src/utility/traverse.js","webpack://rollbar/./src/browser/bundles/rollbar.noconflict.js","webpack://rollbar/./src/browser/rollbar.js","webpack://rollbar/./src/browser/core.js","webpack://rollbar/./src/rollbar.js","webpack://rollbar/./src/rateLimiter.js","webpack://rollbar/./src/merge.js","webpack://rollbar/./src/queue.js","webpack://rollbar/./src/notifier.js","webpack://rollbar/./src/api.js","webpack://rollbar/./src/apiUtility.js","webpack://rollbar/./node_modules/console-polyfill/index.js","webpack://rollbar/./src/browser/detection.js","webpack://rollbar/./src/browser/globalSetup.js","webpack://rollbar/./src/browser/transport.js","webpack://rollbar/./src/browser/transforms.js","webpack://rollbar/./node_modules/error-stack-parser/error-stack-parser.js","webpack://rollbar/./node_modules/error-stack-parser/node_modules/stackframe/stackframe.js","webpack://rollbar/./src/transforms.js","webpack://rollbar/./src/browser/predicates.js","webpack://rollbar/./src/predicates.js","webpack://rollbar/./src/defaults.js","webpack://rollbar/./src/browser/defaults/scrubFields.js","webpack://rollbar/./src/telemetry.js","webpack://rollbar/./src/browser/telemetry.js","webpack://rollbar/./src/browser/domUtility.js","webpack://rollbar/./src/utility/polyfillJSON.js","webpack://rollbar/./vendor/JSON-js/json3.js","webpack://rollbar/./src/browser/wrapGlobals.js","webpack://rollbar/./src/truncation.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;QCVA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;AClFa;;AAEb,YAAY,mBAAO,CAAC,EAAS;;AAE7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,OAAO;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,EAAE;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,mCAAmC,OAAO;AAC1C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,iBAAiB,YAAY;AAC7B;AACA,qBAAqB;AACrB;AACA,KAAK,wBAAwB;AAC7B;AACA,KAAK,yBAAyB;AAC9B;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kCAAkC,OAAO;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,SAAS;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,kCAAkC,OAAO;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,SAAS,UAAU,YAAY,GAAG;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,aAAa;AAChC;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5wBa;;AAEb;AACA,mBAAO,CAAC,EAAkB;AAC1B,gBAAgB,mBAAO,CAAC,EAAa;AACrC,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;AC3Ca;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;AChFa;;AAEb,uBAAuB,mBAAO,CAAC,EAAoB;;AAEnD;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;;AAEA,sBAAsB,wBAAwB;AAC9C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,eAAe;AACf;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7Ha;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,eAAe,mBAAO,CAAC,CAAoB;;AAE3C;AACA;;AAEA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,WAAW;AAC9B;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC9Fa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,kBAAkB;;AAElB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,eAAe,gBAAgB;AAC/B;AACA;AACA;;AAEA,yBAAyB;AACzB;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;;;;ACtDa;;AAEb,cAAc,mBAAO,CAAC,CAAY;;AAElC;AACA;AACA;;AAEA;;;;;;;;ACRa;;AAEb,cAAc,mBAAO,CAAC,CAAQ;AAC9B,gBAAgB,mBAAO,CAAC,EAAc;AACtC,mBAAmB,mBAAO,CAAC,EAAa;AACxC,mBAAmB,mBAAO,CAAC,EAAyB;AACpD,kBAAkB,mBAAO,CAAC,EAAe;AACzC,YAAY,mBAAO,CAAC,CAAU;AAC9B,iBAAiB,mBAAO,CAAC,EAAe;;AAExC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;;;;;;;ACnBa;;AAEb,aAAa,mBAAO,CAAC,EAAY;AACjC,QAAQ,mBAAO,CAAC,CAAY;AAC5B,UAAU,mBAAO,CAAC,EAAQ;AAC1B,aAAa,mBAAO,CAAC,CAAU;AAC/B,cAAc,mBAAO,CAAC,EAAe;;AAErC,gBAAgB,mBAAO,CAAC,EAAa;AACrC,aAAa,mBAAO,CAAC,CAAO;;AAE5B,iBAAiB,mBAAO,CAAC,EAAc;AACvC,uBAAuB,mBAAO,CAAC,EAAe;AAC9C,iBAAiB,mBAAO,CAAC,EAAc;AACvC,uBAAuB,mBAAO,CAAC,EAAe;AAC9C,kBAAkB,mBAAO,CAAC,CAAgB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,0BAA0B,sBAAsB;AAChD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,oCAAoC,SAAS;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,eAAe,mBAAO,CAAC,EAAa;AACpC,kBAAkB,mBAAO,CAAC,EAAwB;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACpjBa;;AAEb,kBAAkB,mBAAO,CAAC,EAAe;AACzC,YAAY,mBAAO,CAAC,EAAS;AAC7B,eAAe,mBAAO,CAAC,EAAY;AACnC,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,6EAA6E,UAAU;AACvF,yFAAyF,UAAU;;AAEnG;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,6BAA6B;AAC7B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACnRa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AChJa;;AAEb;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA,WAAW,YAAY;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACvDa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wDAAwD,WAAW;AACnE;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,QAAQ;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,aAAa,8BAA8B;AAC3C;AACA;AACA;AACA;AACA,+CAA+C,SAAS;AACxD;AACA;AACA,cAAc;AACd;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,SAAS;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,+BAA+B;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC7Qa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACxHa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,cAAc,mBAAO,CAAC,EAAc;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;ACvGa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC7FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;AClBY;;AAEb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;AC/Ba;;AAEb;AACA,gBAAgB,QAAQ;AACxB;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;;AAEA;AACA,gBAAgB,QAAQ;;AAExB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;;;;;;;AClGa;;AAEb;;AAEA,QAAQ,mBAAO,CAAC,CAAY;AAC5B,aAAa,mBAAO,CAAC,CAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACvQa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,kBAAkB,mBAAO,CAAC,CAAgB;AAC1C,aAAa,mBAAO,CAAC,CAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,OAAO;AAC7C;AACA,oBAAoB,6CAA6C;AACjE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,4BAA4B,gBAAgB;AAC5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,sBAAsB;AACvC;AACA;AACA;;AAEA,4BAA4B,oBAAoB;AAChD;AACA;;AAEA;AACA;;AAEA;AACA;AACA,8BAA8B,aAAa;AAC3C;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,kBAAkB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC9UA;AACA;AACA;;AAEA;AACA,QAAQ,IAA0C;AAClD,QAAQ,iCAA6B,CAAC,uBAAY,CAAC,oCAAE,OAAO;AAAA;AAAA;AAAA,oGAAC;AAC7D,KAAK,MAAM,EAIN;AACL,CAAC;AACD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,MAAM;AACzB,oBAAoB,MAAM;AAC1B;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA,CAAC;;;;;;;ACzMD;AACA;AACA;;AAEA;AACA,QAAQ,IAA0C;AAClD,QAAQ,iCAAqB,EAAE,oCAAE,OAAO;AAAA;AAAA;AAAA,oGAAC;AACzC,KAAK,MAAM,EAIN;AACL,CAAC;AACD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,wBAAwB;AAC3C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA,CAAC;;;;;;;;AC9IY;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,sBAAsB;AAC1D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,8BAA8B;AAC9B;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrJa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;ACba;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe;;AAEf;;AAEA,uCAAuC,eAAe;;AAEtD;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA;;AAEA,wCAAwC,eAAe;;AAEvD,mBAAmB,gBAAgB;AACnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,SAAS;AAC1B;;AAEA,mBAAmB,qBAAqB;AACxC;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClMa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACVa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5Da;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qCAAqC,mBAAmB;AACxD;;AAEA;AACA,qCAAqC,4BAA4B;AACjE;AACA;AACA,8BAA8B,4BAA4B;AAC1D;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD;AACA;AACA,8BAA8B,gBAAgB;AAC9C;AACA;;AAEA;AACA,8BAA8B,aAAa;AAC3C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AClLa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,YAAY,mBAAO,CAAC,CAAU;AAC9B,gBAAgB,mBAAO,CAAC,CAAO;AAC/B,cAAc,mBAAO,CAAC,EAAc;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gDAAgD,aAAa;AAC7D;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B,mBAAmB,qBAAqB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,6BAA6B,0BAA0B;AACvD;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,eAAe,0BAA0B;AACzC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB;;AAEjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,SAAS;AAC9C;AACA;AACA,GAAG;AACH,yCAAyC;AACzC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,8CAA8C,QAAQ;;AAEtD;AACA;;AAEA;AACA,8CAA8C,QAAQ;;AAEtD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC/vBa;;AAEb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,6BAA6B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,4BAA4B,QAAQ;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,4BAA4B;AAC7C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,uBAAuB;AACpC;AACA;AACA;AACA,2BAA2B,sBAAsB;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnIa;;AAEb,mBAAmB,mBAAO,CAAC,EAA4B;;AAEvD;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB;AACpB;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,yCAAyC,iBAAiB;AAC1D,8BAA8B,kBAAkB;;AAEhD,yCAAyC,iBAAiB;AAC1D,sCAAsC,6BAA6B;;AAEnE;AACA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,wBAAwB;AACxB,+CAA+C,EAAE;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;;AAGA;;AAEA;;AAEA,UAAU;AACV,UAAU;AACV,UAAU;AACV;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA,qBAAqB,YAAY;AACjC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,qBAAqB,YAAY;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,eAAe;AACf;AACA,cAAc,wDAAwD;AACtE,cAAc,0BAA0B;AACxC;AACA;AACA;AACA;;AAEA;;AAEA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,mBAAmB,WAAW;AAC9B;AACA;;AAEA;;AAEA,OAAO;AACP;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,sBAAsB,UAAU;AAChC;AACA;;;AAGA;;AAEA;AACA;;AAEA;AACA;;AAEA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB,oBAAoB;AACpB,cAAc;AACd,gBAAgB;AAChB,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,UAAU;AACV;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,WAAW;AACX;AACA,wBAAwB,gDAAgD;AACxE;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,SAAS;AACT,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,WAAW;AACX;AACA,wBAAwB,gDAAgD;AACxE;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,sCAAsC,EAAE;AACxC;AACA;AACA;AACA,SAAS;AACT;;AAEA;;AAEA;AACA;;AAEA;AACA,+CAA+C,yGAAyG,EAAE;;AAE1J;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,SAAS;AACT;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE,UAAU;AACvB;AACA;AACA,KAAK;AACL;AACA;;AAEA;;;;;;;;AC1vBa;;AAEb;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,aAAa,oBAAoB;AACjC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC1Ca;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,eAAe,mBAAO,CAAC,CAAoB;;AAE3C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA","file":"rollbar.noconflict.umd.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"rollbar\"] = factory();\n\telse\n\t\troot[\"rollbar\"] = factory();\n})(this, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n","'use strict';\n\nvar merge = require('./merge');\n\nvar RollbarJSON = {};\nfunction setupJSON(polyfillJSON) {\n if (isFunction(RollbarJSON.stringify) && isFunction(RollbarJSON.parse)) {\n return;\n }\n\n if (isDefined(JSON)) {\n // If polyfill is provided, prefer it over existing non-native shims.\n if(polyfillJSON) {\n if (isNativeFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isNativeFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n } else { // else accept any interface that is present.\n if (isFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n }\n }\n if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {\n polyfillJSON && polyfillJSON(RollbarJSON);\n }\n}\n\n/*\n * isType - Given a Javascript value and a string, returns true if the type of the value matches the\n * given string.\n *\n * @param x - any value\n * @param t - a lowercase string containing one of the following type names:\n * - undefined\n * - null\n * - error\n * - number\n * - boolean\n * - string\n * - symbol\n * - function\n * - object\n * - array\n * @returns true if x is of type t, otherwise false\n */\nfunction isType(x, t) {\n return t === typeName(x);\n}\n\n/*\n * typeName - Given a Javascript value, returns the type of the object as a string\n */\nfunction typeName(x) {\n var name = typeof x;\n if (name !== 'object') {\n return name;\n }\n if (!x) {\n return 'null';\n }\n if (x instanceof Error) {\n return 'error';\n }\n return ({}).toString.call(x).match(/\\s([a-zA-Z]+)/)[1].toLowerCase();\n}\n\n/* isFunction - a convenience function for checking if a value is a function\n *\n * @param f - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isFunction(f) {\n return isType(f, 'function');\n}\n\n/* isNativeFunction - a convenience function for checking if a value is a native JS function\n *\n * @param f - any value\n * @returns true if f is a native JS function, otherwise false\n */\nfunction isNativeFunction(f) {\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n var funcMatchString = Function.prototype.toString.call(Object.prototype.hasOwnProperty)\n .replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?');\n var reIsNative = RegExp('^' + funcMatchString + '$');\n return isObject(f) && reIsNative.test(f);\n}\n\n/* isObject - Checks if the argument is an object\n *\n * @param value - any value\n * @returns true is value is an object function is an object)\n*/\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/* isString - Checks if the argument is a string\n *\n * @param value - any value\n * @returns true if value is a string\n*/\nfunction isString(value) {\n return typeof value === 'string' || value instanceof String\n}\n\n/**\n * isFiniteNumber - determines whether the passed value is a finite number\n *\n * @param {*} n - any value\n * @returns true if value is a finite number\n */\n function isFiniteNumber(n) {\n return Number.isFinite(n);\n}\n\n/*\n * isDefined - a convenience function for checking if a value is not equal to undefined\n *\n * @param u - any value\n * @returns true if u is anything other than undefined\n */\nfunction isDefined(u) {\n return !isType(u, 'undefined');\n}\n\n/*\n * isIterable - convenience function for checking if a value can be iterated, essentially\n * whether it is an object or an array.\n *\n * @param i - any value\n * @returns true if i is an object or an array as determined by `typeName`\n */\nfunction isIterable(i) {\n var type = typeName(i);\n return (type === 'object' || type === 'array');\n}\n\n/*\n * isError - convenience function for checking if a value is of an error type\n *\n * @param e - any value\n * @returns true if e is an error\n */\nfunction isError(e) {\n // Detect both Error and Firefox Exception type\n return isType(e, 'error') || isType(e, 'exception');\n}\n\n/* isPromise - a convenience function for checking if a value is a promise\n *\n * @param p - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isPromise(p) {\n return isObject(p) && isType(p.then, 'function');\n}\n\nfunction redact() {\n return '********';\n}\n\n// from http://stackoverflow.com/a/8809472/1138191\nfunction uuid4() {\n var d = now();\n var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n var r = (d + Math.random() * 16) % 16 | 0;\n d = Math.floor(d / 16);\n return (c === 'x' ? r : (r & 0x7 | 0x8)).toString(16);\n });\n return uuid;\n}\n\nvar LEVELS = {\n debug: 0,\n info: 1,\n warning: 2,\n error: 3,\n critical: 4\n};\n\nfunction sanitizeUrl(url) {\n var baseUrlParts = parseUri(url);\n if (!baseUrlParts) {\n return '(unknown)';\n }\n\n // remove a trailing # if there is no anchor\n if (baseUrlParts.anchor === '') {\n baseUrlParts.source = baseUrlParts.source.replace('#', '');\n }\n\n url = baseUrlParts.source.replace('?' + baseUrlParts.query, '');\n return url;\n}\n\nvar parseUriOptions = {\n strictMode: false,\n key: [\n 'source',\n 'protocol',\n 'authority',\n 'userInfo',\n 'user',\n 'password',\n 'host',\n 'port',\n 'relative',\n 'path',\n 'directory',\n 'file',\n 'query',\n 'anchor'\n ],\n q: {\n name: 'queryKey',\n parser: /(?:^|&)([^&=]*)=?([^&]*)/g\n },\n parser: {\n strict: /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n loose: /^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/\n }\n};\n\nfunction parseUri(str) {\n if (!isType(str, 'string')) {\n return undefined;\n }\n\n var o = parseUriOptions;\n var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);\n var uri = {};\n\n for (var i = 0, l = o.key.length; i < l; ++i) {\n uri[o.key[i]] = m[i] || '';\n }\n\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) {\n uri[o.q.name][$1] = $2;\n }\n });\n\n return uri;\n}\n\nfunction addParamsAndAccessTokenToPath(accessToken, options, params) {\n params = params || {};\n params.access_token = accessToken;\n var paramsArray = [];\n var k;\n for (k in params) {\n if (Object.prototype.hasOwnProperty.call(params, k)) {\n paramsArray.push([k, params[k]].join('='));\n }\n }\n var query = '?' + paramsArray.sort().join('&');\n\n options = options || {};\n options.path = options.path || '';\n var qs = options.path.indexOf('?');\n var h = options.path.indexOf('#');\n var p;\n if (qs !== -1 && (h === -1 || h > qs)) {\n p = options.path;\n options.path = p.substring(0,qs) + query + '&' + p.substring(qs+1);\n } else {\n if (h !== -1) {\n p = options.path;\n options.path = p.substring(0,h) + query + p.substring(h);\n } else {\n options.path = options.path + query;\n }\n }\n}\n\nfunction formatUrl(u, protocol) {\n protocol = protocol || u.protocol;\n if (!protocol && u.port) {\n if (u.port === 80) {\n protocol = 'http:';\n } else if (u.port === 443) {\n protocol = 'https:';\n }\n }\n protocol = protocol || 'https:';\n\n if (!u.hostname) {\n return null;\n }\n var result = protocol + '//' + u.hostname;\n if (u.port) {\n result = result + ':' + u.port;\n }\n if (u.path) {\n result = result + u.path;\n }\n return result;\n}\n\nfunction stringify(obj, backup) {\n var value, error;\n try {\n value = RollbarJSON.stringify(obj);\n } catch (jsonError) {\n if (backup && isFunction(backup)) {\n try {\n value = backup(obj);\n } catch (backupError) {\n error = backupError;\n }\n } else {\n error = jsonError;\n }\n }\n return {error: error, value: value};\n}\n\nfunction maxByteSize(string) {\n // The transport will use utf-8, so assume utf-8 encoding.\n //\n // This minimal implementation will accurately count bytes for all UCS-2 and\n // single code point UTF-16. If presented with multi code point UTF-16,\n // which should be rare, it will safely overcount, not undercount.\n //\n // While robust utf-8 encoders exist, this is far smaller and far more performant.\n // For quickly counting payload size for truncation, smaller is better.\n\n var count = 0;\n var length = string.length;\n\n for (var i = 0; i < length; i++) {\n var code = string.charCodeAt(i);\n if (code < 128) { // up to 7 bits\n count = count + 1;\n } else if (code < 2048) { // up to 11 bits\n count = count + 2;\n } else if (code < 65536) { // up to 16 bits\n count = count + 3;\n }\n }\n\n return count;\n}\n\nfunction jsonParse(s) {\n var value, error;\n try {\n value = RollbarJSON.parse(s);\n } catch (e) {\n error = e;\n }\n return {error: error, value: value};\n}\n\nfunction makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n mode,\n backupMessage,\n errorParser\n) {\n var location = {\n url: url || '',\n line: lineno,\n column: colno\n };\n location.func = errorParser.guessFunctionName(location.url, location.line);\n location.context = errorParser.gatherContext(location.url, location.line);\n var href = typeof document !== 'undefined' && document && document.location && document.location.href;\n var useragent = typeof window !== 'undefined' && window && window.navigator && window.navigator.userAgent;\n return {\n 'mode': mode,\n 'message': error ? String(error) : (message || backupMessage),\n 'url': href,\n 'stack': [location],\n 'useragent': useragent\n };\n}\n\nfunction wrapCallback(logger, f) {\n return function(err, resp) {\n try {\n f(err, resp);\n } catch (e) {\n logger.error(e);\n }\n };\n}\n\nfunction nonCircularClone(obj) {\n var seen = [obj];\n\n function clone(obj, seen) {\n var value, name, newSeen, result = {};\n\n try {\n for (name in obj) {\n value = obj[name];\n\n if (value && (isType(value, 'object') || isType(value, 'array'))) {\n if (seen.includes(value)) {\n result[name] = 'Removed circular reference: ' + typeName(value);\n } else {\n newSeen = seen.slice();\n newSeen.push(value);\n result[name] = clone(value, newSeen);\n }\n continue;\n }\n\n result[name] = value;\n }\n } catch (e) {\n result = 'Failed cloning custom data: ' + e.message;\n }\n return result;\n }\n return clone(obj, seen);\n}\n\nfunction createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\n var diagnostic = {};\n var argTypes = [];\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n argTypes.push(typ);\n switch (typ) {\n case 'undefined':\n break;\n case 'string':\n message ? extraArgs.push(arg) : message = arg;\n break;\n case 'function':\n callback = wrapCallback(logger, arg);\n break;\n case 'date':\n extraArgs.push(arg);\n break;\n case 'error':\n case 'domexception':\n case 'exception': // Firefox Exception type\n err ? extraArgs.push(arg) : err = arg;\n break;\n case 'object':\n case 'array':\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n if (requestKeys && typ === 'object' && !request) {\n for (var j = 0, len = requestKeys.length; j < len; ++j) {\n if (arg[requestKeys[j]] !== undefined) {\n request = arg;\n break;\n }\n }\n if (request) {\n break;\n }\n }\n custom ? extraArgs.push(arg) : custom = arg;\n break;\n default:\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n extraArgs.push(arg);\n }\n }\n\n // if custom is an array this turns it into an object with integer keys\n if (custom) custom = nonCircularClone(custom);\n\n if (extraArgs.length > 0) {\n if (!custom) custom = nonCircularClone({});\n custom.extraArgs = nonCircularClone(extraArgs);\n }\n\n var item = {\n message: message,\n err: err,\n custom: custom,\n timestamp: now(),\n callback: callback,\n notifier: notifier,\n diagnostic: diagnostic,\n uuid: uuid4()\n };\n\n setCustomItemKeys(item, custom);\n\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n item.diagnostic.original_arg_types = argTypes;\n return item;\n}\n\nfunction setCustomItemKeys(item, custom) {\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (custom && custom.skipFrames !== undefined) {\n item.skipFrames = custom.skipFrames;\n delete custom.skipFrames;\n }\n}\n\nfunction addErrorContext(item, errors) {\n var custom = item.data.custom || {};\n var contextAdded = false;\n\n try {\n for (var i = 0; i < errors.length; ++i) {\n if (errors[i].hasOwnProperty('rollbarContext')) {\n custom = merge(custom, nonCircularClone(errors[i].rollbarContext));\n contextAdded = true;\n }\n }\n\n // Avoid adding an empty object to the data.\n if (contextAdded) {\n item.data.custom = custom;\n }\n } catch (e) {\n item.diagnostic.error_context = 'Failed: ' + e.message;\n }\n}\n\nvar TELEMETRY_TYPES = ['log', 'network', 'dom', 'navigation', 'error', 'manual'];\nvar TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];\n\nfunction arrayIncludes(arr, val) {\n for (var k = 0; k < arr.length; ++k) {\n if (arr[k] === val) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction createTelemetryEvent(args) {\n var type, metadata, level;\n var arg;\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n switch (typ) {\n case 'string':\n if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {\n type = arg;\n } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {\n level = arg;\n }\n break;\n case 'object':\n metadata = arg;\n break;\n default:\n break;\n }\n }\n var event = {\n type: type || 'manual',\n metadata: metadata || {},\n level: level\n };\n\n return event;\n}\n\n/*\n * get - given an obj/array and a keypath, return the value at that keypath or\n * undefined if not possible.\n *\n * @param obj - an object or array\n * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'\n * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`\n */\nfunction get(obj, path) {\n if (!obj) {\n return undefined;\n }\n var keys = path.split('.');\n var result = obj;\n try {\n for (var i = 0, len = keys.length; i < len; ++i) {\n result = result[keys[i]];\n }\n } catch (e) {\n result = undefined;\n }\n return result;\n}\n\nfunction set(obj, path, value) {\n if (!obj) {\n return;\n }\n var keys = path.split('.');\n var len = keys.length;\n if (len < 1) {\n return;\n }\n if (len === 1) {\n obj[keys[0]] = value;\n return;\n }\n try {\n var temp = obj[keys[0]] || {};\n var replacement = temp;\n for (var i = 1; i < len - 1; ++i) {\n temp[keys[i]] = temp[keys[i]] || {};\n temp = temp[keys[i]];\n }\n temp[keys[len-1]] = value;\n obj[keys[0]] = replacement;\n } catch (e) {\n return;\n }\n}\n\nfunction formatArgsAsString(args) {\n var i, len, arg;\n var result = [];\n for (i = 0, len = args.length; i < len; ++i) {\n arg = args[i];\n switch (typeName(arg)) {\n case 'object':\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500) {\n arg = arg.substr(0, 497) + '...';\n }\n break;\n case 'null':\n arg = 'null';\n break;\n case 'undefined':\n arg = 'undefined';\n break;\n case 'symbol':\n arg = arg.toString();\n break;\n }\n result.push(arg);\n }\n return result.join(' ');\n}\n\nfunction now() {\n if (Date.now) {\n return +Date.now();\n }\n return +new Date();\n}\n\nfunction filterIp(requestData, captureIp) {\n if (!requestData || !requestData['user_ip'] || captureIp === true) {\n return;\n }\n var newIp = requestData['user_ip'];\n if (!captureIp) {\n newIp = null;\n } else {\n try {\n var parts;\n if (newIp.indexOf('.') !== -1) {\n parts = newIp.split('.');\n parts.pop();\n parts.push('0');\n newIp = parts.join('.');\n } else if (newIp.indexOf(':') !== -1) {\n parts = newIp.split(':');\n if (parts.length > 2) {\n var beginning = parts.slice(0, 3);\n var slashIdx = beginning[2].indexOf('/');\n if (slashIdx !== -1) {\n beginning[2] = beginning[2].substring(0, slashIdx);\n }\n var terminal = '0000:0000:0000:0000:0000';\n newIp = beginning.concat(terminal).join(':');\n }\n } else {\n newIp = null;\n }\n } catch (e) {\n newIp = null;\n }\n }\n requestData['user_ip'] = newIp;\n}\n\nfunction handleOptions(current, input, payload, logger) {\n var result = merge(current, input, payload);\n result = updateDeprecatedOptions(result, logger);\n if (!input || input.overwriteScrubFields) {\n return result;\n }\n if (input.scrubFields) {\n result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);\n }\n return result;\n}\n\nfunction updateDeprecatedOptions(options, logger) {\n if(options.hostWhiteList && !options.hostSafeList) {\n options.hostSafeList = options.hostWhiteList;\n options.hostWhiteList = undefined;\n logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');\n }\n if(options.hostBlackList && !options.hostBlockList) {\n options.hostBlockList = options.hostBlackList;\n options.hostBlackList = undefined;\n logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');\n }\n return options;\n}\n\nmodule.exports = {\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n createItem: createItem,\n addErrorContext: addErrorContext,\n createTelemetryEvent: createTelemetryEvent,\n filterIp: filterIp,\n formatArgsAsString: formatArgsAsString,\n formatUrl: formatUrl,\n get: get,\n handleOptions: handleOptions,\n isError: isError,\n isFiniteNumber: isFiniteNumber,\n isFunction: isFunction,\n isIterable: isIterable,\n isNativeFunction: isNativeFunction,\n isObject: isObject,\n isString: isString,\n isType: isType,\n isPromise: isPromise,\n jsonParse: jsonParse,\n LEVELS: LEVELS,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n merge: merge,\n now: now,\n redact: redact,\n RollbarJSON: RollbarJSON,\n sanitizeUrl: sanitizeUrl,\n set: set,\n setupJSON: setupJSON,\n stringify: stringify,\n maxByteSize: maxByteSize,\n typeName: typeName,\n uuid4: uuid4\n};\n","'use strict';\n\n/* eslint-disable no-console */\nrequire('console-polyfill');\nvar detection = require('./detection');\nvar _ = require('../utility');\n\nfunction error() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.error(_.formatArgsAsString(args));\n } else {\n console.error.apply(console, args);\n }\n}\n\nfunction info() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.info(_.formatArgsAsString(args));\n } else {\n console.info.apply(console, args);\n }\n}\n\nfunction log() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.log(_.formatArgsAsString(args));\n } else {\n console.log.apply(console, args);\n }\n}\n\n/* eslint-enable no-console */\n\nmodule.exports = {\n error: error,\n info: info,\n log: log\n};\n","'use strict';\n\n// See https://nodejs.org/docs/latest/api/url.html\nfunction parse(url) {\n var result = {\n protocol: null, auth: null, host: null, path: null,\n hash: null, href: url, hostname: null, port: null,\n pathname: null, search: null, query: null\n };\n\n var i, last;\n i = url.indexOf('//');\n if (i !== -1) {\n result.protocol = url.substring(0,i);\n last = i+2;\n } else {\n last = 0;\n }\n \n i = url.indexOf('@', last);\n if (i !== -1) {\n result.auth = url.substring(last, i);\n last = i+1;\n }\n\n i = url.indexOf('/', last);\n if (i === -1) {\n i = url.indexOf('?', last);\n if (i === -1) {\n i = url.indexOf('#', last);\n if (i === -1) {\n result.host = url.substring(last);\n } else {\n result.host = url.substring(last, i);\n result.hash = url.substring(i);\n }\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n return result;\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n\n i = url.indexOf('#', last);\n if (i === -1) {\n result.path = url.substring(last);\n } else {\n result.path = url.substring(last, i);\n result.hash = url.substring(i);\n }\n\n if (result.path) {\n var pathParts = result.path.split('?');\n result.pathname = pathParts[0];\n result.query = pathParts[1];\n result.search = result.query ? '?' + result.query : null;\n }\n return result;\n}\n\nmodule.exports = {\n parse: parse\n};\n","'use strict';\n\nvar ErrorStackParser = require('error-stack-parser');\n\nvar UNKNOWN_FUNCTION = '?';\nvar ERR_CLASS_REGEXP = new RegExp('^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ');\n\nfunction guessFunctionName() {\n return UNKNOWN_FUNCTION;\n}\n\n\nfunction gatherContext() {\n return null;\n}\n\n\nfunction Frame(stackFrame) {\n var data = {};\n\n data._stackFrame = stackFrame;\n\n data.url = stackFrame.fileName;\n data.line = stackFrame.lineNumber;\n data.func = stackFrame.functionName;\n data.column = stackFrame.columnNumber;\n data.args = stackFrame.args;\n\n data.context = gatherContext();\n\n return data;\n}\n\n\nfunction Stack(exception, skip) {\n function getStack() {\n var parserStack = [];\n\n skip = skip || 0;\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch(e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = skip; i < parserStack.length; i++) {\n stack.push(new Frame(parserStack[i]));\n }\n\n return stack;\n }\n\n return {\n stack: getStack(),\n message: exception.message,\n name: _mostSpecificErrorName(exception),\n rawStack: exception.stack,\n rawException: exception\n };\n}\n\n\nfunction parse(e, skip) {\n var err = e;\n\n if (err.nested) {\n var traceChain = [];\n while (err) {\n traceChain.push(new Stack(err, skip));\n err = err.nested;\n\n skip = 0; // Only apply skip value to primary error\n }\n\n // Return primary error with full trace chain attached.\n traceChain[0].traceChain = traceChain;\n return traceChain[0];\n } else {\n return new Stack(err, skip);\n }\n}\n\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg || !errMsg.match) {\n return ['Unknown error. There was no error message to display.', ''];\n }\n var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);\n var errClass = '(unknown)';\n\n if (errClassMatch) {\n errClass = errClassMatch[errClassMatch.length - 1];\n errMsg = errMsg.replace((errClassMatch[errClassMatch.length - 2] || '') + errClass + ':', '');\n errMsg = errMsg.replace(/(^[\\s]+|[\\s]+$)/g, '');\n }\n return [errClass, errMsg];\n}\n\n// * Prefers any value over an empty string\n// * Prefers any value over 'Error' where possible\n// * Prefers name over constructor.name when both are more specific than 'Error'\nfunction _mostSpecificErrorName(error) {\n var name = error.name && error.name.length && error.name;\n var constructorName = error.constructor.name && error.constructor.name.length && error.constructor.name;\n\n if (!name || !constructorName) {\n return name || constructorName;\n }\n\n if (name === 'Error') {\n return constructorName;\n }\n return name;\n}\n\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame\n};\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction scrub(data, scrubFields, scrubPaths) {\n scrubFields = scrubFields || [];\n\n if (scrubPaths) {\n for (var i = 0; i < scrubPaths.length; ++i) {\n scrubPath(data, scrubPaths[i]);\n }\n }\n\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart) {\n return paramPart + _.redact();\n }\n\n function paramScrubber(v) {\n var i;\n if (_.isType(v, 'string')) {\n for (i = 0; i < queryRes.length; ++i) {\n v = v.replace(queryRes[i], redactQueryParam);\n }\n }\n return v;\n }\n\n function valScrubber(k, v) {\n var i;\n for (i = 0; i < paramRes.length; ++i) {\n if (paramRes[i].test(k)) {\n v = _.redact();\n break;\n }\n }\n return v;\n }\n\n function scrubber(k, v, seen) {\n var tmpV = valScrubber(k, v);\n if (tmpV === v) {\n if (_.isType(v, 'object') || _.isType(v, 'array')) {\n return traverse(v, scrubber, seen);\n }\n return paramScrubber(tmpV);\n } else {\n return tmpV;\n }\n }\n\n return traverse(data, scrubber);\n}\n\nfunction scrubPath(obj, path) {\n var keys = path.split('.');\n var last = keys.length - 1;\n try {\n for (var i = 0; i <= last; ++i) {\n if (i < last) {\n obj = obj[keys[i]];\n } else {\n obj[keys[i]] = _.redact();\n }\n }\n } catch (e) {\n // Missing key is OK;\n }\n}\n\nfunction _getScrubFieldRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '^\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?$';\n ret.push(new RegExp(pat, 'i'));\n }\n return ret;\n}\n\n\nfunction _getScrubQueryParamRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?';\n ret.push(new RegExp('(' + pat + '=)([^&\\\\n]+)', 'igm'));\n }\n return ret;\n}\n\nmodule.exports = scrub;\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction traverse(obj, func, seen) {\n var k, v, i;\n var isObj = _.isType(obj, 'object');\n var isArray = _.isType(obj, 'array');\n var keys = [];\n var seenIndex;\n\n // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.\n seen = seen || { obj: [], mapped: []};\n\n if (isObj) {\n seenIndex = seen.obj.indexOf(obj);\n\n if (isObj && seenIndex !== -1) {\n // Prefer the mapped object if there is one.\n return seen.mapped[seenIndex] || seen.obj[seenIndex];\n }\n\n seen.obj.push(obj);\n seenIndex = seen.obj.length - 1;\n }\n\n if (isObj) {\n for (k in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, k)) {\n keys.push(k);\n }\n }\n } else if (isArray) {\n for (i = 0; i < obj.length; ++i) {\n keys.push(i);\n }\n }\n\n var result = isObj ? {} : [];\n var same = true;\n for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n result[k] = func(k, v, seen);\n same = same && result[k] === obj[k];\n }\n\n if (isObj && !same) {\n seen.mapped[seenIndex] = result;\n }\n\n return !same ? result : obj;\n}\n\nmodule.exports = traverse;\n","'use strict';\n\nvar rollbar = require('../rollbar');\n\nif ((typeof window !== 'undefined') && !window._rollbarStartTime) {\n window._rollbarStartTime = (new Date()).getTime();\n}\n\nmodule.exports = rollbar;\n","'use strict';\n\nvar Rollbar = require('./core');\nvar telemeter = require('../telemetry');\nvar instrumenter = require('./telemetry');\nvar polyfillJSON = require('../utility/polyfillJSON');\nvar wrapGlobals = require('./wrapGlobals');\nvar scrub = require('../scrub');\nvar truncation = require('../truncation');\n\nRollbar.setComponents({\n telemeter: telemeter,\n instrumenter: instrumenter,\n polyfillJSON: polyfillJSON,\n wrapGlobals: wrapGlobals,\n scrub: scrub,\n truncation: truncation\n});\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar Client = require('../rollbar');\nvar _ = require('../utility');\nvar API = require('../api');\nvar logger = require('./logger');\nvar globals = require('./globalSetup');\n\nvar Transport = require('./transport');\nvar urllib = require('./url');\n\nvar transforms = require('./transforms');\nvar sharedTransforms = require('../transforms');\nvar predicates = require('./predicates');\nvar sharedPredicates = require('../predicates');\nvar errorParser = require('../errorParser');\n\nfunction Rollbar(options, client) {\n this.options = _.handleOptions(defaultOptions, options, null, logger);\n this.options._configuredOptions = options;\n var Telemeter = this.components.telemeter;\n var Instrumenter = this.components.instrumenter;\n var polyfillJSON = this.components.polyfillJSON;\n this.wrapGlobals = this.components.wrapGlobals;\n this.scrub = this.components.scrub;\n var truncation = this.components.truncation;\n\n var transport = new Transport(truncation);\n var api = new API(this.options, transport, urllib, truncation);\n if (Telemeter) {\n this.telemeter = new Telemeter(this.options);\n }\n this.client = client || new Client(this.options, api, logger, this.telemeter, 'browser');\n var gWindow = _gWindow();\n var gDocument = (typeof document != 'undefined') && document;\n this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers\n this.anonymousErrorsPending = 0;\n addTransformsToNotifier(this.client.notifier, this, gWindow);\n addPredicatesToQueue(this.client.queue);\n this.setupUnhandledCapture();\n if (Instrumenter) {\n this.instrumenter = new Instrumenter(this.options, this.client.telemeter, this, gWindow, gDocument);\n this.instrumenter.instrument();\n }\n _.setupJSON(polyfillJSON);\n}\n\nvar _instance = null;\nRollbar.init = function(options, client) {\n if (_instance) {\n return _instance.global(options).configure(options);\n }\n _instance = new Rollbar(options, client);\n return _instance;\n};\n\nRollbar.prototype.components = {};\n\nRollbar.setComponents = function(components) {\n Rollbar.prototype.components = components;\n}\n\nfunction handleUninitialized(maybeCallback) {\n var message = 'Rollbar is not initialized';\n logger.error(message);\n if (maybeCallback) {\n maybeCallback(new Error(message));\n }\n}\n\nRollbar.prototype.global = function(options) {\n this.client.global(options);\n return this;\n};\nRollbar.global = function(options) {\n if (_instance) {\n return _instance.global(options);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.configure = function(options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = {payload: payloadData};\n }\n this.options = _.handleOptions(oldOptions, options, payload, logger);\n this.options._configuredOptions = _.handleOptions(oldOptions._configuredOptions, options, payload);\n this.client.configure(this.options, payloadData);\n this.instrumenter && this.instrumenter.configure(this.options);\n this.setupUnhandledCapture();\n return this;\n};\nRollbar.configure = function(options, payloadData) {\n if (_instance) {\n return _instance.configure(options, payloadData);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.lastError = function() {\n return this.client.lastError;\n};\nRollbar.lastError = function() {\n if (_instance) {\n return _instance.lastError();\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.log = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.log(item);\n return {uuid: uuid};\n};\nRollbar.log = function() {\n if (_instance) {\n return _instance.log.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.debug = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.debug(item);\n return {uuid: uuid};\n};\nRollbar.debug = function() {\n if (_instance) {\n return _instance.debug.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.info = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.info(item);\n return {uuid: uuid};\n};\nRollbar.info = function() {\n if (_instance) {\n return _instance.info.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warn = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warn(item);\n return {uuid: uuid};\n};\nRollbar.warn = function() {\n if (_instance) {\n return _instance.warn.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warning = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warning(item);\n return {uuid: uuid};\n};\nRollbar.warning = function() {\n if (_instance) {\n return _instance.warning.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.error = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.error(item);\n return {uuid: uuid};\n};\nRollbar.error = function() {\n if (_instance) {\n return _instance.error.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.critical = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.critical(item);\n return {uuid: uuid};\n};\nRollbar.critical = function() {\n if (_instance) {\n return _instance.critical.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.buildJsonPayload = function(item) {\n return this.client.buildJsonPayload(item);\n};\nRollbar.buildJsonPayload = function() {\n if (_instance) {\n return _instance.buildJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.sendJsonPayload = function(jsonPayload) {\n return this.client.sendJsonPayload(jsonPayload);\n};\nRollbar.sendJsonPayload = function() {\n if (_instance) {\n return _instance.sendJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.setupUnhandledCapture = function() {\n var gWindow = _gWindow();\n\n if (!this.unhandledExceptionsInitialized) {\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(gWindow, this);\n if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {\n this.wrapGlobals(gWindow, this);\n }\n this.unhandledExceptionsInitialized = true;\n }\n }\n if (!this.unhandledRejectionsInitialized) {\n if (this.options.captureUnhandledRejections || this.options.handleUnhandledRejections) {\n globals.captureUnhandledRejections(gWindow, this);\n this.unhandledRejectionsInitialized = true;\n }\n }\n};\n\nRollbar.prototype.handleUncaughtException = function(message, url, lineno, colno, error, context) {\n if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {\n return;\n }\n\n // Chrome will always send 5+ arguments and error will be valid or null, not undefined.\n // If error is undefined, we have a different caller.\n // Chrome also sends errors from web workers with null error, but does not invoke\n // prepareStackTrace() for these. Test for empty url to skip them.\n if (this.options.inspectAnonymousErrors && this.isChrome && error === null && url === '') {\n return 'anonymous';\n }\n\n var item;\n var stackInfo = _.makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n 'onerror',\n 'uncaught exception',\n errorParser\n );\n if (_.isError(error)) {\n item = this._createItem([message, error, context]);\n item._unhandledStackInfo = stackInfo;\n } else if (_.isError(url)) {\n item = this._createItem([message, url, context]);\n item._unhandledStackInfo = stackInfo;\n } else {\n item = this._createItem([message, context]);\n item.stackInfo = stackInfo;\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n this.client.log(item);\n};\n\n/**\n * Chrome only. Other browsers will ignore.\n *\n * Use Error.prepareStackTrace to extract information about errors that\n * do not have a valid error object in onerror().\n *\n * In tested version of Chrome, onerror is called first but has no way\n * to communicate with prepareStackTrace. Use a counter to let this\n * handler know which errors to send to Rollbar.\n *\n * In config options, set inspectAnonymousErrors to enable.\n */\nRollbar.prototype.handleAnonymousErrors = function() {\n if (!this.options.inspectAnonymousErrors || !this.isChrome) {\n return;\n }\n\n var r = this;\n function prepareStackTrace(error, _stack) { // eslint-disable-line no-unused-vars\n if (r.options.inspectAnonymousErrors) {\n if (r.anonymousErrorsPending) {\n // This is the only known way to detect that onerror saw an anonymous error.\n // It depends on onerror reliably being called before Error.prepareStackTrace,\n // which so far holds true on tested versions of Chrome. If versions of Chrome\n // are tested that behave differently, this logic will need to be updated\n // accordingly.\n r.anonymousErrorsPending -= 1;\n\n if (!error) {\n // Not likely to get here, but calling handleUncaughtException from here\n // without an error object would throw off the anonymousErrorsPending counter,\n // so return now.\n return;\n }\n\n // Allow this to be tracked later.\n error._isAnonymous = true;\n\n // url, lineno, colno shouldn't be needed for these errors.\n // If that changes, update this accordingly, using the unused\n // _stack param as needed (rather than parse error.toString()).\n r.handleUncaughtException(error.message, null, null, null, error);\n }\n }\n\n // Workaround to ensure stack is preserved for normal errors.\n return error.stack;\n }\n\n // https://v8.dev/docs/stack-trace-api\n try {\n Error.prepareStackTrace = prepareStackTrace;\n } catch (e) {\n this.options.inspectAnonymousErrors = false;\n this.error('anonymous error handler failed', e);\n }\n}\n\nRollbar.prototype.handleUnhandledRejection = function(reason, promise) {\n if (!this.options.captureUnhandledRejections && !this.options.handleUnhandledRejections) {\n return;\n }\n\n var message = 'unhandled rejection was null or undefined!';\n if (reason) {\n if (reason.message) {\n message = reason.message;\n } else {\n var reasonResult = _.stringify(reason);\n if (reasonResult.value) {\n message = reasonResult.value;\n }\n }\n }\n var context = (reason && reason._rollbarContext) || (promise && promise._rollbarContext);\n\n var item;\n if (_.isError(reason)) {\n item = this._createItem([message, reason, context]);\n } else {\n item = this._createItem([message, reason, context]);\n item.stackInfo = _.makeUnhandledStackInfo(\n message,\n '',\n 0,\n 0,\n null,\n 'unhandledrejection',\n '',\n errorParser\n );\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n item._originalArgs = item._originalArgs || [];\n item._originalArgs.push(promise);\n this.client.log(item);\n};\n\nRollbar.prototype.wrap = function(f, context, _before) {\n try {\n var ctxFn;\n if(_.isFunction(context)) {\n ctxFn = context;\n } else {\n ctxFn = function() { return context || {}; };\n }\n\n if (!_.isFunction(f)) {\n return f;\n }\n\n if (f._isWrap) {\n return f;\n }\n\n if (!f._rollbar_wrapped) {\n f._rollbar_wrapped = function () {\n if (_before && _.isFunction(_before)) {\n _before.apply(this, arguments);\n }\n try {\n return f.apply(this, arguments);\n } catch(exc) {\n var e = exc;\n if (e && window._rollbarWrappedError !== e) {\n if (_.isType(e, 'string')) {\n e = new String(e);\n }\n e._rollbarContext = ctxFn() || {};\n e._rollbarContext._wrappedSource = f.toString();\n\n window._rollbarWrappedError = e;\n }\n throw e;\n }\n };\n\n f._rollbar_wrapped._isWrap = true;\n\n if (f.hasOwnProperty) {\n for (var prop in f) {\n if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {\n f._rollbar_wrapped[prop] = f[prop];\n }\n }\n }\n }\n\n return f._rollbar_wrapped;\n } catch (e) {\n // Return the original function if the wrap fails.\n return f;\n }\n};\nRollbar.wrap = function(f, context) {\n if (_instance) {\n return _instance.wrap(f, context);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.captureEvent = function() {\n var event = _.createTelemetryEvent(arguments);\n return this.client.captureEvent(event.type, event.metadata, event.level);\n};\nRollbar.captureEvent = function() {\n if (_instance) {\n return _instance.captureEvent.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\n// The following two methods are used internally and are not meant for public use\nRollbar.prototype.captureDomContentLoaded = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureLoad(ts);\n};\n\n/* Internal */\n\nfunction addTransformsToNotifier(notifier, rollbar, gWindow) {\n notifier\n .addTransform(transforms.handleDomException)\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(gWindow))\n .addTransform(transforms.addClientInfo(gWindow))\n .addTransform(transforms.addPluginInfo(gWindow))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(sharedTransforms.addConfigToPayload)\n .addTransform(transforms.addScrubber(rollbar.scrub))\n .addTransform(sharedTransforms.userTransform(logger))\n .addTransform(sharedTransforms.addConfiguredOptions)\n .addTransform(sharedTransforms.addDiagnosticKeys)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(sharedPredicates.checkLevel)\n .addPredicate(predicates.checkIgnore)\n .addPredicate(sharedPredicates.userCheckIgnore(logger))\n .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))\n .addPredicate(sharedPredicates.urlIsSafeListed(logger))\n .addPredicate(sharedPredicates.messageIsIgnored(logger));\n}\n\nRollbar.prototype.loadFull = function() {\n logger.info('Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.');\n};\n\nRollbar.prototype._createItem = function(args) {\n return _.createItem(args, logger, this);\n};\n\nfunction _getFirstFunction(args) {\n for (var i = 0, len = args.length; i < len; ++i) {\n if (_.isFunction(args[i])) {\n return args[i];\n }\n }\n return undefined;\n}\n\nfunction _gWindow() {\n return ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n}\n\nvar defaults = require('../defaults');\nvar scrubFields = require('./defaults/scrubFields');\n\nvar defaultOptions = {\n version: defaults.version,\n scrubFields: scrubFields.scrubFields,\n logLevel: defaults.logLevel,\n reportLevel: defaults.reportLevel,\n uncaughtErrorLevel: defaults.uncaughtErrorLevel,\n endpoint: defaults.endpoint,\n verbose: false,\n enabled: true,\n transmit: true,\n sendConfig: false,\n includeItemsInTelemetry: true,\n captureIp: true,\n inspectAnonymousErrors: true,\n ignoreDuplicateErrors: true,\n wrapGlobalEventHandlers: false\n};\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar _ = require('./utility');\n\n/*\n * Rollbar - the interface to Rollbar\n *\n * @param options\n * @param api\n * @param logger\n */\nfunction Rollbar(options, api, logger, telemeter, platform) {\n this.options = _.merge(options);\n this.logger = logger;\n Rollbar.rateLimiter.configureGlobal(this.options);\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.api = api;\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n\n // This must happen before the Notifier is created\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = telemeter;\n setStackTraceLimit(options);\n this.lastError = null;\n this.lastErrorHash = 'none';\n}\n\nvar defaultOptions = {\n maxItems: 0,\n itemsPerMinute: 60\n};\n\nRollbar.rateLimiter = new RateLimiter(defaultOptions);\n\nRollbar.prototype.global = function (options) {\n Rollbar.rateLimiter.configureGlobal(options);\n return this;\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n\n this.options = _.merge(oldOptions, options, payload);\n\n // This must happen before the Notifier is configured\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier && this.notifier.configure(this.options);\n this.telemeter && this.telemeter.configure(this.options);\n setStackTraceLimit(options);\n this.global(this.options);\n\n if (validateTracer(options.tracer)) {\n this.tracer = options.tracer\n }\n\n return this;\n};\n\nRollbar.prototype.log = function (item) {\n var level = this._defaultLogLevel();\n return this._log(level, item);\n};\n\nRollbar.prototype.debug = function (item) {\n this._log('debug', item);\n};\n\nRollbar.prototype.info = function (item) {\n this._log('info', item);\n};\n\nRollbar.prototype.warn = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.warning = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.error = function (item) {\n this._log('error', item);\n};\n\nRollbar.prototype.critical = function (item) {\n this._log('critical', item);\n};\n\nRollbar.prototype.wait = function (callback) {\n this.queue.wait(callback);\n};\n\nRollbar.prototype.captureEvent = function (type, metadata, level) {\n return this.telemeter && this.telemeter.captureEvent(type, metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function (ts) {\n return this.telemeter && this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (ts) {\n return this.telemeter && this.telemeter.captureLoad(ts);\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.api.buildJsonPayload(item);\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n this.api.postJsonPayload(jsonPayload);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function (defaultLevel, item) {\n var callback;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {\n if (callback) {\n var error = new Error('ignored identical item');\n error.item = item;\n callback(error);\n }\n return;\n }\n try {\n this._addTracingInfo(item);\n item.level = item.level || defaultLevel;\n this.telemeter && this.telemeter._captureRollbarItem(item);\n item.telemetryEvents = (this.telemeter && this.telemeter.copyEvents()) || [];\n this.notifier.log(item, callback);\n } catch (e) {\n if (callback) {\n callback(e);\n }\n this.logger.error(e);\n }\n};\n\nRollbar.prototype._defaultLogLevel = function () {\n return this.options.logLevel || 'debug';\n};\n\nRollbar.prototype._sameAsLastError = function (item) {\n if (!item._isUncaught) {\n return false;\n }\n var itemHash = generateItemHash(item);\n if (this.lastErrorHash === itemHash) {\n return true;\n }\n this.lastError = item.err;\n this.lastErrorHash = itemHash;\n return false;\n};\n\nRollbar.prototype._addTracingInfo = function (item) {\n // Tracer validation occurs in the constructor\n // or in the Rollbar.prototype.configure methods\n if (this.tracer) {\n // add rollbar occurrence uuid to span\n var span = this.tracer.scope().active();\n\n if (validateSpan(span)) {\n span.setTag('rollbar.error_uuid', item.uuid);\n span.setTag('rollbar.has_error', true);\n span.setTag('error', true);\n span.setTag('rollbar.item_url', `https://rollbar.com/item/uuid/?uuid=${item.uuid}`);\n span.setTag('rollbar.occurrence_url', `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`);\n\n // add span ID & trace ID to occurrence\n var opentracingSpanId = span.context().toSpanId();\n var opentracingTraceId = span.context().toTraceId();\n\n if (item.custom) {\n item.custom.opentracing_span_id = opentracingSpanId;\n item.custom.opentracing_trace_id = opentracingTraceId;\n } else {\n item.custom = {\n opentracing_span_id: opentracingSpanId,\n opentracing_trace_id: opentracingTraceId\n };\n }\n }\n }\n}\n\nfunction generateItemHash(item) {\n var message = item.message || '';\n var stack = (item.err || {}).stack || String(item.err);\n return message + '::' + stack;\n}\n\n// Node.js, Chrome, Safari, and some other browsers support this property\n// which globally sets the number of stack frames returned in an Error object.\n// If a browser can't use it, no harm done.\nfunction setStackTraceLimit(options) {\n if (options.stackTraceLimit) {\n Error.stackTraceLimit = options.stackTraceLimit;\n }\n}\n\n/**\n * Validate the Tracer object provided to the Client\n * is valid for our Opentracing use case.\n * @param {opentracer.Tracer} tracer\n */\nfunction validateTracer(tracer) {\n if (!tracer) {\n return false;\n }\n\n if (!tracer.scope || typeof tracer.scope !== 'function') {\n return false;\n }\n\n var scope = tracer.scope();\n\n if (!scope || !scope.active || typeof scope.active !== 'function') {\n return false;\n }\n\n return true;\n}\n\n/**\n * Validate the Span object provided\n * @param {opentracer.Span} span\n */\nfunction validateSpan(span) {\n if (!span || !span.context || typeof span.context !== 'function') {\n return false;\n }\n\n var spanContext = span.context();\n\n if (!spanContext\n || !spanContext.toSpanId\n || !spanContext.toTraceId\n || typeof spanContext.toSpanId !== 'function'\n || typeof spanContext.toTraceId !== 'function') {\n return false\n }\n\n return true;\n}\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar\n *\n * @param options - the same options that are accepted by configureGlobal offered as a convenience\n */\nfunction RateLimiter(options) {\n this.startTime = _.now();\n this.counter = 0;\n this.perMinCounter = 0;\n this.platform = null;\n this.platformOptions = {};\n this.configureGlobal(options);\n}\n\nRateLimiter.globalSettings = {\n startTime: _.now(),\n maxItems: undefined,\n itemsPerMinute: undefined\n};\n\n/*\n * configureGlobal - set the global rate limiter options\n *\n * @param options - Only the following values are recognized:\n * startTime: a timestamp of the form returned by (new Date()).getTime()\n * maxItems: the maximum items\n * itemsPerMinute: the max number of items to send in a given minute\n */\nRateLimiter.prototype.configureGlobal = function(options) {\n if (options.startTime !== undefined) {\n RateLimiter.globalSettings.startTime = options.startTime;\n }\n if (options.maxItems !== undefined) {\n RateLimiter.globalSettings.maxItems = options.maxItems;\n }\n if (options.itemsPerMinute !== undefined) {\n RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;\n }\n};\n\n/*\n * shouldSend - determine if we should send a given item based on rate limit settings\n *\n * @param item - the item we are about to send\n * @returns An object with the following structure:\n * error: (Error|null)\n * shouldSend: bool\n * payload: (Object|null)\n * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and\n * exactly one of error or payload will be non-null. If error is non-null, the returned Error will\n * describe the situation, but it means that we were already over a rate limit (either globally or\n * per minute) when this item was checked. If error is null, and therefore payload is non-null, it\n * means this item put us over the global rate limit and the payload should be sent to Rollbar in\n * place of the passed in item.\n */\nRateLimiter.prototype.shouldSend = function(item, now) {\n now = now || _.now();\n var elapsedTime = now - this.startTime;\n if (elapsedTime < 0 || elapsedTime >= 60000) {\n this.startTime = now;\n this.perMinCounter = 0;\n }\n\n var globalRateLimit = RateLimiter.globalSettings.maxItems;\n var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;\n\n if (checkRate(item, globalRateLimit, this.counter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimit + ' max items reached', false);\n } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimitPerMin + ' items per minute reached', false);\n }\n this.counter++;\n this.perMinCounter++;\n\n var shouldSend = !checkRate(item, globalRateLimit, this.counter);\n var perMinute = shouldSend;\n shouldSend = shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);\n return shouldSendValue(this.platform, this.platformOptions, null, shouldSend, globalRateLimit, globalRateLimitPerMin, perMinute);\n};\n\nRateLimiter.prototype.setPlatformOptions = function(platform, options) {\n this.platform = platform;\n this.platformOptions = options;\n};\n\n/* Helpers */\n\nfunction checkRate(item, limit, counter) {\n return !item.ignoreRateLimit && limit >= 1 && counter > limit;\n}\n\nfunction shouldSendValue(platform, options, error, shouldSend, globalRateLimit, limitPerMin, perMinute) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute);\n }\n return {error: error, shouldSend: shouldSend, payload: payload};\n}\n\nfunction rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute) {\n var environment = options.environment || (options.payload && options.payload.environment);\n var msg;\n if (perMinute) {\n msg = 'item per minute limit reached, ignoring errors until timeout';\n } else {\n msg = 'maxItems has been hit, ignoring errors until reset.';\n }\n var item = {\n body: {\n message: {\n body: msg,\n extra: {\n maxItems: globalRateLimit,\n itemsPerMinute: limitPerMin\n }\n }\n },\n language: 'javascript',\n environment: environment,\n notifier: {\n version: (options.notifier && options.notifier.version) || options.version\n }\n };\n if (platform === 'browser') {\n item.platform = 'browser';\n item.framework = 'browser-js';\n item.notifier.name = 'rollbar-browser-js';\n } else if (platform === 'server') {\n item.framework = options.framework || 'node-js';\n item.notifier.name = options.notifier.name;\n } else if (platform === 'react-native') {\n item.framework = options.framework || 'react-native';\n item.notifier.name = options.notifier.name;\n }\n return item;\n}\n\nmodule.exports = RateLimiter;\n","'use strict';\n\n'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isPlainObject = function isPlainObject(obj) {\n\tif (!obj || toStr.call(obj) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tvar hasOwnConstructor = hasOwn.call(obj, 'constructor');\n\tvar hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n\t// Not own constructor property must be Object\n\tif (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n\t\treturn false;\n\t}\n\n\t// Own properties are enumerated firstly, so to speed up,\n\t// if last one is own, then all properties are own.\n\tvar key;\n\tfor (key in obj) {/**/}\n\n\treturn typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\nfunction merge() {\n var i, src, copy, clone, name,\n result = {},\n current = null,\n length = arguments.length;\n\n for (i=0; i < length; i++) {\n current = arguments[i];\n if (current == null) {\n continue;\n }\n\n for (name in current) {\n src = result[name];\n copy = current[name];\n if (result !== copy) {\n if (copy && isPlainObject(copy)) {\n clone = src && isPlainObject(src) ? src : {};\n result[name] = merge(clone, copy);\n } else if (typeof copy !== 'undefined') {\n result[name] = copy;\n }\n }\n }\n }\n return result;\n}\n\nmodule.exports = merge;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Queue - an object which handles which handles a queue of items to be sent to Rollbar.\n * This object handles rate limiting via a passed in rate limiter, retries based on connection\n * errors, and filtering of items based on a set of configurable predicates. The communication to\n * the backend is performed via a given API object.\n *\n * @param rateLimiter - An object which conforms to the interface\n * rateLimiter.shouldSend(item) -> bool\n * @param api - An object which conforms to the interface\n * api.postItem(payload, function(err, response))\n * @param logger - An object used to log verbose messages if desired\n * @param options - see Queue.prototype.configure\n */\nfunction Queue(rateLimiter, api, logger, options) {\n this.rateLimiter = rateLimiter;\n this.api = api;\n this.logger = logger;\n this.options = options;\n this.predicates = [];\n this.pendingItems = [];\n this.pendingRequests = [];\n this.retryQueue = [];\n this.retryHandle = null;\n this.waitCallback = null;\n this.waitIntervalID = null;\n}\n\n/*\n * configure - updates the options this queue uses\n *\n * @param options\n */\nQueue.prototype.configure = function(options) {\n this.api && this.api.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addPredicate - adds a predicate to the end of the list of predicates for this queue\n *\n * @param predicate - function(item, options) -> (bool|{err: Error})\n * Returning true means that this predicate passes and the item is okay to go on the queue\n * Returning false means do not add the item to the queue, but it is not an error\n * Returning {err: Error} means do not add the item to the queue, and the given error explains why\n * Returning {err: undefined} is equivalent to returning true but don't do that\n */\nQueue.prototype.addPredicate = function(predicate) {\n if (_.isFunction(predicate)) {\n this.predicates.push(predicate);\n }\n return this;\n};\n\nQueue.prototype.addPendingItem = function(item) {\n this.pendingItems.push(item);\n};\n\nQueue.prototype.removePendingItem = function(item) {\n var idx = this.pendingItems.indexOf(item);\n if (idx !== -1) {\n this.pendingItems.splice(idx, 1);\n }\n};\n\n/*\n * addItem - Send an item to the Rollbar API if all of the predicates are satisfied\n *\n * @param item - The payload to send to the backend\n * @param callback - function(error, repsonse) which will be called with the response from the API\n * in the case of a success, otherwise response will be null and error will have a value. If both\n * error and response are null then the item was stopped by a predicate which did not consider this\n * to be an error condition, but nonetheless did not send the item to the API.\n * @param originalError - The original error before any transformations that is to be logged if any\n */\nQueue.prototype.addItem = function(item, callback, originalError, originalItem) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() { return; };\n }\n var predicateResult = this._applyPredicates(item);\n if (predicateResult.stop) {\n this.removePendingItem(originalItem);\n callback(predicateResult.err);\n return;\n }\n this._maybeLog(item, originalError);\n this.removePendingItem(originalItem);\n if (!this.options.transmit) {\n callback(new Error('Transmit disabled'));\n return;\n }\n this.pendingRequests.push(item);\n try {\n this._makeApiRequest(item, function(err, resp) {\n this._dequeuePendingRequest(item);\n callback(err, resp);\n }.bind(this));\n } catch (e) {\n this._dequeuePendingRequest(item);\n callback(e);\n }\n};\n\n/*\n * wait - Stop any further errors from being added to the queue, and get called back when all items\n * currently processing have finished sending to the backend.\n *\n * @param callback - function() called when all pending items have been sent\n */\nQueue.prototype.wait = function(callback) {\n if (!_.isFunction(callback)) {\n return;\n }\n this.waitCallback = callback;\n if (this._maybeCallWait()) {\n return;\n }\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitIntervalID = setInterval(function() {\n this._maybeCallWait();\n }.bind(this), 500);\n};\n\n/* _applyPredicates - Sequentially applies the predicates that have been added to the queue to the\n * given item with the currently configured options.\n *\n * @param item - An item in the queue\n * @returns {stop: bool, err: (Error|null)} - stop being true means do not add item to the queue,\n * the error value should be passed up to a callbak if we are stopping.\n */\nQueue.prototype._applyPredicates = function(item) {\n var p = null;\n for (var i = 0, len = this.predicates.length; i < len; i++) {\n p = this.predicates[i](item, this.options);\n if (!p || p.err !== undefined) {\n return {stop: true, err: p.err};\n }\n }\n return {stop: false, err: null};\n};\n\n/*\n * _makeApiRequest - Send an item to Rollbar, callback when done, if there is an error make an\n * effort to retry if we are configured to do so.\n *\n * @param item - an item ready to send to the backend\n * @param callback - function(err, response)\n */\nQueue.prototype._makeApiRequest = function(item, callback) {\n var rateLimitResponse = this.rateLimiter.shouldSend(item);\n if (rateLimitResponse.shouldSend) {\n this.api.postItem(item, function(err, resp) {\n if (err) {\n this._maybeRetry(err, item, callback);\n } else {\n callback(err, resp);\n }\n }.bind(this));\n } else if (rateLimitResponse.error) {\n callback(rateLimitResponse.error);\n } else {\n this.api.postItem(rateLimitResponse.payload, callback);\n }\n};\n\n// These are errors basically mean there is no internet connection\nvar RETRIABLE_ERRORS = ['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED', 'EHOSTUNREACH', 'EPIPE', 'EAI_AGAIN'];\n\n/*\n * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback\n * with the error.\n *\n * @param err - an error returned by the API transport\n * @param item - the item that was trying to be sent when this error occured\n * @param callback - function(err, response)\n */\nQueue.prototype._maybeRetry = function(err, item, callback) {\n var shouldRetry = false;\n if (this.options.retryInterval) {\n for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {\n if (err.code === RETRIABLE_ERRORS[i]) {\n shouldRetry = true;\n break;\n }\n }\n if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {\n item.retries = item.retries ? item.retries + 1 : 1;\n if (item.retries > this.options.maxRetries) {\n shouldRetry = false;\n }\n }\n }\n if (shouldRetry) {\n this._retryApiRequest(item, callback);\n } else {\n callback(err);\n }\n};\n\n/*\n * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process\n * that queue based on the retryInterval in the options for this queue.\n *\n * @param item - an item that failed to send due to an error we deem retriable\n * @param callback - function(err, response)\n */\nQueue.prototype._retryApiRequest = function(item, callback) {\n this.retryQueue.push({item: item, callback: callback});\n\n if (!this.retryHandle) {\n this.retryHandle = setInterval(function() {\n while (this.retryQueue.length) {\n var retryObject = this.retryQueue.shift();\n this._makeApiRequest(retryObject.item, retryObject.callback);\n }\n }.bind(this), this.options.retryInterval);\n }\n};\n\n/*\n * _dequeuePendingRequest - Removes the item from the pending request queue, this queue is used to\n * enable to functionality of providing a callback that clients can pass to `wait` to be notified\n * when the pending request queue has been emptied. This must be called when the API finishes\n * processing this item. If a `wait` callback is configured, it is called by this function.\n *\n * @param item - the item previously added to the pending request queue\n */\nQueue.prototype._dequeuePendingRequest = function(item) {\n var idx = this.pendingRequests.indexOf(item);\n if (idx !== -1) {\n this.pendingRequests.splice(idx, 1);\n this._maybeCallWait();\n }\n};\n\nQueue.prototype._maybeLog = function(data, originalError) {\n if (this.logger && this.options.verbose) {\n var message = originalError;\n message = message || _.get(data, 'body.trace.exception.message');\n message = message || _.get(data, 'body.trace_chain.0.exception.message');\n if (message) {\n this.logger.error(message);\n return;\n }\n message = _.get(data, 'body.message.body');\n if (message) {\n this.logger.log(message);\n }\n }\n};\n\nQueue.prototype._maybeCallWait = function() {\n if (_.isFunction(this.waitCallback) && this.pendingItems.length === 0 && this.pendingRequests.length === 0) {\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitCallback();\n return true;\n }\n return false;\n};\n\nmodule.exports = Queue;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Notifier - the internal object responsible for delegating between the client exposed API, the\n * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the\n * queue which handles the communcation with the Rollbar API servers.\n *\n * @param queue - an object that conforms to the interface: addItem(item, callback)\n * @param options - an object representing the options to be set for this notifier, this should have\n * any defaults already set by the caller\n */\nfunction Notifier(queue, options) {\n this.queue = queue;\n this.options = options;\n this.transforms = [];\n this.diagnostic = {};\n}\n\n/*\n * configure - updates the options for this notifier with the passed in object\n *\n * @param options - an object which gets merged with the current options set on this notifier\n * @returns this\n */\nNotifier.prototype.configure = function(options) {\n this.queue && this.queue.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addTransform - adds a transform onto the end of the queue of transforms for this notifier\n *\n * @param transform - a function which takes three arguments:\n * * item: An Object representing the data to eventually be sent to Rollbar\n * * options: The current value of the options for this notifier\n * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this\n * callback with a null value for error if it wants the processing chain to continue, otherwise\n * with an error to terminate the processing. The item should be the updated item after this\n * transform is finished modifying it.\n */\nNotifier.prototype.addTransform = function(transform) {\n if (_.isFunction(transform)) {\n this.transforms.push(transform);\n }\n return this;\n};\n\n/*\n * log - the internal log function which applies the configured transforms and then pushes onto the\n * queue to be sent to the backend.\n *\n * @param item - An object with the following structure:\n * message [String] - An optional string to be sent to rollbar\n * error [Error] - An optional error\n *\n * @param callback - A function of type function(err, resp) which will be called with exactly one\n * null argument and one non-null argument. The callback will be called once, either during the\n * transform stage if an error occurs inside a transform, or in response to the communication with\n * the backend. The second argument will be the response from the backend in case of success.\n */\nNotifier.prototype.log = function(item, callback) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!this.options.enabled) {\n return callback(new Error('Rollbar is not enabled'));\n }\n\n this.queue.addPendingItem(item);\n var originalError = item.err;\n this._applyTransforms(item, function(err, i) {\n if (err) {\n this.queue.removePendingItem(item);\n return callback(err, null);\n }\n this.queue.addItem(i, callback, originalError, item);\n }.bind(this));\n};\n\n/* Internal */\n\n/*\n * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See\n * `addTransform` for more information.\n *\n * @param item - An item to be transformed\n * @param callback - A function of type function(err, item) which will be called with a non-null\n * error and a null item in the case of a transform failure, or a null error and non-null item after\n * all transforms have been applied.\n */\nNotifier.prototype._applyTransforms = function(item, callback) {\n var transformIndex = -1;\n var transformsLength = this.transforms.length;\n var transforms = this.transforms;\n var options = this.options;\n\n var cb = function(err, i) {\n if (err) {\n callback(err, null);\n return;\n }\n\n transformIndex++;\n\n if (transformIndex === transformsLength) {\n callback(null, i);\n return;\n }\n\n transforms[transformIndex](i, options, cb);\n };\n\n cb(null, item);\n};\n\nmodule.exports = Notifier;\n","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1/item/',\n search: null,\n version: '1',\n protocol: 'https:',\n port: 443\n};\n\n/**\n * Api is an object that encapsulates methods of communicating with\n * the Rollbar API. It is a standard interface with some parts implemented\n * differently for server or browser contexts. It is an object that should\n * be instantiated when used so it can contain non-global options that may\n * be different for another instance of RollbarApi.\n *\n * @param options {\n * accessToken: the accessToken to use for posting items to rollbar\n * endpoint: an alternative endpoint to send errors to\n * must be a valid, fully qualified URL.\n * The default is: https://api.rollbar.com/api/1/item\n * proxy: if you wish to proxy requests provide an object\n * with the following keys:\n * host or hostname (required): foo.example.com\n * port (optional): 123\n * protocol (optional): https\n * }\n */\nfunction Api(options, transport, urllib, truncation, jsonBackup) {\n this.options = options;\n this.transport = transport;\n this.url = urllib;\n this.truncation = truncation;\n this.jsonBackup = jsonBackup;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, urllib);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function(data, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n this.transport.post(this.accessToken, transportOptions, payload, callback);\n};\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.buildJsonPayload = function(data, callback) {\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n\n if (stringifyResult.error) {\n if (callback) {\n callback(stringifyResult.error);\n }\n return null;\n }\n\n return stringifyResult.value;\n};\n\n/**\n *\n * @param jsonPayload\n * @param callback\n */\nApi.prototype.postJsonPayload = function(jsonPayload, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n this.transport.postJsonPayload(this.accessToken, transportOptions, jsonPayload, callback);\n};\n\nApi.prototype.configure = function(options) {\n var oldOptions = this.oldOptions;\n this.options = _.merge(oldOptions, options);\n this.transportOptions = _getTransport(this.options, this.url);\n if (this.options.accessToken !== undefined) {\n this.accessToken = this.options.accessToken;\n }\n return this;\n};\n\nfunction _getTransport(options, url) {\n return helpers.getTransportFromOptions(options, defaultOptions, url);\n}\n\nmodule.exports = Api;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (!_.isType(data.context, 'string')) {\n var contextResult = _.stringify(data.context, jsonBackup);\n if (contextResult.error) {\n data.context = 'Error: could not serialize \\'context\\'';\n } else {\n data.context = contextResult.value || '';\n }\n if (data.context.length > 255) {\n data.context = data.context.substr(0, 255);\n }\n }\n return {\n access_token: accessToken,\n data: data\n };\n}\n\nfunction getTransportFromOptions(options, defaults, url) {\n var hostname = defaults.hostname;\n var protocol = defaults.protocol;\n var port = defaults.port;\n var path = defaults.path;\n var search = defaults.search;\n var timeout = options.timeout;\n\n var proxy = options.proxy;\n if (options.endpoint) {\n var opts = url.parse(options.endpoint);\n hostname = opts.hostname;\n protocol = opts.protocol;\n port = opts.port;\n path = opts.pathname;\n search = opts.search;\n }\n return {\n timeout: timeout,\n hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy\n };\n}\n\nfunction transportOptions(transport, method) {\n var protocol = transport.protocol || 'https:';\n var port = transport.port || (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);\n var hostname = transport.hostname;\n var path = transport.path;\n var timeout = transport.timeout;\n if (transport.search) {\n path = path + transport.search;\n }\n if (transport.proxy) {\n path = protocol + '//' + hostname + path;\n hostname = transport.proxy.host || transport.proxy.hostname;\n port = transport.proxy.port;\n protocol = transport.proxy.protocol || protocol;\n }\n return {\n timeout: timeout,\n protocol: protocol,\n hostname: hostname,\n path: path,\n port: port,\n method: method\n };\n}\n\nfunction appendPathToPath(base, path) {\n var baseTrailingSlash = /\\/$/.test(base);\n var pathBeginningSlash = /^\\//.test(path);\n\n if (baseTrailingSlash && pathBeginningSlash) {\n path = path.substring(1);\n } else if (!baseTrailingSlash && !pathBeginningSlash) {\n path = '/' + path;\n }\n\n return base + path;\n}\n\nmodule.exports = {\n buildPayload: buildPayload,\n getTransportFromOptions: getTransportFromOptions,\n transportOptions: transportOptions,\n appendPathToPath: appendPathToPath\n};\n","// Console-polyfill. MIT license.\n// https://github.com/paulmillr/console-polyfill\n// Make it safe to do console.log() always.\n(function(global) {\n 'use strict';\n if (!global.console) {\n global.console = {};\n }\n var con = global.console;\n var prop, method;\n var dummy = function() {};\n var properties = ['memory'];\n var methods = ('assert,clear,count,debug,dir,dirxml,error,exception,group,' +\n 'groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,' +\n 'show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn').split(',');\n while (prop = properties.pop()) if (!con[prop]) con[prop] = {};\n while (method = methods.pop()) if (!con[method]) con[method] = dummy;\n // Using `this` for web workers & supports Browserify / Webpack.\n})(typeof window === 'undefined' ? this : window);\n","'use strict';\n\n// This detection.js module is used to encapsulate any ugly browser/feature\n// detection we may need to do.\n\n// Figure out which version of IE we're using, if any.\n// This is gleaned from http://stackoverflow.com/questions/5574842/best-way-to-check-for-ie-less-than-9-in-javascript-without-library\n// Will return an integer on IE (i.e. 8)\n// Will return undefined otherwise\nfunction getIEVersion() {\n\tvar undef;\n\tif (typeof document === 'undefined') {\n\t\treturn undef;\n\t}\n\n var v = 3,\n div = document.createElement('div'),\n all = div.getElementsByTagName('i');\n\n while (\n div.innerHTML = '',\n all[0]\n );\n\n return v > 4 ? v : undef;\n}\n\nvar Detection = {\n ieVersion: getIEVersion\n};\n\nmodule.exports = Detection;\n","'use strict';\n\nfunction captureUncaughtExceptions(window, handler, shim) {\n if (!window) { return; }\n var oldOnError;\n\n if (typeof handler._rollbarOldOnError === 'function') {\n oldOnError = handler._rollbarOldOnError;\n } else if (window.onerror) {\n oldOnError = window.onerror;\n while (oldOnError._rollbarOldOnError) {\n oldOnError = oldOnError._rollbarOldOnError;\n }\n handler._rollbarOldOnError = oldOnError;\n }\n\n handler.handleAnonymousErrors();\n\n var fn = function() {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n if (shim) {\n fn._rollbarOldOnError = oldOnError;\n }\n window.onerror = fn;\n}\n\nfunction _rollbarWindowOnError(window, r, old, args) {\n if (window._rollbarWrappedError) {\n if (!args[4]) {\n args[4] = window._rollbarWrappedError;\n }\n if (!args[5]) {\n args[5] = window._rollbarWrappedError._rollbarContext;\n }\n window._rollbarWrappedError = null;\n }\n\n var ret = r.handleUncaughtException.apply(r, args);\n\n if (old) {\n old.apply(window, args);\n }\n\n // Let other chained onerror handlers above run before setting this.\n // If an error is thrown and caught within a chained onerror handler,\n // Error.prepareStackTrace() will see that one before the one we want.\n if (ret === 'anonymous') {\n r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()\n }\n}\n\nfunction captureUnhandledRejections(window, handler, shim) {\n if (!window) { return; }\n\n if (typeof window._rollbarURH === 'function' && window._rollbarURH.belongsToShim) {\n window.removeEventListener('unhandledrejection', window._rollbarURH);\n }\n\n var rejectionHandler = function (evt) {\n var reason, promise, detail;\n try {\n reason = evt.reason;\n } catch (e) {\n reason = undefined;\n }\n try {\n promise = evt.promise;\n } catch (e) {\n promise = '[unhandledrejection] error getting `promise` from event';\n }\n try {\n detail = evt.detail;\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\n }\n } catch (e) {\n // Ignore\n }\n if (!reason) {\n reason = '[unhandledrejection] error getting `reason` from event';\n }\n\n if (handler && handler.handleUnhandledRejection) {\n handler.handleUnhandledRejection(reason, promise);\n }\n };\n rejectionHandler.belongsToShim = shim;\n window._rollbarURH = rejectionHandler;\n window.addEventListener('unhandledrejection', rejectionHandler);\n}\n\n\nmodule.exports = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections\n};\n","'use strict';\n\n/*global XDomainRequest*/\n\nvar _ = require('../utility');\nvar logger = require('./logger');\n\n/*\n * accessToken may be embedded in payload but that should not\n * be assumed\n *\n * options: {\n * hostname\n * protocol\n * path\n * port\n * method\n * }\n *\n * params is an object containing key/value pairs. These\n * will be appended to the path as 'key=value&key=value'\n *\n * payload is an unserialized object\n */\nfunction Transport(truncation) {\n this.truncation = truncation;\n}\n\nTransport.prototype.get = function(accessToken, options, params, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n _.addParamsAndAccessTokenToPath(accessToken, options, params);\n\n var method = 'GET';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, null, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.post = function(accessToken, options, payload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!payload) {\n return callback(new Error('Cannot send empty request'));\n }\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n if (stringifyResult.error) {\n return callback(stringifyResult.error);\n }\n\n var writeData = stringifyResult.value;\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, writeData, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.postJsonPayload = function (accessToken, options, jsonPayload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, jsonPayload, callback, requestFactory, options.timeout);\n}\n\n\n// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope\n// so Angular change detection isn't triggered on each API call.\n// This is the equivalent of runOutsideAngular().\n//\nfunction _makeZoneRequest() {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;\n var args = Array.prototype.slice.call(arguments);\n\n if (currentZone && currentZone._name === 'angular') {\n var rootZone = currentZone._parent;\n rootZone.run(function () {\n _makeRequest.apply(undefined, args);\n });\n } else {\n _makeRequest.apply(undefined, args);\n }\n}\n\n/* global RollbarProxy */\nfunction _proxyRequest(json, callback) {\n var rollbarProxy = new RollbarProxy();\n rollbarProxy.sendJsonPayload(\n json,\n function(_msg) { /* do nothing */ }, // eslint-disable-line no-unused-vars\n function(err) {\n callback(new Error(err));\n }\n );\n}\n\nfunction _makeRequest(accessToken, url, method, data, callback, requestFactory, timeout) {\n if (typeof RollbarProxy !== 'undefined') {\n return _proxyRequest(data, callback);\n }\n\n var request;\n if (requestFactory) {\n request = requestFactory();\n } else {\n request = _createXMLHTTPObject();\n }\n if (!request) {\n // Give up, no way to send requests\n return callback(new Error('No way to send a request'));\n }\n try {\n try {\n var onreadystatechange = function() {\n try {\n if (onreadystatechange && request.readyState === 4) {\n onreadystatechange = undefined;\n\n var parseResponse = _.jsonParse(request.responseText);\n if (_isSuccess(request)) {\n callback(parseResponse.error, parseResponse.value);\n return;\n } else if (_isNormalFailure(request)) {\n if (request.status === 403) {\n // likely caused by using a server access token\n var message = parseResponse.value && parseResponse.value.message;\n logger.error(message);\n }\n // return valid http status codes\n callback(new Error(String(request.status)));\n } else {\n // IE will return a status 12000+ on some sort of connection failure,\n // so we return a blank error\n // http://msdn.microsoft.com/en-us/library/aa383770%28VS.85%29.aspx\n var msg = 'XHR response had no status code (likely connection failure)';\n callback(_newRetriableError(msg));\n }\n }\n } catch (ex) {\n //jquery source mentions firefox may error out while accessing the\n //request members if there is a network error\n //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111\n var exc;\n if (ex && ex.stack) {\n exc = ex;\n } else {\n exc = new Error(ex);\n }\n callback(exc);\n }\n };\n\n request.open(method, url, true);\n if (request.setRequestHeader) {\n request.setRequestHeader('Content-Type', 'application/json');\n request.setRequestHeader('X-Rollbar-Access-Token', accessToken);\n }\n\n if(_.isFiniteNumber(timeout)) {\n request.timeout = timeout;\n }\n\n request.onreadystatechange = onreadystatechange;\n request.send(data);\n } catch (e1) {\n // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest\n if (typeof XDomainRequest !== 'undefined') {\n\n // Assume we are in a really old browser which has a bunch of limitations:\n // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx\n\n // Extreme paranoia: if we have XDomainRequest then we have a window, but just in case\n if (!window || !window.location) {\n return callback(new Error('No window available during request, unknown environment'));\n }\n\n // If the current page is http, try and send over http\n if (window.location.href.substring(0, 5) === 'http:' && url.substring(0, 5) === 'https') {\n url = 'http' + url.substring(5);\n }\n\n var xdomainrequest = new XDomainRequest();\n xdomainrequest.onprogress = function() {};\n xdomainrequest.ontimeout = function() {\n var msg = 'Request timed out';\n var code = 'ETIMEDOUT';\n callback(_newRetriableError(msg, code));\n };\n xdomainrequest.onerror = function() {\n callback(new Error('Error during request'));\n };\n xdomainrequest.onload = function() {\n var parseResponse = _.jsonParse(xdomainrequest.responseText);\n callback(parseResponse.error, parseResponse.value);\n };\n xdomainrequest.open(method, url, true);\n xdomainrequest.send(data);\n } else {\n callback(new Error('Cannot find a method to transport a request'));\n }\n }\n } catch (e2) {\n callback(e2);\n }\n}\n\nfunction _createXMLHTTPObject() {\n /* global ActiveXObject:false */\n\n var factories = [\n function () {\n return new XMLHttpRequest();\n },\n function () {\n return new ActiveXObject('Msxml2.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Msxml3.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Microsoft.XMLHTTP');\n }\n ];\n var xmlhttp;\n var i;\n var numFactories = factories.length;\n for (i = 0; i < numFactories; i++) {\n /* eslint-disable no-empty */\n try {\n xmlhttp = factories[i]();\n break;\n } catch (e) {\n // pass\n }\n /* eslint-enable no-empty */\n }\n return xmlhttp;\n}\n\nfunction _isSuccess(r) {\n return r && r.status && r.status === 200;\n}\n\nfunction _isNormalFailure(r) {\n return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;\n}\n\nfunction _newRetriableError(message, code) {\n var err = new Error(message);\n err.code = code || 'ENOTFOUND';\n return err;\n}\n\nmodule.exports = Transport;\n","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('../errorParser');\nvar logger = require('./logger');\n\nfunction handleDomException(item, options, callback) {\n if(item.err && errorParser.Stack(item.err).name === 'DOMException') {\n var originalError = new Error();\n originalError.name = item.err.name;\n originalError.message = item.err.message;\n originalError.stack = item.err.stack;\n originalError.nested = item.err;\n item.err = originalError;\n }\n callback(null, item);\n}\n\nfunction handleItemWithError(item, options, callback) {\n item.data = item.data || {};\n if (item.err) {\n try {\n item.stackInfo = item.err._savedStackTrace || errorParser.parse(item.err, item.skipFrames);\n\n if (options.addErrorContext) {\n addErrorContext(item);\n }\n } catch (e) {\n logger.error('Error while parsing the error object.', e);\n try {\n item.message = item.err.message || item.err.description || item.message || String(item.err);\n } catch (e2) {\n item.message = String(item.err) || String(e2);\n }\n delete item.err;\n }\n }\n callback(null, item);\n}\n\nfunction addErrorContext(item) {\n var chain = [];\n var err = item.err;\n\n chain.push(err);\n\n while (err.nested) {\n err = err.nested;\n chain.push(err);\n }\n\n _.addErrorContext(item, chain);\n}\n\nfunction ensureItemHasSomethingToSay(item, options, callback) {\n if (!item.message && !item.stackInfo && !item.custom) {\n callback(new Error('No message, stack info, or custom data'), null);\n }\n callback(null, item);\n}\n\nfunction addBaseInfo(item, options, callback) {\n var environment = (options.payload && options.payload.environment) || options.environment;\n item.data = _.merge(item.data, {\n environment: environment,\n level: item.level,\n endpoint: options.endpoint,\n platform: 'browser',\n framework: 'browser-js',\n language: 'javascript',\n server: {},\n uuid: item.uuid,\n notifier: {\n name: 'rollbar-browser-js',\n version: options.version\n },\n custom: item.custom\n });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.location) {\n return callback(null, item);\n }\n var remoteString = '$remote_ip';\n if (!options.captureIp) {\n remoteString = null;\n } else if (options.captureIp !== true) {\n remoteString += '_anonymize';\n }\n _.set(item, 'data.request', {\n url: window.location.href,\n query_string: window.location.search,\n user_ip: remoteString\n });\n callback(null, item);\n };\n}\n\nfunction addClientInfo(window) {\n return function(item, options, callback) {\n if (!window) {\n return callback(null, item);\n }\n var nav = window.navigator || {};\n var scr = window.screen || {};\n _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: nav.userAgent,\n language: nav.language,\n cookie_enabled: nav.cookieEnabled,\n screen: {\n width: scr.width,\n height: scr.height\n }\n }\n });\n callback(null, item);\n };\n}\n\nfunction addPluginInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.navigator) {\n return callback(null, item);\n }\n var plugins = [];\n var navPlugins = window.navigator.plugins || [];\n var cur;\n for (var i=0, l=navPlugins.length; i < l; ++i) {\n cur = navPlugins[i];\n plugins.push({name: cur.name, description: cur.description});\n }\n _.set(item, 'data.client.javascript.plugins', plugins);\n callback(null, item);\n };\n}\n\nfunction addBody(item, options, callback) {\n if (item.stackInfo) {\n if (item.stackInfo.traceChain) {\n addBodyTraceChain(item, options, callback);\n } else {\n addBodyTrace(item, options, callback);\n }\n } else {\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction addBodyMessage(item, options, callback) {\n var message = item.message;\n var custom = item.custom;\n\n if (!message) {\n message = 'Item sent with null or missing arguments.';\n }\n var result = {\n body: message\n };\n\n if (custom) {\n result.extra = _.merge(custom);\n }\n\n _.set(item, 'data.body', {message: result});\n callback(null, item);\n}\n\nfunction stackFromItem(item) {\n // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = item.stackInfo.stack;\n if (stack && stack.length === 0 && item._unhandledStackInfo && item._unhandledStackInfo.stack) {\n stack = item._unhandledStackInfo.stack;\n }\n return stack;\n}\n\nfunction addBodyTraceChain(item, options, callback) {\n var traceChain = item.stackInfo.traceChain;\n var traces = [];\n\n var traceChainLength = traceChain.length;\n for (var i = 0; i < traceChainLength; i++) {\n var trace = buildTrace(item, traceChain[i], options);\n traces.push(trace);\n }\n\n _.set(item, 'data.body', {trace_chain: traces});\n callback(null, item);\n}\n\nfunction addBodyTrace(item, options, callback) {\n var stack = stackFromItem(item);\n\n if (stack) {\n var trace = buildTrace(item, item.stackInfo, options);\n _.set(item, 'data.body', {trace: trace});\n callback(null, item);\n } else {\n var stackInfo = item.stackInfo;\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction buildTrace(item, stackInfo, options) {\n var description = item && item.data.description;\n var custom = item && item.custom;\n var stack = stackFromItem(item);\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n var trace = {\n exception: {\n 'class': className,\n message: message\n }\n };\n\n if (description) {\n trace.exception.description = description;\n }\n\n if (stack) {\n if (stack.length === 0) {\n trace.exception.stack = stackInfo.rawStack;\n trace.exception.raw = String(stackInfo.rawException);\n }\n var stackFrame;\n var frame;\n var code;\n var pre;\n var post;\n var contextLength;\n var i, mid;\n\n trace.frames = [];\n for (i = 0; i < stack.length; ++i) {\n stackFrame = stack[i];\n frame = {\n filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',\n lineno: stackFrame.line || null,\n method: (!stackFrame.func || stackFrame.func === '?') ? '[anonymous]' : stackFrame.func,\n colno: stackFrame.column\n };\n if (options.sendFrameUrl) {\n frame.url = stackFrame.url;\n }\n if (frame.method && frame.method.endsWith && frame.method.endsWith('_rollbar_wrapped')) {\n continue;\n }\n\n code = pre = post = null;\n contextLength = stackFrame.context ? stackFrame.context.length : 0;\n if (contextLength) {\n mid = Math.floor(contextLength / 2);\n pre = stackFrame.context.slice(0, mid);\n code = stackFrame.context[mid];\n post = stackFrame.context.slice(mid);\n }\n\n if (code) {\n frame.code = code;\n }\n\n if (pre || post) {\n frame.context = {};\n if (pre && pre.length) {\n frame.context.pre = pre;\n }\n if (post && post.length) {\n frame.context.post = post;\n }\n }\n\n if (stackFrame.args) {\n frame.args = stackFrame.args;\n }\n\n trace.frames.push(frame);\n }\n\n // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last\n trace.frames.reverse();\n\n if (custom) {\n trace.extra = _.merge(custom);\n }\n }\n\n return trace;\n}\n\nfunction errorClass(stackInfo, guess, options) {\n if (stackInfo.name) {\n return stackInfo.name;\n } else if (options.guessErrorClass) {\n return guess;\n } else {\n return '(unknown)';\n }\n}\n\nfunction addScrubber(scrubFn) {\n return function (item, options, callback) {\n if (scrubFn) {\n var scrubFields = options.scrubFields || [];\n var scrubPaths = options.scrubPaths || [];\n item.data = scrubFn(item.data, scrubFields, scrubPaths);\n }\n callback(null, item);\n }\n}\n\nmodule.exports = {\n handleDomException: handleDomException,\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n addScrubber: addScrubber\n};\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('error-stack-parser', ['stackframe'], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory(require('stackframe'));\n } else {\n root.ErrorStackParser = factory(root.StackFrame);\n }\n}(this, function ErrorStackParser(StackFrame) {\n 'use strict';\n\n var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\\S+:\\d+/;\n var CHROME_IE_STACK_REGEXP = /^\\s*at .*(\\S+:\\d+|\\(native\\))/m;\n var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\\[native code])?$/;\n\n return {\n /**\n * Given an Error object, extract the most information from it.\n *\n * @param {Error} error object\n * @return {Array} of StackFrames\n */\n parse: function ErrorStackParser$$parse(error) {\n if (typeof error.stacktrace !== 'undefined' || typeof error['opera#sourceloc'] !== 'undefined') {\n return this.parseOpera(error);\n } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {\n return this.parseV8OrIE(error);\n } else if (error.stack) {\n return this.parseFFOrSafari(error);\n } else {\n throw new Error('Cannot parse given Error object');\n }\n },\n\n // Separate line and column numbers from a string of the form: (URI:Line:Column)\n extractLocation: function ErrorStackParser$$extractLocation(urlLike) {\n // Fail-fast but return locations like \"(native)\"\n if (urlLike.indexOf(':') === -1) {\n return [urlLike];\n }\n\n var regExp = /(.+?)(?::(\\d+))?(?::(\\d+))?$/;\n var parts = regExp.exec(urlLike.replace(/[()]/g, ''));\n return [parts[1], parts[2] || undefined, parts[3] || undefined];\n },\n\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(CHROME_IE_STACK_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n if (line.indexOf('(eval ') > -1) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n line = line.replace(/eval code/g, 'eval').replace(/(\\(eval at [^()]*)|(\\),.*$)/g, '');\n }\n var sanitizedLine = line.replace(/^\\s+/, '').replace(/\\(eval code/g, '(');\n\n // capture and preseve the parenthesized location \"(/foo/my bar.js:12:87)\" in\n // case it has spaces in it, as the string is split on \\s+ later on\n var location = sanitizedLine.match(/ (\\((.+):(\\d+):(\\d+)\\)$)/);\n\n // remove the parenthesized location from the line, if it was matched\n sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;\n\n var tokens = sanitizedLine.split(/\\s+/).slice(1);\n // if a location was matched, pass it to extractLocation() otherwise pop the last token\n var locationParts = this.extractLocation(location ? location[1] : tokens.pop());\n var functionName = tokens.join(' ') || undefined;\n var fileName = ['eval', ''].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];\n\n return new StackFrame({\n functionName: functionName,\n fileName: fileName,\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n },\n\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n if (line.indexOf(' > eval') > -1) {\n line = line.replace(/ line (\\d+)(?: > eval line \\d+)* > eval:\\d+:\\d+/g, ':$1');\n }\n\n if (line.indexOf('@') === -1 && line.indexOf(':') === -1) {\n // Safari eval frames only have function names and nothing else\n return new StackFrame({\n functionName: line\n });\n } else {\n var functionNameRegex = /((.*\".+\"[^@]*)?[^@]*)(?:@)/;\n var matches = line.match(functionNameRegex);\n var functionName = matches && matches[1] ? matches[1] : undefined;\n var locationParts = this.extractLocation(line.replace(functionNameRegex, ''));\n\n return new StackFrame({\n functionName: functionName,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }\n }, this);\n },\n\n parseOpera: function ErrorStackParser$$parseOpera(e) {\n if (!e.stacktrace || (e.message.indexOf('\\n') > -1 &&\n e.message.split('\\n').length > e.stacktrace.split('\\n').length)) {\n return this.parseOpera9(e);\n } else if (!e.stack) {\n return this.parseOpera10(e);\n } else {\n return this.parseOpera11(e);\n }\n },\n\n parseOpera9: function ErrorStackParser$$parseOpera9(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)/i;\n var lines = e.message.split('\\n');\n var result = [];\n\n for (var i = 2, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(new StackFrame({\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n }));\n }\n }\n\n return result;\n },\n\n parseOpera10: function ErrorStackParser$$parseOpera10(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)(?:: In function (\\S+))?$/i;\n var lines = e.stacktrace.split('\\n');\n var result = [];\n\n for (var i = 0, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(\n new StackFrame({\n functionName: match[3] || undefined,\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n })\n );\n }\n }\n\n return result;\n },\n\n // Opera 10.65+ Error.stack very similar to FF/Safari\n parseOpera11: function ErrorStackParser$$parseOpera11(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);\n }, this);\n\n return filtered.map(function(line) {\n var tokens = line.split('@');\n var locationParts = this.extractLocation(tokens.pop());\n var functionCall = (tokens.shift() || '');\n var functionName = functionCall\n .replace(//, '$2')\n .replace(/\\([^)]*\\)/g, '') || undefined;\n var argsRaw;\n if (functionCall.match(/\\(([^)]*)\\)/)) {\n argsRaw = functionCall.replace(/^[^(]+\\(([^)]*)\\)$/, '$1');\n }\n var args = (argsRaw === undefined || argsRaw === '[arguments not available]') ?\n undefined : argsRaw.split(',');\n\n return new StackFrame({\n functionName: functionName,\n args: args,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n }\n };\n}));\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('stackframe', [], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.StackFrame = factory();\n }\n}(this, function() {\n 'use strict';\n function _isNumber(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n }\n\n function _capitalize(str) {\n return str.charAt(0).toUpperCase() + str.substring(1);\n }\n\n function _getter(p) {\n return function() {\n return this[p];\n };\n }\n\n var booleanProps = ['isConstructor', 'isEval', 'isNative', 'isToplevel'];\n var numericProps = ['columnNumber', 'lineNumber'];\n var stringProps = ['fileName', 'functionName', 'source'];\n var arrayProps = ['args'];\n var objectProps = ['evalOrigin'];\n\n var props = booleanProps.concat(numericProps, stringProps, arrayProps, objectProps);\n\n function StackFrame(obj) {\n if (!obj) return;\n for (var i = 0; i < props.length; i++) {\n if (obj[props[i]] !== undefined) {\n this['set' + _capitalize(props[i])](obj[props[i]]);\n }\n }\n }\n\n StackFrame.prototype = {\n getArgs: function() {\n return this.args;\n },\n setArgs: function(v) {\n if (Object.prototype.toString.call(v) !== '[object Array]') {\n throw new TypeError('Args must be an Array');\n }\n this.args = v;\n },\n\n getEvalOrigin: function() {\n return this.evalOrigin;\n },\n setEvalOrigin: function(v) {\n if (v instanceof StackFrame) {\n this.evalOrigin = v;\n } else if (v instanceof Object) {\n this.evalOrigin = new StackFrame(v);\n } else {\n throw new TypeError('Eval Origin must be an Object or StackFrame');\n }\n },\n\n toString: function() {\n var fileName = this.getFileName() || '';\n var lineNumber = this.getLineNumber() || '';\n var columnNumber = this.getColumnNumber() || '';\n var functionName = this.getFunctionName() || '';\n if (this.getIsEval()) {\n if (fileName) {\n return '[eval] (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return '[eval]:' + lineNumber + ':' + columnNumber;\n }\n if (functionName) {\n return functionName + ' (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return fileName + ':' + lineNumber + ':' + columnNumber;\n }\n };\n\n StackFrame.fromString = function StackFrame$$fromString(str) {\n var argsStartIndex = str.indexOf('(');\n var argsEndIndex = str.lastIndexOf(')');\n\n var functionName = str.substring(0, argsStartIndex);\n var args = str.substring(argsStartIndex + 1, argsEndIndex).split(',');\n var locationString = str.substring(argsEndIndex + 1);\n\n if (locationString.indexOf('@') === 0) {\n var parts = /@(.+?)(?::(\\d+))?(?::(\\d+))?$/.exec(locationString, '');\n var fileName = parts[1];\n var lineNumber = parts[2];\n var columnNumber = parts[3];\n }\n\n return new StackFrame({\n functionName: functionName,\n args: args || undefined,\n fileName: fileName,\n lineNumber: lineNumber || undefined,\n columnNumber: columnNumber || undefined\n });\n };\n\n for (var i = 0; i < booleanProps.length; i++) {\n StackFrame.prototype['get' + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);\n StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function(p) {\n return function(v) {\n this[p] = Boolean(v);\n };\n })(booleanProps[i]);\n }\n\n for (var j = 0; j < numericProps.length; j++) {\n StackFrame.prototype['get' + _capitalize(numericProps[j])] = _getter(numericProps[j]);\n StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function(p) {\n return function(v) {\n if (!_isNumber(v)) {\n throw new TypeError(p + ' must be a Number');\n }\n this[p] = Number(v);\n };\n })(numericProps[j]);\n }\n\n for (var k = 0; k < stringProps.length; k++) {\n StackFrame.prototype['get' + _capitalize(stringProps[k])] = _getter(stringProps[k]);\n StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function(p) {\n return function(v) {\n this[p] = String(v);\n };\n })(stringProps[k]);\n }\n\n return StackFrame;\n}));\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction itemToPayload(item, options, callback) {\n var payloadOptions = options.payload || {};\n if (payloadOptions.body) {\n delete payloadOptions.body;\n }\n\n var data = _.merge(item.data, payloadOptions);\n if (item._isUncaught) {\n data._isUncaught = true;\n }\n if (item._originalArgs) {\n data._originalArgs = item._originalArgs;\n }\n callback(null, data);\n}\n\nfunction addTelemetryData(item, options, callback) {\n if (item.telemetryEvents) {\n _.set(item, 'data.body.telemetry', item.telemetryEvents);\n }\n callback(null, item);\n}\n\nfunction addMessageWithError(item, options, callback) {\n if (!item.message) {\n callback(null, item);\n return;\n }\n var tracePath = 'data.body.trace_chain.0';\n var trace = _.get(item, tracePath);\n if (!trace) {\n tracePath = 'data.body.trace';\n trace = _.get(item, tracePath);\n }\n if (trace) {\n if (!(trace.exception && trace.exception.description)) {\n _.set(item, tracePath+'.exception.description', item.message);\n callback(null, item);\n return;\n }\n var extra = _.get(item, tracePath+'.extra') || {};\n var newExtra = _.merge(extra, {message: item.message});\n _.set(item, tracePath+'.extra', newExtra);\n }\n callback(null, item);\n}\n\nfunction userTransform(logger) {\n return function(item, options, callback) {\n var newItem = _.merge(item);\n var response = null;\n try {\n if (_.isFunction(options.transform)) {\n response = options.transform(newItem.data, item);\n }\n } catch (e) {\n options.transform = null;\n logger.error('Error while calling custom transform() function. Removing custom transform().', e);\n callback(null, item);\n return;\n }\n if(_.isPromise(response)) {\n response.then(function (promisedItem) {\n if(promisedItem) {\n newItem.data = promisedItem;\n }\n callback(null, newItem);\n }, function (error) {\n callback(error, item);\n });\n } else {\n callback(null, newItem);\n }\n }\n}\n\nfunction addConfigToPayload(item, options, callback) {\n if (!options.sendConfig) {\n return callback(null, item);\n }\n var configKey = '_rollbarConfig';\n var custom = _.get(item, 'data.custom') || {};\n custom[configKey] = options;\n item.data.custom = custom;\n callback(null, item);\n}\n\nfunction addFunctionOption(options, name) {\n if(_.isFunction(options[name])) {\n options[name] = options[name].toString();\n }\n}\n\nfunction addConfiguredOptions(item, options, callback) {\n var configuredOptions = options._configuredOptions;\n\n // These must be stringified or they'll get dropped during serialization.\n addFunctionOption(configuredOptions, 'transform');\n addFunctionOption(configuredOptions, 'checkIgnore');\n addFunctionOption(configuredOptions, 'onSendCallback');\n\n delete configuredOptions.accessToken;\n item.data.notifier.configured_options = configuredOptions;\n callback(null, item);\n}\n\nfunction addDiagnosticKeys(item, options, callback) {\n var diagnostic = _.merge(item.notifier.client.notifier.diagnostic, item.diagnostic);\n\n if (_.get(item, 'err._isAnonymous')) {\n diagnostic.is_anonymous = true;\n }\n\n if (item._isUncaught) {\n diagnostic.is_uncaught = item._isUncaught;\n }\n\n if (item.err) {\n try {\n diagnostic.raw_error = {\n message: item.err.message,\n name: item.err.name,\n constructor_name: item.err.constructor && item.err.constructor.name,\n filename: item.err.fileName,\n line: item.err.lineNumber,\n column: item.err.columnNumber,\n stack: item.err.stack\n };\n } catch (e) {\n diagnostic.raw_error = { failed: String(e) };\n }\n }\n\n item.data.notifier.diagnostic = _.merge(item.data.notifier.diagnostic, diagnostic);\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError,\n userTransform: userTransform,\n addConfigToPayload: addConfigToPayload,\n addConfiguredOptions: addConfiguredOptions,\n addDiagnosticKeys: addDiagnosticKeys\n};\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction checkIgnore(item, settings) {\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore\n};\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction checkLevel(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = settings.reportLevel;\n var reportLevelVal = _.LEVELS[reportLevel] || 0;\n\n if (levelVal < reportLevelVal) {\n return false;\n }\n return true;\n}\n\nfunction userCheckIgnore(logger) {\n return function(item, settings) {\n var isUncaught = !!item._isUncaught;\n delete item._isUncaught;\n var args = item._originalArgs;\n delete item._originalArgs;\n try {\n if (_.isFunction(settings.onSendCallback)) {\n settings.onSendCallback(isUncaught, args, item);\n }\n } catch (e) {\n settings.onSendCallback = null;\n logger.error('Error while calling onSendCallback, removing', e);\n }\n try {\n if (_.isFunction(settings.checkIgnore) && settings.checkIgnore(isUncaught, args, item)) {\n return false;\n }\n } catch (e) {\n settings.checkIgnore = null;\n logger.error('Error while calling custom checkIgnore(), removing', e);\n }\n return true;\n }\n}\n\nfunction urlIsNotBlockListed(logger) {\n return function(item, settings) {\n return !urlIsOnAList(item, settings, 'blocklist', logger);\n }\n}\n\nfunction urlIsSafeListed(logger) {\n return function(item, settings) {\n return urlIsOnAList(item, settings, 'safelist', logger);\n }\n}\n\nfunction matchFrames(trace, list, block) {\n if (!trace) { return !block }\n\n var frames = trace.frames;\n\n if (!frames || frames.length === 0) { return !block; }\n\n var frame, filename, url, urlRegex;\n var listLength = list.length;\n var frameLength = frames.length;\n for (var i = 0; i < frameLength; i++) {\n frame = frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) { return !block; }\n\n for (var j = 0; j < listLength; j++) {\n url = list[j];\n urlRegex = new RegExp(url);\n\n if (urlRegex.test(filename)) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction urlIsOnAList(item, settings, safeOrBlock, logger) {\n // safelist is the default\n var block = false;\n if (safeOrBlock === 'blocklist') {\n block = true;\n }\n\n var list, traces;\n try {\n list = block ? settings.hostBlockList : settings.hostSafeList;\n traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];\n\n // These two checks are important to come first as they are defaults\n // in case the list is missing or the trace is missing or not well-formed\n if (!list || list.length === 0) {\n return !block;\n }\n if (traces.length === 0 || !traces[0]) {\n return !block;\n }\n\n var tracesLength = traces.length;\n for (var i = 0; i < tracesLength; i++) {\n if(matchFrames(traces[i], list, block)) {\n return true;\n }\n }\n } catch (e)\n /* istanbul ignore next */\n {\n if (block) {\n settings.hostBlockList = null;\n } else {\n settings.hostSafeList = null;\n }\n var listName = block ? 'hostBlockList' : 'hostSafeList';\n logger.error('Error while reading your configuration\\'s ' + listName + ' option. Removing custom ' + listName + '.', e);\n return !block;\n }\n return false;\n}\n\nfunction messageIsIgnored(logger) {\n return function(item, settings) {\n var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n messages = messagesFromItem(item);\n\n if (messages.length === 0){\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n\n for (j = 0; j < messages.length; j++) {\n messageIsIgnored = rIgnoredMessage.test(messages[j]);\n\n if (messageIsIgnored) {\n return false;\n }\n }\n }\n } catch(e)\n /* istanbul ignore next */\n {\n settings.ignoredMessages = null;\n logger.error('Error while reading your configuration\\'s ignoredMessages option. Removing custom ignoredMessages.');\n }\n\n return true;\n }\n}\n\nfunction messagesFromItem(item) {\n var body = item.body;\n var messages = [];\n\n // The payload schema only allows one of trace_chain, message, or trace.\n // However, existing test cases are based on having both trace and message present.\n // So here we preserve the ability to collect strings from any combination of these keys.\n if (body.trace_chain) {\n var traceChain = body.trace_chain;\n for (var i = 0; i < traceChain.length; i++) {\n var trace = traceChain[i];\n messages.push(_.get(trace, 'exception.message'));\n }\n }\n if (body.trace) {\n messages.push(_.get(body, 'trace.exception.message'));\n }\n if (body.message) {\n messages.push(_.get(body, 'message.body'));\n }\n return messages;\n}\n\nmodule.exports = {\n checkLevel: checkLevel,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlockListed: urlIsNotBlockListed,\n urlIsSafeListed: urlIsSafeListed,\n messageIsIgnored: messageIsIgnored\n};\n","'use strict';\n\nmodule.exports = {\n version: '2.24.1',\n endpoint: 'api.rollbar.com/api/1/item/',\n logLevel: 'debug',\n reportLevel: 'debug',\n uncaughtErrorLevel: 'error',\n maxItems: 0,\n itemsPerMin: 60\n}\n","'use strict';\n\nmodule.exports = {\n scrubFields: [\n 'pw',\n 'pass',\n 'passwd',\n 'password',\n 'secret',\n 'confirm_password',\n 'confirmPassword',\n 'password_confirmation',\n 'passwordConfirmation',\n 'access_token',\n 'accessToken',\n 'X-Rollbar-Access-Token',\n 'secret_key',\n 'secretKey',\n 'secretToken',\n 'cc-number',\n 'card number',\n 'cardnumber',\n 'cardnum',\n 'ccnum',\n 'ccnumber',\n 'cc num',\n 'creditcardnumber',\n 'credit card number',\n 'newcreditcardnumber',\n 'new credit card',\n 'creditcardno',\n 'credit card no',\n 'card#',\n 'card #',\n 'cc-csc',\n 'cvc',\n 'cvc2',\n 'cvv2',\n 'ccv2',\n 'security code',\n 'card verification',\n 'name on credit card',\n 'name on card',\n 'nameoncard',\n 'cardholder',\n 'card holder',\n 'name des karteninhabers',\n 'ccname',\n 'card type',\n 'cardtype',\n 'cc type',\n 'cctype',\n 'payment type',\n 'expiration date',\n 'expirationdate',\n 'expdate',\n 'cc-exp',\n 'ccmonth',\n 'ccyear'\n ]\n}\n","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.merge(options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n}\n\nTelemeter.prototype.configure = function(options) {\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n var deleteCount = 0;\n if (this.maxQueueSize > newMaxEvents) {\n deleteCount = this.maxQueueSize - newMaxEvents;\n }\n this.maxQueueSize = newMaxEvents;\n this.queue.splice(0, deleteCount);\n};\n\nTelemeter.prototype.copyEvents = function() {\n var events = Array.prototype.slice.call(this.queue, 0);\n if (_.isFunction(this.options.filterTelemetry)) {\n try {\n var i = events.length;\n while (i--) {\n if (this.options.filterTelemetry(events[i])) {\n events.splice(i, 1);\n }\n }\n } catch (e) {\n this.options.filterTelemetry = null;\n }\n }\n return events;\n};\n\nTelemeter.prototype.capture = function(type, metadata, level, rollbarUUID, timestamp) {\n var e = {\n level: getLevel(type, level),\n type: type,\n timestamp_ms: timestamp || _.now(),\n body: metadata,\n source: 'client'\n };\n if (rollbarUUID) {\n e.uuid = rollbarUUID;\n }\n\n try {\n if (_.isFunction(this.options.filterTelemetry) && this.options.filterTelemetry(e)) {\n return false;\n }\n } catch (exc) {\n this.options.filterTelemetry = null;\n }\n\n this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function(type, metadata, level, rollbarUUID) {\n return this.capture(type, metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.captureError = function(err, level, rollbarUUID, timestamp) {\n var metadata = {\n message: err.message || String(err)\n };\n if (err.stack) {\n metadata.stack = err.stack;\n }\n return this.capture('error', metadata, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureLog = function(message, level, rollbarUUID, timestamp) {\n return this.capture('log', {\n message: message\n }, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID, requestData) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\n if (requestData) {\n metadata.request = requestData;\n }\n var level = this.levelFromStatus(metadata.status_code);\n return this.capture('network', metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.levelFromStatus = function(statusCode) {\n if (statusCode >= 200 && statusCode < 400) {\n return 'info';\n }\n if (statusCode === 0 || statusCode >= 400) {\n return 'error';\n }\n return 'info';\n};\n\nTelemeter.prototype.captureDom = function(subtype, element, value, checked, rollbarUUID) {\n var metadata = {\n subtype: subtype,\n element: element\n };\n if (value !== undefined) {\n metadata.value = value;\n }\n if (checked !== undefined) {\n metadata.checked = checked;\n }\n return this.capture('dom', metadata, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureNavigation = function(from, to, rollbarUUID) {\n return this.capture('navigation', {from: from, to: to}, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureDomContentLoaded = function(ts) {\n return this.capture('navigation', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n */\n};\nTelemeter.prototype.captureLoad = function(ts) {\n return this.capture('navigation', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n */\n};\n\nTelemeter.prototype.captureConnectivityChange = function(type, rollbarUUID) {\n return this.captureNetwork({change: type}, 'connectivity', rollbarUUID);\n};\n\n// Only intended to be used internally by the notifier\nTelemeter.prototype._captureRollbarItem = function(item) {\n if (!this.options.includeItemsInTelemetry) {\n return;\n }\n if (item.err) {\n return this.captureError(item.err, item.level, item.uuid, item.timestamp);\n }\n if (item.message) {\n return this.captureLog(item.message, item.level, item.uuid, item.timestamp);\n }\n if (item.custom) {\n return this.capture('log', item.custom, item.level, item.uuid, item.timestamp);\n }\n};\n\nTelemeter.prototype.push = function(e) {\n this.queue.push(e);\n if (this.queue.length > this.maxQueueSize) {\n this.queue.shift();\n }\n};\n\nfunction getLevel(type, level) {\n if (level) {\n return level;\n }\n var defaultLevel = {\n error: 'error',\n manual: 'info'\n };\n return defaultLevel[type] || 'info';\n}\n\nmodule.exports = Telemeter;\n","'use strict';\n\nvar _ = require('../utility');\nvar scrub = require('../scrub');\nvar urlparser = require('./url');\nvar domUtil = require('./domUtility');\n\nvar defaults = {\n network: true,\n networkResponseHeaders: false,\n networkResponseBody: false,\n networkRequestHeaders: false,\n networkRequestBody: false,\n networkErrorOnHttp5xx: false,\n networkErrorOnHttp4xx: false,\n networkErrorOnHttp0: false,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true,\n contentSecurityPolicy: true,\n errorOnContentSecurityPolicy: false\n};\n\nfunction replace(obj, name, replacement, replacements, type) {\n var orig = obj[name];\n obj[name] = replacement(orig);\n if (replacements) {\n replacements[type].push([obj, name, orig]);\n }\n}\n\nfunction restore(replacements, type) {\n var b;\n while (replacements[type].length) {\n b = replacements[type].shift();\n b[0][b[1]] = b[2];\n }\n}\n\nfunction nameFromDescription(description) {\n if (!description || !description.attributes) { return null; }\n var attrs = description.attributes;\n for (var a = 0; a < attrs.length; ++a) {\n if (attrs[a].key === 'name') {\n return attrs[a].value;\n }\n }\n return null;\n}\n\nfunction defaultValueScrubber(scrubFields) {\n var patterns = [];\n for (var i = 0; i < scrubFields.length; ++i) {\n patterns.push(new RegExp(scrubFields[i], 'i'));\n }\n return function(description) {\n var name = nameFromDescription(description);\n if (!name) { return false; }\n for (var i = 0; i < patterns.length; ++i) {\n if (patterns[i].test(name)) {\n return true;\n }\n }\n return false;\n };\n}\n\nfunction Instrumenter(options, telemeter, rollbar, _window, _document) {\n this.options = options;\n var autoInstrument = options.autoInstrument;\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);\n this.telemeter = telemeter;\n this.rollbar = rollbar;\n this.diagnostic = rollbar.client.notifier.diagnostic;\n this._window = _window || {};\n this._document = _document || {};\n this.replacements = {\n network: [],\n log: [],\n navigation: [],\n connectivity: []\n };\n this.eventRemovers = {\n dom: [],\n connectivity: [],\n contentsecuritypolicy: []\n };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function(options) {\n this.options = _.merge(this.options, options);\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.merge(this.autoInstrument);\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n if (options.scrubTelemetryInputs !== undefined) {\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n }\n if (options.telemetryScrubber !== undefined) {\n this.telemetryScrubber = options.telemetryScrubber;\n }\n};\n\n// eslint-disable-next-line complexity\nInstrumenter.prototype.instrument = function(oldSettings) {\n if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {\n this.instrumentNetwork();\n } else if (!this.autoInstrument.network && oldSettings && oldSettings.network) {\n this.deinstrumentNetwork();\n }\n\n if (this.autoInstrument.log && !(oldSettings && oldSettings.log)) {\n this.instrumentConsole();\n } else if (!this.autoInstrument.log && oldSettings && oldSettings.log) {\n this.deinstrumentConsole();\n }\n\n if (this.autoInstrument.dom && !(oldSettings && oldSettings.dom)) {\n this.instrumentDom();\n } else if (!this.autoInstrument.dom && oldSettings && oldSettings.dom) {\n this.deinstrumentDom();\n }\n\n if (this.autoInstrument.navigation && !(oldSettings && oldSettings.navigation)) {\n this.instrumentNavigation();\n } else if (!this.autoInstrument.navigation && oldSettings && oldSettings.navigation) {\n this.deinstrumentNavigation();\n }\n\n if (this.autoInstrument.connectivity && !(oldSettings && oldSettings.connectivity)) {\n this.instrumentConnectivity();\n } else if (!this.autoInstrument.connectivity && oldSettings && oldSettings.connectivity) {\n this.deinstrumentConnectivity();\n }\n\n if (this.autoInstrument.contentSecurityPolicy && !(oldSettings && oldSettings.contentSecurityPolicy)) {\n this.instrumentContentSecurityPolicy();\n } else if (!this.autoInstrument.contentSecurityPolicy && oldSettings && oldSettings.contentSecurityPolicy) {\n this.deinstrumentContentSecurityPolicy();\n }\n};\n\nInstrumenter.prototype.deinstrumentNetwork = function() {\n restore(this.replacements, 'network');\n};\n\nInstrumenter.prototype.instrumentNetwork = function() {\n var self = this;\n\n function wrapProp(prop, xhr) {\n if (prop in xhr && _.isFunction(xhr[prop])) {\n replace(xhr, prop, function(orig) {\n return self.rollbar.wrap(orig);\n });\n }\n }\n\n if ('XMLHttpRequest' in this._window) {\n var xhrp = this._window.XMLHttpRequest.prototype;\n replace(xhrp, 'open', function(orig) {\n return function(method, url) {\n if (_.isType(url, 'string')) {\n if (this.__rollbar_xhr) {\n this.__rollbar_xhr.method = method;\n this.__rollbar_xhr.url = url;\n this.__rollbar_xhr.status_code = null;\n this.__rollbar_xhr.start_time_ms = _.now();\n this.__rollbar_xhr.end_time_ms = null;\n } else {\n this.__rollbar_xhr = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'setRequestHeader', function(orig) {\n return function(header, value) {\n // If xhr.open is async, __rollbar_xhr may not be initialized yet.\n if (!this.__rollbar_xhr) {\n this.__rollbar_xhr = {};\n }\n if (_.isType(header, 'string') && _.isType(value, 'string')) {\n if (self.autoInstrument.networkRequestHeaders) {\n if (!this.__rollbar_xhr.request_headers) {\n this.__rollbar_xhr.request_headers = {};\n }\n this.__rollbar_xhr.request_headers[header] = value;\n }\n // We want the content type even if request header telemetry is off.\n if (header.toLowerCase() === 'content-type') {\n this.__rollbar_xhr.request_content_type = value;\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'send', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(data) {\n /* eslint-enable no-unused-vars */\n var xhr = this;\n\n function onreadystatechangeHandler() {\n if (xhr.__rollbar_xhr) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n if (self.autoInstrument.networkRequestBody) {\n xhr.__rollbar_xhr.request = data;\n }\n xhr.__rollbar_event = self.captureNetwork(xhr.__rollbar_xhr, 'xhr', undefined);\n }\n if (xhr.readyState < 2) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n }\n if (xhr.readyState > 3) {\n xhr.__rollbar_xhr.end_time_ms = _.now();\n\n var headers = null;\n xhr.__rollbar_xhr.response_content_type = xhr.getResponseHeader('Content-Type');\n if (self.autoInstrument.networkResponseHeaders) {\n var headersConfig = self.autoInstrument.networkResponseHeaders;\n headers = {};\n try {\n var header, i;\n if (headersConfig === true) {\n var allHeaders = xhr.getAllResponseHeaders();\n if (allHeaders) {\n var arr = allHeaders.trim().split(/[\\r\\n]+/);\n var parts, value;\n for (i=0; i < arr.length; i++) {\n parts = arr[i].split(': ');\n header = parts.shift();\n value = parts.join(': ');\n headers[header] = value;\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n header = headersConfig[i];\n headers[header] = xhr.getResponseHeader(header);\n }\n }\n } catch (e) {\n /* we ignore the errors here that could come from different\n * browser issues with the xhr methods */\n }\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n try {\n body = xhr.responseText;\n } catch (e) {\n /* ignore errors from reading responseText */\n }\n }\n var response = null;\n if (body || headers) {\n response = {};\n if (body) {\n if (self.isJsonContentType(xhr.__rollbar_xhr.response_content_type)) {\n response.body = self.scrubJson(body);\n } else {\n response.body = body;\n }\n }\n if (headers) {\n response.headers = headers;\n }\n }\n if (response) {\n xhr.__rollbar_xhr.response = response;\n }\n try {\n var code = xhr.status;\n code = code === 1223 ? 204 : code;\n xhr.__rollbar_xhr.status_code = code;\n xhr.__rollbar_event.level = self.telemeter.levelFromStatus(code);\n self.errorOnHttpStatus(xhr.__rollbar_xhr);\n } catch (e) {\n /* ignore possible exception from xhr.status */\n }\n }\n }\n }\n\n wrapProp('onload', xhr);\n wrapProp('onerror', xhr);\n wrapProp('onprogress', xhr);\n\n if ('onreadystatechange' in xhr && _.isFunction(xhr.onreadystatechange)) {\n replace(xhr, 'onreadystatechange', function(orig) {\n return self.rollbar.wrap(orig, undefined, onreadystatechangeHandler);\n });\n } else {\n xhr.onreadystatechange = onreadystatechangeHandler;\n }\n if (xhr.__rollbar_xhr && self.trackHttpErrors()) {\n xhr.__rollbar_xhr.stack = (new Error()).stack;\n }\n return orig.apply(this, arguments);\n }\n }, this.replacements, 'network');\n }\n\n if ('fetch' in this._window) {\n replace(this._window, 'fetch', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(fn, t) {\n /* eslint-enable no-unused-vars */\n var args = new Array(arguments.length);\n for (var i=0, len=args.length; i < len; i++) {\n args[i] = arguments[i];\n }\n var input = args[0];\n var method = 'GET';\n var url;\n if (_.isType(input, 'string')) {\n url = input;\n } else if (input) {\n url = input.url;\n if (input.method) {\n method = input.method;\n }\n }\n if (args[1] && args[1].method) {\n method = args[1].method;\n }\n var metadata = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n if (args[1] && args[1].headers) {\n // Argument may be a Headers object, or plain object. Ensure here that\n // we are working with a Headers object with case-insensitive keys.\n var reqHeaders = new Headers(args[1].headers);\n\n metadata.request_content_type = reqHeaders.get('Content-Type');\n\n if (self.autoInstrument.networkRequestHeaders) {\n metadata.request_headers = self.fetchHeaders(reqHeaders, self.autoInstrument.networkRequestHeaders)\n }\n }\n\n if (self.autoInstrument.networkRequestBody) {\n if (args[1] && args[1].body) {\n metadata.request = args[1].body;\n } else if (args[0] && !_.isType(args[0], 'string') && args[0].body) {\n metadata.request = args[0].body;\n }\n }\n self.captureNetwork(metadata, 'fetch', undefined);\n if (self.trackHttpErrors()) {\n metadata.stack = (new Error()).stack;\n }\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n metadata.response_content_type = resp.headers.get('Content-Type');\n var headers = null;\n if (self.autoInstrument.networkResponseHeaders) {\n headers = self.fetchHeaders(resp.headers, self.autoInstrument.networkResponseHeaders);\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n if (typeof resp.text === 'function') { // Response.text() is not implemented on some platforms\n // The response must be cloned to prevent reading (and locking) the original stream.\n body = resp.clone().text(); //returns a Promise\n }\n }\n if (headers || body) {\n metadata.response = {};\n if (body) {\n // Test to ensure body is a Promise, which it should always be.\n if (typeof body.then === 'function') {\n body.then(function (text) {\n if (self.isJsonContentType(metadata.response_content_type)) {\n metadata.response.body = self.scrubJson(text);\n }\n });\n } else {\n metadata.response.body = body;\n }\n }\n if (headers) {\n metadata.response.headers = headers;\n }\n }\n self.errorOnHttpStatus(metadata);\n return resp;\n });\n };\n }, this.replacements, 'network');\n }\n};\n\nInstrumenter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID) {\n if (metadata.request && this.isJsonContentType(metadata.request_content_type)) {\n metadata.request = this.scrubJson(metadata.request);\n }\n return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);\n};\n\nInstrumenter.prototype.isJsonContentType = function(contentType) {\n return (contentType && _.isType(contentType, 'string') && contentType.toLowerCase().includes('json')) ? true : false;\n}\n\nInstrumenter.prototype.scrubJson = function(json) {\n return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));\n}\n\nInstrumenter.prototype.fetchHeaders = function(inHeaders, headersConfig) {\n var outHeaders = {};\n try {\n var i;\n if (headersConfig === true) {\n if (typeof inHeaders.entries === 'function') { // Headers.entries() is not implemented in IE\n var allHeaders = inHeaders.entries();\n var currentHeader = allHeaders.next();\n while (!currentHeader.done) {\n outHeaders[currentHeader.value[0]] = currentHeader.value[1];\n currentHeader = allHeaders.next();\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n var header = headersConfig[i];\n outHeaders[header] = inHeaders.get(header);\n }\n }\n } catch (e) {\n /* ignore probable IE errors */\n }\n return outHeaders;\n}\n\nInstrumenter.prototype.trackHttpErrors = function() {\n return this.autoInstrument.networkErrorOnHttp5xx ||\n this.autoInstrument.networkErrorOnHttp4xx ||\n this.autoInstrument.networkErrorOnHttp0;\n}\n\nInstrumenter.prototype.errorOnHttpStatus = function(metadata) {\n var status = metadata.status_code;\n\n if ((status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||\n (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||\n (status === 0 && this.autoInstrument.networkErrorOnHttp0)) {\n var error = new Error('HTTP request failed with Status ' + status);\n error.stack = metadata.stack;\n this.rollbar.error(error, { skipFrames: 1 });\n }\n}\n\nInstrumenter.prototype.deinstrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n var b;\n while (this.replacements['log'].length) {\n b = this.replacements['log'].shift();\n this._window.console[b[0]] = b[1];\n }\n};\n\nInstrumenter.prototype.instrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n\n var self = this;\n var c = this._window.console;\n\n function wrapConsole(method) {\n 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778\n\n var orig = c[method];\n var origConsole = c;\n var level = method === 'warn' ? 'warning' : method;\n c[method] = function() {\n var args = Array.prototype.slice.call(arguments);\n var message = _.formatArgsAsString(args);\n self.telemeter.captureLog(message, level);\n if (orig) {\n Function.prototype.apply.call(orig, origConsole, args);\n }\n };\n self.replacements['log'].push([method, orig]);\n }\n var methods = ['debug','info','warn','error','log'];\n try {\n for (var i=0, len=methods.length; i < len; i++) {\n wrapConsole(methods[i]);\n }\n } catch (e) {\n this.diagnostic.instrumentConsole = { error: e.message };\n }\n};\n\nInstrumenter.prototype.deinstrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n this.removeListeners('dom');\n};\n\nInstrumenter.prototype.instrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n var clickHandler = this.handleClick.bind(this);\n var blurHandler = this.handleBlur.bind(this);\n this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);\n this.addListener('dom', this._window, 'blur', 'onfocusout', blurHandler, true);\n};\n\nInstrumenter.prototype.handleClick = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n var hasTag = e && e.tagName;\n var anchorOrButton = domUtil.isDescribedElement(e, 'a') || domUtil.isDescribedElement(e, 'button');\n if (hasTag && (anchorOrButton || domUtil.isDescribedElement(e, 'input', ['button', 'submit']))) {\n this.captureDomEvent('click', e);\n } else if (domUtil.isDescribedElement(e, 'input', ['checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value, e.checked);\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleBlur = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n if (e && e.tagName) {\n if (domUtil.isDescribedElement(e, 'textarea')) {\n this.captureDomEvent('input', e, e.value);\n } else if (domUtil.isDescribedElement(e, 'select') && e.options && e.options.length) {\n this.handleSelectInputChanged(e);\n } else if (domUtil.isDescribedElement(e, 'input') && !domUtil.isDescribedElement(e, 'input', ['button', 'submit', 'hidden', 'checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value);\n }\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleSelectInputChanged = function(elem) {\n if (elem.multiple) {\n for (var i = 0; i < elem.options.length; i++) {\n if (elem.options[i].selected) {\n this.captureDomEvent('input', elem, elem.options[i].value);\n }\n }\n } else if (elem.selectedIndex >= 0 && elem.options[elem.selectedIndex]) {\n this.captureDomEvent('input', elem, elem.options[elem.selectedIndex].value);\n }\n};\n\nInstrumenter.prototype.captureDomEvent = function(subtype, element, value, isChecked) {\n if (value !== undefined) {\n if (this.scrubTelemetryInputs || (domUtil.getElementType(element) === 'password')) {\n value = '[scrubbed]';\n } else {\n var description = domUtil.describeElement(element);\n if (this.telemetryScrubber) {\n if (this.telemetryScrubber(description)) {\n value = '[scrubbed]';\n }\n } else if (this.defaultValueScrubber(description)) {\n value = '[scrubbed]';\n }\n }\n }\n var elementString = domUtil.elementArrayToString(domUtil.treeToArray(element));\n this.telemeter.captureDom(subtype, elementString, value, isChecked);\n};\n\nInstrumenter.prototype.deinstrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n restore(this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.instrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n var self = this;\n replace(this._window, 'onpopstate', function(orig) {\n return function() {\n var current = self._location.href;\n self.handleUrlChange(self._lastHref, current);\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n }, this.replacements, 'navigation');\n\n replace(this._window.history, 'pushState', function(orig) {\n return function() {\n var url = arguments.length > 2 ? arguments[2] : undefined;\n if (url) {\n self.handleUrlChange(self._lastHref, url + '');\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.handleUrlChange = function(from, to) {\n var parsedHref = urlparser.parse(this._location.href);\n var parsedTo = urlparser.parse(to);\n var parsedFrom = urlparser.parse(from);\n this._lastHref = to;\n if (parsedHref.protocol === parsedTo.protocol && parsedHref.host === parsedTo.host) {\n to = parsedTo.path + (parsedTo.hash || '');\n }\n if (parsedHref.protocol === parsedFrom.protocol && parsedHref.host === parsedFrom.host) {\n from = parsedFrom.path + (parsedFrom.hash || '');\n }\n this.telemeter.captureNavigation(from, to);\n};\n\nInstrumenter.prototype.deinstrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.removeListeners('connectivity');\n } else {\n restore(this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.instrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.addListener('connectivity', this._window, 'online', undefined, function() {\n this.telemeter.captureConnectivityChange('online');\n }.bind(this), true);\n this.addListener('connectivity', this._window, 'offline', undefined, function() {\n this.telemeter.captureConnectivityChange('offline');\n }.bind(this), true);\n } else {\n var self = this;\n replace(this._document.body, 'ononline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('online');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n replace(this._document.body, 'onoffline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('offline');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.handleCspEvent = function(cspEvent) {\n var message = 'Security Policy Violation: ' +\n 'blockedURI: ' + cspEvent.blockedURI + ', ' +\n 'violatedDirective: ' + cspEvent.violatedDirective + ', ' +\n 'effectiveDirective: ' + cspEvent.effectiveDirective + ', ';\n\n if (cspEvent.sourceFile) {\n message += 'location: ' + cspEvent.sourceFile + ', ' +\n 'line: ' + cspEvent.lineNumber + ', ' +\n 'col: ' + cspEvent.columnNumber + ', ';\n }\n\n message += 'originalPolicy: ' + cspEvent.originalPolicy;\n\n this.telemeter.captureLog(message, 'error');\n this.handleCspError(message);\n}\n\nInstrumenter.prototype.handleCspError = function(message) {\n if (this.autoInstrument.errorOnContentSecurityPolicy) {\n this.rollbar.error(message);\n }\n}\n\nInstrumenter.prototype.deinstrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._window)) { return; }\n\n this.removeListeners('contentsecuritypolicy');\n};\n\nInstrumenter.prototype.instrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._window)) { return; }\n\n var cspHandler = this.handleCspEvent.bind(this);\n this.addListener('contentsecuritypolicy', this._window, 'securitypolicyviolation', null, cspHandler, false);\n};\n\nInstrumenter.prototype.addListener = function(section, obj, type, altType, handler, capture) {\n if (obj.addEventListener) {\n obj.addEventListener(type, handler, capture);\n this.eventRemovers[section].push(function() {\n obj.removeEventListener(type, handler, capture);\n });\n } else if (altType) {\n obj.attachEvent(altType, handler);\n this.eventRemovers[section].push(function() {\n obj.detachEvent(altType, handler);\n });\n }\n};\n\nInstrumenter.prototype.removeListeners = function(section) {\n var r;\n while (this.eventRemovers[section].length) {\n r = this.eventRemovers[section].shift();\n r();\n }\n};\n\nmodule.exports = Instrumenter;\n","'use strict';\n\nfunction getElementType(e) {\n return (e.getAttribute('type') || '').toLowerCase();\n}\n\nfunction isDescribedElement(element, type, subtypes) {\n if (element.tagName.toLowerCase() !== type.toLowerCase()) {\n return false;\n }\n if (!subtypes) {\n return true;\n }\n element = getElementType(element);\n for (var i = 0; i < subtypes.length; i++) {\n if (subtypes[i] === element) {\n return true;\n }\n }\n return false;\n}\n\nfunction getElementFromEvent(evt, doc) {\n if (evt.target) {\n return evt.target;\n }\n if (doc && doc.elementFromPoint) {\n return doc.elementFromPoint(evt.clientX, evt.clientY);\n }\n return undefined;\n}\n\nfunction treeToArray(elem) {\n var MAX_HEIGHT = 5;\n var out = [];\n var nextDescription;\n for (var height = 0; elem && height < MAX_HEIGHT; height++) {\n nextDescription = describeElement(elem);\n if (nextDescription.tagName === 'html') {\n break;\n }\n out.unshift(nextDescription);\n elem = elem.parentNode;\n }\n return out;\n}\n\nfunction elementArrayToString(a) {\n var MAX_LENGTH = 80;\n var separator = ' > ', separatorLength = separator.length;\n var out = [], len = 0, nextStr, totalLength;\n\n for (var i = a.length - 1; i >= 0; i--) {\n nextStr = descriptionToString(a[i]);\n totalLength = len + (out.length * separatorLength) + nextStr.length;\n if (i < a.length - 1 && totalLength >= MAX_LENGTH + 3) {\n out.unshift('...');\n break;\n }\n out.unshift(nextStr);\n len += nextStr.length;\n }\n return out.join(separator);\n}\n\nfunction descriptionToString(desc) {\n if (!desc || !desc.tagName) {\n return '';\n }\n var out = [desc.tagName];\n if (desc.id) {\n out.push('#' + desc.id);\n }\n if (desc.classes) {\n out.push('.' + desc.classes.join('.'));\n }\n for (var i = 0; i < desc.attributes.length; i++) {\n out.push('[' + desc.attributes[i].key + '=\"' + desc.attributes[i].value + '\"]');\n }\n\n return out.join('');\n}\n\n/**\n * Input: a dom element\n * Output: null if tagName is falsey or input is falsey, else\n * {\n * tagName: String,\n * id: String | undefined,\n * classes: [String] | undefined,\n * attributes: [\n * {\n * key: OneOf(type, name, title, alt),\n * value: String\n * }\n * ]\n * }\n */\nfunction describeElement(elem) {\n if (!elem || !elem.tagName) {\n return null;\n }\n var out = {}, className, key, attr, i;\n out.tagName = elem.tagName.toLowerCase();\n if (elem.id) {\n out.id = elem.id;\n }\n className = elem.className;\n if (className && (typeof className === 'string')) {\n out.classes = className.split(/\\s+/);\n }\n var attributes = ['type', 'name', 'title', 'alt'];\n out.attributes = [];\n for (i = 0; i < attributes.length; i++) {\n key = attributes[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.attributes.push({key: key, value: attr});\n }\n }\n return out;\n}\n\nmodule.exports = {\n describeElement: describeElement,\n descriptionToString: descriptionToString,\n elementArrayToString: elementArrayToString,\n treeToArray: treeToArray,\n getElementFromEvent: getElementFromEvent,\n isDescribedElement: isDescribedElement,\n getElementType: getElementType\n};\n","'use strict';\n\nvar polyfillJSON = require('../../vendor/JSON-js/json3');\n\nmodule.exports = polyfillJSON;\n","// json3.js\n// 2017-02-21\n// Public Domain.\n// NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.\n// See http://www.JSON.org/js.html\n// This code should be minified before deployment.\n// See http://javascript.crockford.com/jsmin.html\n\n// USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO\n// NOT CONTROL.\n\n// This file creates a global JSON object containing two methods: stringify\n// and parse. This file provides the ES5 JSON capability to ES3 systems.\n// If a project might run on IE8 or earlier, then this file should be included.\n// This file does nothing on ES5 systems.\n\n// JSON.stringify(value, replacer, space)\n// value any JavaScript value, usually an object or array.\n// replacer an optional parameter that determines how object\n// values are stringified for objects. It can be a\n// function or an array of strings.\n// space an optional parameter that specifies the indentation\n// of nested structures. If it is omitted, the text will\n// be packed without extra whitespace. If it is a number,\n// it will specify the number of spaces to indent at each\n// level. If it is a string (such as \"\\t\" or \" \"),\n// it contains the characters used to indent at each level.\n// This method produces a JSON text from a JavaScript value.\n// When an object value is found, if the object contains a toJSON\n// method, its toJSON method will be called and the result will be\n// stringified. A toJSON method does not serialize: it returns the\n// value represented by the name/value pair that should be serialized,\n// or undefined if nothing should be serialized. The toJSON method\n// will be passed the key associated with the value, and this will be\n// bound to the value.\n\n// For example, this would serialize Dates as ISO strings.\n\n// Date.prototype.toJSON = function (key) {\n// function f(n) {\n// // Format integers to have at least two digits.\n// return (n < 10)\n// ? \"0\" + n\n// : n;\n// }\n// return this.getUTCFullYear() + \"-\" +\n// f(this.getUTCMonth() + 1) + \"-\" +\n// f(this.getUTCDate()) + \"T\" +\n// f(this.getUTCHours()) + \":\" +\n// f(this.getUTCMinutes()) + \":\" +\n// f(this.getUTCSeconds()) + \"Z\";\n// };\n\n// You can provide an optional replacer method. It will be passed the\n// key and value of each member, with this bound to the containing\n// object. The value that is returned from your method will be\n// serialized. If your method returns undefined, then the member will\n// be excluded from the serialization.\n\n// If the replacer parameter is an array of strings, then it will be\n// used to select the members to be serialized. It filters the results\n// such that only members with keys listed in the replacer array are\n// stringified.\n\n// Values that do not have JSON representations, such as undefined or\n// functions, will not be serialized. Such values in objects will be\n// dropped; in arrays they will be replaced with null. You can use\n// a replacer function to replace those with JSON values.\n\n// JSON.stringify(undefined) returns undefined.\n\n// The optional space parameter produces a stringification of the\n// value that is filled with line breaks and indentation to make it\n// easier to read.\n\n// If the space parameter is a non-empty string, then that string will\n// be used for indentation. If the space parameter is a number, then\n// the indentation will be that many spaces.\n\n// Example:\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}]);\n// // text is '[\"e\",{\"pluribus\":\"unum\"}]'\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}], null, \"\\t\");\n// // text is '[\\n\\t\"e\",\\n\\t{\\n\\t\\t\"pluribus\": \"unum\"\\n\\t}\\n]'\n\n// text = JSON.stringify([new Date()], function (key, value) {\n// return this[key] instanceof Date\n// ? \"Date(\" + this[key] + \")\"\n// : value;\n// });\n// // text is '[\"Date(---current time---)\"]'\n\n// JSON.parse(text, reviver)\n// This method parses a JSON text to produce an object or array.\n// It can throw a SyntaxError exception.\n// This has been modified to use JSON-js/json_parse_state.js as the\n// parser instead of the one built around eval found in JSON-js/json2.js\n\n// The optional reviver parameter is a function that can filter and\n// transform the results. It receives each of the keys and values,\n// and its return value is used instead of the original value.\n// If it returns what it received, then the structure is not modified.\n// If it returns undefined then the member is deleted.\n\n// Example:\n\n// // Parse the text. Values that look like ISO date strings will\n// // be converted to Date objects.\n\n// myData = JSON.parse(text, function (key, value) {\n// var a;\n// if (typeof value === \"string\") {\n// a =\n// /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2}(?:\\.\\d*)?)Z$/.exec(value);\n// if (a) {\n// return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],\n// +a[5], +a[6]));\n// }\n// }\n// return value;\n// });\n\n// myData = JSON.parse('[\"Date(09/09/2001)\"]', function (key, value) {\n// var d;\n// if (typeof value === \"string\" &&\n// value.slice(0, 5) === \"Date(\" &&\n// value.slice(-1) === \")\") {\n// d = new Date(value.slice(5, -1));\n// if (d) {\n// return d;\n// }\n// }\n// return value;\n// });\n\n// This is a reference implementation. You are free to copy, modify, or\n// redistribute.\n\n/*jslint\n for, this\n */\n\n/*property\n JSON, apply, call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,\n getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,\n lastIndex, length, parse, prototype, push, replace, slice, stringify,\n test, toJSON, toString, valueOf\n */\n\nvar setupCustomJSON = function(JSON) {\n\n var rx_one = /^[\\],:{}\\s]*$/;\n var rx_two = /\\\\(?:[\"\\\\\\/bfnrt]|u[0-9a-fA-F]{4})/g;\n var rx_three = /\"[^\"\\\\\\n\\r]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g;\n var rx_four = /(?:^|:|,)(?:\\s*\\[)+/g;\n var rx_escapable = /[\\\\\"\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n var rx_dangerous = /[\\u0000\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n\n function f(n) {\n // Format integers to have at least two digits.\n return n < 10\n ? \"0\" + n\n : n;\n }\n\n function this_value() {\n return this.valueOf();\n }\n\n if (typeof Date.prototype.toJSON !== \"function\") {\n\n Date.prototype.toJSON = function () {\n\n return isFinite(this.valueOf())\n ? this.getUTCFullYear() + \"-\" +\n f(this.getUTCMonth() + 1) + \"-\" +\n f(this.getUTCDate()) + \"T\" +\n f(this.getUTCHours()) + \":\" +\n f(this.getUTCMinutes()) + \":\" +\n f(this.getUTCSeconds()) + \"Z\"\n : null;\n };\n\n Boolean.prototype.toJSON = this_value;\n Number.prototype.toJSON = this_value;\n String.prototype.toJSON = this_value;\n }\n\n var gap;\n var indent;\n var meta;\n var rep;\n\n\n function quote(string) {\n\n // If the string contains no control characters, no quote characters, and no\n // backslash characters, then we can safely slap some quotes around it.\n // Otherwise we must also replace the offending characters with safe escape\n // sequences.\n\n rx_escapable.lastIndex = 0;\n return rx_escapable.test(string)\n ? \"\\\"\" + string.replace(rx_escapable, function (a) {\n var c = meta[a];\n return typeof c === \"string\"\n ? c\n : \"\\\\u\" + (\"0000\" + a.charCodeAt(0).toString(16)).slice(-4);\n }) + \"\\\"\"\n : \"\\\"\" + string + \"\\\"\";\n }\n\n\n function str(key, holder) {\n\n // Produce a string from holder[key].\n\n var i; // The loop counter.\n var k; // The member key.\n var v; // The member value.\n var length;\n var mind = gap;\n var partial;\n var value = holder[key];\n\n // If the value has a toJSON method, call it to obtain a replacement value.\n\n if (value && typeof value === \"object\" &&\n typeof value.toJSON === \"function\") {\n value = value.toJSON(key);\n }\n\n // If we were called with a replacer function, then call the replacer to\n // obtain a replacement value.\n\n if (typeof rep === \"function\") {\n value = rep.call(holder, key, value);\n }\n\n // What happens next depends on the value's type.\n\n switch (typeof value) {\n case \"string\":\n return quote(value);\n\n case \"number\":\n\n // JSON numbers must be finite. Encode non-finite numbers as null.\n\n return isFinite(value)\n ? String(value)\n : \"null\";\n\n case \"boolean\":\n case \"null\":\n\n // If the value is a boolean or null, convert it to a string. Note:\n // typeof null does not produce \"null\". The case is included here in\n // the remote chance that this gets fixed someday.\n\n return String(value);\n\n // If the type is \"object\", we might be dealing with an object or an array or\n // null.\n\n case \"object\":\n\n // Due to a specification blunder in ECMAScript, typeof null is \"object\",\n // so watch out for that case.\n\n if (!value) {\n return \"null\";\n }\n\n // Make an array to hold the partial results of stringifying this object value.\n\n gap += indent;\n partial = [];\n\n // Is the value an array?\n\n if (Object.prototype.toString.apply(value) === \"[object Array]\") {\n\n // The value is an array. Stringify every element. Use null as a placeholder\n // for non-JSON values.\n\n length = value.length;\n for (i = 0; i < length; i += 1) {\n partial[i] = str(i, value) || \"null\";\n }\n\n // Join all of the elements together, separated with commas, and wrap them in\n // brackets.\n\n v = partial.length === 0\n ? \"[]\"\n : gap\n ? \"[\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"]\"\n : \"[\" + partial.join(\",\") + \"]\";\n gap = mind;\n return v;\n }\n\n // If the replacer is an array, use it to select the members to be stringified.\n\n if (rep && typeof rep === \"object\") {\n length = rep.length;\n for (i = 0; i < length; i += 1) {\n if (typeof rep[i] === \"string\") {\n k = rep[i];\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n } else {\n\n // Otherwise, iterate through all of the keys in the object.\n\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(value, k)) {\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n }\n\n // Join all of the member texts together, separated with commas,\n // and wrap them in braces.\n\n v = partial.length === 0\n ? \"{}\"\n : gap\n ? \"{\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"}\"\n : \"{\" + partial.join(\",\") + \"}\";\n gap = mind;\n return v;\n }\n }\n\n // If the JSON object does not yet have a stringify method, give it one.\n\n if (typeof JSON.stringify !== \"function\") {\n meta = { // table of character substitutions\n \"\\b\": \"\\\\b\",\n \"\\t\": \"\\\\t\",\n \"\\n\": \"\\\\n\",\n \"\\f\": \"\\\\f\",\n \"\\r\": \"\\\\r\",\n \"\\\"\": \"\\\\\\\"\",\n \"\\\\\": \"\\\\\\\\\"\n };\n JSON.stringify = function (value, replacer, space) {\n\n // The stringify method takes a value and an optional replacer, and an optional\n // space parameter, and returns a JSON text. The replacer can be a function\n // that can replace values, or an array of strings that will select the keys.\n // A default replacer method can be provided. Use of the space parameter can\n // produce text that is more easily readable.\n\n var i;\n gap = \"\";\n indent = \"\";\n\n // If the space parameter is a number, make an indent string containing that\n // many spaces.\n\n if (typeof space === \"number\") {\n for (i = 0; i < space; i += 1) {\n indent += \" \";\n }\n\n // If the space parameter is a string, it will be used as the indent string.\n\n } else if (typeof space === \"string\") {\n indent = space;\n }\n\n // If there is a replacer, it must be a function or an array.\n // Otherwise, throw an error.\n\n rep = replacer;\n if (replacer && typeof replacer !== \"function\" &&\n (typeof replacer !== \"object\" ||\n typeof replacer.length !== \"number\")) {\n throw new Error(\"JSON.stringify\");\n }\n\n // Make a fake root object containing our value under the key of \"\".\n // Return the result of stringifying the value.\n\n return str(\"\", {\"\": value});\n };\n }\n\n\n // If the JSON object does not yet have a parse method, give it one.\n\n if (typeof JSON.parse !== \"function\") {\n JSON.parse = (function () {\n\n // This function creates a JSON parse function that uses a state machine rather\n // than the dangerous eval function to parse a JSON text.\n\n var state; // The state of the parser, one of\n // 'go' The starting state\n // 'ok' The final, accepting state\n // 'firstokey' Ready for the first key of the object or\n // the closing of an empty object\n // 'okey' Ready for the next key of the object\n // 'colon' Ready for the colon\n // 'ovalue' Ready for the value half of a key/value pair\n // 'ocomma' Ready for a comma or closing }\n // 'firstavalue' Ready for the first value of an array or\n // an empty array\n // 'avalue' Ready for the next value of an array\n // 'acomma' Ready for a comma or closing ]\n var stack; // The stack, for controlling nesting.\n var container; // The current container object or array\n var key; // The current key\n var value; // The current value\n var escapes = { // Escapement translation table\n \"\\\\\": \"\\\\\",\n \"\\\"\": \"\\\"\",\n \"/\": \"/\",\n \"t\": \"\\t\",\n \"n\": \"\\n\",\n \"r\": \"\\r\",\n \"f\": \"\\f\",\n \"b\": \"\\b\"\n };\n var string = { // The actions for string tokens\n go: function () {\n state = \"ok\";\n },\n firstokey: function () {\n key = value;\n state = \"colon\";\n },\n okey: function () {\n key = value;\n state = \"colon\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var number = { // The actions for number tokens\n go: function () {\n state = \"ok\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var action = {\n\n // The action table describes the behavior of the machine. It contains an\n // object for each token. Each object contains a method that is called when\n // a token is matched in a state. An object will lack a method for illegal\n // states.\n\n \"{\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = {};\n state = \"firstokey\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = {};\n state = \"firstokey\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n }\n },\n \"}\": {\n firstokey: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n ocomma: function () {\n var pop = stack.pop();\n container[key] = value;\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \"[\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = [];\n state = \"firstavalue\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = [];\n state = \"firstavalue\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n }\n },\n \"]\": {\n firstavalue: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n acomma: function () {\n var pop = stack.pop();\n container.push(value);\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \":\": {\n colon: function () {\n if (Object.hasOwnProperty.call(container, key)) {\n throw new SyntaxError(\"Duplicate key '\" + key + \"\\\"\");\n }\n state = \"ovalue\";\n }\n },\n \",\": {\n ocomma: function () {\n container[key] = value;\n state = \"okey\";\n },\n acomma: function () {\n container.push(value);\n state = \"avalue\";\n }\n },\n \"true\": {\n go: function () {\n value = true;\n state = \"ok\";\n },\n ovalue: function () {\n value = true;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = true;\n state = \"acomma\";\n },\n avalue: function () {\n value = true;\n state = \"acomma\";\n }\n },\n \"false\": {\n go: function () {\n value = false;\n state = \"ok\";\n },\n ovalue: function () {\n value = false;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = false;\n state = \"acomma\";\n },\n avalue: function () {\n value = false;\n state = \"acomma\";\n }\n },\n \"null\": {\n go: function () {\n value = null;\n state = \"ok\";\n },\n ovalue: function () {\n value = null;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = null;\n state = \"acomma\";\n },\n avalue: function () {\n value = null;\n state = \"acomma\";\n }\n }\n };\n\n function debackslashify(text) {\n\n // Remove and replace any backslash escapement.\n\n return text.replace(/\\\\(?:u(.{4})|([^u]))/g, function (ignore, b, c) {\n return b\n ? String.fromCharCode(parseInt(b, 16))\n : escapes[c];\n });\n }\n\n return function (source, reviver) {\n\n // A regular expression is used to extract tokens from the JSON text.\n // The extraction process is cautious.\n\n var result;\n var tx = /^[\\u0020\\t\\n\\r]*(?:([,:\\[\\]{}]|true|false|null)|(-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?)|\"((?:[^\\r\\n\\t\\\\\\\"]|\\\\(?:[\"\\\\\\/trnfb]|u[0-9a-fA-F]{4}))*)\")/;\n\n // Set the starting state.\n\n state = \"go\";\n\n // The stack records the container, key, and state for each object or array\n // that contains another object or array while processing nested structures.\n\n stack = [];\n\n // If any error occurs, we will catch it and ultimately throw a syntax error.\n\n try {\n\n // For each token...\n\n while (true) {\n result = tx.exec(source);\n if (!result) {\n break;\n }\n\n // result is the result array from matching the tokenizing regular expression.\n // result[0] contains everything that matched, including any initial whitespace.\n // result[1] contains any punctuation that was matched, or true, false, or null.\n // result[2] contains a matched number, still in string form.\n // result[3] contains a matched string, without quotes but with escapement.\n\n if (result[1]) {\n\n // Token: Execute the action for this state and token.\n\n action[result[1]][state]();\n\n } else if (result[2]) {\n\n // Number token: Convert the number string into a number value and execute\n // the action for this state and number.\n\n value = +result[2];\n number[state]();\n } else {\n\n // String token: Replace the escapement sequences and execute the action for\n // this state and string.\n\n value = debackslashify(result[3]);\n string[state]();\n }\n\n // Remove the token from the string. The loop will continue as long as there\n // are tokens. This is a slow process, but it allows the use of ^ matching,\n // which assures that no illegal tokens slip through.\n\n source = source.slice(result[0].length);\n }\n\n // If we find a state/token combination that is illegal, then the action will\n // cause an error. We handle the error by simply changing the state.\n\n } catch (e) {\n state = e;\n }\n\n // The parsing is finished. If we are not in the final \"ok\" state, or if the\n // remaining source contains anything except whitespace, then we did not have\n //a well-formed JSON text.\n\n if (state !== \"ok\" || (/[^\\u0020\\t\\n\\r]/.test(source))) {\n throw (state instanceof SyntaxError)\n ? state\n : new SyntaxError(\"JSON\");\n }\n\n // If there is a reviver function, we recursively walk the new structure,\n // passing each name/value pair to the reviver function for possible\n // transformation, starting with a temporary root object that holds the current\n // value in an empty key. If there is not a reviver function, we simply return\n // that value.\n\n return (typeof reviver === \"function\")\n ? (function walk(holder, key) {\n var k;\n var v;\n var val = holder[key];\n if (val && typeof val === \"object\") {\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(val, k)) {\n v = walk(val, k);\n if (v !== undefined) {\n val[k] = v;\n } else {\n delete val[k];\n }\n }\n }\n }\n return reviver.call(holder, key, val);\n }({\"\": value}, \"\"))\n : value;\n };\n }());\n }\n}\n\nmodule.exports = setupCustomJSON;\n","'use strict';\n\nfunction wrapGlobals(window, handler, shim) {\n if (!window) { return; }\n // Adapted from https://github.com/bugsnag/bugsnag-js\n var globals = 'EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload'.split(',');\n var i, global;\n for (i = 0; i < globals.length; ++i) {\n global = globals[i];\n\n if (window[global] && window[global].prototype) {\n _extendListenerPrototype(handler, window[global].prototype, shim);\n }\n }\n}\n\nfunction _extendListenerPrototype(handler, prototype, shim) {\n if (prototype.hasOwnProperty && prototype.hasOwnProperty('addEventListener')) {\n var oldAddEventListener = prototype.addEventListener;\n while (oldAddEventListener._rollbarOldAdd && oldAddEventListener.belongsToShim) {\n oldAddEventListener = oldAddEventListener._rollbarOldAdd;\n }\n var addFn = function(event, callback, bubble) {\n oldAddEventListener.call(this, event, handler.wrap(callback), bubble);\n };\n addFn._rollbarOldAdd = oldAddEventListener;\n addFn.belongsToShim = shim;\n prototype.addEventListener = addFn;\n\n var oldRemoveEventListener = prototype.removeEventListener;\n while (oldRemoveEventListener._rollbarOldRemove && oldRemoveEventListener.belongsToShim) {\n oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;\n }\n var removeFn = function(event, callback, bubble) {\n oldRemoveEventListener.call(this, event, callback && callback._rollbar_wrapped || callback, bubble);\n };\n removeFn._rollbarOldRemove = oldRemoveEventListener;\n removeFn.belongsToShim = shim;\n prototype.removeEventListener = removeFn;\n }\n}\n\nmodule.exports = wrapGlobals;\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction raw(payload, jsonBackup) {\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction selectFrames(frames, range) {\n var len = frames.length;\n if (len > range * 2) {\n return frames.slice(0, range).concat(frames.slice(len - range));\n }\n return frames;\n}\n\nfunction truncateFrames(payload, jsonBackup, range) {\n range = (typeof range === 'undefined') ? 30 : range;\n var body = payload.data.body;\n var frames;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n frames = chain[i].frames;\n frames = selectFrames(frames, range);\n chain[i].frames = frames;\n }\n } else if (body.trace) {\n frames = body.trace.frames;\n frames = selectFrames(frames, range);\n body.trace.frames = frames;\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction maybeTruncateValue(len, val) {\n if (!val) {\n return val;\n }\n if (val.length > len) {\n return val.slice(0, len - 3).concat('...');\n }\n return val;\n}\n\nfunction truncateStrings(len, payload, jsonBackup) {\n function truncator(k, v, seen) {\n switch (_.typeName(v)) {\n case 'string':\n return maybeTruncateValue(len, v);\n case 'object':\n case 'array':\n return traverse(v, truncator, seen);\n default:\n return v;\n }\n }\n payload = traverse(payload, truncator);\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction truncateTraceData(traceData) {\n if (traceData.exception) {\n delete traceData.exception.description;\n traceData.exception.message = maybeTruncateValue(255, traceData.exception.message);\n }\n traceData.frames = selectFrames(traceData.frames, 1);\n return traceData;\n}\n\nfunction minBody(payload, jsonBackup) {\n var body = payload.data.body;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n chain[i] = truncateTraceData(chain[i]);\n }\n } else if (body.trace) {\n body.trace = truncateTraceData(body.trace);\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction needsTruncation(payload, maxSize) {\n return _.maxByteSize(payload) > maxSize;\n}\n\nfunction truncate(payload, jsonBackup, maxSize) {\n maxSize = (typeof maxSize === 'undefined') ? (512 * 1024) : maxSize;\n var strategies = [\n raw,\n truncateFrames,\n truncateStrings.bind(null, 1024),\n truncateStrings.bind(null, 512),\n truncateStrings.bind(null, 256),\n minBody\n ];\n var strategy, results, result;\n\n while ((strategy = strategies.shift())) {\n results = strategy(payload, jsonBackup);\n payload = results[0];\n result = results[1];\n if (result.error || !needsTruncation(result.value, maxSize)) {\n return result;\n }\n }\n return result;\n}\n\nmodule.exports = {\n truncate: truncate,\n\n /* for testing */\n raw: raw,\n truncateFrames: truncateFrames,\n truncateStrings: truncateStrings,\n maybeTruncateValue: maybeTruncateValue\n};\n"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/rollbar.noconflict.umd.min.js b/dist/rollbar.noconflict.umd.min.js index 50a884ae5..d4a957408 100644 --- a/dist/rollbar.noconflict.umd.min.js +++ b/dist/rollbar.noconflict.umd.min.js @@ -1,2 +1,2 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.rollbar=e():t.rollbar=e()}(this,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=6)}([function(t,e,r){"use strict";var n=r(12),o={};function i(t,e){return e===s(t)}function s(t){var e=typeof t;return"object"!==e?e:t?t instanceof Error?"error":{}.toString.call(t).match(/\s([a-zA-Z]+)/)[1].toLowerCase():"null"}function a(t){return i(t,"function")}function u(t){var e=Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?"),r=RegExp("^"+e+"$");return c(t)&&r.test(t)}function c(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function l(){var t=v();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var r=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?r:7&r|8).toString(16)}))}var p={strictMode:!1,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};function f(t,e){var r,n;try{r=o.stringify(t)}catch(o){if(e&&a(e))try{r=e(t)}catch(t){n=t}else n=o}return{error:n,value:r}}function h(t,e){return function(r,n){try{e(r,n)}catch(e){t.error(e)}}}var d=["log","network","dom","navigation","error","manual"],m=["critical","error","warning","info","debug"];function g(t,e){for(var r=0;ra)?(s=e.path,e.path=s.substring(0,a)+i+"&"+s.substring(a+1)):-1!==u?(s=e.path,e.path=s.substring(0,u)+i+s.substring(u)):e.path=e.path+i},createItem:function(t,e,r,o,i){for(var a,u,c,p,f,d,m=[],g=[],y=0,b=t.length;y0&&((c=n(c)).extraArgs=m);var k={message:a,err:u,custom:c,timestamp:v(),callback:p,notifier:r,diagnostic:{},uuid:l()};return function(t,e){e&&void 0!==e.level&&(t.level=e.level,delete e.level);e&&void 0!==e.skipFrames&&(t.skipFrames=e.skipFrames,delete e.skipFrames)}(k,c),o&&f&&(k.request=f),i&&(k.lambdaContext=i),k._originalArgs=t,k.diagnostic.original_arg_types=g,k},addErrorContext:function(t,e){var r=t.data.custom||{},o=!1;try{for(var i=0;i2){var o=n.slice(0,3),i=o[2].indexOf("/");-1!==i&&(o[2]=o[2].substring(0,i));r=o.concat("0000:0000:0000:0000:0000").join(":")}}else r=null}catch(t){r=null}else r=null;t.user_ip=r}},formatArgsAsString:function(t){var e,r,n,o=[];for(e=0,r=t.length;e500&&(n=n.substr(0,497)+"...");break;case"null":n="null";break;case"undefined":n="undefined";break;case"symbol":n=n.toString()}o.push(n)}return o.join(" ")},formatUrl:function(t,e){if(!(e=e||t.protocol)&&t.port&&(80===t.port?e="http:":443===t.port&&(e="https:")),e=e||"https:",!t.hostname)return null;var r=e+"//"+t.hostname;return t.port&&(r=r+":"+t.port),t.path&&(r+=t.path),r},get:function(t,e){if(t){var r=e.split("."),n=t;try{for(var o=0,i=r.length;o=1&&r>e}function s(t,e,r,n,o,i,s){var a=null;return r&&(r=new Error(r)),r||n||(a=function(t,e,r,n,o){var i,s=e.environment||e.payload&&e.payload.environment;i=o?"item per minute limit reached, ignoring errors until timeout":"maxItems has been hit, ignoring errors until reset.";var a={body:{message:{body:i,extra:{maxItems:r,itemsPerMinute:n}}},language:"javascript",environment:s,notifier:{version:e.notifier&&e.notifier.version||e.version}};"browser"===t?(a.platform="browser",a.framework="browser-js",a.notifier.name="rollbar-browser-js"):"server"===t?(a.framework=e.framework||"node-js",a.notifier.name=e.notifier.name):"react-native"===t&&(a.framework=e.framework||"react-native",a.notifier.name=e.notifier.name);return a}(t,e,o,i,s)),{error:r,shouldSend:n,payload:a}}o.globalSettings={startTime:n.now(),maxItems:void 0,itemsPerMinute:void 0},o.prototype.configureGlobal=function(t){void 0!==t.startTime&&(o.globalSettings.startTime=t.startTime),void 0!==t.maxItems&&(o.globalSettings.maxItems=t.maxItems),void 0!==t.itemsPerMinute&&(o.globalSettings.itemsPerMinute=t.itemsPerMinute)},o.prototype.shouldSend=function(t,e){var r=(e=e||n.now())-this.startTime;(r<0||r>=6e4)&&(this.startTime=e,this.perMinCounter=0);var a=o.globalSettings.maxItems,u=o.globalSettings.itemsPerMinute;if(i(t,a,this.counter))return s(this.platform,this.platformOptions,a+" max items reached",!1);if(i(t,u,this.perMinCounter))return s(this.platform,this.platformOptions,u+" items per minute reached",!1);this.counter++,this.perMinCounter++;var c=!i(t,a,this.counter),l=c;return c=c&&!i(t,u,this.perMinCounter),s(this.platform,this.platformOptions,null,c,a,u,l)},o.prototype.setPlatformOptions=function(t,e){this.platform=t,this.platformOptions=e},t.exports=o},function(t,e,r){"use strict";var n=Object.prototype.hasOwnProperty,o=Object.prototype.toString,i=function(t){if(!t||"[object Object]"!==o.call(t))return!1;var e,r=n.call(t,"constructor"),i=t.constructor&&t.constructor.prototype&&n.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!r&&!i)return!1;for(e in t);return void 0===e||n.call(t,e)};t.exports=function t(){var e,r,n,o,s,a={},u=null,c=arguments.length;for(e=0;ethis.options.maxRetries&&(o=!1))}o?this._retryApiRequest(e,r):r(t)},o.prototype._retryApiRequest=function(t,e){this.retryQueue.push({item:t,callback:e}),this.retryHandle||(this.retryHandle=setInterval(function(){for(;this.retryQueue.length;){var t=this.retryQueue.shift();this._makeApiRequest(t.item,t.callback)}}.bind(this),this.options.retryInterval))},o.prototype._dequeuePendingRequest=function(t){var e=this.pendingRequests.indexOf(t);-1!==e&&(this.pendingRequests.splice(e,1),this._maybeCallWait())},o.prototype._maybeLog=function(t,e){if(this.logger&&this.options.verbose){var r=e;if(r=(r=r||n.get(t,"body.trace.exception.message"))||n.get(t,"body.trace_chain.0.exception.message"))return void this.logger.error(r);(r=n.get(t,"body.message.body"))&&this.logger.log(r)}},o.prototype._maybeCallWait=function(){return!(!n.isFunction(this.waitCallback)||0!==this.pendingItems.length||0!==this.pendingRequests.length)&&(this.waitIntervalID&&(this.waitIntervalID=clearInterval(this.waitIntervalID)),this.waitCallback(),!0)},t.exports=o},function(t,e,r){"use strict";var n=r(0);function o(t,e){this.queue=t,this.options=e,this.transforms=[],this.diagnostic={}}o.prototype.configure=function(t){this.queue&&this.queue.configure(t);var e=this.options;return this.options=n.merge(e,t),this},o.prototype.addTransform=function(t){return n.isFunction(t)&&this.transforms.push(t),this},o.prototype.log=function(t,e){if(e&&n.isFunction(e)||(e=function(){}),!this.options.enabled)return e(new Error("Rollbar is not enabled"));this.queue.addPendingItem(t);var r=t.err;this._applyTransforms(t,function(n,o){if(n)return this.queue.removePendingItem(t),e(n,null);this.queue.addItem(o,e,r,t)}.bind(this))},o.prototype._applyTransforms=function(t,e){var r=-1,n=this.transforms.length,o=this.transforms,i=this.options,s=function(t,a){t?e(t,null):++r!==n?o[r](a,i,s):e(null,a)};s(null,t)},t.exports=o},function(t,e,r){"use strict";var n=r(0),o=r(16),i={hostname:"api.rollbar.com",path:"/api/1/item/",search:null,version:"1",protocol:"https:",port:443};function s(t,e,r,n,o){this.options=t,this.transport=e,this.url=r,this.truncation=n,this.jsonBackup=o,this.accessToken=t.accessToken,this.transportOptions=a(t,r)}function a(t,e){return o.getTransportFromOptions(t,i,e)}s.prototype.postItem=function(t,e){var r=o.transportOptions(this.transportOptions,"POST"),n=o.buildPayload(this.accessToken,t,this.jsonBackup);this.transport.post(this.accessToken,r,n,e)},s.prototype.buildJsonPayload=function(t,e){var r,i=o.buildPayload(this.accessToken,t,this.jsonBackup);return(r=this.truncation?this.truncation.truncate(i):n.stringify(i)).error?(e&&e(r.error),null):r.value},s.prototype.postJsonPayload=function(t,e){var r=o.transportOptions(this.transportOptions,"POST");this.transport.postJsonPayload(this.accessToken,r,t,e)},s.prototype.configure=function(t){var e=this.oldOptions;return this.options=n.merge(e,t),this.transportOptions=a(this.options,this.url),void 0!==this.options.accessToken&&(this.accessToken=this.options.accessToken),this},t.exports=s},function(t,e,r){"use strict";var n=r(0);t.exports={buildPayload:function(t,e,r){if(!n.isType(e.context,"string")){var o=n.stringify(e.context,r);o.error?e.context="Error: could not serialize 'context'":e.context=o.value||"",e.context.length>255&&(e.context=e.context.substr(0,255))}return{access_token:t,data:e}},getTransportFromOptions:function(t,e,r){var n=e.hostname,o=e.protocol,i=e.port,s=e.path,a=e.search,u=t.timeout,c=t.proxy;if(t.endpoint){var l=r.parse(t.endpoint);n=l.hostname,o=l.protocol,i=l.port,s=l.pathname,a=l.search}return{timeout:u,hostname:n,protocol:o,port:i,path:s,search:a,proxy:c}},transportOptions:function(t,e){var r=t.protocol||"https:",n=t.port||("http:"===r?80:"https:"===r?443:void 0),o=t.hostname,i=t.path,s=t.timeout;return t.search&&(i+=t.search),t.proxy&&(i=r+"//"+o+i,o=t.proxy.host||t.proxy.hostname,n=t.proxy.port,r=t.proxy.protocol||r),{timeout:s,protocol:r,hostname:o,path:i,port:n,method:e}},appendPathToPath:function(t,e){var r=/\/$/.test(t),n=/^\//.test(e);return r&&n?e=e.substring(1):r||n||(e="/"+e),t+e}}},function(t,e){!function(t){"use strict";t.console||(t.console={});for(var e,r,n=t.console,o=function(){},i=["memory"],s="assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(",");e=i.pop();)n[e]||(n[e]={});for(;r=s.pop();)n[r]||(n[r]=o)}("undefined"==typeof window?this:window)},function(t,e,r){"use strict";var n={ieVersion:function(){if("undefined"!=typeof document){for(var t=3,e=document.createElement("div"),r=e.getElementsByTagName("i");e.innerHTML="\x3c!--[if gt IE "+ ++t+"]>4?t:void 0}}};t.exports=n},function(t,e,r){"use strict";function n(t,e,r,n){t._rollbarWrappedError&&(n[4]||(n[4]=t._rollbarWrappedError),n[5]||(n[5]=t._rollbarWrappedError._rollbarContext),t._rollbarWrappedError=null);var o=e.handleUncaughtException.apply(e,n);r&&r.apply(t,n),"anonymous"===o&&(e.anonymousErrorsPending+=1)}t.exports={captureUncaughtExceptions:function(t,e,r){if(t){var o;if("function"==typeof e._rollbarOldOnError)o=e._rollbarOldOnError;else if(t.onerror){for(o=t.onerror;o._rollbarOldOnError;)o=o._rollbarOldOnError;e._rollbarOldOnError=o}e.handleAnonymousErrors();var i=function(){var r=Array.prototype.slice.call(arguments,0);n(t,e,o,r)};r&&(i._rollbarOldOnError=o),t.onerror=i}},captureUnhandledRejections:function(t,e,r){if(t){"function"==typeof t._rollbarURH&&t._rollbarURH.belongsToShim&&t.removeEventListener("unhandledrejection",t._rollbarURH);var n=function(t){var r,n,o;try{r=t.reason}catch(t){r=void 0}try{n=t.promise}catch(t){n="[unhandledrejection] error getting `promise` from event"}try{o=t.detail,!r&&o&&(r=o.reason,n=o.promise)}catch(t){}r||(r="[unhandledrejection] error getting `reason` from event"),e&&e.handleUnhandledRejection&&e.handleUnhandledRejection(r,n)};n.belongsToShim=r,t._rollbarURH=n,t.addEventListener("unhandledrejection",n)}}}},function(t,e,r){"use strict";var n=r(0),o=r(1);function i(t){this.truncation=t}function s(){var t="undefined"!=typeof window&&window||"undefined"!=typeof self&&self,e=t&&t.Zone&&t.Zone.current,r=Array.prototype.slice.call(arguments);if(e&&"angular"===e._name){var n=e._parent;n.run((function(){a.apply(void 0,r)}))}else a.apply(void 0,r)}function a(t,e,r,i,s,a,c){if("undefined"!=typeof RollbarProxy)return function(t,e){(new RollbarProxy).sendJsonPayload(t,(function(t){}),(function(t){e(new Error(t))}))}(i,s);var l;if(!(l=a?a():function(){var t,e,r=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],n=r.length;for(e=0;e=400&&t.status<600}(l)){if(403===l.status){var e=t.value&&t.value.message;o.error(e)}s(new Error(String(l.status)))}else{s(u("XHR response had no status code (likely connection failure)"))}}}catch(t){var r;r=t&&t.stack?t:new Error(t),s(r)}var i};l.open(r,e,!0),l.setRequestHeader&&(l.setRequestHeader("Content-Type","application/json"),l.setRequestHeader("X-Rollbar-Access-Token",t)),n.isFiniteNumber(c)&&(l.timeout=c),l.onreadystatechange=p,l.send(i)}catch(t){if("undefined"!=typeof XDomainRequest){if(!window||!window.location)return s(new Error("No window available during request, unknown environment"));"http:"===window.location.href.substring(0,5)&&"https"===e.substring(0,5)&&(e="http"+e.substring(5));var f=new XDomainRequest;f.onprogress=function(){},f.ontimeout=function(){s(u("Request timed out","ETIMEDOUT"))},f.onerror=function(){s(new Error("Error during request"))},f.onload=function(){var t=n.jsonParse(f.responseText);s(t.error,t.value)},f.open(r,e,!0),f.send(i)}else s(new Error("Cannot find a method to transport a request"))}}catch(t){s(t)}}function u(t,e){var r=new Error(t);return r.code=e||"ENOTFOUND",r}i.prototype.get=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){}),n.addParamsAndAccessTokenToPath(t,e,r);s(t,n.formatUrl(e),"GET",null,o,i,e.timeout)},i.prototype.post=function(t,e,r,o,i){if(o&&n.isFunction(o)||(o=function(){}),!r)return o(new Error("Cannot send empty request"));var a;if((a=this.truncation?this.truncation.truncate(r):n.stringify(r)).error)return o(a.error);var u=a.value;s(t,n.formatUrl(e),"POST",u,o,i,e.timeout)},i.prototype.postJsonPayload=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){});s(t,n.formatUrl(e),"POST",r,o,i,e.timeout)},t.exports=i},function(t,e,r){"use strict";var n=r(0),o=r(3),i=r(1);function s(t,e,r){var o=t.message,i=t.custom;o||(o="Item sent with null or missing arguments.");var s={body:o};i&&(s.extra=n.merge(i)),n.set(t,"data.body",{message:s}),r(null,t)}function a(t){var e=t.stackInfo.stack;return e&&0===e.length&&t._unhandledStackInfo&&t._unhandledStackInfo.stack&&(e=t._unhandledStackInfo.stack),e}function u(t,e,r){var i=t&&t.data.description,s=t&&t.custom,u=a(t),l=o.guessErrorClass(e.message),p={exception:{class:c(e,l[0],r),message:l[1]}};if(i&&(p.exception.description=i),u){var f,h,d,m,g,v,y,b;for(0===u.length&&(p.exception.stack=e.rawStack,p.exception.raw=String(e.rawException)),p.frames=[],y=0;y-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var r=e.replace(/^\s+/,"").replace(/\(eval code/g,"("),n=r.match(/ (\((.+):(\d+):(\d+)\)$)/),o=(r=n?r.replace(n[0],""):r).split(/\s+/).slice(1),i=this.extractLocation(n?n[1]:o.pop()),s=o.join(" ")||void 0,a=["eval",""].indexOf(i[0])>-1?void 0:i[0];return new t({functionName:s,fileName:a,lineNumber:i[1],columnNumber:i[2],source:e})}),this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter((function(t){return!t.match(n)}),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 t({functionName:e});var r=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(r),o=n&&n[1]?n[1]:void 0,i=this.extractLocation(e.replace(r,""));return new t({functionName:o,fileName:i[0],lineNumber:i[1],columnNumber:i[2],source:e})}),this)},parseOpera:function(t){return!t.stacktrace||t.message.indexOf("\n")>-1&&t.message.split("\n").length>t.stacktrace.split("\n").length?this.parseOpera9(t):t.stack?this.parseOpera11(t):this.parseOpera10(t)},parseOpera9:function(e){for(var r=/Line (\d+).*script (?:in )?(\S+)/i,n=e.message.split("\n"),o=[],i=2,s=n.length;i/,"$2").replace(/\([^)]*\)/g,"")||void 0;i.match(/\(([^)]*)\)/)&&(r=i.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var a=void 0===r||"[arguments not available]"===r?void 0:r.split(",");return new t({functionName:s,args:a,fileName:o[0],lineNumber:o[1],columnNumber:o[2],source:e})}),this)}}})?n.apply(e,o):n)||(t.exports=i)}()},function(t,e,r){var n,o,i;!function(r,s){"use strict";o=[],void 0===(i="function"==typeof(n=function(){function t(t){return t.charAt(0).toUpperCase()+t.substring(1)}function e(t){return function(){return this[t]}}var r=["isConstructor","isEval","isNative","isToplevel"],n=["columnNumber","lineNumber"],o=["fileName","functionName","source"],i=r.concat(n,o,["args"],["evalOrigin"]);function s(e){if(e)for(var r=0;ro&&(i=this.maxQueueSize-o),this.maxQueueSize=o,this.queue.splice(0,i)},o.prototype.copyEvents=function(){var t=Array.prototype.slice.call(this.queue,0);if(n.isFunction(this.options.filterTelemetry))try{for(var e=t.length;e--;)this.options.filterTelemetry(t[e])&&t.splice(e,1)}catch(t){this.options.filterTelemetry=null}return t},o.prototype.capture=function(t,e,r,o,s){var a={level:i(t,r),type:t,timestamp_ms:s||n.now(),body:e,source:"client"};o&&(a.uuid=o);try{if(n.isFunction(this.options.filterTelemetry)&&this.options.filterTelemetry(a))return!1}catch(t){this.options.filterTelemetry=null}return this.push(a),a},o.prototype.captureEvent=function(t,e,r,n){return this.capture(t,e,r,n)},o.prototype.captureError=function(t,e,r,n){var o={message:t.message||String(t)};return t.stack&&(o.stack=t.stack),this.capture("error",o,e,r,n)},o.prototype.captureLog=function(t,e,r,n){return this.capture("log",{message:t},e,r,n)},o.prototype.captureNetwork=function(t,e,r,n){e=e||"xhr",t.subtype=t.subtype||e,n&&(t.request=n);var o=this.levelFromStatus(t.status_code);return this.capture("network",t,o,r)},o.prototype.levelFromStatus=function(t){return t>=200&&t<400?"info":0===t||t>=400?"error":"info"},o.prototype.captureDom=function(t,e,r,n,o){var i={subtype:t,element:e};return void 0!==r&&(i.value=r),void 0!==n&&(i.checked=n),this.capture("dom",i,"info",o)},o.prototype.captureNavigation=function(t,e,r){return this.capture("navigation",{from:t,to:e},"info",r)},o.prototype.captureDomContentLoaded=function(t){return this.capture("navigation",{subtype:"DOMContentLoaded"},"info",void 0,t&&t.getTime())},o.prototype.captureLoad=function(t){return this.capture("navigation",{subtype:"load"},"info",void 0,t&&t.getTime())},o.prototype.captureConnectivityChange=function(t,e){return this.captureNetwork({change:t},"connectivity",e)},o.prototype._captureRollbarItem=function(t){if(this.options.includeItemsInTelemetry)return t.err?this.captureError(t.err,t.level,t.uuid,t.timestamp):t.message?this.captureLog(t.message,t.level,t.uuid,t.timestamp):t.custom?this.capture("log",t.custom,t.level,t.uuid,t.timestamp):void 0},o.prototype.push=function(t){this.queue.push(t),this.queue.length>this.maxQueueSize&&this.queue.shift()},t.exports=o},function(t,e,r){"use strict";var n=r(0),o=r(4),i=r(2),s=r(31),a={network:!0,networkResponseHeaders:!1,networkResponseBody:!1,networkRequestHeaders:!1,networkRequestBody:!1,networkErrorOnHttp5xx:!1,networkErrorOnHttp4xx:!1,networkErrorOnHttp0:!1,log:!0,dom:!0,navigation:!0,connectivity:!0,contentSecurityPolicy:!0,errorOnContentSecurityPolicy:!1};function u(t,e,r,n,o){var i=t[e];t[e]=r(i),n&&n[o].push([t,e,i])}function c(t,e){for(var r;t[e].length;)(r=t[e].shift())[0][r[1]]=r[2]}function l(t,e,r,o,i){this.options=t;var s=t.autoInstrument;!1===t.enabled||!1===s?this.autoInstrument={}:(n.isType(s,"object")||(s=a),this.autoInstrument=n.merge(a,s)),this.scrubTelemetryInputs=!!t.scrubTelemetryInputs,this.telemetryScrubber=t.telemetryScrubber,this.defaultValueScrubber=function(t){for(var e=[],r=0;r3)){i.__rollbar_xhr.end_time_ms=n.now();var e=null;if(i.__rollbar_xhr.response_content_type=i.getResponseHeader("Content-Type"),t.autoInstrument.networkResponseHeaders){var r=t.autoInstrument.networkResponseHeaders;e={};try{var s,a;if(!0===r){var u=i.getAllResponseHeaders();if(u){var c,l,p=u.trim().split(/[\r\n]+/);for(a=0;a=500&&this.autoInstrument.networkErrorOnHttp5xx||e>=400&&this.autoInstrument.networkErrorOnHttp4xx||0===e&&this.autoInstrument.networkErrorOnHttp0){var r=new Error("HTTP request failed with Status "+e);r.stack=t.stack,this.rollbar.error(r,{skipFrames:1})}},l.prototype.deinstrumentConsole=function(){if("console"in this._window&&this._window.console.log)for(var t;this.replacements.log.length;)t=this.replacements.log.shift(),this._window.console[t[0]]=t[1]},l.prototype.instrumentConsole=function(){if("console"in this._window&&this._window.console.log){var t=this,e=this._window.console,r=["debug","info","warn","error","log"];try{for(var o=0,i=r.length;o=0&&t.options[t.selectedIndex]&&this.captureDomEvent("input",t,t.options[t.selectedIndex].value)},l.prototype.captureDomEvent=function(t,e,r,n){if(void 0!==r)if(this.scrubTelemetryInputs||"password"===s.getElementType(e))r="[scrubbed]";else{var o=s.describeElement(e);this.telemetryScrubber?this.telemetryScrubber(o)&&(r="[scrubbed]"):this.defaultValueScrubber(o)&&(r="[scrubbed]")}var i=s.elementArrayToString(s.treeToArray(e));this.telemeter.captureDom(t,i,r,n)},l.prototype.deinstrumentNavigation=function(){var t=this._window.chrome;!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState&&c(this.replacements,"navigation")},l.prototype.instrumentNavigation=function(){var t=this._window.chrome;if(!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState){var e=this;u(this._window,"onpopstate",(function(t){return function(){var r=e._location.href;e.handleUrlChange(e._lastHref,r),t&&t.apply(this,arguments)}}),this.replacements,"navigation"),u(this._window.history,"pushState",(function(t){return function(){var r=arguments.length>2?arguments[2]:void 0;return r&&e.handleUrlChange(e._lastHref,r+""),t.apply(this,arguments)}}),this.replacements,"navigation")}},l.prototype.handleUrlChange=function(t,e){var r=i.parse(this._location.href),n=i.parse(e),o=i.parse(t);this._lastHref=e,r.protocol===n.protocol&&r.host===n.host&&(e=n.path+(n.hash||"")),r.protocol===o.protocol&&r.host===o.host&&(t=o.path+(o.hash||"")),this.telemeter.captureNavigation(t,e)},l.prototype.deinstrumentConnectivity=function(){("addEventListener"in this._window||"body"in this._document)&&(this._window.addEventListener?this.removeListeners("connectivity"):c(this.replacements,"connectivity"))},l.prototype.instrumentConnectivity=function(){if("addEventListener"in this._window||"body"in this._document)if(this._window.addEventListener)this.addListener("connectivity",this._window,"online",void 0,function(){this.telemeter.captureConnectivityChange("online")}.bind(this),!0),this.addListener("connectivity",this._window,"offline",void 0,function(){this.telemeter.captureConnectivityChange("offline")}.bind(this),!0);else{var t=this;u(this._document.body,"ononline",(function(e){return function(){t.telemeter.captureConnectivityChange("online"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity"),u(this._document.body,"onoffline",(function(e){return function(){t.telemeter.captureConnectivityChange("offline"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity")}},l.prototype.handleCspEvent=function(t){var e="Security Policy Violation: blockedURI: "+t.blockedURI+", violatedDirective: "+t.violatedDirective+", effectiveDirective: "+t.effectiveDirective+", ";t.sourceFile&&(e+="location: "+t.sourceFile+", line: "+t.lineNumber+", col: "+t.columnNumber+", "),e+="originalPolicy: "+t.originalPolicy,this.telemeter.captureLog(e,"error"),this.handleCspError(e)},l.prototype.handleCspError=function(t){this.autoInstrument.errorOnContentSecurityPolicy&&this.rollbar.error(t)},l.prototype.deinstrumentContentSecurityPolicy=function(){"addEventListener"in this._window&&this.removeListeners("contentsecuritypolicy")},l.prototype.instrumentContentSecurityPolicy=function(){if("addEventListener"in this._window){var t=this.handleCspEvent.bind(this);this.addListener("contentsecuritypolicy",this._window,"securitypolicyviolation",null,t,!1)}},l.prototype.addListener=function(t,e,r,n,o,i){e.addEventListener?(e.addEventListener(r,o,i),this.eventRemovers[t].push((function(){e.removeEventListener(r,o,i)}))):n&&(e.attachEvent(n,o),this.eventRemovers[t].push((function(){e.detachEvent(n,o)})))},l.prototype.removeListeners=function(t){for(;this.eventRemovers[t].length;)this.eventRemovers[t].shift()()},t.exports=l},function(t,e,r){"use strict";function n(t){return(t.getAttribute("type")||"").toLowerCase()}function o(t){if(!t||!t.tagName)return"";var e=[t.tagName];t.id&&e.push("#"+t.id),t.classes&&e.push("."+t.classes.join("."));for(var r=0;r=0;a--){if(e=o(t[a]),r=s+i.length*n+e.length,a=83){i.unshift("...");break}i.unshift(e),s+=e.length}return i.join(" > ")},treeToArray:function(t){for(var e,r=[],n=0;t&&n<5&&"html"!==(e=i(t)).tagName;n++)r.unshift(e),t=t.parentNode;return r},getElementFromEvent:function(t,e){return t.target?t.target:e&&e.elementFromPoint?e.elementFromPoint(t.clientX,t.clientY):void 0},isDescribedElement:function(t,e,r){if(t.tagName.toLowerCase()!==e.toLowerCase())return!1;if(!r)return!0;t=n(t);for(var o=0;o2*e?t.slice(0,e).concat(t.slice(r-e)):t}function a(t,e,r){r=void 0===r?30:r;var o,i=t.data.body;if(i.trace_chain)for(var a=i.trace_chain,u=0;ut?e.slice(0,t-3).concat("..."):e}function c(t,e,r){return[e=o(e,(function e(r,i,s){switch(n.typeName(i)){case"string":return u(t,i);case"object":case"array":return o(i,e,s);default:return i}})),n.stringify(e,r)]}function l(t){return t.exception&&(delete t.exception.description,t.exception.message=u(255,t.exception.message)),t.frames=s(t.frames,1),t}function p(t,e){var r=t.data.body;if(r.trace_chain)for(var o=r.trace_chain,i=0;ie}t.exports={truncate:function(t,e,r){r=void 0===r?524288:r;for(var n,o,s,u=[i,a,c.bind(null,1024),c.bind(null,512),c.bind(null,256),p];n=u.shift();)if(t=(o=n(t,e))[0],(s=o[1]).error||!f(s.value,r))return s;return s},raw:i,truncateFrames:a,truncateStrings:c,maybeTruncateValue:u}}])})); +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.rollbar=e():t.rollbar=e()}(this,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=6)}([function(t,e,r){"use strict";var n=r(12),o={};function i(t,e){return e===s(t)}function s(t){var e=typeof t;return"object"!==e?e:t?t instanceof Error?"error":{}.toString.call(t).match(/\s([a-zA-Z]+)/)[1].toLowerCase():"null"}function a(t){return i(t,"function")}function u(t){var e=Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?"),r=RegExp("^"+e+"$");return c(t)&&r.test(t)}function c(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function l(){var t=y();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var r=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?r:7&r|8).toString(16)}))}var p={strictMode:!1,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};function f(t,e){var r,n;try{r=o.stringify(t)}catch(o){if(e&&a(e))try{r=e(t)}catch(t){n=t}else n=o}return{error:n,value:r}}function h(t,e){return function(r,n){try{e(r,n)}catch(e){t.error(e)}}}function d(t){return function t(e,r){var n,o,a,u={};try{for(o in e)(n=e[o])&&(i(n,"object")||i(n,"array"))?r.includes(n)?u[o]="Removed circular reference: "+s(n):((a=r.slice()).push(n),u[o]=t(n,a)):u[o]=n}catch(t){u="Failed cloning custom data: "+t.message}return u}(t,[t])}var m=["log","network","dom","navigation","error","manual"],g=["critical","error","warning","info","debug"];function v(t,e){for(var r=0;ra)?(s=e.path,e.path=s.substring(0,a)+i+"&"+s.substring(a+1)):-1!==u?(s=e.path,e.path=s.substring(0,u)+i+s.substring(u)):e.path=e.path+i},createItem:function(t,e,r,n,o){for(var i,a,u,c,p,f,m=[],g=[],v=0,b=t.length;v0&&(u||(u=d({})),u.extraArgs=d(m));var k={message:i,err:a,custom:u,timestamp:y(),callback:c,notifier:r,diagnostic:{},uuid:l()};return function(t,e){e&&void 0!==e.level&&(t.level=e.level,delete e.level);e&&void 0!==e.skipFrames&&(t.skipFrames=e.skipFrames,delete e.skipFrames)}(k,u),n&&p&&(k.request=p),o&&(k.lambdaContext=o),k._originalArgs=t,k.diagnostic.original_arg_types=g,k},addErrorContext:function(t,e){var r=t.data.custom||{},o=!1;try{for(var i=0;i2){var o=n.slice(0,3),i=o[2].indexOf("/");-1!==i&&(o[2]=o[2].substring(0,i));r=o.concat("0000:0000:0000:0000:0000").join(":")}}else r=null}catch(t){r=null}else r=null;t.user_ip=r}},formatArgsAsString:function(t){var e,r,n,o=[];for(e=0,r=t.length;e500&&(n=n.substr(0,497)+"...");break;case"null":n="null";break;case"undefined":n="undefined";break;case"symbol":n=n.toString()}o.push(n)}return o.join(" ")},formatUrl:function(t,e){if(!(e=e||t.protocol)&&t.port&&(80===t.port?e="http:":443===t.port&&(e="https:")),e=e||"https:",!t.hostname)return null;var r=e+"//"+t.hostname;return t.port&&(r=r+":"+t.port),t.path&&(r+=t.path),r},get:function(t,e){if(t){var r=e.split("."),n=t;try{for(var o=0,i=r.length;o=1&&r>e}function s(t,e,r,n,o,i,s){var a=null;return r&&(r=new Error(r)),r||n||(a=function(t,e,r,n,o){var i,s=e.environment||e.payload&&e.payload.environment;i=o?"item per minute limit reached, ignoring errors until timeout":"maxItems has been hit, ignoring errors until reset.";var a={body:{message:{body:i,extra:{maxItems:r,itemsPerMinute:n}}},language:"javascript",environment:s,notifier:{version:e.notifier&&e.notifier.version||e.version}};"browser"===t?(a.platform="browser",a.framework="browser-js",a.notifier.name="rollbar-browser-js"):"server"===t?(a.framework=e.framework||"node-js",a.notifier.name=e.notifier.name):"react-native"===t&&(a.framework=e.framework||"react-native",a.notifier.name=e.notifier.name);return a}(t,e,o,i,s)),{error:r,shouldSend:n,payload:a}}o.globalSettings={startTime:n.now(),maxItems:void 0,itemsPerMinute:void 0},o.prototype.configureGlobal=function(t){void 0!==t.startTime&&(o.globalSettings.startTime=t.startTime),void 0!==t.maxItems&&(o.globalSettings.maxItems=t.maxItems),void 0!==t.itemsPerMinute&&(o.globalSettings.itemsPerMinute=t.itemsPerMinute)},o.prototype.shouldSend=function(t,e){var r=(e=e||n.now())-this.startTime;(r<0||r>=6e4)&&(this.startTime=e,this.perMinCounter=0);var a=o.globalSettings.maxItems,u=o.globalSettings.itemsPerMinute;if(i(t,a,this.counter))return s(this.platform,this.platformOptions,a+" max items reached",!1);if(i(t,u,this.perMinCounter))return s(this.platform,this.platformOptions,u+" items per minute reached",!1);this.counter++,this.perMinCounter++;var c=!i(t,a,this.counter),l=c;return c=c&&!i(t,u,this.perMinCounter),s(this.platform,this.platformOptions,null,c,a,u,l)},o.prototype.setPlatformOptions=function(t,e){this.platform=t,this.platformOptions=e},t.exports=o},function(t,e,r){"use strict";var n=Object.prototype.hasOwnProperty,o=Object.prototype.toString,i=function(t){if(!t||"[object Object]"!==o.call(t))return!1;var e,r=n.call(t,"constructor"),i=t.constructor&&t.constructor.prototype&&n.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!r&&!i)return!1;for(e in t);return void 0===e||n.call(t,e)};t.exports=function t(){var e,r,n,o,s,a={},u=null,c=arguments.length;for(e=0;ethis.options.maxRetries&&(o=!1))}o?this._retryApiRequest(e,r):r(t)},o.prototype._retryApiRequest=function(t,e){this.retryQueue.push({item:t,callback:e}),this.retryHandle||(this.retryHandle=setInterval(function(){for(;this.retryQueue.length;){var t=this.retryQueue.shift();this._makeApiRequest(t.item,t.callback)}}.bind(this),this.options.retryInterval))},o.prototype._dequeuePendingRequest=function(t){var e=this.pendingRequests.indexOf(t);-1!==e&&(this.pendingRequests.splice(e,1),this._maybeCallWait())},o.prototype._maybeLog=function(t,e){if(this.logger&&this.options.verbose){var r=e;if(r=(r=r||n.get(t,"body.trace.exception.message"))||n.get(t,"body.trace_chain.0.exception.message"))return void this.logger.error(r);(r=n.get(t,"body.message.body"))&&this.logger.log(r)}},o.prototype._maybeCallWait=function(){return!(!n.isFunction(this.waitCallback)||0!==this.pendingItems.length||0!==this.pendingRequests.length)&&(this.waitIntervalID&&(this.waitIntervalID=clearInterval(this.waitIntervalID)),this.waitCallback(),!0)},t.exports=o},function(t,e,r){"use strict";var n=r(0);function o(t,e){this.queue=t,this.options=e,this.transforms=[],this.diagnostic={}}o.prototype.configure=function(t){this.queue&&this.queue.configure(t);var e=this.options;return this.options=n.merge(e,t),this},o.prototype.addTransform=function(t){return n.isFunction(t)&&this.transforms.push(t),this},o.prototype.log=function(t,e){if(e&&n.isFunction(e)||(e=function(){}),!this.options.enabled)return e(new Error("Rollbar is not enabled"));this.queue.addPendingItem(t);var r=t.err;this._applyTransforms(t,function(n,o){if(n)return this.queue.removePendingItem(t),e(n,null);this.queue.addItem(o,e,r,t)}.bind(this))},o.prototype._applyTransforms=function(t,e){var r=-1,n=this.transforms.length,o=this.transforms,i=this.options,s=function(t,a){t?e(t,null):++r!==n?o[r](a,i,s):e(null,a)};s(null,t)},t.exports=o},function(t,e,r){"use strict";var n=r(0),o=r(16),i={hostname:"api.rollbar.com",path:"/api/1/item/",search:null,version:"1",protocol:"https:",port:443};function s(t,e,r,n,o){this.options=t,this.transport=e,this.url=r,this.truncation=n,this.jsonBackup=o,this.accessToken=t.accessToken,this.transportOptions=a(t,r)}function a(t,e){return o.getTransportFromOptions(t,i,e)}s.prototype.postItem=function(t,e){var r=o.transportOptions(this.transportOptions,"POST"),n=o.buildPayload(this.accessToken,t,this.jsonBackup);this.transport.post(this.accessToken,r,n,e)},s.prototype.buildJsonPayload=function(t,e){var r,i=o.buildPayload(this.accessToken,t,this.jsonBackup);return(r=this.truncation?this.truncation.truncate(i):n.stringify(i)).error?(e&&e(r.error),null):r.value},s.prototype.postJsonPayload=function(t,e){var r=o.transportOptions(this.transportOptions,"POST");this.transport.postJsonPayload(this.accessToken,r,t,e)},s.prototype.configure=function(t){var e=this.oldOptions;return this.options=n.merge(e,t),this.transportOptions=a(this.options,this.url),void 0!==this.options.accessToken&&(this.accessToken=this.options.accessToken),this},t.exports=s},function(t,e,r){"use strict";var n=r(0);t.exports={buildPayload:function(t,e,r){if(!n.isType(e.context,"string")){var o=n.stringify(e.context,r);o.error?e.context="Error: could not serialize 'context'":e.context=o.value||"",e.context.length>255&&(e.context=e.context.substr(0,255))}return{access_token:t,data:e}},getTransportFromOptions:function(t,e,r){var n=e.hostname,o=e.protocol,i=e.port,s=e.path,a=e.search,u=t.timeout,c=t.proxy;if(t.endpoint){var l=r.parse(t.endpoint);n=l.hostname,o=l.protocol,i=l.port,s=l.pathname,a=l.search}return{timeout:u,hostname:n,protocol:o,port:i,path:s,search:a,proxy:c}},transportOptions:function(t,e){var r=t.protocol||"https:",n=t.port||("http:"===r?80:"https:"===r?443:void 0),o=t.hostname,i=t.path,s=t.timeout;return t.search&&(i+=t.search),t.proxy&&(i=r+"//"+o+i,o=t.proxy.host||t.proxy.hostname,n=t.proxy.port,r=t.proxy.protocol||r),{timeout:s,protocol:r,hostname:o,path:i,port:n,method:e}},appendPathToPath:function(t,e){var r=/\/$/.test(t),n=/^\//.test(e);return r&&n?e=e.substring(1):r||n||(e="/"+e),t+e}}},function(t,e){!function(t){"use strict";t.console||(t.console={});for(var e,r,n=t.console,o=function(){},i=["memory"],s="assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(",");e=i.pop();)n[e]||(n[e]={});for(;r=s.pop();)n[r]||(n[r]=o)}("undefined"==typeof window?this:window)},function(t,e,r){"use strict";var n={ieVersion:function(){if("undefined"!=typeof document){for(var t=3,e=document.createElement("div"),r=e.getElementsByTagName("i");e.innerHTML="\x3c!--[if gt IE "+ ++t+"]>4?t:void 0}}};t.exports=n},function(t,e,r){"use strict";function n(t,e,r,n){t._rollbarWrappedError&&(n[4]||(n[4]=t._rollbarWrappedError),n[5]||(n[5]=t._rollbarWrappedError._rollbarContext),t._rollbarWrappedError=null);var o=e.handleUncaughtException.apply(e,n);r&&r.apply(t,n),"anonymous"===o&&(e.anonymousErrorsPending+=1)}t.exports={captureUncaughtExceptions:function(t,e,r){if(t){var o;if("function"==typeof e._rollbarOldOnError)o=e._rollbarOldOnError;else if(t.onerror){for(o=t.onerror;o._rollbarOldOnError;)o=o._rollbarOldOnError;e._rollbarOldOnError=o}e.handleAnonymousErrors();var i=function(){var r=Array.prototype.slice.call(arguments,0);n(t,e,o,r)};r&&(i._rollbarOldOnError=o),t.onerror=i}},captureUnhandledRejections:function(t,e,r){if(t){"function"==typeof t._rollbarURH&&t._rollbarURH.belongsToShim&&t.removeEventListener("unhandledrejection",t._rollbarURH);var n=function(t){var r,n,o;try{r=t.reason}catch(t){r=void 0}try{n=t.promise}catch(t){n="[unhandledrejection] error getting `promise` from event"}try{o=t.detail,!r&&o&&(r=o.reason,n=o.promise)}catch(t){}r||(r="[unhandledrejection] error getting `reason` from event"),e&&e.handleUnhandledRejection&&e.handleUnhandledRejection(r,n)};n.belongsToShim=r,t._rollbarURH=n,t.addEventListener("unhandledrejection",n)}}}},function(t,e,r){"use strict";var n=r(0),o=r(1);function i(t){this.truncation=t}function s(){var t="undefined"!=typeof window&&window||"undefined"!=typeof self&&self,e=t&&t.Zone&&t.Zone.current,r=Array.prototype.slice.call(arguments);if(e&&"angular"===e._name){var n=e._parent;n.run((function(){a.apply(void 0,r)}))}else a.apply(void 0,r)}function a(t,e,r,i,s,a,c){if("undefined"!=typeof RollbarProxy)return function(t,e){(new RollbarProxy).sendJsonPayload(t,(function(t){}),(function(t){e(new Error(t))}))}(i,s);var l;if(!(l=a?a():function(){var t,e,r=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],n=r.length;for(e=0;e=400&&t.status<600}(l)){if(403===l.status){var e=t.value&&t.value.message;o.error(e)}s(new Error(String(l.status)))}else{s(u("XHR response had no status code (likely connection failure)"))}}}catch(t){var r;r=t&&t.stack?t:new Error(t),s(r)}var i};l.open(r,e,!0),l.setRequestHeader&&(l.setRequestHeader("Content-Type","application/json"),l.setRequestHeader("X-Rollbar-Access-Token",t)),n.isFiniteNumber(c)&&(l.timeout=c),l.onreadystatechange=p,l.send(i)}catch(t){if("undefined"!=typeof XDomainRequest){if(!window||!window.location)return s(new Error("No window available during request, unknown environment"));"http:"===window.location.href.substring(0,5)&&"https"===e.substring(0,5)&&(e="http"+e.substring(5));var f=new XDomainRequest;f.onprogress=function(){},f.ontimeout=function(){s(u("Request timed out","ETIMEDOUT"))},f.onerror=function(){s(new Error("Error during request"))},f.onload=function(){var t=n.jsonParse(f.responseText);s(t.error,t.value)},f.open(r,e,!0),f.send(i)}else s(new Error("Cannot find a method to transport a request"))}}catch(t){s(t)}}function u(t,e){var r=new Error(t);return r.code=e||"ENOTFOUND",r}i.prototype.get=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){}),n.addParamsAndAccessTokenToPath(t,e,r);s(t,n.formatUrl(e),"GET",null,o,i,e.timeout)},i.prototype.post=function(t,e,r,o,i){if(o&&n.isFunction(o)||(o=function(){}),!r)return o(new Error("Cannot send empty request"));var a;if((a=this.truncation?this.truncation.truncate(r):n.stringify(r)).error)return o(a.error);var u=a.value;s(t,n.formatUrl(e),"POST",u,o,i,e.timeout)},i.prototype.postJsonPayload=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){});s(t,n.formatUrl(e),"POST",r,o,i,e.timeout)},t.exports=i},function(t,e,r){"use strict";var n=r(0),o=r(3),i=r(1);function s(t,e,r){var o=t.message,i=t.custom;o||(o="Item sent with null or missing arguments.");var s={body:o};i&&(s.extra=n.merge(i)),n.set(t,"data.body",{message:s}),r(null,t)}function a(t){var e=t.stackInfo.stack;return e&&0===e.length&&t._unhandledStackInfo&&t._unhandledStackInfo.stack&&(e=t._unhandledStackInfo.stack),e}function u(t,e,r){var i=t&&t.data.description,s=t&&t.custom,u=a(t),l=o.guessErrorClass(e.message),p={exception:{class:c(e,l[0],r),message:l[1]}};if(i&&(p.exception.description=i),u){var f,h,d,m,g,v,y,b;for(0===u.length&&(p.exception.stack=e.rawStack,p.exception.raw=String(e.rawException)),p.frames=[],y=0;y-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var r=e.replace(/^\s+/,"").replace(/\(eval code/g,"("),n=r.match(/ (\((.+):(\d+):(\d+)\)$)/),o=(r=n?r.replace(n[0],""):r).split(/\s+/).slice(1),i=this.extractLocation(n?n[1]:o.pop()),s=o.join(" ")||void 0,a=["eval",""].indexOf(i[0])>-1?void 0:i[0];return new t({functionName:s,fileName:a,lineNumber:i[1],columnNumber:i[2],source:e})}),this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter((function(t){return!t.match(n)}),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 t({functionName:e});var r=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(r),o=n&&n[1]?n[1]:void 0,i=this.extractLocation(e.replace(r,""));return new t({functionName:o,fileName:i[0],lineNumber:i[1],columnNumber:i[2],source:e})}),this)},parseOpera:function(t){return!t.stacktrace||t.message.indexOf("\n")>-1&&t.message.split("\n").length>t.stacktrace.split("\n").length?this.parseOpera9(t):t.stack?this.parseOpera11(t):this.parseOpera10(t)},parseOpera9:function(e){for(var r=/Line (\d+).*script (?:in )?(\S+)/i,n=e.message.split("\n"),o=[],i=2,s=n.length;i/,"$2").replace(/\([^)]*\)/g,"")||void 0;i.match(/\(([^)]*)\)/)&&(r=i.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var a=void 0===r||"[arguments not available]"===r?void 0:r.split(",");return new t({functionName:s,args:a,fileName:o[0],lineNumber:o[1],columnNumber:o[2],source:e})}),this)}}})?n.apply(e,o):n)||(t.exports=i)}()},function(t,e,r){var n,o,i;!function(r,s){"use strict";o=[],void 0===(i="function"==typeof(n=function(){function t(t){return t.charAt(0).toUpperCase()+t.substring(1)}function e(t){return function(){return this[t]}}var r=["isConstructor","isEval","isNative","isToplevel"],n=["columnNumber","lineNumber"],o=["fileName","functionName","source"],i=r.concat(n,o,["args"],["evalOrigin"]);function s(e){if(e)for(var r=0;ro&&(i=this.maxQueueSize-o),this.maxQueueSize=o,this.queue.splice(0,i)},o.prototype.copyEvents=function(){var t=Array.prototype.slice.call(this.queue,0);if(n.isFunction(this.options.filterTelemetry))try{for(var e=t.length;e--;)this.options.filterTelemetry(t[e])&&t.splice(e,1)}catch(t){this.options.filterTelemetry=null}return t},o.prototype.capture=function(t,e,r,o,s){var a={level:i(t,r),type:t,timestamp_ms:s||n.now(),body:e,source:"client"};o&&(a.uuid=o);try{if(n.isFunction(this.options.filterTelemetry)&&this.options.filterTelemetry(a))return!1}catch(t){this.options.filterTelemetry=null}return this.push(a),a},o.prototype.captureEvent=function(t,e,r,n){return this.capture(t,e,r,n)},o.prototype.captureError=function(t,e,r,n){var o={message:t.message||String(t)};return t.stack&&(o.stack=t.stack),this.capture("error",o,e,r,n)},o.prototype.captureLog=function(t,e,r,n){return this.capture("log",{message:t},e,r,n)},o.prototype.captureNetwork=function(t,e,r,n){e=e||"xhr",t.subtype=t.subtype||e,n&&(t.request=n);var o=this.levelFromStatus(t.status_code);return this.capture("network",t,o,r)},o.prototype.levelFromStatus=function(t){return t>=200&&t<400?"info":0===t||t>=400?"error":"info"},o.prototype.captureDom=function(t,e,r,n,o){var i={subtype:t,element:e};return void 0!==r&&(i.value=r),void 0!==n&&(i.checked=n),this.capture("dom",i,"info",o)},o.prototype.captureNavigation=function(t,e,r){return this.capture("navigation",{from:t,to:e},"info",r)},o.prototype.captureDomContentLoaded=function(t){return this.capture("navigation",{subtype:"DOMContentLoaded"},"info",void 0,t&&t.getTime())},o.prototype.captureLoad=function(t){return this.capture("navigation",{subtype:"load"},"info",void 0,t&&t.getTime())},o.prototype.captureConnectivityChange=function(t,e){return this.captureNetwork({change:t},"connectivity",e)},o.prototype._captureRollbarItem=function(t){if(this.options.includeItemsInTelemetry)return t.err?this.captureError(t.err,t.level,t.uuid,t.timestamp):t.message?this.captureLog(t.message,t.level,t.uuid,t.timestamp):t.custom?this.capture("log",t.custom,t.level,t.uuid,t.timestamp):void 0},o.prototype.push=function(t){this.queue.push(t),this.queue.length>this.maxQueueSize&&this.queue.shift()},t.exports=o},function(t,e,r){"use strict";var n=r(0),o=r(4),i=r(2),s=r(31),a={network:!0,networkResponseHeaders:!1,networkResponseBody:!1,networkRequestHeaders:!1,networkRequestBody:!1,networkErrorOnHttp5xx:!1,networkErrorOnHttp4xx:!1,networkErrorOnHttp0:!1,log:!0,dom:!0,navigation:!0,connectivity:!0,contentSecurityPolicy:!0,errorOnContentSecurityPolicy:!1};function u(t,e,r,n,o){var i=t[e];t[e]=r(i),n&&n[o].push([t,e,i])}function c(t,e){for(var r;t[e].length;)(r=t[e].shift())[0][r[1]]=r[2]}function l(t,e,r,o,i){this.options=t;var s=t.autoInstrument;!1===t.enabled||!1===s?this.autoInstrument={}:(n.isType(s,"object")||(s=a),this.autoInstrument=n.merge(a,s)),this.scrubTelemetryInputs=!!t.scrubTelemetryInputs,this.telemetryScrubber=t.telemetryScrubber,this.defaultValueScrubber=function(t){for(var e=[],r=0;r3)){i.__rollbar_xhr.end_time_ms=n.now();var e=null;if(i.__rollbar_xhr.response_content_type=i.getResponseHeader("Content-Type"),t.autoInstrument.networkResponseHeaders){var r=t.autoInstrument.networkResponseHeaders;e={};try{var s,a;if(!0===r){var u=i.getAllResponseHeaders();if(u){var c,l,p=u.trim().split(/[\r\n]+/);for(a=0;a=500&&this.autoInstrument.networkErrorOnHttp5xx||e>=400&&this.autoInstrument.networkErrorOnHttp4xx||0===e&&this.autoInstrument.networkErrorOnHttp0){var r=new Error("HTTP request failed with Status "+e);r.stack=t.stack,this.rollbar.error(r,{skipFrames:1})}},l.prototype.deinstrumentConsole=function(){if("console"in this._window&&this._window.console.log)for(var t;this.replacements.log.length;)t=this.replacements.log.shift(),this._window.console[t[0]]=t[1]},l.prototype.instrumentConsole=function(){if("console"in this._window&&this._window.console.log){var t=this,e=this._window.console,r=["debug","info","warn","error","log"];try{for(var o=0,i=r.length;o=0&&t.options[t.selectedIndex]&&this.captureDomEvent("input",t,t.options[t.selectedIndex].value)},l.prototype.captureDomEvent=function(t,e,r,n){if(void 0!==r)if(this.scrubTelemetryInputs||"password"===s.getElementType(e))r="[scrubbed]";else{var o=s.describeElement(e);this.telemetryScrubber?this.telemetryScrubber(o)&&(r="[scrubbed]"):this.defaultValueScrubber(o)&&(r="[scrubbed]")}var i=s.elementArrayToString(s.treeToArray(e));this.telemeter.captureDom(t,i,r,n)},l.prototype.deinstrumentNavigation=function(){var t=this._window.chrome;!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState&&c(this.replacements,"navigation")},l.prototype.instrumentNavigation=function(){var t=this._window.chrome;if(!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState){var e=this;u(this._window,"onpopstate",(function(t){return function(){var r=e._location.href;e.handleUrlChange(e._lastHref,r),t&&t.apply(this,arguments)}}),this.replacements,"navigation"),u(this._window.history,"pushState",(function(t){return function(){var r=arguments.length>2?arguments[2]:void 0;return r&&e.handleUrlChange(e._lastHref,r+""),t.apply(this,arguments)}}),this.replacements,"navigation")}},l.prototype.handleUrlChange=function(t,e){var r=i.parse(this._location.href),n=i.parse(e),o=i.parse(t);this._lastHref=e,r.protocol===n.protocol&&r.host===n.host&&(e=n.path+(n.hash||"")),r.protocol===o.protocol&&r.host===o.host&&(t=o.path+(o.hash||"")),this.telemeter.captureNavigation(t,e)},l.prototype.deinstrumentConnectivity=function(){("addEventListener"in this._window||"body"in this._document)&&(this._window.addEventListener?this.removeListeners("connectivity"):c(this.replacements,"connectivity"))},l.prototype.instrumentConnectivity=function(){if("addEventListener"in this._window||"body"in this._document)if(this._window.addEventListener)this.addListener("connectivity",this._window,"online",void 0,function(){this.telemeter.captureConnectivityChange("online")}.bind(this),!0),this.addListener("connectivity",this._window,"offline",void 0,function(){this.telemeter.captureConnectivityChange("offline")}.bind(this),!0);else{var t=this;u(this._document.body,"ononline",(function(e){return function(){t.telemeter.captureConnectivityChange("online"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity"),u(this._document.body,"onoffline",(function(e){return function(){t.telemeter.captureConnectivityChange("offline"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity")}},l.prototype.handleCspEvent=function(t){var e="Security Policy Violation: blockedURI: "+t.blockedURI+", violatedDirective: "+t.violatedDirective+", effectiveDirective: "+t.effectiveDirective+", ";t.sourceFile&&(e+="location: "+t.sourceFile+", line: "+t.lineNumber+", col: "+t.columnNumber+", "),e+="originalPolicy: "+t.originalPolicy,this.telemeter.captureLog(e,"error"),this.handleCspError(e)},l.prototype.handleCspError=function(t){this.autoInstrument.errorOnContentSecurityPolicy&&this.rollbar.error(t)},l.prototype.deinstrumentContentSecurityPolicy=function(){"addEventListener"in this._window&&this.removeListeners("contentsecuritypolicy")},l.prototype.instrumentContentSecurityPolicy=function(){if("addEventListener"in this._window){var t=this.handleCspEvent.bind(this);this.addListener("contentsecuritypolicy",this._window,"securitypolicyviolation",null,t,!1)}},l.prototype.addListener=function(t,e,r,n,o,i){e.addEventListener?(e.addEventListener(r,o,i),this.eventRemovers[t].push((function(){e.removeEventListener(r,o,i)}))):n&&(e.attachEvent(n,o),this.eventRemovers[t].push((function(){e.detachEvent(n,o)})))},l.prototype.removeListeners=function(t){for(;this.eventRemovers[t].length;)this.eventRemovers[t].shift()()},t.exports=l},function(t,e,r){"use strict";function n(t){return(t.getAttribute("type")||"").toLowerCase()}function o(t){if(!t||!t.tagName)return"";var e=[t.tagName];t.id&&e.push("#"+t.id),t.classes&&e.push("."+t.classes.join("."));for(var r=0;r=0;a--){if(e=o(t[a]),r=s+i.length*n+e.length,a=83){i.unshift("...");break}i.unshift(e),s+=e.length}return i.join(" > ")},treeToArray:function(t){for(var e,r=[],n=0;t&&n<5&&"html"!==(e=i(t)).tagName;n++)r.unshift(e),t=t.parentNode;return r},getElementFromEvent:function(t,e){return t.target?t.target:e&&e.elementFromPoint?e.elementFromPoint(t.clientX,t.clientY):void 0},isDescribedElement:function(t,e,r){if(t.tagName.toLowerCase()!==e.toLowerCase())return!1;if(!r)return!0;t=n(t);for(var o=0;o2*e?t.slice(0,e).concat(t.slice(r-e)):t}function a(t,e,r){r=void 0===r?30:r;var o,i=t.data.body;if(i.trace_chain)for(var a=i.trace_chain,u=0;ut?e.slice(0,t-3).concat("..."):e}function c(t,e,r){return[e=o(e,(function e(r,i,s){switch(n.typeName(i)){case"string":return u(t,i);case"object":case"array":return o(i,e,s);default:return i}})),n.stringify(e,r)]}function l(t){return t.exception&&(delete t.exception.description,t.exception.message=u(255,t.exception.message)),t.frames=s(t.frames,1),t}function p(t,e){var r=t.data.body;if(r.trace_chain)for(var o=r.trace_chain,i=0;ie}t.exports={truncate:function(t,e,r){r=void 0===r?524288:r;for(var n,o,s,u=[i,a,c.bind(null,1024),c.bind(null,512),c.bind(null,256),p];n=u.shift();)if(t=(o=n(t,e))[0],(s=o[1]).error||!f(s.value,r))return s;return s},raw:i,truncateFrames:a,truncateStrings:c,maybeTruncateValue:u}}])})); //# sourceMappingURL=rollbar.noconflict.umd.min.js.map \ No newline at end of file diff --git a/dist/rollbar.noconflict.umd.min.js.map b/dist/rollbar.noconflict.umd.min.js.map index cb9f112d2..06d338b5b 100644 --- a/dist/rollbar.noconflict.umd.min.js.map +++ b/dist/rollbar.noconflict.umd.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://rollbar/webpack/universalModuleDefinition","webpack://rollbar/webpack/bootstrap","webpack://rollbar/./src/utility.js","webpack://rollbar/./src/browser/logger.js","webpack://rollbar/./src/browser/url.js","webpack://rollbar/./src/errorParser.js","webpack://rollbar/./src/scrub.js","webpack://rollbar/./src/utility/traverse.js","webpack://rollbar/./src/browser/bundles/rollbar.noconflict.js","webpack://rollbar/./src/browser/rollbar.js","webpack://rollbar/./src/browser/core.js","webpack://rollbar/./src/rollbar.js","webpack://rollbar/./src/rateLimiter.js","webpack://rollbar/./src/merge.js","webpack://rollbar/./src/queue.js","webpack://rollbar/./src/notifier.js","webpack://rollbar/./src/api.js","webpack://rollbar/./src/apiUtility.js","webpack://rollbar/./node_modules/console-polyfill/index.js","webpack://rollbar/./src/browser/detection.js","webpack://rollbar/./src/browser/globalSetup.js","webpack://rollbar/./src/browser/transport.js","webpack://rollbar/./src/browser/transforms.js","webpack://rollbar/./node_modules/error-stack-parser/error-stack-parser.js","webpack://rollbar/./node_modules/error-stack-parser/node_modules/stackframe/stackframe.js","webpack://rollbar/./src/transforms.js","webpack://rollbar/./src/browser/predicates.js","webpack://rollbar/./src/predicates.js","webpack://rollbar/./src/defaults.js","webpack://rollbar/./src/browser/defaults/scrubFields.js","webpack://rollbar/./src/telemetry.js","webpack://rollbar/./src/browser/telemetry.js","webpack://rollbar/./src/browser/domUtility.js","webpack://rollbar/./src/utility/polyfillJSON.js","webpack://rollbar/./vendor/JSON-js/json3.js","webpack://rollbar/./src/browser/wrapGlobals.js","webpack://rollbar/./src/truncation.js"],"names":["root","factory","exports","module","define","amd","this","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","merge","RollbarJSON","isType","x","typeName","Error","toString","match","toLowerCase","isFunction","f","isNativeFunction","funcMatchString","Function","replace","reIsNative","RegExp","isObject","test","type","uuid4","now","Math","random","floor","parseUriOptions","strictMode","q","parser","strict","loose","stringify","obj","backup","error","jsonError","backupError","wrapCallback","logger","err","resp","e","TELEMETRY_TYPES","TELEMETRY_LEVELS","arrayIncludes","arr","val","k","length","Date","addParamsAndAccessTokenToPath","accessToken","options","params","access_token","paramsArray","push","join","query","sort","path","qs","indexOf","h","substring","createItem","args","notifier","requestKeys","lambdaContext","message","custom","callback","request","arg","extraArgs","argTypes","typ","DOMException","j","len","undefined","item","timestamp","diagnostic","uuid","level","skipFrames","setCustomItemKeys","_originalArgs","original_arg_types","addErrorContext","errors","data","contextAdded","rollbarContext","error_context","createTelemetryEvent","metadata","filterIp","requestData","captureIp","newIp","parts","split","pop","beginning","slice","slashIdx","concat","formatArgsAsString","result","substr","formatUrl","u","protocol","port","hostname","keys","handleOptions","current","input","payload","hostWhiteList","hostSafeList","log","hostBlackList","hostBlockList","updateDeprecatedOptions","overwriteScrubFields","scrubFields","isError","isFiniteNumber","Number","isFinite","isIterable","isString","String","isPromise","then","jsonParse","parse","LEVELS","debug","info","warning","critical","makeUnhandledStackInfo","url","lineno","colno","backupMessage","errorParser","location","line","column","func","guessFunctionName","context","gatherContext","href","document","useragent","window","navigator","userAgent","redact","sanitizeUrl","baseUrlParts","str","exec","uri","$0","$1","$2","parseUri","anchor","source","set","temp","replacement","setupJSON","polyfillJSON","JSON","maxByteSize","string","count","code","charCodeAt","detection","_","Array","arguments","unshift","ieVersion","console","apply","last","auth","host","hash","pathname","search","parseInt","pathParts","ErrorStackParser","ERR_CLASS_REGEXP","Frame","stackFrame","_stackFrame","fileName","lineNumber","functionName","columnNumber","Stack","exception","skip","stack","parserStack","getStack","_mostSpecificErrorName","rawStack","rawException","constructorName","constructor","guessErrorClass","errMsg","errClassMatch","errClass","nested","traceChain","traverse","scrubPath","scrubPaths","paramRes","pat","ret","_getScrubFieldRegexs","queryRes","_getScrubQueryParamRegexs","redactQueryParam","dummy0","paramPart","scrubber","v","seen","tmpV","valScrubber","paramScrubber","seenIndex","isObj","isArray","mapped","same","rollbar","_rollbarStartTime","getTime","Rollbar","telemeter","instrumenter","wrapGlobals","scrub","truncation","setComponents","Client","API","globals","Transport","urllib","transforms","sharedTransforms","predicates","sharedPredicates","client","defaultOptions","_configuredOptions","Telemeter","components","Instrumenter","transport","api","gWindow","_gWindow","gDocument","isChrome","chrome","runtime","anonymousErrorsPending","addTransform","handleDomException","handleItemWithError","ensureItemHasSomethingToSay","addBaseInfo","addRequestInfo","addClientInfo","addPluginInfo","addBody","addMessageWithError","addTelemetryData","addConfigToPayload","addScrubber","userTransform","addConfiguredOptions","addDiagnosticKeys","itemToPayload","addTransformsToNotifier","queue","addPredicate","checkLevel","checkIgnore","userCheckIgnore","urlIsNotBlockListed","urlIsSafeListed","messageIsIgnored","setupUnhandledCapture","instrument","_instance","handleUninitialized","maybeCallback","_getFirstFunction","self","init","global","configure","payloadData","oldOptions","lastError","_createItem","warn","buildJsonPayload","sendJsonPayload","jsonPayload","unhandledExceptionsInitialized","captureUncaught","handleUncaughtExceptions","captureUncaughtExceptions","wrapGlobalEventHandlers","unhandledRejectionsInitialized","captureUnhandledRejections","handleUnhandledRejections","handleUncaughtException","inspectAnonymousErrors","stackInfo","_unhandledStackInfo","uncaughtErrorLevel","_isUncaught","handleAnonymousErrors","prepareStackTrace","_stack","_isAnonymous","handleUnhandledRejection","reason","promise","reasonResult","_rollbarContext","wrap","_before","ctxFn","_isWrap","_rollbar_wrapped","exc","_rollbarWrappedError","_wrappedSource","prop","captureEvent","event","captureDomContentLoaded","ts","captureLoad","loadFull","defaults","version","logLevel","reportLevel","endpoint","verbose","enabled","transmit","sendConfig","includeItemsInTelemetry","ignoreDuplicateErrors","RateLimiter","Queue","Notifier","platform","rateLimiter","configureGlobal","setPlatformOptions","tracer","validateTracer","setStackTraceLimit","lastErrorHash","stackTraceLimit","scope","active","maxItems","itemsPerMinute","_defaultLogLevel","_log","wait","postJsonPayload","defaultLevel","_sameAsLastError","_addTracingInfo","_captureRollbarItem","telemetryEvents","copyEvents","itemHash","generateItemHash","span","spanContext","toSpanId","toTraceId","validateSpan","setTag","opentracingSpanId","opentracingTraceId","opentracing_span_id","opentracing_trace_id","startTime","counter","perMinCounter","platformOptions","checkRate","limit","ignoreRateLimit","shouldSendValue","shouldSend","globalRateLimit","limitPerMin","perMinute","msg","environment","body","extra","language","framework","rateLimitPayload","globalSettings","elapsedTime","globalRateLimitPerMin","hasOwn","toStr","isPlainObject","hasOwnConstructor","hasIsPrototypeOf","src","copy","clone","pendingItems","pendingRequests","retryQueue","retryHandle","waitCallback","waitIntervalID","predicate","addPendingItem","removePendingItem","idx","splice","addItem","originalError","originalItem","predicateResult","_applyPredicates","stop","_maybeLog","_makeApiRequest","_dequeuePendingRequest","_maybeCallWait","clearInterval","setInterval","rateLimitResponse","postItem","_maybeRetry","RETRIABLE_ERRORS","shouldRetry","retryInterval","maxRetries","retries","_retryApiRequest","retryObject","shift","transform","_applyTransforms","transformIndex","transformsLength","cb","helpers","Api","jsonBackup","transportOptions","_getTransport","getTransportFromOptions","buildPayload","post","stringifyResult","truncate","contextResult","timeout","proxy","opts","method","appendPathToPath","base","baseTrailingSlash","pathBeginningSlash","con","dummy","properties","methods","Detection","div","createElement","all","getElementsByTagName","innerHTML","undef","_rollbarWindowOnError","old","handler","shim","oldOnError","_rollbarOldOnError","onerror","fn","_rollbarURH","belongsToShim","removeEventListener","rejectionHandler","evt","detail","addEventListener","_makeZoneRequest","currentZone","Zone","_name","rootZone","_parent","run","_makeRequest","requestFactory","RollbarProxy","json","_msg","_proxyRequest","xmlhttp","factories","XMLHttpRequest","ActiveXObject","numFactories","_createXMLHTTPObject","onreadystatechange","readyState","parseResponse","responseText","status","_isNormalFailure","_newRetriableError","ex","open","setRequestHeader","send","e1","XDomainRequest","xdomainrequest","onprogress","ontimeout","onload","e2","writeData","addBodyMessage","stackFromItem","buildTrace","description","guess","trace","errorClass","frame","pre","contextLength","mid","raw","frames","filename","sendFrameUrl","endsWith","reverse","_savedStackTrace","chain","server","remoteString","query_string","user_ip","nav","scr","screen","runtime_ms","round","javascript","browser","cookie_enabled","cookieEnabled","width","height","cur","plugins","navPlugins","traces","traceChainLength","trace_chain","addBodyTraceChain","className","addBodyTrace","scrubFn","StackFrame","FIREFOX_SAFARI_STACK_REGEXP","CHROME_IE_STACK_REGEXP","SAFARI_NATIVE_CODE_REGEXP","stacktrace","parseOpera","parseV8OrIE","parseFFOrSafari","extractLocation","urlLike","filter","map","sanitizedLine","tokens","locationParts","functionNameRegex","matches","parseOpera9","parseOpera11","parseOpera10","lineRE","lines","argsRaw","functionCall","_capitalize","charAt","toUpperCase","_getter","booleanProps","numericProps","stringProps","props","getArgs","setArgs","TypeError","getEvalOrigin","evalOrigin","setEvalOrigin","getFileName","getLineNumber","getColumnNumber","getFunctionName","getIsEval","fromString","argsStartIndex","argsEndIndex","lastIndexOf","locationString","Boolean","isNaN","parseFloat","addFunctionOption","payloadOptions","tracePath","newExtra","newItem","response","promisedItem","configuredOptions","configured_options","is_anonymous","is_uncaught","raw_error","constructor_name","failed","settings","matchFrames","list","block","listLength","frameLength","urlIsOnAList","safeOrBlock","tracesLength","listName","levelVal","isUncaught","onSendCallback","ignoredMessages","rIgnoredMessage","messages","messagesFromItem","itemsPerMin","maxTelemetryEvents","maxQueueSize","max","min","getLevel","manual","newMaxEvents","deleteCount","events","filterTelemetry","capture","rollbarUUID","timestamp_ms","captureError","captureLog","captureNetwork","subtype","levelFromStatus","status_code","statusCode","captureDom","element","checked","captureNavigation","from","to","captureConnectivityChange","change","urlparser","domUtil","network","networkResponseHeaders","networkResponseBody","networkRequestHeaders","networkRequestBody","networkErrorOnHttp5xx","networkErrorOnHttp4xx","networkErrorOnHttp0","dom","navigation","connectivity","contentSecurityPolicy","errorOnContentSecurityPolicy","replacements","orig","restore","b","_window","_document","autoInstrument","scrubTelemetryInputs","telemetryScrubber","defaultValueScrubber","patterns","attributes","attrs","a","nameFromDescription","eventRemovers","contentsecuritypolicy","_location","_lastHref","oldSettings","deinstrumentNetwork","instrumentNetwork","deinstrumentConsole","instrumentConsole","deinstrumentDom","instrumentDom","deinstrumentNavigation","instrumentNavigation","deinstrumentConnectivity","instrumentConnectivity","deinstrumentContentSecurityPolicy","instrumentContentSecurityPolicy","wrapProp","xhr","xhrp","__rollbar_xhr","start_time_ms","end_time_ms","header","request_headers","request_content_type","onreadystatechangeHandler","__rollbar_event","headers","response_content_type","getResponseHeader","headersConfig","allHeaders","getAllResponseHeaders","trim","isJsonContentType","scrubJson","errorOnHttpStatus","trackHttpErrors","reqHeaders","Headers","fetchHeaders","text","contentType","includes","inHeaders","outHeaders","entries","currentHeader","next","done","wrapConsole","origConsole","removeListeners","clickHandler","handleClick","blurHandler","handleBlur","addListener","getElementFromEvent","hasTag","tagName","anchorOrButton","isDescribedElement","captureDomEvent","handleSelectInputChanged","elem","multiple","selected","selectedIndex","isChecked","getElementType","describeElement","elementString","elementArrayToString","treeToArray","app","history","pushState","handleUrlChange","parsedHref","parsedTo","parsedFrom","handleCspEvent","cspEvent","blockedURI","violatedDirective","effectiveDirective","sourceFile","originalPolicy","handleCspError","cspHandler","section","altType","attachEvent","detachEvent","getAttribute","descriptionToString","desc","out","id","classes","attr","nextStr","totalLength","separatorLength","MAX_LENGTH","nextDescription","parentNode","doc","target","elementFromPoint","clientX","clientY","subtypes","gap","indent","meta","rep","state","container","escapes","number","action","rx_escapable","this_value","valueOf","quote","lastIndex","toJSON","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","\"","replacer","space","holder","partial","mind","go","firstokey","okey","ovalue","firstavalue","avalue","ocomma","acomma","colon","SyntaxError","reviver","tx","ignore","fromCharCode","walk","_extendListenerPrototype","oldAddEventListener","_rollbarOldAdd","addFn","bubble","oldRemoveEventListener","_rollbarOldRemove","removeFn","selectFrames","range","truncateFrames","maybeTruncateValue","truncateStrings","truncator","truncateTraceData","traceData","minBody","needsTruncation","maxSize","strategy","results","strategies"],"mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAiB,QAAID,IAErBD,EAAc,QAAIC,IARpB,CASGK,MAAM,WACT,O,YCTE,IAAIC,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUP,QAGnC,IAAIC,EAASI,EAAiBE,GAAY,CACzCC,EAAGD,EACHE,GAAG,EACHT,QAAS,IAUV,OANAU,EAAQH,GAAUI,KAAKV,EAAOD,QAASC,EAAQA,EAAOD,QAASM,GAG/DL,EAAOQ,GAAI,EAGJR,EAAOD,QA0Df,OArDAM,EAAoBM,EAAIF,EAGxBJ,EAAoBO,EAAIR,EAGxBC,EAAoBQ,EAAI,SAASd,EAASe,EAAMC,GAC3CV,EAAoBW,EAAEjB,EAASe,IAClCG,OAAOC,eAAenB,EAASe,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEV,EAAoBgB,EAAI,SAAStB,GACX,oBAAXuB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAenB,EAASuB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAenB,EAAS,aAAc,CAAEyB,OAAO,KAQvDnB,EAAoBoB,EAA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J,UAE5E01B,EAAUzV,OAASkV,EAAaO,EAAUzV,OAAQ,GAC3CyV,EAGT,SAASC,EAAQvyB,EAASgX,GACxB,IAAIzD,EAAOvT,EAAQ7B,KAAKoV,KACxB,GAAIA,EAAKiL,YAEP,IADA,IAAIrB,EAAQ5J,EAAKiL,YACRloB,EAAI,EAAGA,EAAI6mB,EAAM7hB,OAAQhF,IAChC6mB,EAAM7mB,GAAK+7B,EAAkBlV,EAAM7mB,SAE5Bid,EAAK+I,QACd/I,EAAK+I,MAAQ+V,EAAkB9e,EAAK+I,QAEtC,MAAO,CAACtc,EAASoE,EAAE/J,UAAU2F,EAASgX,IAGxC,SAASwb,EAAgBxyB,EAASyyB,GAChC,OAAOruB,EAAEN,YAAY9D,GAAWyyB,EA0BlC18B,EAAOD,QAAU,CACfyhB,SAxBF,SAAkBvX,EAASgX,EAAYyb,GACrCA,OAA8B,IAAZA,EAA2B,OAAeA,EAW5D,IAVA,IAQIC,EAAUC,EAAStzB,EARnBuzB,EAAa,CACfhW,EACAqV,EACAE,EAAgBr6B,KAAK,KAAM,MAC3Bq6B,EAAgBr6B,KAAK,KAAM,KAC3Bq6B,EAAgBr6B,KAAK,KAAM,KAC3By6B,GAIMG,EAAWE,EAAWpc,SAI5B,GAFAxW,GADA2yB,EAAUD,EAAS1yB,EAASgX,IACV,IAClB3X,EAASszB,EAAQ,IACNn4B,QAAUg4B,EAAgBnzB,EAAO9H,MAAOk7B,GACjD,OAAOpzB,EAGX,OAAOA,GAOPud,IAAKA,EACLqV,eAAgBA,EAChBE,gBAAiBA,EACjBD,mBAAoBA","file":"rollbar.noconflict.umd.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"rollbar\"] = factory();\n\telse\n\t\troot[\"rollbar\"] = factory();\n})(this, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n","'use strict';\n\nvar merge = require('./merge');\n\nvar RollbarJSON = {};\nfunction setupJSON(polyfillJSON) {\n if (isFunction(RollbarJSON.stringify) && isFunction(RollbarJSON.parse)) {\n return;\n }\n\n if (isDefined(JSON)) {\n // If polyfill is provided, prefer it over existing non-native shims.\n if(polyfillJSON) {\n if (isNativeFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isNativeFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n } else { // else accept any interface that is present.\n if (isFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n }\n }\n if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {\n polyfillJSON && polyfillJSON(RollbarJSON);\n }\n}\n\n/*\n * isType - Given a Javascript value and a string, returns true if the type of the value matches the\n * given string.\n *\n * @param x - any value\n * @param t - a lowercase string containing one of the following type names:\n * - undefined\n * - null\n * - error\n * - number\n * - boolean\n * - string\n * - symbol\n * - function\n * - object\n * - array\n * @returns true if x is of type t, otherwise false\n */\nfunction isType(x, t) {\n return t === typeName(x);\n}\n\n/*\n * typeName - Given a Javascript value, returns the type of the object as a string\n */\nfunction typeName(x) {\n var name = typeof x;\n if (name !== 'object') {\n return name;\n }\n if (!x) {\n return 'null';\n }\n if (x instanceof Error) {\n return 'error';\n }\n return ({}).toString.call(x).match(/\\s([a-zA-Z]+)/)[1].toLowerCase();\n}\n\n/* isFunction - a convenience function for checking if a value is a function\n *\n * @param f - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isFunction(f) {\n return isType(f, 'function');\n}\n\n/* isNativeFunction - a convenience function for checking if a value is a native JS function\n *\n * @param f - any value\n * @returns true if f is a native JS function, otherwise false\n */\nfunction isNativeFunction(f) {\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n var funcMatchString = Function.prototype.toString.call(Object.prototype.hasOwnProperty)\n .replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?');\n var reIsNative = RegExp('^' + funcMatchString + '$');\n return isObject(f) && reIsNative.test(f);\n}\n\n/* isObject - Checks if the argument is an object\n *\n * @param value - any value\n * @returns true is value is an object function is an object)\n*/\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/* isString - Checks if the argument is a string\n *\n * @param value - any value\n * @returns true if value is a string\n*/\nfunction isString(value) {\n return typeof value === 'string' || value instanceof String\n}\n\n/**\n * isFiniteNumber - determines whether the passed value is a finite number\n *\n * @param {*} n - any value\n * @returns true if value is a finite number\n */\n function isFiniteNumber(n) {\n return Number.isFinite(n);\n}\n\n/*\n * isDefined - a convenience function for checking if a value is not equal to undefined\n *\n * @param u - any value\n * @returns true if u is anything other than undefined\n */\nfunction isDefined(u) {\n return !isType(u, 'undefined');\n}\n\n/*\n * isIterable - convenience function for checking if a value can be iterated, essentially\n * whether it is an object or an array.\n *\n * @param i - any value\n * @returns true if i is an object or an array as determined by `typeName`\n */\nfunction isIterable(i) {\n var type = typeName(i);\n return (type === 'object' || type === 'array');\n}\n\n/*\n * isError - convenience function for checking if a value is of an error type\n *\n * @param e - any value\n * @returns true if e is an error\n */\nfunction isError(e) {\n // Detect both Error and Firefox Exception type\n return isType(e, 'error') || isType(e, 'exception');\n}\n\n/* isPromise - a convenience function for checking if a value is a promise\n *\n * @param p - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isPromise(p) {\n return isObject(p) && isType(p.then, 'function');\n}\n\nfunction redact() {\n return '********';\n}\n\n// from http://stackoverflow.com/a/8809472/1138191\nfunction uuid4() {\n var d = now();\n var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n var r = (d + Math.random() * 16) % 16 | 0;\n d = Math.floor(d / 16);\n return (c === 'x' ? r : (r & 0x7 | 0x8)).toString(16);\n });\n return uuid;\n}\n\nvar LEVELS = {\n debug: 0,\n info: 1,\n warning: 2,\n error: 3,\n critical: 4\n};\n\nfunction sanitizeUrl(url) {\n var baseUrlParts = parseUri(url);\n if (!baseUrlParts) {\n return '(unknown)';\n }\n\n // remove a trailing # if there is no anchor\n if (baseUrlParts.anchor === '') {\n baseUrlParts.source = baseUrlParts.source.replace('#', '');\n }\n\n url = baseUrlParts.source.replace('?' + baseUrlParts.query, '');\n return url;\n}\n\nvar parseUriOptions = {\n strictMode: false,\n key: [\n 'source',\n 'protocol',\n 'authority',\n 'userInfo',\n 'user',\n 'password',\n 'host',\n 'port',\n 'relative',\n 'path',\n 'directory',\n 'file',\n 'query',\n 'anchor'\n ],\n q: {\n name: 'queryKey',\n parser: /(?:^|&)([^&=]*)=?([^&]*)/g\n },\n parser: {\n strict: /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n loose: /^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/\n }\n};\n\nfunction parseUri(str) {\n if (!isType(str, 'string')) {\n return undefined;\n }\n\n var o = parseUriOptions;\n var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);\n var uri = {};\n\n for (var i = 0, l = o.key.length; i < l; ++i) {\n uri[o.key[i]] = m[i] || '';\n }\n\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) {\n uri[o.q.name][$1] = $2;\n }\n });\n\n return uri;\n}\n\nfunction addParamsAndAccessTokenToPath(accessToken, options, params) {\n params = params || {};\n params.access_token = accessToken;\n var paramsArray = [];\n var k;\n for (k in params) {\n if (Object.prototype.hasOwnProperty.call(params, k)) {\n paramsArray.push([k, params[k]].join('='));\n }\n }\n var query = '?' + paramsArray.sort().join('&');\n\n options = options || {};\n options.path = options.path || '';\n var qs = options.path.indexOf('?');\n var h = options.path.indexOf('#');\n var p;\n if (qs !== -1 && (h === -1 || h > qs)) {\n p = options.path;\n options.path = p.substring(0,qs) + query + '&' + p.substring(qs+1);\n } else {\n if (h !== -1) {\n p = options.path;\n options.path = p.substring(0,h) + query + p.substring(h);\n } else {\n options.path = options.path + query;\n }\n }\n}\n\nfunction formatUrl(u, protocol) {\n protocol = protocol || u.protocol;\n if (!protocol && u.port) {\n if (u.port === 80) {\n protocol = 'http:';\n } else if (u.port === 443) {\n protocol = 'https:';\n }\n }\n protocol = protocol || 'https:';\n\n if (!u.hostname) {\n return null;\n }\n var result = protocol + '//' + u.hostname;\n if (u.port) {\n result = result + ':' + u.port;\n }\n if (u.path) {\n result = result + u.path;\n }\n return result;\n}\n\nfunction stringify(obj, backup) {\n var value, error;\n try {\n value = RollbarJSON.stringify(obj);\n } catch (jsonError) {\n if (backup && isFunction(backup)) {\n try {\n value = backup(obj);\n } catch (backupError) {\n error = backupError;\n }\n } else {\n error = jsonError;\n }\n }\n return {error: error, value: value};\n}\n\nfunction maxByteSize(string) {\n // The transport will use utf-8, so assume utf-8 encoding.\n //\n // This minimal implementation will accurately count bytes for all UCS-2 and\n // single code point UTF-16. If presented with multi code point UTF-16,\n // which should be rare, it will safely overcount, not undercount.\n //\n // While robust utf-8 encoders exist, this is far smaller and far more performant.\n // For quickly counting payload size for truncation, smaller is better.\n\n var count = 0;\n var length = string.length;\n\n for (var i = 0; i < length; i++) {\n var code = string.charCodeAt(i);\n if (code < 128) { // up to 7 bits\n count = count + 1;\n } else if (code < 2048) { // up to 11 bits\n count = count + 2;\n } else if (code < 65536) { // up to 16 bits\n count = count + 3;\n }\n }\n\n return count;\n}\n\nfunction jsonParse(s) {\n var value, error;\n try {\n value = RollbarJSON.parse(s);\n } catch (e) {\n error = e;\n }\n return {error: error, value: value};\n}\n\nfunction makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n mode,\n backupMessage,\n errorParser\n) {\n var location = {\n url: url || '',\n line: lineno,\n column: colno\n };\n location.func = errorParser.guessFunctionName(location.url, location.line);\n location.context = errorParser.gatherContext(location.url, location.line);\n var href = typeof document !== 'undefined' && document && document.location && document.location.href;\n var useragent = typeof window !== 'undefined' && window && window.navigator && window.navigator.userAgent;\n return {\n 'mode': mode,\n 'message': error ? String(error) : (message || backupMessage),\n 'url': href,\n 'stack': [location],\n 'useragent': useragent\n };\n}\n\nfunction wrapCallback(logger, f) {\n return function(err, resp) {\n try {\n f(err, resp);\n } catch (e) {\n logger.error(e);\n }\n };\n}\n\nfunction createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\n var diagnostic = {};\n var argTypes = [];\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n argTypes.push(typ);\n switch (typ) {\n case 'undefined':\n break;\n case 'string':\n message ? extraArgs.push(arg) : message = arg;\n break;\n case 'function':\n callback = wrapCallback(logger, arg);\n break;\n case 'date':\n extraArgs.push(arg);\n break;\n case 'error':\n case 'domexception':\n case 'exception': // Firefox Exception type\n err ? extraArgs.push(arg) : err = arg;\n break;\n case 'object':\n case 'array':\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n if (requestKeys && typ === 'object' && !request) {\n for (var j = 0, len = requestKeys.length; j < len; ++j) {\n if (arg[requestKeys[j]] !== undefined) {\n request = arg;\n break;\n }\n }\n if (request) {\n break;\n }\n }\n custom ? extraArgs.push(arg) : custom = arg;\n break;\n default:\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n extraArgs.push(arg);\n }\n }\n\n if (extraArgs.length > 0) {\n // if custom is an array this turns it into an object with integer keys\n custom = merge(custom);\n custom.extraArgs = extraArgs;\n }\n\n var item = {\n message: message,\n err: err,\n custom: custom,\n timestamp: now(),\n callback: callback,\n notifier: notifier,\n diagnostic: diagnostic,\n uuid: uuid4()\n };\n\n setCustomItemKeys(item, custom);\n\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n item.diagnostic.original_arg_types = argTypes;\n return item;\n}\n\nfunction setCustomItemKeys(item, custom) {\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (custom && custom.skipFrames !== undefined) {\n item.skipFrames = custom.skipFrames;\n delete custom.skipFrames;\n }\n}\n\nfunction addErrorContext(item, errors) {\n var custom = item.data.custom || {};\n var contextAdded = false;\n\n try {\n for (var i = 0; i < errors.length; ++i) {\n if (errors[i].hasOwnProperty('rollbarContext')) {\n custom = merge(custom, errors[i].rollbarContext);\n contextAdded = true;\n }\n }\n\n // Avoid adding an empty object to the data.\n if (contextAdded) {\n item.data.custom = custom;\n }\n } catch (e) {\n item.diagnostic.error_context = 'Failed: ' + e.message;\n }\n}\n\nvar TELEMETRY_TYPES = ['log', 'network', 'dom', 'navigation', 'error', 'manual'];\nvar TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];\n\nfunction arrayIncludes(arr, val) {\n for (var k = 0; k < arr.length; ++k) {\n if (arr[k] === val) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction createTelemetryEvent(args) {\n var type, metadata, level;\n var arg;\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n switch (typ) {\n case 'string':\n if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {\n type = arg;\n } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {\n level = arg;\n }\n break;\n case 'object':\n metadata = arg;\n break;\n default:\n break;\n }\n }\n var event = {\n type: type || 'manual',\n metadata: metadata || {},\n level: level\n };\n\n return event;\n}\n\n/*\n * get - given an obj/array and a keypath, return the value at that keypath or\n * undefined if not possible.\n *\n * @param obj - an object or array\n * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'\n * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`\n */\nfunction get(obj, path) {\n if (!obj) {\n return undefined;\n }\n var keys = path.split('.');\n var result = obj;\n try {\n for (var i = 0, len = keys.length; i < len; ++i) {\n result = result[keys[i]];\n }\n } catch (e) {\n result = undefined;\n }\n return result;\n}\n\nfunction set(obj, path, value) {\n if (!obj) {\n return;\n }\n var keys = path.split('.');\n var len = keys.length;\n if (len < 1) {\n return;\n }\n if (len === 1) {\n obj[keys[0]] = value;\n return;\n }\n try {\n var temp = obj[keys[0]] || {};\n var replacement = temp;\n for (var i = 1; i < len - 1; ++i) {\n temp[keys[i]] = temp[keys[i]] || {};\n temp = temp[keys[i]];\n }\n temp[keys[len-1]] = value;\n obj[keys[0]] = replacement;\n } catch (e) {\n return;\n }\n}\n\nfunction formatArgsAsString(args) {\n var i, len, arg;\n var result = [];\n for (i = 0, len = args.length; i < len; ++i) {\n arg = args[i];\n switch (typeName(arg)) {\n case 'object':\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500) {\n arg = arg.substr(0, 497) + '...';\n }\n break;\n case 'null':\n arg = 'null';\n break;\n case 'undefined':\n arg = 'undefined';\n break;\n case 'symbol':\n arg = arg.toString();\n break;\n }\n result.push(arg);\n }\n return result.join(' ');\n}\n\nfunction now() {\n if (Date.now) {\n return +Date.now();\n }\n return +new Date();\n}\n\nfunction filterIp(requestData, captureIp) {\n if (!requestData || !requestData['user_ip'] || captureIp === true) {\n return;\n }\n var newIp = requestData['user_ip'];\n if (!captureIp) {\n newIp = null;\n } else {\n try {\n var parts;\n if (newIp.indexOf('.') !== -1) {\n parts = newIp.split('.');\n parts.pop();\n parts.push('0');\n newIp = parts.join('.');\n } else if (newIp.indexOf(':') !== -1) {\n parts = newIp.split(':');\n if (parts.length > 2) {\n var beginning = parts.slice(0, 3);\n var slashIdx = beginning[2].indexOf('/');\n if (slashIdx !== -1) {\n beginning[2] = beginning[2].substring(0, slashIdx);\n }\n var terminal = '0000:0000:0000:0000:0000';\n newIp = beginning.concat(terminal).join(':');\n }\n } else {\n newIp = null;\n }\n } catch (e) {\n newIp = null;\n }\n }\n requestData['user_ip'] = newIp;\n}\n\nfunction handleOptions(current, input, payload, logger) {\n var result = merge(current, input, payload);\n result = updateDeprecatedOptions(result, logger);\n if (!input || input.overwriteScrubFields) {\n return result;\n }\n if (input.scrubFields) {\n result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);\n }\n return result;\n}\n\nfunction updateDeprecatedOptions(options, logger) {\n if(options.hostWhiteList && !options.hostSafeList) {\n options.hostSafeList = options.hostWhiteList;\n options.hostWhiteList = undefined;\n logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');\n }\n if(options.hostBlackList && !options.hostBlockList) {\n options.hostBlockList = options.hostBlackList;\n options.hostBlackList = undefined;\n logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');\n }\n return options;\n}\n\nmodule.exports = {\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n createItem: createItem,\n addErrorContext: addErrorContext,\n createTelemetryEvent: createTelemetryEvent,\n filterIp: filterIp,\n formatArgsAsString: formatArgsAsString,\n formatUrl: formatUrl,\n get: get,\n handleOptions: handleOptions,\n isError: isError,\n isFiniteNumber: isFiniteNumber,\n isFunction: isFunction,\n isIterable: isIterable,\n isNativeFunction: isNativeFunction,\n isObject: isObject,\n isString: isString,\n isType: isType,\n isPromise: isPromise,\n jsonParse: jsonParse,\n LEVELS: LEVELS,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n merge: merge,\n now: now,\n redact: redact,\n RollbarJSON: RollbarJSON,\n sanitizeUrl: sanitizeUrl,\n set: set,\n setupJSON: setupJSON,\n stringify: stringify,\n maxByteSize: maxByteSize,\n typeName: typeName,\n uuid4: uuid4\n};\n","'use strict';\n\n/* eslint-disable no-console */\nrequire('console-polyfill');\nvar detection = require('./detection');\nvar _ = require('../utility');\n\nfunction error() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.error(_.formatArgsAsString(args));\n } else {\n console.error.apply(console, args);\n }\n}\n\nfunction info() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.info(_.formatArgsAsString(args));\n } else {\n console.info.apply(console, args);\n }\n}\n\nfunction log() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.log(_.formatArgsAsString(args));\n } else {\n console.log.apply(console, args);\n }\n}\n\n/* eslint-enable no-console */\n\nmodule.exports = {\n error: error,\n info: info,\n log: log\n};\n","'use strict';\n\n// See https://nodejs.org/docs/latest/api/url.html\nfunction parse(url) {\n var result = {\n protocol: null, auth: null, host: null, path: null,\n hash: null, href: url, hostname: null, port: null,\n pathname: null, search: null, query: null\n };\n\n var i, last;\n i = url.indexOf('//');\n if (i !== -1) {\n result.protocol = url.substring(0,i);\n last = i+2;\n } else {\n last = 0;\n }\n \n i = url.indexOf('@', last);\n if (i !== -1) {\n result.auth = url.substring(last, i);\n last = i+1;\n }\n\n i = url.indexOf('/', last);\n if (i === -1) {\n i = url.indexOf('?', last);\n if (i === -1) {\n i = url.indexOf('#', last);\n if (i === -1) {\n result.host = url.substring(last);\n } else {\n result.host = url.substring(last, i);\n result.hash = url.substring(i);\n }\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n return result;\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n\n i = url.indexOf('#', last);\n if (i === -1) {\n result.path = url.substring(last);\n } else {\n result.path = url.substring(last, i);\n result.hash = url.substring(i);\n }\n\n if (result.path) {\n var pathParts = result.path.split('?');\n result.pathname = pathParts[0];\n result.query = pathParts[1];\n result.search = result.query ? '?' + result.query : null;\n }\n return result;\n}\n\nmodule.exports = {\n parse: parse\n};\n","'use strict';\n\nvar ErrorStackParser = require('error-stack-parser');\n\nvar UNKNOWN_FUNCTION = '?';\nvar ERR_CLASS_REGEXP = new RegExp('^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ');\n\nfunction guessFunctionName() {\n return UNKNOWN_FUNCTION;\n}\n\n\nfunction gatherContext() {\n return null;\n}\n\n\nfunction Frame(stackFrame) {\n var data = {};\n\n data._stackFrame = stackFrame;\n\n data.url = stackFrame.fileName;\n data.line = stackFrame.lineNumber;\n data.func = stackFrame.functionName;\n data.column = stackFrame.columnNumber;\n data.args = stackFrame.args;\n\n data.context = gatherContext();\n\n return data;\n}\n\n\nfunction Stack(exception, skip) {\n function getStack() {\n var parserStack = [];\n\n skip = skip || 0;\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch(e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = skip; i < parserStack.length; i++) {\n stack.push(new Frame(parserStack[i]));\n }\n\n return stack;\n }\n\n return {\n stack: getStack(),\n message: exception.message,\n name: _mostSpecificErrorName(exception),\n rawStack: exception.stack,\n rawException: exception\n };\n}\n\n\nfunction parse(e, skip) {\n var err = e;\n\n if (err.nested) {\n var traceChain = [];\n while (err) {\n traceChain.push(new Stack(err, skip));\n err = err.nested;\n\n skip = 0; // Only apply skip value to primary error\n }\n\n // Return primary error with full trace chain attached.\n traceChain[0].traceChain = traceChain;\n return traceChain[0];\n } else {\n return new Stack(err, skip);\n }\n}\n\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg || !errMsg.match) {\n return ['Unknown error. There was no error message to display.', ''];\n }\n var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);\n var errClass = '(unknown)';\n\n if (errClassMatch) {\n errClass = errClassMatch[errClassMatch.length - 1];\n errMsg = errMsg.replace((errClassMatch[errClassMatch.length - 2] || '') + errClass + ':', '');\n errMsg = errMsg.replace(/(^[\\s]+|[\\s]+$)/g, '');\n }\n return [errClass, errMsg];\n}\n\n// * Prefers any value over an empty string\n// * Prefers any value over 'Error' where possible\n// * Prefers name over constructor.name when both are more specific than 'Error'\nfunction _mostSpecificErrorName(error) {\n var name = error.name && error.name.length && error.name;\n var constructorName = error.constructor.name && error.constructor.name.length && error.constructor.name;\n\n if (!name || !constructorName) {\n return name || constructorName;\n }\n\n if (name === 'Error') {\n return constructorName;\n }\n return name;\n}\n\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame\n};\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction scrub(data, scrubFields, scrubPaths) {\n scrubFields = scrubFields || [];\n\n if (scrubPaths) {\n for (var i = 0; i < scrubPaths.length; ++i) {\n scrubPath(data, scrubPaths[i]);\n }\n }\n\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart) {\n return paramPart + _.redact();\n }\n\n function paramScrubber(v) {\n var i;\n if (_.isType(v, 'string')) {\n for (i = 0; i < queryRes.length; ++i) {\n v = v.replace(queryRes[i], redactQueryParam);\n }\n }\n return v;\n }\n\n function valScrubber(k, v) {\n var i;\n for (i = 0; i < paramRes.length; ++i) {\n if (paramRes[i].test(k)) {\n v = _.redact();\n break;\n }\n }\n return v;\n }\n\n function scrubber(k, v, seen) {\n var tmpV = valScrubber(k, v);\n if (tmpV === v) {\n if (_.isType(v, 'object') || _.isType(v, 'array')) {\n return traverse(v, scrubber, seen);\n }\n return paramScrubber(tmpV);\n } else {\n return tmpV;\n }\n }\n\n return traverse(data, scrubber);\n}\n\nfunction scrubPath(obj, path) {\n var keys = path.split('.');\n var last = keys.length - 1;\n try {\n for (var i = 0; i <= last; ++i) {\n if (i < last) {\n obj = obj[keys[i]];\n } else {\n obj[keys[i]] = _.redact();\n }\n }\n } catch (e) {\n // Missing key is OK;\n }\n}\n\nfunction _getScrubFieldRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '^\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?$';\n ret.push(new RegExp(pat, 'i'));\n }\n return ret;\n}\n\n\nfunction _getScrubQueryParamRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?';\n ret.push(new RegExp('(' + pat + '=)([^&\\\\n]+)', 'igm'));\n }\n return ret;\n}\n\nmodule.exports = scrub;\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction traverse(obj, func, seen) {\n var k, v, i;\n var isObj = _.isType(obj, 'object');\n var isArray = _.isType(obj, 'array');\n var keys = [];\n var seenIndex;\n\n // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.\n seen = seen || { obj: [], mapped: []};\n\n if (isObj) {\n seenIndex = seen.obj.indexOf(obj);\n\n if (isObj && seenIndex !== -1) {\n // Prefer the mapped object if there is one.\n return seen.mapped[seenIndex] || seen.obj[seenIndex];\n }\n\n seen.obj.push(obj);\n seenIndex = seen.obj.length - 1;\n }\n\n if (isObj) {\n for (k in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, k)) {\n keys.push(k);\n }\n }\n } else if (isArray) {\n for (i = 0; i < obj.length; ++i) {\n keys.push(i);\n }\n }\n\n var result = isObj ? {} : [];\n var same = true;\n for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n result[k] = func(k, v, seen);\n same = same && result[k] === obj[k];\n }\n\n if (isObj && !same) {\n seen.mapped[seenIndex] = result;\n }\n\n return !same ? result : obj;\n}\n\nmodule.exports = traverse;\n","'use strict';\n\nvar rollbar = require('../rollbar');\n\nif ((typeof window !== 'undefined') && !window._rollbarStartTime) {\n window._rollbarStartTime = (new Date()).getTime();\n}\n\nmodule.exports = rollbar;\n","'use strict';\n\nvar Rollbar = require('./core');\nvar telemeter = require('../telemetry');\nvar instrumenter = require('./telemetry');\nvar polyfillJSON = require('../utility/polyfillJSON');\nvar wrapGlobals = require('./wrapGlobals');\nvar scrub = require('../scrub');\nvar truncation = require('../truncation');\n\nRollbar.setComponents({\n telemeter: telemeter,\n instrumenter: instrumenter,\n polyfillJSON: polyfillJSON,\n wrapGlobals: wrapGlobals,\n scrub: scrub,\n truncation: truncation\n});\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar Client = require('../rollbar');\nvar _ = require('../utility');\nvar API = require('../api');\nvar logger = require('./logger');\nvar globals = require('./globalSetup');\n\nvar Transport = require('./transport');\nvar urllib = require('./url');\n\nvar transforms = require('./transforms');\nvar sharedTransforms = require('../transforms');\nvar predicates = require('./predicates');\nvar sharedPredicates = require('../predicates');\nvar errorParser = require('../errorParser');\n\nfunction Rollbar(options, client) {\n this.options = _.handleOptions(defaultOptions, options, null, logger);\n this.options._configuredOptions = options;\n var Telemeter = this.components.telemeter;\n var Instrumenter = this.components.instrumenter;\n var polyfillJSON = this.components.polyfillJSON;\n this.wrapGlobals = this.components.wrapGlobals;\n this.scrub = this.components.scrub;\n var truncation = this.components.truncation;\n\n var transport = new Transport(truncation);\n var api = new API(this.options, transport, urllib, truncation);\n if (Telemeter) {\n this.telemeter = new Telemeter(this.options);\n }\n this.client = client || new Client(this.options, api, logger, this.telemeter, 'browser');\n var gWindow = _gWindow();\n var gDocument = (typeof document != 'undefined') && document;\n this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers\n this.anonymousErrorsPending = 0;\n addTransformsToNotifier(this.client.notifier, this, gWindow);\n addPredicatesToQueue(this.client.queue);\n this.setupUnhandledCapture();\n if (Instrumenter) {\n this.instrumenter = new Instrumenter(this.options, this.client.telemeter, this, gWindow, gDocument);\n this.instrumenter.instrument();\n }\n _.setupJSON(polyfillJSON);\n}\n\nvar _instance = null;\nRollbar.init = function(options, client) {\n if (_instance) {\n return _instance.global(options).configure(options);\n }\n _instance = new Rollbar(options, client);\n return _instance;\n};\n\nRollbar.prototype.components = {};\n\nRollbar.setComponents = function(components) {\n Rollbar.prototype.components = components;\n}\n\nfunction handleUninitialized(maybeCallback) {\n var message = 'Rollbar is not initialized';\n logger.error(message);\n if (maybeCallback) {\n maybeCallback(new Error(message));\n }\n}\n\nRollbar.prototype.global = function(options) {\n this.client.global(options);\n return this;\n};\nRollbar.global = function(options) {\n if (_instance) {\n return _instance.global(options);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.configure = function(options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = {payload: payloadData};\n }\n this.options = _.handleOptions(oldOptions, options, payload, logger);\n this.options._configuredOptions = _.handleOptions(oldOptions._configuredOptions, options, payload);\n this.client.configure(this.options, payloadData);\n this.instrumenter && this.instrumenter.configure(this.options);\n this.setupUnhandledCapture();\n return this;\n};\nRollbar.configure = function(options, payloadData) {\n if (_instance) {\n return _instance.configure(options, payloadData);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.lastError = function() {\n return this.client.lastError;\n};\nRollbar.lastError = function() {\n if (_instance) {\n return _instance.lastError();\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.log = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.log(item);\n return {uuid: uuid};\n};\nRollbar.log = function() {\n if (_instance) {\n return _instance.log.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.debug = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.debug(item);\n return {uuid: uuid};\n};\nRollbar.debug = function() {\n if (_instance) {\n return _instance.debug.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.info = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.info(item);\n return {uuid: uuid};\n};\nRollbar.info = function() {\n if (_instance) {\n return _instance.info.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warn = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warn(item);\n return {uuid: uuid};\n};\nRollbar.warn = function() {\n if (_instance) {\n return _instance.warn.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warning = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warning(item);\n return {uuid: uuid};\n};\nRollbar.warning = function() {\n if (_instance) {\n return _instance.warning.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.error = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.error(item);\n return {uuid: uuid};\n};\nRollbar.error = function() {\n if (_instance) {\n return _instance.error.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.critical = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.critical(item);\n return {uuid: uuid};\n};\nRollbar.critical = function() {\n if (_instance) {\n return _instance.critical.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.buildJsonPayload = function(item) {\n return this.client.buildJsonPayload(item);\n};\nRollbar.buildJsonPayload = function() {\n if (_instance) {\n return _instance.buildJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.sendJsonPayload = function(jsonPayload) {\n return this.client.sendJsonPayload(jsonPayload);\n};\nRollbar.sendJsonPayload = function() {\n if (_instance) {\n return _instance.sendJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.setupUnhandledCapture = function() {\n var gWindow = _gWindow();\n\n if (!this.unhandledExceptionsInitialized) {\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(gWindow, this);\n if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {\n this.wrapGlobals(gWindow, this);\n }\n this.unhandledExceptionsInitialized = true;\n }\n }\n if (!this.unhandledRejectionsInitialized) {\n if (this.options.captureUnhandledRejections || this.options.handleUnhandledRejections) {\n globals.captureUnhandledRejections(gWindow, this);\n this.unhandledRejectionsInitialized = true;\n }\n }\n};\n\nRollbar.prototype.handleUncaughtException = function(message, url, lineno, colno, error, context) {\n if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {\n return;\n }\n\n // Chrome will always send 5+ arguments and error will be valid or null, not undefined.\n // If error is undefined, we have a different caller.\n // Chrome also sends errors from web workers with null error, but does not invoke\n // prepareStackTrace() for these. Test for empty url to skip them.\n if (this.options.inspectAnonymousErrors && this.isChrome && error === null && url === '') {\n return 'anonymous';\n }\n\n var item;\n var stackInfo = _.makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n 'onerror',\n 'uncaught exception',\n errorParser\n );\n if (_.isError(error)) {\n item = this._createItem([message, error, context]);\n item._unhandledStackInfo = stackInfo;\n } else if (_.isError(url)) {\n item = this._createItem([message, url, context]);\n item._unhandledStackInfo = stackInfo;\n } else {\n item = this._createItem([message, context]);\n item.stackInfo = stackInfo;\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n this.client.log(item);\n};\n\n/**\n * Chrome only. Other browsers will ignore.\n *\n * Use Error.prepareStackTrace to extract information about errors that\n * do not have a valid error object in onerror().\n *\n * In tested version of Chrome, onerror is called first but has no way\n * to communicate with prepareStackTrace. Use a counter to let this\n * handler know which errors to send to Rollbar.\n *\n * In config options, set inspectAnonymousErrors to enable.\n */\nRollbar.prototype.handleAnonymousErrors = function() {\n if (!this.options.inspectAnonymousErrors || !this.isChrome) {\n return;\n }\n\n var r = this;\n function prepareStackTrace(error, _stack) { // eslint-disable-line no-unused-vars\n if (r.options.inspectAnonymousErrors) {\n if (r.anonymousErrorsPending) {\n // This is the only known way to detect that onerror saw an anonymous error.\n // It depends on onerror reliably being called before Error.prepareStackTrace,\n // which so far holds true on tested versions of Chrome. If versions of Chrome\n // are tested that behave differently, this logic will need to be updated\n // accordingly.\n r.anonymousErrorsPending -= 1;\n\n if (!error) {\n // Not likely to get here, but calling handleUncaughtException from here\n // without an error object would throw off the anonymousErrorsPending counter,\n // so return now.\n return;\n }\n\n // Allow this to be tracked later.\n error._isAnonymous = true;\n\n // url, lineno, colno shouldn't be needed for these errors.\n // If that changes, update this accordingly, using the unused\n // _stack param as needed (rather than parse error.toString()).\n r.handleUncaughtException(error.message, null, null, null, error);\n }\n }\n\n // Workaround to ensure stack is preserved for normal errors.\n return error.stack;\n }\n\n // https://v8.dev/docs/stack-trace-api\n try {\n Error.prepareStackTrace = prepareStackTrace;\n } catch (e) {\n this.options.inspectAnonymousErrors = false;\n this.error('anonymous error handler failed', e);\n }\n}\n\nRollbar.prototype.handleUnhandledRejection = function(reason, promise) {\n if (!this.options.captureUnhandledRejections && !this.options.handleUnhandledRejections) {\n return;\n }\n\n var message = 'unhandled rejection was null or undefined!';\n if (reason) {\n if (reason.message) {\n message = reason.message;\n } else {\n var reasonResult = _.stringify(reason);\n if (reasonResult.value) {\n message = reasonResult.value;\n }\n }\n }\n var context = (reason && reason._rollbarContext) || (promise && promise._rollbarContext);\n\n var item;\n if (_.isError(reason)) {\n item = this._createItem([message, reason, context]);\n } else {\n item = this._createItem([message, reason, context]);\n item.stackInfo = _.makeUnhandledStackInfo(\n message,\n '',\n 0,\n 0,\n null,\n 'unhandledrejection',\n '',\n errorParser\n );\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n item._originalArgs = item._originalArgs || [];\n item._originalArgs.push(promise);\n this.client.log(item);\n};\n\nRollbar.prototype.wrap = function(f, context, _before) {\n try {\n var ctxFn;\n if(_.isFunction(context)) {\n ctxFn = context;\n } else {\n ctxFn = function() { return context || {}; };\n }\n\n if (!_.isFunction(f)) {\n return f;\n }\n\n if (f._isWrap) {\n return f;\n }\n\n if (!f._rollbar_wrapped) {\n f._rollbar_wrapped = function () {\n if (_before && _.isFunction(_before)) {\n _before.apply(this, arguments);\n }\n try {\n return f.apply(this, arguments);\n } catch(exc) {\n var e = exc;\n if (e && window._rollbarWrappedError !== e) {\n if (_.isType(e, 'string')) {\n e = new String(e);\n }\n e._rollbarContext = ctxFn() || {};\n e._rollbarContext._wrappedSource = f.toString();\n\n window._rollbarWrappedError = e;\n }\n throw e;\n }\n };\n\n f._rollbar_wrapped._isWrap = true;\n\n if (f.hasOwnProperty) {\n for (var prop in f) {\n if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {\n f._rollbar_wrapped[prop] = f[prop];\n }\n }\n }\n }\n\n return f._rollbar_wrapped;\n } catch (e) {\n // Return the original function if the wrap fails.\n return f;\n }\n};\nRollbar.wrap = function(f, context) {\n if (_instance) {\n return _instance.wrap(f, context);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.captureEvent = function() {\n var event = _.createTelemetryEvent(arguments);\n return this.client.captureEvent(event.type, event.metadata, event.level);\n};\nRollbar.captureEvent = function() {\n if (_instance) {\n return _instance.captureEvent.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\n// The following two methods are used internally and are not meant for public use\nRollbar.prototype.captureDomContentLoaded = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureLoad(ts);\n};\n\n/* Internal */\n\nfunction addTransformsToNotifier(notifier, rollbar, gWindow) {\n notifier\n .addTransform(transforms.handleDomException)\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(gWindow))\n .addTransform(transforms.addClientInfo(gWindow))\n .addTransform(transforms.addPluginInfo(gWindow))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(sharedTransforms.addConfigToPayload)\n .addTransform(transforms.addScrubber(rollbar.scrub))\n .addTransform(sharedTransforms.userTransform(logger))\n .addTransform(sharedTransforms.addConfiguredOptions)\n .addTransform(sharedTransforms.addDiagnosticKeys)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(sharedPredicates.checkLevel)\n .addPredicate(predicates.checkIgnore)\n .addPredicate(sharedPredicates.userCheckIgnore(logger))\n .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))\n .addPredicate(sharedPredicates.urlIsSafeListed(logger))\n .addPredicate(sharedPredicates.messageIsIgnored(logger));\n}\n\nRollbar.prototype.loadFull = function() {\n logger.info('Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.');\n};\n\nRollbar.prototype._createItem = function(args) {\n return _.createItem(args, logger, this);\n};\n\nfunction _getFirstFunction(args) {\n for (var i = 0, len = args.length; i < len; ++i) {\n if (_.isFunction(args[i])) {\n return args[i];\n }\n }\n return undefined;\n}\n\nfunction _gWindow() {\n return ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n}\n\nvar defaults = require('../defaults');\nvar scrubFields = require('./defaults/scrubFields');\n\nvar defaultOptions = {\n version: defaults.version,\n scrubFields: scrubFields.scrubFields,\n logLevel: defaults.logLevel,\n reportLevel: defaults.reportLevel,\n uncaughtErrorLevel: defaults.uncaughtErrorLevel,\n endpoint: defaults.endpoint,\n verbose: false,\n enabled: true,\n transmit: true,\n sendConfig: false,\n includeItemsInTelemetry: true,\n captureIp: true,\n inspectAnonymousErrors: true,\n ignoreDuplicateErrors: true,\n wrapGlobalEventHandlers: false\n};\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar _ = require('./utility');\n\n/*\n * Rollbar - the interface to Rollbar\n *\n * @param options\n * @param api\n * @param logger\n */\nfunction Rollbar(options, api, logger, telemeter, platform) {\n this.options = _.merge(options);\n this.logger = logger;\n Rollbar.rateLimiter.configureGlobal(this.options);\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.api = api;\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n\n // This must happen before the Notifier is created\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = telemeter;\n setStackTraceLimit(options);\n this.lastError = null;\n this.lastErrorHash = 'none';\n}\n\nvar defaultOptions = {\n maxItems: 0,\n itemsPerMinute: 60\n};\n\nRollbar.rateLimiter = new RateLimiter(defaultOptions);\n\nRollbar.prototype.global = function (options) {\n Rollbar.rateLimiter.configureGlobal(options);\n return this;\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n\n this.options = _.merge(oldOptions, options, payload);\n\n // This must happen before the Notifier is configured\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier && this.notifier.configure(this.options);\n this.telemeter && this.telemeter.configure(this.options);\n setStackTraceLimit(options);\n this.global(this.options);\n\n if (validateTracer(options.tracer)) {\n this.tracer = options.tracer\n }\n\n return this;\n};\n\nRollbar.prototype.log = function (item) {\n var level = this._defaultLogLevel();\n return this._log(level, item);\n};\n\nRollbar.prototype.debug = function (item) {\n this._log('debug', item);\n};\n\nRollbar.prototype.info = function (item) {\n this._log('info', item);\n};\n\nRollbar.prototype.warn = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.warning = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.error = function (item) {\n this._log('error', item);\n};\n\nRollbar.prototype.critical = function (item) {\n this._log('critical', item);\n};\n\nRollbar.prototype.wait = function (callback) {\n this.queue.wait(callback);\n};\n\nRollbar.prototype.captureEvent = function (type, metadata, level) {\n return this.telemeter && this.telemeter.captureEvent(type, metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function (ts) {\n return this.telemeter && this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (ts) {\n return this.telemeter && this.telemeter.captureLoad(ts);\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.api.buildJsonPayload(item);\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n this.api.postJsonPayload(jsonPayload);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function (defaultLevel, item) {\n var callback;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {\n if (callback) {\n var error = new Error('ignored identical item');\n error.item = item;\n callback(error);\n }\n return;\n }\n try {\n this._addTracingInfo(item);\n item.level = item.level || defaultLevel;\n this.telemeter && this.telemeter._captureRollbarItem(item);\n item.telemetryEvents = (this.telemeter && this.telemeter.copyEvents()) || [];\n this.notifier.log(item, callback);\n } catch (e) {\n if (callback) {\n callback(e);\n }\n this.logger.error(e);\n }\n};\n\nRollbar.prototype._defaultLogLevel = function () {\n return this.options.logLevel || 'debug';\n};\n\nRollbar.prototype._sameAsLastError = function (item) {\n if (!item._isUncaught) {\n return false;\n }\n var itemHash = generateItemHash(item);\n if (this.lastErrorHash === itemHash) {\n return true;\n }\n this.lastError = item.err;\n this.lastErrorHash = itemHash;\n return false;\n};\n\nRollbar.prototype._addTracingInfo = function (item) {\n // Tracer validation occurs in the constructor\n // or in the Rollbar.prototype.configure methods\n if (this.tracer) {\n // add rollbar occurrence uuid to span\n var span = this.tracer.scope().active();\n\n if (validateSpan(span)) {\n span.setTag('rollbar.error_uuid', item.uuid);\n span.setTag('rollbar.has_error', true);\n span.setTag('error', true);\n span.setTag('rollbar.item_url', `https://rollbar.com/item/uuid/?uuid=${item.uuid}`);\n span.setTag('rollbar.occurrence_url', `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`);\n\n // add span ID & trace ID to occurrence\n var opentracingSpanId = span.context().toSpanId();\n var opentracingTraceId = span.context().toTraceId();\n\n if (item.custom) {\n item.custom.opentracing_span_id = opentracingSpanId;\n item.custom.opentracing_trace_id = opentracingTraceId;\n } else {\n item.custom = {\n opentracing_span_id: opentracingSpanId,\n opentracing_trace_id: opentracingTraceId\n };\n }\n }\n }\n}\n\nfunction generateItemHash(item) {\n var message = item.message || '';\n var stack = (item.err || {}).stack || String(item.err);\n return message + '::' + stack;\n}\n\n// Node.js, Chrome, Safari, and some other browsers support this property\n// which globally sets the number of stack frames returned in an Error object.\n// If a browser can't use it, no harm done.\nfunction setStackTraceLimit(options) {\n if (options.stackTraceLimit) {\n Error.stackTraceLimit = options.stackTraceLimit;\n }\n}\n\n/**\n * Validate the Tracer object provided to the Client\n * is valid for our Opentracing use case.\n * @param {opentracer.Tracer} tracer\n */\nfunction validateTracer(tracer) {\n if (!tracer) {\n return false;\n }\n\n if (!tracer.scope || typeof tracer.scope !== 'function') {\n return false;\n }\n\n var scope = tracer.scope();\n\n if (!scope || !scope.active || typeof scope.active !== 'function') {\n return false;\n }\n\n return true;\n}\n\n/**\n * Validate the Span object provided\n * @param {opentracer.Span} span\n */\nfunction validateSpan(span) {\n if (!span || !span.context || typeof span.context !== 'function') {\n return false;\n }\n\n var spanContext = span.context();\n\n if (!spanContext\n || !spanContext.toSpanId\n || !spanContext.toTraceId\n || typeof spanContext.toSpanId !== 'function'\n || typeof spanContext.toTraceId !== 'function') {\n return false\n }\n\n return true;\n}\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar\n *\n * @param options - the same options that are accepted by configureGlobal offered as a convenience\n */\nfunction RateLimiter(options) {\n this.startTime = _.now();\n this.counter = 0;\n this.perMinCounter = 0;\n this.platform = null;\n this.platformOptions = {};\n this.configureGlobal(options);\n}\n\nRateLimiter.globalSettings = {\n startTime: _.now(),\n maxItems: undefined,\n itemsPerMinute: undefined\n};\n\n/*\n * configureGlobal - set the global rate limiter options\n *\n * @param options - Only the following values are recognized:\n * startTime: a timestamp of the form returned by (new Date()).getTime()\n * maxItems: the maximum items\n * itemsPerMinute: the max number of items to send in a given minute\n */\nRateLimiter.prototype.configureGlobal = function(options) {\n if (options.startTime !== undefined) {\n RateLimiter.globalSettings.startTime = options.startTime;\n }\n if (options.maxItems !== undefined) {\n RateLimiter.globalSettings.maxItems = options.maxItems;\n }\n if (options.itemsPerMinute !== undefined) {\n RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;\n }\n};\n\n/*\n * shouldSend - determine if we should send a given item based on rate limit settings\n *\n * @param item - the item we are about to send\n * @returns An object with the following structure:\n * error: (Error|null)\n * shouldSend: bool\n * payload: (Object|null)\n * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and\n * exactly one of error or payload will be non-null. If error is non-null, the returned Error will\n * describe the situation, but it means that we were already over a rate limit (either globally or\n * per minute) when this item was checked. If error is null, and therefore payload is non-null, it\n * means this item put us over the global rate limit and the payload should be sent to Rollbar in\n * place of the passed in item.\n */\nRateLimiter.prototype.shouldSend = function(item, now) {\n now = now || _.now();\n var elapsedTime = now - this.startTime;\n if (elapsedTime < 0 || elapsedTime >= 60000) {\n this.startTime = now;\n this.perMinCounter = 0;\n }\n\n var globalRateLimit = RateLimiter.globalSettings.maxItems;\n var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;\n\n if (checkRate(item, globalRateLimit, this.counter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimit + ' max items reached', false);\n } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimitPerMin + ' items per minute reached', false);\n }\n this.counter++;\n this.perMinCounter++;\n\n var shouldSend = !checkRate(item, globalRateLimit, this.counter);\n var perMinute = shouldSend;\n shouldSend = shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);\n return shouldSendValue(this.platform, this.platformOptions, null, shouldSend, globalRateLimit, globalRateLimitPerMin, perMinute);\n};\n\nRateLimiter.prototype.setPlatformOptions = function(platform, options) {\n this.platform = platform;\n this.platformOptions = options;\n};\n\n/* Helpers */\n\nfunction checkRate(item, limit, counter) {\n return !item.ignoreRateLimit && limit >= 1 && counter > limit;\n}\n\nfunction shouldSendValue(platform, options, error, shouldSend, globalRateLimit, limitPerMin, perMinute) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute);\n }\n return {error: error, shouldSend: shouldSend, payload: payload};\n}\n\nfunction rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute) {\n var environment = options.environment || (options.payload && options.payload.environment);\n var msg;\n if (perMinute) {\n msg = 'item per minute limit reached, ignoring errors until timeout';\n } else {\n msg = 'maxItems has been hit, ignoring errors until reset.';\n }\n var item = {\n body: {\n message: {\n body: msg,\n extra: {\n maxItems: globalRateLimit,\n itemsPerMinute: limitPerMin\n }\n }\n },\n language: 'javascript',\n environment: environment,\n notifier: {\n version: (options.notifier && options.notifier.version) || options.version\n }\n };\n if (platform === 'browser') {\n item.platform = 'browser';\n item.framework = 'browser-js';\n item.notifier.name = 'rollbar-browser-js';\n } else if (platform === 'server') {\n item.framework = options.framework || 'node-js';\n item.notifier.name = options.notifier.name;\n } else if (platform === 'react-native') {\n item.framework = options.framework || 'react-native';\n item.notifier.name = options.notifier.name;\n }\n return item;\n}\n\nmodule.exports = RateLimiter;\n","'use strict';\n\n'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isPlainObject = function isPlainObject(obj) {\n\tif (!obj || toStr.call(obj) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tvar hasOwnConstructor = hasOwn.call(obj, 'constructor');\n\tvar hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n\t// Not own constructor property must be Object\n\tif (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n\t\treturn false;\n\t}\n\n\t// Own properties are enumerated firstly, so to speed up,\n\t// if last one is own, then all properties are own.\n\tvar key;\n\tfor (key in obj) {/**/}\n\n\treturn typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\nfunction merge() {\n var i, src, copy, clone, name,\n result = {},\n current = null,\n length = arguments.length;\n\n for (i=0; i < length; i++) {\n current = arguments[i];\n if (current == null) {\n continue;\n }\n\n for (name in current) {\n src = result[name];\n copy = current[name];\n if (result !== copy) {\n if (copy && isPlainObject(copy)) {\n clone = src && isPlainObject(src) ? src : {};\n result[name] = merge(clone, copy);\n } else if (typeof copy !== 'undefined') {\n result[name] = copy;\n }\n }\n }\n }\n return result;\n}\n\nmodule.exports = merge;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Queue - an object which handles which handles a queue of items to be sent to Rollbar.\n * This object handles rate limiting via a passed in rate limiter, retries based on connection\n * errors, and filtering of items based on a set of configurable predicates. The communication to\n * the backend is performed via a given API object.\n *\n * @param rateLimiter - An object which conforms to the interface\n * rateLimiter.shouldSend(item) -> bool\n * @param api - An object which conforms to the interface\n * api.postItem(payload, function(err, response))\n * @param logger - An object used to log verbose messages if desired\n * @param options - see Queue.prototype.configure\n */\nfunction Queue(rateLimiter, api, logger, options) {\n this.rateLimiter = rateLimiter;\n this.api = api;\n this.logger = logger;\n this.options = options;\n this.predicates = [];\n this.pendingItems = [];\n this.pendingRequests = [];\n this.retryQueue = [];\n this.retryHandle = null;\n this.waitCallback = null;\n this.waitIntervalID = null;\n}\n\n/*\n * configure - updates the options this queue uses\n *\n * @param options\n */\nQueue.prototype.configure = function(options) {\n this.api && this.api.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addPredicate - adds a predicate to the end of the list of predicates for this queue\n *\n * @param predicate - function(item, options) -> (bool|{err: Error})\n * Returning true means that this predicate passes and the item is okay to go on the queue\n * Returning false means do not add the item to the queue, but it is not an error\n * Returning {err: Error} means do not add the item to the queue, and the given error explains why\n * Returning {err: undefined} is equivalent to returning true but don't do that\n */\nQueue.prototype.addPredicate = function(predicate) {\n if (_.isFunction(predicate)) {\n this.predicates.push(predicate);\n }\n return this;\n};\n\nQueue.prototype.addPendingItem = function(item) {\n this.pendingItems.push(item);\n};\n\nQueue.prototype.removePendingItem = function(item) {\n var idx = this.pendingItems.indexOf(item);\n if (idx !== -1) {\n this.pendingItems.splice(idx, 1);\n }\n};\n\n/*\n * addItem - Send an item to the Rollbar API if all of the predicates are satisfied\n *\n * @param item - The payload to send to the backend\n * @param callback - function(error, repsonse) which will be called with the response from the API\n * in the case of a success, otherwise response will be null and error will have a value. If both\n * error and response are null then the item was stopped by a predicate which did not consider this\n * to be an error condition, but nonetheless did not send the item to the API.\n * @param originalError - The original error before any transformations that is to be logged if any\n */\nQueue.prototype.addItem = function(item, callback, originalError, originalItem) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() { return; };\n }\n var predicateResult = this._applyPredicates(item);\n if (predicateResult.stop) {\n this.removePendingItem(originalItem);\n callback(predicateResult.err);\n return;\n }\n this._maybeLog(item, originalError);\n this.removePendingItem(originalItem);\n if (!this.options.transmit) {\n callback(new Error('Transmit disabled'));\n return;\n }\n this.pendingRequests.push(item);\n try {\n this._makeApiRequest(item, function(err, resp) {\n this._dequeuePendingRequest(item);\n callback(err, resp);\n }.bind(this));\n } catch (e) {\n this._dequeuePendingRequest(item);\n callback(e);\n }\n};\n\n/*\n * wait - Stop any further errors from being added to the queue, and get called back when all items\n * currently processing have finished sending to the backend.\n *\n * @param callback - function() called when all pending items have been sent\n */\nQueue.prototype.wait = function(callback) {\n if (!_.isFunction(callback)) {\n return;\n }\n this.waitCallback = callback;\n if (this._maybeCallWait()) {\n return;\n }\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitIntervalID = setInterval(function() {\n this._maybeCallWait();\n }.bind(this), 500);\n};\n\n/* _applyPredicates - Sequentially applies the predicates that have been added to the queue to the\n * given item with the currently configured options.\n *\n * @param item - An item in the queue\n * @returns {stop: bool, err: (Error|null)} - stop being true means do not add item to the queue,\n * the error value should be passed up to a callbak if we are stopping.\n */\nQueue.prototype._applyPredicates = function(item) {\n var p = null;\n for (var i = 0, len = this.predicates.length; i < len; i++) {\n p = this.predicates[i](item, this.options);\n if (!p || p.err !== undefined) {\n return {stop: true, err: p.err};\n }\n }\n return {stop: false, err: null};\n};\n\n/*\n * _makeApiRequest - Send an item to Rollbar, callback when done, if there is an error make an\n * effort to retry if we are configured to do so.\n *\n * @param item - an item ready to send to the backend\n * @param callback - function(err, response)\n */\nQueue.prototype._makeApiRequest = function(item, callback) {\n var rateLimitResponse = this.rateLimiter.shouldSend(item);\n if (rateLimitResponse.shouldSend) {\n this.api.postItem(item, function(err, resp) {\n if (err) {\n this._maybeRetry(err, item, callback);\n } else {\n callback(err, resp);\n }\n }.bind(this));\n } else if (rateLimitResponse.error) {\n callback(rateLimitResponse.error);\n } else {\n this.api.postItem(rateLimitResponse.payload, callback);\n }\n};\n\n// These are errors basically mean there is no internet connection\nvar RETRIABLE_ERRORS = ['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED', 'EHOSTUNREACH', 'EPIPE', 'EAI_AGAIN'];\n\n/*\n * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback\n * with the error.\n *\n * @param err - an error returned by the API transport\n * @param item - the item that was trying to be sent when this error occured\n * @param callback - function(err, response)\n */\nQueue.prototype._maybeRetry = function(err, item, callback) {\n var shouldRetry = false;\n if (this.options.retryInterval) {\n for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {\n if (err.code === RETRIABLE_ERRORS[i]) {\n shouldRetry = true;\n break;\n }\n }\n if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {\n item.retries = item.retries ? item.retries + 1 : 1;\n if (item.retries > this.options.maxRetries) {\n shouldRetry = false;\n }\n }\n }\n if (shouldRetry) {\n this._retryApiRequest(item, callback);\n } else {\n callback(err);\n }\n};\n\n/*\n * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process\n * that queue based on the retryInterval in the options for this queue.\n *\n * @param item - an item that failed to send due to an error we deem retriable\n * @param callback - function(err, response)\n */\nQueue.prototype._retryApiRequest = function(item, callback) {\n this.retryQueue.push({item: item, callback: callback});\n\n if (!this.retryHandle) {\n this.retryHandle = setInterval(function() {\n while (this.retryQueue.length) {\n var retryObject = this.retryQueue.shift();\n this._makeApiRequest(retryObject.item, retryObject.callback);\n }\n }.bind(this), this.options.retryInterval);\n }\n};\n\n/*\n * _dequeuePendingRequest - Removes the item from the pending request queue, this queue is used to\n * enable to functionality of providing a callback that clients can pass to `wait` to be notified\n * when the pending request queue has been emptied. This must be called when the API finishes\n * processing this item. If a `wait` callback is configured, it is called by this function.\n *\n * @param item - the item previously added to the pending request queue\n */\nQueue.prototype._dequeuePendingRequest = function(item) {\n var idx = this.pendingRequests.indexOf(item);\n if (idx !== -1) {\n this.pendingRequests.splice(idx, 1);\n this._maybeCallWait();\n }\n};\n\nQueue.prototype._maybeLog = function(data, originalError) {\n if (this.logger && this.options.verbose) {\n var message = originalError;\n message = message || _.get(data, 'body.trace.exception.message');\n message = message || _.get(data, 'body.trace_chain.0.exception.message');\n if (message) {\n this.logger.error(message);\n return;\n }\n message = _.get(data, 'body.message.body');\n if (message) {\n this.logger.log(message);\n }\n }\n};\n\nQueue.prototype._maybeCallWait = function() {\n if (_.isFunction(this.waitCallback) && this.pendingItems.length === 0 && this.pendingRequests.length === 0) {\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitCallback();\n return true;\n }\n return false;\n};\n\nmodule.exports = Queue;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Notifier - the internal object responsible for delegating between the client exposed API, the\n * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the\n * queue which handles the communcation with the Rollbar API servers.\n *\n * @param queue - an object that conforms to the interface: addItem(item, callback)\n * @param options - an object representing the options to be set for this notifier, this should have\n * any defaults already set by the caller\n */\nfunction Notifier(queue, options) {\n this.queue = queue;\n this.options = options;\n this.transforms = [];\n this.diagnostic = {};\n}\n\n/*\n * configure - updates the options for this notifier with the passed in object\n *\n * @param options - an object which gets merged with the current options set on this notifier\n * @returns this\n */\nNotifier.prototype.configure = function(options) {\n this.queue && this.queue.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addTransform - adds a transform onto the end of the queue of transforms for this notifier\n *\n * @param transform - a function which takes three arguments:\n * * item: An Object representing the data to eventually be sent to Rollbar\n * * options: The current value of the options for this notifier\n * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this\n * callback with a null value for error if it wants the processing chain to continue, otherwise\n * with an error to terminate the processing. The item should be the updated item after this\n * transform is finished modifying it.\n */\nNotifier.prototype.addTransform = function(transform) {\n if (_.isFunction(transform)) {\n this.transforms.push(transform);\n }\n return this;\n};\n\n/*\n * log - the internal log function which applies the configured transforms and then pushes onto the\n * queue to be sent to the backend.\n *\n * @param item - An object with the following structure:\n * message [String] - An optional string to be sent to rollbar\n * error [Error] - An optional error\n *\n * @param callback - A function of type function(err, resp) which will be called with exactly one\n * null argument and one non-null argument. The callback will be called once, either during the\n * transform stage if an error occurs inside a transform, or in response to the communication with\n * the backend. The second argument will be the response from the backend in case of success.\n */\nNotifier.prototype.log = function(item, callback) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!this.options.enabled) {\n return callback(new Error('Rollbar is not enabled'));\n }\n\n this.queue.addPendingItem(item);\n var originalError = item.err;\n this._applyTransforms(item, function(err, i) {\n if (err) {\n this.queue.removePendingItem(item);\n return callback(err, null);\n }\n this.queue.addItem(i, callback, originalError, item);\n }.bind(this));\n};\n\n/* Internal */\n\n/*\n * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See\n * `addTransform` for more information.\n *\n * @param item - An item to be transformed\n * @param callback - A function of type function(err, item) which will be called with a non-null\n * error and a null item in the case of a transform failure, or a null error and non-null item after\n * all transforms have been applied.\n */\nNotifier.prototype._applyTransforms = function(item, callback) {\n var transformIndex = -1;\n var transformsLength = this.transforms.length;\n var transforms = this.transforms;\n var options = this.options;\n\n var cb = function(err, i) {\n if (err) {\n callback(err, null);\n return;\n }\n\n transformIndex++;\n\n if (transformIndex === transformsLength) {\n callback(null, i);\n return;\n }\n\n transforms[transformIndex](i, options, cb);\n };\n\n cb(null, item);\n};\n\nmodule.exports = Notifier;\n","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1/item/',\n search: null,\n version: '1',\n protocol: 'https:',\n port: 443\n};\n\n/**\n * Api is an object that encapsulates methods of communicating with\n * the Rollbar API. It is a standard interface with some parts implemented\n * differently for server or browser contexts. It is an object that should\n * be instantiated when used so it can contain non-global options that may\n * be different for another instance of RollbarApi.\n *\n * @param options {\n * accessToken: the accessToken to use for posting items to rollbar\n * endpoint: an alternative endpoint to send errors to\n * must be a valid, fully qualified URL.\n * The default is: https://api.rollbar.com/api/1/item\n * proxy: if you wish to proxy requests provide an object\n * with the following keys:\n * host or hostname (required): foo.example.com\n * port (optional): 123\n * protocol (optional): https\n * }\n */\nfunction Api(options, transport, urllib, truncation, jsonBackup) {\n this.options = options;\n this.transport = transport;\n this.url = urllib;\n this.truncation = truncation;\n this.jsonBackup = jsonBackup;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, urllib);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function(data, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n this.transport.post(this.accessToken, transportOptions, payload, callback);\n};\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.buildJsonPayload = function(data, callback) {\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n\n if (stringifyResult.error) {\n if (callback) {\n callback(stringifyResult.error);\n }\n return null;\n }\n\n return stringifyResult.value;\n};\n\n/**\n *\n * @param jsonPayload\n * @param callback\n */\nApi.prototype.postJsonPayload = function(jsonPayload, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n this.transport.postJsonPayload(this.accessToken, transportOptions, jsonPayload, callback);\n};\n\nApi.prototype.configure = function(options) {\n var oldOptions = this.oldOptions;\n this.options = _.merge(oldOptions, options);\n this.transportOptions = _getTransport(this.options, this.url);\n if (this.options.accessToken !== undefined) {\n this.accessToken = this.options.accessToken;\n }\n return this;\n};\n\nfunction _getTransport(options, url) {\n return helpers.getTransportFromOptions(options, defaultOptions, url);\n}\n\nmodule.exports = Api;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (!_.isType(data.context, 'string')) {\n var contextResult = _.stringify(data.context, jsonBackup);\n if (contextResult.error) {\n data.context = 'Error: could not serialize \\'context\\'';\n } else {\n data.context = contextResult.value || '';\n }\n if (data.context.length > 255) {\n data.context = data.context.substr(0, 255);\n }\n }\n return {\n access_token: accessToken,\n data: data\n };\n}\n\nfunction getTransportFromOptions(options, defaults, url) {\n var hostname = defaults.hostname;\n var protocol = defaults.protocol;\n var port = defaults.port;\n var path = defaults.path;\n var search = defaults.search;\n var timeout = options.timeout;\n\n var proxy = options.proxy;\n if (options.endpoint) {\n var opts = url.parse(options.endpoint);\n hostname = opts.hostname;\n protocol = opts.protocol;\n port = opts.port;\n path = opts.pathname;\n search = opts.search;\n }\n return {\n timeout: timeout,\n hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy\n };\n}\n\nfunction transportOptions(transport, method) {\n var protocol = transport.protocol || 'https:';\n var port = transport.port || (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);\n var hostname = transport.hostname;\n var path = transport.path;\n var timeout = transport.timeout;\n if (transport.search) {\n path = path + transport.search;\n }\n if (transport.proxy) {\n path = protocol + '//' + hostname + path;\n hostname = transport.proxy.host || transport.proxy.hostname;\n port = transport.proxy.port;\n protocol = transport.proxy.protocol || protocol;\n }\n return {\n timeout: timeout,\n protocol: protocol,\n hostname: hostname,\n path: path,\n port: port,\n method: method\n };\n}\n\nfunction appendPathToPath(base, path) {\n var baseTrailingSlash = /\\/$/.test(base);\n var pathBeginningSlash = /^\\//.test(path);\n\n if (baseTrailingSlash && pathBeginningSlash) {\n path = path.substring(1);\n } else if (!baseTrailingSlash && !pathBeginningSlash) {\n path = '/' + path;\n }\n\n return base + path;\n}\n\nmodule.exports = {\n buildPayload: buildPayload,\n getTransportFromOptions: getTransportFromOptions,\n transportOptions: transportOptions,\n appendPathToPath: appendPathToPath\n};\n","// Console-polyfill. MIT license.\n// https://github.com/paulmillr/console-polyfill\n// Make it safe to do console.log() always.\n(function(global) {\n 'use strict';\n if (!global.console) {\n global.console = {};\n }\n var con = global.console;\n var prop, method;\n var dummy = function() {};\n var properties = ['memory'];\n var methods = ('assert,clear,count,debug,dir,dirxml,error,exception,group,' +\n 'groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,' +\n 'show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn').split(',');\n while (prop = properties.pop()) if (!con[prop]) con[prop] = {};\n while (method = methods.pop()) if (!con[method]) con[method] = dummy;\n // Using `this` for web workers & supports Browserify / Webpack.\n})(typeof window === 'undefined' ? this : window);\n","'use strict';\n\n// This detection.js module is used to encapsulate any ugly browser/feature\n// detection we may need to do.\n\n// Figure out which version of IE we're using, if any.\n// This is gleaned from http://stackoverflow.com/questions/5574842/best-way-to-check-for-ie-less-than-9-in-javascript-without-library\n// Will return an integer on IE (i.e. 8)\n// Will return undefined otherwise\nfunction getIEVersion() {\n\tvar undef;\n\tif (typeof document === 'undefined') {\n\t\treturn undef;\n\t}\n\n var v = 3,\n div = document.createElement('div'),\n all = div.getElementsByTagName('i');\n\n while (\n div.innerHTML = '',\n all[0]\n );\n\n return v > 4 ? v : undef;\n}\n\nvar Detection = {\n ieVersion: getIEVersion\n};\n\nmodule.exports = Detection;\n","'use strict';\n\nfunction captureUncaughtExceptions(window, handler, shim) {\n if (!window) { return; }\n var oldOnError;\n\n if (typeof handler._rollbarOldOnError === 'function') {\n oldOnError = handler._rollbarOldOnError;\n } else if (window.onerror) {\n oldOnError = window.onerror;\n while (oldOnError._rollbarOldOnError) {\n oldOnError = oldOnError._rollbarOldOnError;\n }\n handler._rollbarOldOnError = oldOnError;\n }\n\n handler.handleAnonymousErrors();\n\n var fn = function() {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n if (shim) {\n fn._rollbarOldOnError = oldOnError;\n }\n window.onerror = fn;\n}\n\nfunction _rollbarWindowOnError(window, r, old, args) {\n if (window._rollbarWrappedError) {\n if (!args[4]) {\n args[4] = window._rollbarWrappedError;\n }\n if (!args[5]) {\n args[5] = window._rollbarWrappedError._rollbarContext;\n }\n window._rollbarWrappedError = null;\n }\n\n var ret = r.handleUncaughtException.apply(r, args);\n\n if (old) {\n old.apply(window, args);\n }\n\n // Let other chained onerror handlers above run before setting this.\n // If an error is thrown and caught within a chained onerror handler,\n // Error.prepareStackTrace() will see that one before the one we want.\n if (ret === 'anonymous') {\n r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()\n }\n}\n\nfunction captureUnhandledRejections(window, handler, shim) {\n if (!window) { return; }\n\n if (typeof window._rollbarURH === 'function' && window._rollbarURH.belongsToShim) {\n window.removeEventListener('unhandledrejection', window._rollbarURH);\n }\n\n var rejectionHandler = function (evt) {\n var reason, promise, detail;\n try {\n reason = evt.reason;\n } catch (e) {\n reason = undefined;\n }\n try {\n promise = evt.promise;\n } catch (e) {\n promise = '[unhandledrejection] error getting `promise` from event';\n }\n try {\n detail = evt.detail;\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\n }\n } catch (e) {\n // Ignore\n }\n if (!reason) {\n reason = '[unhandledrejection] error getting `reason` from event';\n }\n\n if (handler && handler.handleUnhandledRejection) {\n handler.handleUnhandledRejection(reason, promise);\n }\n };\n rejectionHandler.belongsToShim = shim;\n window._rollbarURH = rejectionHandler;\n window.addEventListener('unhandledrejection', rejectionHandler);\n}\n\n\nmodule.exports = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections\n};\n","'use strict';\n\n/*global XDomainRequest*/\n\nvar _ = require('../utility');\nvar logger = require('./logger');\n\n/*\n * accessToken may be embedded in payload but that should not\n * be assumed\n *\n * options: {\n * hostname\n * protocol\n * path\n * port\n * method\n * }\n *\n * params is an object containing key/value pairs. These\n * will be appended to the path as 'key=value&key=value'\n *\n * payload is an unserialized object\n */\nfunction Transport(truncation) {\n this.truncation = truncation;\n}\n\nTransport.prototype.get = function(accessToken, options, params, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n _.addParamsAndAccessTokenToPath(accessToken, options, params);\n\n var method = 'GET';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, null, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.post = function(accessToken, options, payload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!payload) {\n return callback(new Error('Cannot send empty request'));\n }\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n if (stringifyResult.error) {\n return callback(stringifyResult.error);\n }\n\n var writeData = stringifyResult.value;\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, writeData, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.postJsonPayload = function (accessToken, options, jsonPayload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, jsonPayload, callback, requestFactory, options.timeout);\n}\n\n\n// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope\n// so Angular change detection isn't triggered on each API call.\n// This is the equivalent of runOutsideAngular().\n//\nfunction _makeZoneRequest() {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;\n var args = Array.prototype.slice.call(arguments);\n\n if (currentZone && currentZone._name === 'angular') {\n var rootZone = currentZone._parent;\n rootZone.run(function () {\n _makeRequest.apply(undefined, args);\n });\n } else {\n _makeRequest.apply(undefined, args);\n }\n}\n\n/* global RollbarProxy */\nfunction _proxyRequest(json, callback) {\n var rollbarProxy = new RollbarProxy();\n rollbarProxy.sendJsonPayload(\n json,\n function(_msg) { /* do nothing */ }, // eslint-disable-line no-unused-vars\n function(err) {\n callback(new Error(err));\n }\n );\n}\n\nfunction _makeRequest(accessToken, url, method, data, callback, requestFactory, timeout) {\n if (typeof RollbarProxy !== 'undefined') {\n return _proxyRequest(data, callback);\n }\n\n var request;\n if (requestFactory) {\n request = requestFactory();\n } else {\n request = _createXMLHTTPObject();\n }\n if (!request) {\n // Give up, no way to send requests\n return callback(new Error('No way to send a request'));\n }\n try {\n try {\n var onreadystatechange = function() {\n try {\n if (onreadystatechange && request.readyState === 4) {\n onreadystatechange = undefined;\n\n var parseResponse = _.jsonParse(request.responseText);\n if (_isSuccess(request)) {\n callback(parseResponse.error, parseResponse.value);\n return;\n } else if (_isNormalFailure(request)) {\n if (request.status === 403) {\n // likely caused by using a server access token\n var message = parseResponse.value && parseResponse.value.message;\n logger.error(message);\n }\n // return valid http status codes\n callback(new Error(String(request.status)));\n } else {\n // IE will return a status 12000+ on some sort of connection failure,\n // so we return a blank error\n // http://msdn.microsoft.com/en-us/library/aa383770%28VS.85%29.aspx\n var msg = 'XHR response had no status code (likely connection failure)';\n callback(_newRetriableError(msg));\n }\n }\n } catch (ex) {\n //jquery source mentions firefox may error out while accessing the\n //request members if there is a network error\n //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111\n var exc;\n if (ex && ex.stack) {\n exc = ex;\n } else {\n exc = new Error(ex);\n }\n callback(exc);\n }\n };\n\n request.open(method, url, true);\n if (request.setRequestHeader) {\n request.setRequestHeader('Content-Type', 'application/json');\n request.setRequestHeader('X-Rollbar-Access-Token', accessToken);\n }\n\n if(_.isFiniteNumber(timeout)) {\n request.timeout = timeout;\n }\n\n request.onreadystatechange = onreadystatechange;\n request.send(data);\n } catch (e1) {\n // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest\n if (typeof XDomainRequest !== 'undefined') {\n\n // Assume we are in a really old browser which has a bunch of limitations:\n // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx\n\n // Extreme paranoia: if we have XDomainRequest then we have a window, but just in case\n if (!window || !window.location) {\n return callback(new Error('No window available during request, unknown environment'));\n }\n\n // If the current page is http, try and send over http\n if (window.location.href.substring(0, 5) === 'http:' && url.substring(0, 5) === 'https') {\n url = 'http' + url.substring(5);\n }\n\n var xdomainrequest = new XDomainRequest();\n xdomainrequest.onprogress = function() {};\n xdomainrequest.ontimeout = function() {\n var msg = 'Request timed out';\n var code = 'ETIMEDOUT';\n callback(_newRetriableError(msg, code));\n };\n xdomainrequest.onerror = function() {\n callback(new Error('Error during request'));\n };\n xdomainrequest.onload = function() {\n var parseResponse = _.jsonParse(xdomainrequest.responseText);\n callback(parseResponse.error, parseResponse.value);\n };\n xdomainrequest.open(method, url, true);\n xdomainrequest.send(data);\n } else {\n callback(new Error('Cannot find a method to transport a request'));\n }\n }\n } catch (e2) {\n callback(e2);\n }\n}\n\nfunction _createXMLHTTPObject() {\n /* global ActiveXObject:false */\n\n var factories = [\n function () {\n return new XMLHttpRequest();\n },\n function () {\n return new ActiveXObject('Msxml2.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Msxml3.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Microsoft.XMLHTTP');\n }\n ];\n var xmlhttp;\n var i;\n var numFactories = factories.length;\n for (i = 0; i < numFactories; i++) {\n /* eslint-disable no-empty */\n try {\n xmlhttp = factories[i]();\n break;\n } catch (e) {\n // pass\n }\n /* eslint-enable no-empty */\n }\n return xmlhttp;\n}\n\nfunction _isSuccess(r) {\n return r && r.status && r.status === 200;\n}\n\nfunction _isNormalFailure(r) {\n return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;\n}\n\nfunction _newRetriableError(message, code) {\n var err = new Error(message);\n err.code = code || 'ENOTFOUND';\n return err;\n}\n\nmodule.exports = Transport;\n","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('../errorParser');\nvar logger = require('./logger');\n\nfunction handleDomException(item, options, callback) {\n if(item.err && errorParser.Stack(item.err).name === 'DOMException') {\n var originalError = new Error();\n originalError.name = item.err.name;\n originalError.message = item.err.message;\n originalError.stack = item.err.stack;\n originalError.nested = item.err;\n item.err = originalError;\n }\n callback(null, item);\n}\n\nfunction handleItemWithError(item, options, callback) {\n item.data = item.data || {};\n if (item.err) {\n try {\n item.stackInfo = item.err._savedStackTrace || errorParser.parse(item.err, item.skipFrames);\n\n if (options.addErrorContext) {\n addErrorContext(item);\n }\n } catch (e) {\n logger.error('Error while parsing the error object.', e);\n try {\n item.message = item.err.message || item.err.description || item.message || String(item.err);\n } catch (e2) {\n item.message = String(item.err) || String(e2);\n }\n delete item.err;\n }\n }\n callback(null, item);\n}\n\nfunction addErrorContext(item) {\n var chain = [];\n var err = item.err;\n\n chain.push(err);\n\n while (err.nested) {\n err = err.nested;\n chain.push(err);\n }\n\n _.addErrorContext(item, chain);\n}\n\nfunction ensureItemHasSomethingToSay(item, options, callback) {\n if (!item.message && !item.stackInfo && !item.custom) {\n callback(new Error('No message, stack info, or custom data'), null);\n }\n callback(null, item);\n}\n\nfunction addBaseInfo(item, options, callback) {\n var environment = (options.payload && options.payload.environment) || options.environment;\n item.data = _.merge(item.data, {\n environment: environment,\n level: item.level,\n endpoint: options.endpoint,\n platform: 'browser',\n framework: 'browser-js',\n language: 'javascript',\n server: {},\n uuid: item.uuid,\n notifier: {\n name: 'rollbar-browser-js',\n version: options.version\n },\n custom: item.custom\n });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.location) {\n return callback(null, item);\n }\n var remoteString = '$remote_ip';\n if (!options.captureIp) {\n remoteString = null;\n } else if (options.captureIp !== true) {\n remoteString += '_anonymize';\n }\n _.set(item, 'data.request', {\n url: window.location.href,\n query_string: window.location.search,\n user_ip: remoteString\n });\n callback(null, item);\n };\n}\n\nfunction addClientInfo(window) {\n return function(item, options, callback) {\n if (!window) {\n return callback(null, item);\n }\n var nav = window.navigator || {};\n var scr = window.screen || {};\n _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: nav.userAgent,\n language: nav.language,\n cookie_enabled: nav.cookieEnabled,\n screen: {\n width: scr.width,\n height: scr.height\n }\n }\n });\n callback(null, item);\n };\n}\n\nfunction addPluginInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.navigator) {\n return callback(null, item);\n }\n var plugins = [];\n var navPlugins = window.navigator.plugins || [];\n var cur;\n for (var i=0, l=navPlugins.length; i < l; ++i) {\n cur = navPlugins[i];\n plugins.push({name: cur.name, description: cur.description});\n }\n _.set(item, 'data.client.javascript.plugins', plugins);\n callback(null, item);\n };\n}\n\nfunction addBody(item, options, callback) {\n if (item.stackInfo) {\n if (item.stackInfo.traceChain) {\n addBodyTraceChain(item, options, callback);\n } else {\n addBodyTrace(item, options, callback);\n }\n } else {\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction addBodyMessage(item, options, callback) {\n var message = item.message;\n var custom = item.custom;\n\n if (!message) {\n message = 'Item sent with null or missing arguments.';\n }\n var result = {\n body: message\n };\n\n if (custom) {\n result.extra = _.merge(custom);\n }\n\n _.set(item, 'data.body', {message: result});\n callback(null, item);\n}\n\nfunction stackFromItem(item) {\n // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = item.stackInfo.stack;\n if (stack && stack.length === 0 && item._unhandledStackInfo && item._unhandledStackInfo.stack) {\n stack = item._unhandledStackInfo.stack;\n }\n return stack;\n}\n\nfunction addBodyTraceChain(item, options, callback) {\n var traceChain = item.stackInfo.traceChain;\n var traces = [];\n\n var traceChainLength = traceChain.length;\n for (var i = 0; i < traceChainLength; i++) {\n var trace = buildTrace(item, traceChain[i], options);\n traces.push(trace);\n }\n\n _.set(item, 'data.body', {trace_chain: traces});\n callback(null, item);\n}\n\nfunction addBodyTrace(item, options, callback) {\n var stack = stackFromItem(item);\n\n if (stack) {\n var trace = buildTrace(item, item.stackInfo, options);\n _.set(item, 'data.body', {trace: trace});\n callback(null, item);\n } else {\n var stackInfo = item.stackInfo;\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction buildTrace(item, stackInfo, options) {\n var description = item && item.data.description;\n var custom = item && item.custom;\n var stack = stackFromItem(item);\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n var trace = {\n exception: {\n 'class': className,\n message: message\n }\n };\n\n if (description) {\n trace.exception.description = description;\n }\n\n if (stack) {\n if (stack.length === 0) {\n trace.exception.stack = stackInfo.rawStack;\n trace.exception.raw = String(stackInfo.rawException);\n }\n var stackFrame;\n var frame;\n var code;\n var pre;\n var post;\n var contextLength;\n var i, mid;\n\n trace.frames = [];\n for (i = 0; i < stack.length; ++i) {\n stackFrame = stack[i];\n frame = {\n filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',\n lineno: stackFrame.line || null,\n method: (!stackFrame.func || stackFrame.func === '?') ? '[anonymous]' : stackFrame.func,\n colno: stackFrame.column\n };\n if (options.sendFrameUrl) {\n frame.url = stackFrame.url;\n }\n if (frame.method && frame.method.endsWith && frame.method.endsWith('_rollbar_wrapped')) {\n continue;\n }\n\n code = pre = post = null;\n contextLength = stackFrame.context ? stackFrame.context.length : 0;\n if (contextLength) {\n mid = Math.floor(contextLength / 2);\n pre = stackFrame.context.slice(0, mid);\n code = stackFrame.context[mid];\n post = stackFrame.context.slice(mid);\n }\n\n if (code) {\n frame.code = code;\n }\n\n if (pre || post) {\n frame.context = {};\n if (pre && pre.length) {\n frame.context.pre = pre;\n }\n if (post && post.length) {\n frame.context.post = post;\n }\n }\n\n if (stackFrame.args) {\n frame.args = stackFrame.args;\n }\n\n trace.frames.push(frame);\n }\n\n // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last\n trace.frames.reverse();\n\n if (custom) {\n trace.extra = _.merge(custom);\n }\n }\n\n return trace;\n}\n\nfunction errorClass(stackInfo, guess, options) {\n if (stackInfo.name) {\n return stackInfo.name;\n } else if (options.guessErrorClass) {\n return guess;\n } else {\n return '(unknown)';\n }\n}\n\nfunction addScrubber(scrubFn) {\n return function (item, options, callback) {\n if (scrubFn) {\n var scrubFields = options.scrubFields || [];\n var scrubPaths = options.scrubPaths || [];\n item.data = scrubFn(item.data, scrubFields, scrubPaths);\n }\n callback(null, item);\n }\n}\n\nmodule.exports = {\n handleDomException: handleDomException,\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n addScrubber: addScrubber\n};\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('error-stack-parser', ['stackframe'], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory(require('stackframe'));\n } else {\n root.ErrorStackParser = factory(root.StackFrame);\n }\n}(this, function ErrorStackParser(StackFrame) {\n 'use strict';\n\n var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\\S+:\\d+/;\n var CHROME_IE_STACK_REGEXP = /^\\s*at .*(\\S+:\\d+|\\(native\\))/m;\n var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\\[native code])?$/;\n\n return {\n /**\n * Given an Error object, extract the most information from it.\n *\n * @param {Error} error object\n * @return {Array} of StackFrames\n */\n parse: function ErrorStackParser$$parse(error) {\n if (typeof error.stacktrace !== 'undefined' || typeof error['opera#sourceloc'] !== 'undefined') {\n return this.parseOpera(error);\n } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {\n return this.parseV8OrIE(error);\n } else if (error.stack) {\n return this.parseFFOrSafari(error);\n } else {\n throw new Error('Cannot parse given Error object');\n }\n },\n\n // Separate line and column numbers from a string of the form: (URI:Line:Column)\n extractLocation: function ErrorStackParser$$extractLocation(urlLike) {\n // Fail-fast but return locations like \"(native)\"\n if (urlLike.indexOf(':') === -1) {\n return [urlLike];\n }\n\n var regExp = /(.+?)(?::(\\d+))?(?::(\\d+))?$/;\n var parts = regExp.exec(urlLike.replace(/[()]/g, ''));\n return [parts[1], parts[2] || undefined, parts[3] || undefined];\n },\n\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(CHROME_IE_STACK_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n if (line.indexOf('(eval ') > -1) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n line = line.replace(/eval code/g, 'eval').replace(/(\\(eval at [^()]*)|(\\),.*$)/g, '');\n }\n var sanitizedLine = line.replace(/^\\s+/, '').replace(/\\(eval code/g, '(');\n\n // capture and preseve the parenthesized location \"(/foo/my bar.js:12:87)\" in\n // case it has spaces in it, as the string is split on \\s+ later on\n var location = sanitizedLine.match(/ (\\((.+):(\\d+):(\\d+)\\)$)/);\n\n // remove the parenthesized location from the line, if it was matched\n sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;\n\n var tokens = sanitizedLine.split(/\\s+/).slice(1);\n // if a location was matched, pass it to extractLocation() otherwise pop the last token\n var locationParts = this.extractLocation(location ? location[1] : tokens.pop());\n var functionName = tokens.join(' ') || undefined;\n var fileName = ['eval', ''].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];\n\n return new StackFrame({\n functionName: functionName,\n fileName: fileName,\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n },\n\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n if (line.indexOf(' > eval') > -1) {\n line = line.replace(/ line (\\d+)(?: > eval line \\d+)* > eval:\\d+:\\d+/g, ':$1');\n }\n\n if (line.indexOf('@') === -1 && line.indexOf(':') === -1) {\n // Safari eval frames only have function names and nothing else\n return new StackFrame({\n functionName: line\n });\n } else {\n var functionNameRegex = /((.*\".+\"[^@]*)?[^@]*)(?:@)/;\n var matches = line.match(functionNameRegex);\n var functionName = matches && matches[1] ? matches[1] : undefined;\n var locationParts = this.extractLocation(line.replace(functionNameRegex, ''));\n\n return new StackFrame({\n functionName: functionName,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }\n }, this);\n },\n\n parseOpera: function ErrorStackParser$$parseOpera(e) {\n if (!e.stacktrace || (e.message.indexOf('\\n') > -1 &&\n e.message.split('\\n').length > e.stacktrace.split('\\n').length)) {\n return this.parseOpera9(e);\n } else if (!e.stack) {\n return this.parseOpera10(e);\n } else {\n return this.parseOpera11(e);\n }\n },\n\n parseOpera9: function ErrorStackParser$$parseOpera9(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)/i;\n var lines = e.message.split('\\n');\n var result = [];\n\n for (var i = 2, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(new StackFrame({\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n }));\n }\n }\n\n return result;\n },\n\n parseOpera10: function ErrorStackParser$$parseOpera10(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)(?:: In function (\\S+))?$/i;\n var lines = e.stacktrace.split('\\n');\n var result = [];\n\n for (var i = 0, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(\n new StackFrame({\n functionName: match[3] || undefined,\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n })\n );\n }\n }\n\n return result;\n },\n\n // Opera 10.65+ Error.stack very similar to FF/Safari\n parseOpera11: function ErrorStackParser$$parseOpera11(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);\n }, this);\n\n return filtered.map(function(line) {\n var tokens = line.split('@');\n var locationParts = this.extractLocation(tokens.pop());\n var functionCall = (tokens.shift() || '');\n var functionName = functionCall\n .replace(//, '$2')\n .replace(/\\([^)]*\\)/g, '') || undefined;\n var argsRaw;\n if (functionCall.match(/\\(([^)]*)\\)/)) {\n argsRaw = functionCall.replace(/^[^(]+\\(([^)]*)\\)$/, '$1');\n }\n var args = (argsRaw === undefined || argsRaw === '[arguments not available]') ?\n undefined : argsRaw.split(',');\n\n return new StackFrame({\n functionName: functionName,\n args: args,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n }\n };\n}));\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('stackframe', [], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.StackFrame = factory();\n }\n}(this, function() {\n 'use strict';\n function _isNumber(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n }\n\n function _capitalize(str) {\n return str.charAt(0).toUpperCase() + str.substring(1);\n }\n\n function _getter(p) {\n return function() {\n return this[p];\n };\n }\n\n var booleanProps = ['isConstructor', 'isEval', 'isNative', 'isToplevel'];\n var numericProps = ['columnNumber', 'lineNumber'];\n var stringProps = ['fileName', 'functionName', 'source'];\n var arrayProps = ['args'];\n var objectProps = ['evalOrigin'];\n\n var props = booleanProps.concat(numericProps, stringProps, arrayProps, objectProps);\n\n function StackFrame(obj) {\n if (!obj) return;\n for (var i = 0; i < props.length; i++) {\n if (obj[props[i]] !== undefined) {\n this['set' + _capitalize(props[i])](obj[props[i]]);\n }\n }\n }\n\n StackFrame.prototype = {\n getArgs: function() {\n return this.args;\n },\n setArgs: function(v) {\n if (Object.prototype.toString.call(v) !== '[object Array]') {\n throw new TypeError('Args must be an Array');\n }\n this.args = v;\n },\n\n getEvalOrigin: function() {\n return this.evalOrigin;\n },\n setEvalOrigin: function(v) {\n if (v instanceof StackFrame) {\n this.evalOrigin = v;\n } else if (v instanceof Object) {\n this.evalOrigin = new StackFrame(v);\n } else {\n throw new TypeError('Eval Origin must be an Object or StackFrame');\n }\n },\n\n toString: function() {\n var fileName = this.getFileName() || '';\n var lineNumber = this.getLineNumber() || '';\n var columnNumber = this.getColumnNumber() || '';\n var functionName = this.getFunctionName() || '';\n if (this.getIsEval()) {\n if (fileName) {\n return '[eval] (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return '[eval]:' + lineNumber + ':' + columnNumber;\n }\n if (functionName) {\n return functionName + ' (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return fileName + ':' + lineNumber + ':' + columnNumber;\n }\n };\n\n StackFrame.fromString = function StackFrame$$fromString(str) {\n var argsStartIndex = str.indexOf('(');\n var argsEndIndex = str.lastIndexOf(')');\n\n var functionName = str.substring(0, argsStartIndex);\n var args = str.substring(argsStartIndex + 1, argsEndIndex).split(',');\n var locationString = str.substring(argsEndIndex + 1);\n\n if (locationString.indexOf('@') === 0) {\n var parts = /@(.+?)(?::(\\d+))?(?::(\\d+))?$/.exec(locationString, '');\n var fileName = parts[1];\n var lineNumber = parts[2];\n var columnNumber = parts[3];\n }\n\n return new StackFrame({\n functionName: functionName,\n args: args || undefined,\n fileName: fileName,\n lineNumber: lineNumber || undefined,\n columnNumber: columnNumber || undefined\n });\n };\n\n for (var i = 0; i < booleanProps.length; i++) {\n StackFrame.prototype['get' + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);\n StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function(p) {\n return function(v) {\n this[p] = Boolean(v);\n };\n })(booleanProps[i]);\n }\n\n for (var j = 0; j < numericProps.length; j++) {\n StackFrame.prototype['get' + _capitalize(numericProps[j])] = _getter(numericProps[j]);\n StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function(p) {\n return function(v) {\n if (!_isNumber(v)) {\n throw new TypeError(p + ' must be a Number');\n }\n this[p] = Number(v);\n };\n })(numericProps[j]);\n }\n\n for (var k = 0; k < stringProps.length; k++) {\n StackFrame.prototype['get' + _capitalize(stringProps[k])] = _getter(stringProps[k]);\n StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function(p) {\n return function(v) {\n this[p] = String(v);\n };\n })(stringProps[k]);\n }\n\n return StackFrame;\n}));\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction itemToPayload(item, options, callback) {\n var payloadOptions = options.payload || {};\n if (payloadOptions.body) {\n delete payloadOptions.body;\n }\n\n var data = _.merge(item.data, payloadOptions);\n if (item._isUncaught) {\n data._isUncaught = true;\n }\n if (item._originalArgs) {\n data._originalArgs = item._originalArgs;\n }\n callback(null, data);\n}\n\nfunction addTelemetryData(item, options, callback) {\n if (item.telemetryEvents) {\n _.set(item, 'data.body.telemetry', item.telemetryEvents);\n }\n callback(null, item);\n}\n\nfunction addMessageWithError(item, options, callback) {\n if (!item.message) {\n callback(null, item);\n return;\n }\n var tracePath = 'data.body.trace_chain.0';\n var trace = _.get(item, tracePath);\n if (!trace) {\n tracePath = 'data.body.trace';\n trace = _.get(item, tracePath);\n }\n if (trace) {\n if (!(trace.exception && trace.exception.description)) {\n _.set(item, tracePath+'.exception.description', item.message);\n callback(null, item);\n return;\n }\n var extra = _.get(item, tracePath+'.extra') || {};\n var newExtra = _.merge(extra, {message: item.message});\n _.set(item, tracePath+'.extra', newExtra);\n }\n callback(null, item);\n}\n\nfunction userTransform(logger) {\n return function(item, options, callback) {\n var newItem = _.merge(item);\n var response = null;\n try {\n if (_.isFunction(options.transform)) {\n response = options.transform(newItem.data, item);\n }\n } catch (e) {\n options.transform = null;\n logger.error('Error while calling custom transform() function. Removing custom transform().', e);\n callback(null, item);\n return;\n }\n if(_.isPromise(response)) {\n response.then(function (promisedItem) {\n if(promisedItem) {\n newItem.data = promisedItem;\n }\n callback(null, newItem);\n }, function (error) {\n callback(error, item);\n });\n } else {\n callback(null, newItem);\n }\n }\n}\n\nfunction addConfigToPayload(item, options, callback) {\n if (!options.sendConfig) {\n return callback(null, item);\n }\n var configKey = '_rollbarConfig';\n var custom = _.get(item, 'data.custom') || {};\n custom[configKey] = options;\n item.data.custom = custom;\n callback(null, item);\n}\n\nfunction addFunctionOption(options, name) {\n if(_.isFunction(options[name])) {\n options[name] = options[name].toString();\n }\n}\n\nfunction addConfiguredOptions(item, options, callback) {\n var configuredOptions = options._configuredOptions;\n\n // These must be stringified or they'll get dropped during serialization.\n addFunctionOption(configuredOptions, 'transform');\n addFunctionOption(configuredOptions, 'checkIgnore');\n addFunctionOption(configuredOptions, 'onSendCallback');\n\n delete configuredOptions.accessToken;\n item.data.notifier.configured_options = configuredOptions;\n callback(null, item);\n}\n\nfunction addDiagnosticKeys(item, options, callback) {\n var diagnostic = _.merge(item.notifier.client.notifier.diagnostic, item.diagnostic);\n\n if (_.get(item, 'err._isAnonymous')) {\n diagnostic.is_anonymous = true;\n }\n\n if (item._isUncaught) {\n diagnostic.is_uncaught = item._isUncaught;\n }\n\n if (item.err) {\n try {\n diagnostic.raw_error = {\n message: item.err.message,\n name: item.err.name,\n constructor_name: item.err.constructor && item.err.constructor.name,\n filename: item.err.fileName,\n line: item.err.lineNumber,\n column: item.err.columnNumber,\n stack: item.err.stack\n };\n } catch (e) {\n diagnostic.raw_error = { failed: String(e) };\n }\n }\n\n item.data.notifier.diagnostic = _.merge(item.data.notifier.diagnostic, diagnostic);\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError,\n userTransform: userTransform,\n addConfigToPayload: addConfigToPayload,\n addConfiguredOptions: addConfiguredOptions,\n addDiagnosticKeys: addDiagnosticKeys\n};\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction checkIgnore(item, settings) {\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore\n};\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction checkLevel(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = settings.reportLevel;\n var reportLevelVal = _.LEVELS[reportLevel] || 0;\n\n if (levelVal < reportLevelVal) {\n return false;\n }\n return true;\n}\n\nfunction userCheckIgnore(logger) {\n return function(item, settings) {\n var isUncaught = !!item._isUncaught;\n delete item._isUncaught;\n var args = item._originalArgs;\n delete item._originalArgs;\n try {\n if (_.isFunction(settings.onSendCallback)) {\n settings.onSendCallback(isUncaught, args, item);\n }\n } catch (e) {\n settings.onSendCallback = null;\n logger.error('Error while calling onSendCallback, removing', e);\n }\n try {\n if (_.isFunction(settings.checkIgnore) && settings.checkIgnore(isUncaught, args, item)) {\n return false;\n }\n } catch (e) {\n settings.checkIgnore = null;\n logger.error('Error while calling custom checkIgnore(), removing', e);\n }\n return true;\n }\n}\n\nfunction urlIsNotBlockListed(logger) {\n return function(item, settings) {\n return !urlIsOnAList(item, settings, 'blocklist', logger);\n }\n}\n\nfunction urlIsSafeListed(logger) {\n return function(item, settings) {\n return urlIsOnAList(item, settings, 'safelist', logger);\n }\n}\n\nfunction matchFrames(trace, list, block) {\n if (!trace) { return !block }\n\n var frames = trace.frames;\n\n if (!frames || frames.length === 0) { return !block; }\n\n var frame, filename, url, urlRegex;\n var listLength = list.length;\n var frameLength = frames.length;\n for (var i = 0; i < frameLength; i++) {\n frame = frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) { return !block; }\n\n for (var j = 0; j < listLength; j++) {\n url = list[j];\n urlRegex = new RegExp(url);\n\n if (urlRegex.test(filename)) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction urlIsOnAList(item, settings, safeOrBlock, logger) {\n // safelist is the default\n var block = false;\n if (safeOrBlock === 'blocklist') {\n block = true;\n }\n\n var list, traces;\n try {\n list = block ? settings.hostBlockList : settings.hostSafeList;\n traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];\n\n // These two checks are important to come first as they are defaults\n // in case the list is missing or the trace is missing or not well-formed\n if (!list || list.length === 0) {\n return !block;\n }\n if (traces.length === 0 || !traces[0]) {\n return !block;\n }\n\n var tracesLength = traces.length;\n for (var i = 0; i < tracesLength; i++) {\n if(matchFrames(traces[i], list, block)) {\n return true;\n }\n }\n } catch (e)\n /* istanbul ignore next */\n {\n if (block) {\n settings.hostBlockList = null;\n } else {\n settings.hostSafeList = null;\n }\n var listName = block ? 'hostBlockList' : 'hostSafeList';\n logger.error('Error while reading your configuration\\'s ' + listName + ' option. Removing custom ' + listName + '.', e);\n return !block;\n }\n return false;\n}\n\nfunction messageIsIgnored(logger) {\n return function(item, settings) {\n var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n messages = messagesFromItem(item);\n\n if (messages.length === 0){\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n\n for (j = 0; j < messages.length; j++) {\n messageIsIgnored = rIgnoredMessage.test(messages[j]);\n\n if (messageIsIgnored) {\n return false;\n }\n }\n }\n } catch(e)\n /* istanbul ignore next */\n {\n settings.ignoredMessages = null;\n logger.error('Error while reading your configuration\\'s ignoredMessages option. Removing custom ignoredMessages.');\n }\n\n return true;\n }\n}\n\nfunction messagesFromItem(item) {\n var body = item.body;\n var messages = [];\n\n // The payload schema only allows one of trace_chain, message, or trace.\n // However, existing test cases are based on having both trace and message present.\n // So here we preserve the ability to collect strings from any combination of these keys.\n if (body.trace_chain) {\n var traceChain = body.trace_chain;\n for (var i = 0; i < traceChain.length; i++) {\n var trace = traceChain[i];\n messages.push(_.get(trace, 'exception.message'));\n }\n }\n if (body.trace) {\n messages.push(_.get(body, 'trace.exception.message'));\n }\n if (body.message) {\n messages.push(_.get(body, 'message.body'));\n }\n return messages;\n}\n\nmodule.exports = {\n checkLevel: checkLevel,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlockListed: urlIsNotBlockListed,\n urlIsSafeListed: urlIsSafeListed,\n messageIsIgnored: messageIsIgnored\n};\n","'use strict';\n\nmodule.exports = {\n version: '2.24.0',\n endpoint: 'api.rollbar.com/api/1/item/',\n logLevel: 'debug',\n reportLevel: 'debug',\n uncaughtErrorLevel: 'error',\n maxItems: 0,\n itemsPerMin: 60\n}\n","'use strict';\n\nmodule.exports = {\n scrubFields: [\n 'pw',\n 'pass',\n 'passwd',\n 'password',\n 'secret',\n 'confirm_password',\n 'confirmPassword',\n 'password_confirmation',\n 'passwordConfirmation',\n 'access_token',\n 'accessToken',\n 'X-Rollbar-Access-Token',\n 'secret_key',\n 'secretKey',\n 'secretToken',\n 'cc-number',\n 'card number',\n 'cardnumber',\n 'cardnum',\n 'ccnum',\n 'ccnumber',\n 'cc num',\n 'creditcardnumber',\n 'credit card number',\n 'newcreditcardnumber',\n 'new credit card',\n 'creditcardno',\n 'credit card no',\n 'card#',\n 'card #',\n 'cc-csc',\n 'cvc',\n 'cvc2',\n 'cvv2',\n 'ccv2',\n 'security code',\n 'card verification',\n 'name on credit card',\n 'name on card',\n 'nameoncard',\n 'cardholder',\n 'card holder',\n 'name des karteninhabers',\n 'ccname',\n 'card type',\n 'cardtype',\n 'cc type',\n 'cctype',\n 'payment type',\n 'expiration date',\n 'expirationdate',\n 'expdate',\n 'cc-exp',\n 'ccmonth',\n 'ccyear'\n ]\n}\n","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.merge(options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n}\n\nTelemeter.prototype.configure = function(options) {\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n var deleteCount = 0;\n if (this.maxQueueSize > newMaxEvents) {\n deleteCount = this.maxQueueSize - newMaxEvents;\n }\n this.maxQueueSize = newMaxEvents;\n this.queue.splice(0, deleteCount);\n};\n\nTelemeter.prototype.copyEvents = function() {\n var events = Array.prototype.slice.call(this.queue, 0);\n if (_.isFunction(this.options.filterTelemetry)) {\n try {\n var i = events.length;\n while (i--) {\n if (this.options.filterTelemetry(events[i])) {\n events.splice(i, 1);\n }\n }\n } catch (e) {\n this.options.filterTelemetry = null;\n }\n }\n return events;\n};\n\nTelemeter.prototype.capture = function(type, metadata, level, rollbarUUID, timestamp) {\n var e = {\n level: getLevel(type, level),\n type: type,\n timestamp_ms: timestamp || _.now(),\n body: metadata,\n source: 'client'\n };\n if (rollbarUUID) {\n e.uuid = rollbarUUID;\n }\n\n try {\n if (_.isFunction(this.options.filterTelemetry) && this.options.filterTelemetry(e)) {\n return false;\n }\n } catch (exc) {\n this.options.filterTelemetry = null;\n }\n\n this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function(type, metadata, level, rollbarUUID) {\n return this.capture(type, metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.captureError = function(err, level, rollbarUUID, timestamp) {\n var metadata = {\n message: err.message || String(err)\n };\n if (err.stack) {\n metadata.stack = err.stack;\n }\n return this.capture('error', metadata, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureLog = function(message, level, rollbarUUID, timestamp) {\n return this.capture('log', {\n message: message\n }, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID, requestData) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\n if (requestData) {\n metadata.request = requestData;\n }\n var level = this.levelFromStatus(metadata.status_code);\n return this.capture('network', metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.levelFromStatus = function(statusCode) {\n if (statusCode >= 200 && statusCode < 400) {\n return 'info';\n }\n if (statusCode === 0 || statusCode >= 400) {\n return 'error';\n }\n return 'info';\n};\n\nTelemeter.prototype.captureDom = function(subtype, element, value, checked, rollbarUUID) {\n var metadata = {\n subtype: subtype,\n element: element\n };\n if (value !== undefined) {\n metadata.value = value;\n }\n if (checked !== undefined) {\n metadata.checked = checked;\n }\n return this.capture('dom', metadata, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureNavigation = function(from, to, rollbarUUID) {\n return this.capture('navigation', {from: from, to: to}, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureDomContentLoaded = function(ts) {\n return this.capture('navigation', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n */\n};\nTelemeter.prototype.captureLoad = function(ts) {\n return this.capture('navigation', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n */\n};\n\nTelemeter.prototype.captureConnectivityChange = function(type, rollbarUUID) {\n return this.captureNetwork({change: type}, 'connectivity', rollbarUUID);\n};\n\n// Only intended to be used internally by the notifier\nTelemeter.prototype._captureRollbarItem = function(item) {\n if (!this.options.includeItemsInTelemetry) {\n return;\n }\n if (item.err) {\n return this.captureError(item.err, item.level, item.uuid, item.timestamp);\n }\n if (item.message) {\n return this.captureLog(item.message, item.level, item.uuid, item.timestamp);\n }\n if (item.custom) {\n return this.capture('log', item.custom, item.level, item.uuid, item.timestamp);\n }\n};\n\nTelemeter.prototype.push = function(e) {\n this.queue.push(e);\n if (this.queue.length > this.maxQueueSize) {\n this.queue.shift();\n }\n};\n\nfunction getLevel(type, level) {\n if (level) {\n return level;\n }\n var defaultLevel = {\n error: 'error',\n manual: 'info'\n };\n return defaultLevel[type] || 'info';\n}\n\nmodule.exports = Telemeter;\n","'use strict';\n\nvar _ = require('../utility');\nvar scrub = require('../scrub');\nvar urlparser = require('./url');\nvar domUtil = require('./domUtility');\n\nvar defaults = {\n network: true,\n networkResponseHeaders: false,\n networkResponseBody: false,\n networkRequestHeaders: false,\n networkRequestBody: false,\n networkErrorOnHttp5xx: false,\n networkErrorOnHttp4xx: false,\n networkErrorOnHttp0: false,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true,\n contentSecurityPolicy: true,\n errorOnContentSecurityPolicy: false\n};\n\nfunction replace(obj, name, replacement, replacements, type) {\n var orig = obj[name];\n obj[name] = replacement(orig);\n if (replacements) {\n replacements[type].push([obj, name, orig]);\n }\n}\n\nfunction restore(replacements, type) {\n var b;\n while (replacements[type].length) {\n b = replacements[type].shift();\n b[0][b[1]] = b[2];\n }\n}\n\nfunction nameFromDescription(description) {\n if (!description || !description.attributes) { return null; }\n var attrs = description.attributes;\n for (var a = 0; a < attrs.length; ++a) {\n if (attrs[a].key === 'name') {\n return attrs[a].value;\n }\n }\n return null;\n}\n\nfunction defaultValueScrubber(scrubFields) {\n var patterns = [];\n for (var i = 0; i < scrubFields.length; ++i) {\n patterns.push(new RegExp(scrubFields[i], 'i'));\n }\n return function(description) {\n var name = nameFromDescription(description);\n if (!name) { return false; }\n for (var i = 0; i < patterns.length; ++i) {\n if (patterns[i].test(name)) {\n return true;\n }\n }\n return false;\n };\n}\n\nfunction Instrumenter(options, telemeter, rollbar, _window, _document) {\n this.options = options;\n var autoInstrument = options.autoInstrument;\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);\n this.telemeter = telemeter;\n this.rollbar = rollbar;\n this.diagnostic = rollbar.client.notifier.diagnostic;\n this._window = _window || {};\n this._document = _document || {};\n this.replacements = {\n network: [],\n log: [],\n navigation: [],\n connectivity: []\n };\n this.eventRemovers = {\n dom: [],\n connectivity: [],\n contentsecuritypolicy: []\n };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function(options) {\n this.options = _.merge(this.options, options);\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.merge(this.autoInstrument);\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n if (options.scrubTelemetryInputs !== undefined) {\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n }\n if (options.telemetryScrubber !== undefined) {\n this.telemetryScrubber = options.telemetryScrubber;\n }\n};\n\n// eslint-disable-next-line complexity\nInstrumenter.prototype.instrument = function(oldSettings) {\n if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {\n this.instrumentNetwork();\n } else if (!this.autoInstrument.network && oldSettings && oldSettings.network) {\n this.deinstrumentNetwork();\n }\n\n if (this.autoInstrument.log && !(oldSettings && oldSettings.log)) {\n this.instrumentConsole();\n } else if (!this.autoInstrument.log && oldSettings && oldSettings.log) {\n this.deinstrumentConsole();\n }\n\n if (this.autoInstrument.dom && !(oldSettings && oldSettings.dom)) {\n this.instrumentDom();\n } else if (!this.autoInstrument.dom && oldSettings && oldSettings.dom) {\n this.deinstrumentDom();\n }\n\n if (this.autoInstrument.navigation && !(oldSettings && oldSettings.navigation)) {\n this.instrumentNavigation();\n } else if (!this.autoInstrument.navigation && oldSettings && oldSettings.navigation) {\n this.deinstrumentNavigation();\n }\n\n if (this.autoInstrument.connectivity && !(oldSettings && oldSettings.connectivity)) {\n this.instrumentConnectivity();\n } else if (!this.autoInstrument.connectivity && oldSettings && oldSettings.connectivity) {\n this.deinstrumentConnectivity();\n }\n\n if (this.autoInstrument.contentSecurityPolicy && !(oldSettings && oldSettings.contentSecurityPolicy)) {\n this.instrumentContentSecurityPolicy();\n } else if (!this.autoInstrument.contentSecurityPolicy && oldSettings && oldSettings.contentSecurityPolicy) {\n this.deinstrumentContentSecurityPolicy();\n }\n};\n\nInstrumenter.prototype.deinstrumentNetwork = function() {\n restore(this.replacements, 'network');\n};\n\nInstrumenter.prototype.instrumentNetwork = function() {\n var self = this;\n\n function wrapProp(prop, xhr) {\n if (prop in xhr && _.isFunction(xhr[prop])) {\n replace(xhr, prop, function(orig) {\n return self.rollbar.wrap(orig);\n });\n }\n }\n\n if ('XMLHttpRequest' in this._window) {\n var xhrp = this._window.XMLHttpRequest.prototype;\n replace(xhrp, 'open', function(orig) {\n return function(method, url) {\n if (_.isType(url, 'string')) {\n if (this.__rollbar_xhr) {\n this.__rollbar_xhr.method = method;\n this.__rollbar_xhr.url = url;\n this.__rollbar_xhr.status_code = null;\n this.__rollbar_xhr.start_time_ms = _.now();\n this.__rollbar_xhr.end_time_ms = null;\n } else {\n this.__rollbar_xhr = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'setRequestHeader', function(orig) {\n return function(header, value) {\n // If xhr.open is async, __rollbar_xhr may not be initialized yet.\n if (!this.__rollbar_xhr) {\n this.__rollbar_xhr = {};\n }\n if (_.isType(header, 'string') && _.isType(value, 'string')) {\n if (self.autoInstrument.networkRequestHeaders) {\n if (!this.__rollbar_xhr.request_headers) {\n this.__rollbar_xhr.request_headers = {};\n }\n this.__rollbar_xhr.request_headers[header] = value;\n }\n // We want the content type even if request header telemetry is off.\n if (header.toLowerCase() === 'content-type') {\n this.__rollbar_xhr.request_content_type = value;\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'send', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(data) {\n /* eslint-enable no-unused-vars */\n var xhr = this;\n\n function onreadystatechangeHandler() {\n if (xhr.__rollbar_xhr) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n if (self.autoInstrument.networkRequestBody) {\n xhr.__rollbar_xhr.request = data;\n }\n xhr.__rollbar_event = self.captureNetwork(xhr.__rollbar_xhr, 'xhr', undefined);\n }\n if (xhr.readyState < 2) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n }\n if (xhr.readyState > 3) {\n xhr.__rollbar_xhr.end_time_ms = _.now();\n\n var headers = null;\n xhr.__rollbar_xhr.response_content_type = xhr.getResponseHeader('Content-Type');\n if (self.autoInstrument.networkResponseHeaders) {\n var headersConfig = self.autoInstrument.networkResponseHeaders;\n headers = {};\n try {\n var header, i;\n if (headersConfig === true) {\n var allHeaders = xhr.getAllResponseHeaders();\n if (allHeaders) {\n var arr = allHeaders.trim().split(/[\\r\\n]+/);\n var parts, value;\n for (i=0; i < arr.length; i++) {\n parts = arr[i].split(': ');\n header = parts.shift();\n value = parts.join(': ');\n headers[header] = value;\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n header = headersConfig[i];\n headers[header] = xhr.getResponseHeader(header);\n }\n }\n } catch (e) {\n /* we ignore the errors here that could come from different\n * browser issues with the xhr methods */\n }\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n try {\n body = xhr.responseText;\n } catch (e) {\n /* ignore errors from reading responseText */\n }\n }\n var response = null;\n if (body || headers) {\n response = {};\n if (body) {\n if (self.isJsonContentType(xhr.__rollbar_xhr.response_content_type)) {\n response.body = self.scrubJson(body);\n } else {\n response.body = body;\n }\n }\n if (headers) {\n response.headers = headers;\n }\n }\n if (response) {\n xhr.__rollbar_xhr.response = response;\n }\n try {\n var code = xhr.status;\n code = code === 1223 ? 204 : code;\n xhr.__rollbar_xhr.status_code = code;\n xhr.__rollbar_event.level = self.telemeter.levelFromStatus(code);\n self.errorOnHttpStatus(xhr.__rollbar_xhr);\n } catch (e) {\n /* ignore possible exception from xhr.status */\n }\n }\n }\n }\n\n wrapProp('onload', xhr);\n wrapProp('onerror', xhr);\n wrapProp('onprogress', xhr);\n\n if ('onreadystatechange' in xhr && _.isFunction(xhr.onreadystatechange)) {\n replace(xhr, 'onreadystatechange', function(orig) {\n return self.rollbar.wrap(orig, undefined, onreadystatechangeHandler);\n });\n } else {\n xhr.onreadystatechange = onreadystatechangeHandler;\n }\n if (xhr.__rollbar_xhr && self.trackHttpErrors()) {\n xhr.__rollbar_xhr.stack = (new Error()).stack;\n }\n return orig.apply(this, arguments);\n }\n }, this.replacements, 'network');\n }\n\n if ('fetch' in this._window) {\n replace(this._window, 'fetch', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(fn, t) {\n /* eslint-enable no-unused-vars */\n var args = new Array(arguments.length);\n for (var i=0, len=args.length; i < len; i++) {\n args[i] = arguments[i];\n }\n var input = args[0];\n var method = 'GET';\n var url;\n if (_.isType(input, 'string')) {\n url = input;\n } else if (input) {\n url = input.url;\n if (input.method) {\n method = input.method;\n }\n }\n if (args[1] && args[1].method) {\n method = args[1].method;\n }\n var metadata = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n if (args[1] && args[1].headers) {\n // Argument may be a Headers object, or plain object. Ensure here that\n // we are working with a Headers object with case-insensitive keys.\n var reqHeaders = new Headers(args[1].headers);\n\n metadata.request_content_type = reqHeaders.get('Content-Type');\n\n if (self.autoInstrument.networkRequestHeaders) {\n metadata.request_headers = self.fetchHeaders(reqHeaders, self.autoInstrument.networkRequestHeaders)\n }\n }\n\n if (self.autoInstrument.networkRequestBody) {\n if (args[1] && args[1].body) {\n metadata.request = args[1].body;\n } else if (args[0] && !_.isType(args[0], 'string') && args[0].body) {\n metadata.request = args[0].body;\n }\n }\n self.captureNetwork(metadata, 'fetch', undefined);\n if (self.trackHttpErrors()) {\n metadata.stack = (new Error()).stack;\n }\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n metadata.response_content_type = resp.headers.get('Content-Type');\n var headers = null;\n if (self.autoInstrument.networkResponseHeaders) {\n headers = self.fetchHeaders(resp.headers, self.autoInstrument.networkResponseHeaders);\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n if (typeof resp.text === 'function') { // Response.text() is not implemented on some platforms\n // The response must be cloned to prevent reading (and locking) the original stream.\n body = resp.clone().text(); //returns a Promise\n }\n }\n if (headers || body) {\n metadata.response = {};\n if (body) {\n // Test to ensure body is a Promise, which it should always be.\n if (typeof body.then === 'function') {\n body.then(function (text) {\n if (self.isJsonContentType(metadata.response_content_type)) {\n metadata.response.body = self.scrubJson(text);\n }\n });\n } else {\n metadata.response.body = body;\n }\n }\n if (headers) {\n metadata.response.headers = headers;\n }\n }\n self.errorOnHttpStatus(metadata);\n return resp;\n });\n };\n }, this.replacements, 'network');\n }\n};\n\nInstrumenter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID) {\n if (metadata.request && this.isJsonContentType(metadata.request_content_type)) {\n metadata.request = this.scrubJson(metadata.request);\n }\n return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);\n};\n\nInstrumenter.prototype.isJsonContentType = function(contentType) {\n return (contentType && _.isType(contentType, 'string') && contentType.toLowerCase().includes('json')) ? true : false;\n}\n\nInstrumenter.prototype.scrubJson = function(json) {\n return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));\n}\n\nInstrumenter.prototype.fetchHeaders = function(inHeaders, headersConfig) {\n var outHeaders = {};\n try {\n var i;\n if (headersConfig === true) {\n if (typeof inHeaders.entries === 'function') { // Headers.entries() is not implemented in IE\n var allHeaders = inHeaders.entries();\n var currentHeader = allHeaders.next();\n while (!currentHeader.done) {\n outHeaders[currentHeader.value[0]] = currentHeader.value[1];\n currentHeader = allHeaders.next();\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n var header = headersConfig[i];\n outHeaders[header] = inHeaders.get(header);\n }\n }\n } catch (e) {\n /* ignore probable IE errors */\n }\n return outHeaders;\n}\n\nInstrumenter.prototype.trackHttpErrors = function() {\n return this.autoInstrument.networkErrorOnHttp5xx ||\n this.autoInstrument.networkErrorOnHttp4xx ||\n this.autoInstrument.networkErrorOnHttp0;\n}\n\nInstrumenter.prototype.errorOnHttpStatus = function(metadata) {\n var status = metadata.status_code;\n\n if ((status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||\n (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||\n (status === 0 && this.autoInstrument.networkErrorOnHttp0)) {\n var error = new Error('HTTP request failed with Status ' + status);\n error.stack = metadata.stack;\n this.rollbar.error(error, { skipFrames: 1 });\n }\n}\n\nInstrumenter.prototype.deinstrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n var b;\n while (this.replacements['log'].length) {\n b = this.replacements['log'].shift();\n this._window.console[b[0]] = b[1];\n }\n};\n\nInstrumenter.prototype.instrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n\n var self = this;\n var c = this._window.console;\n\n function wrapConsole(method) {\n 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778\n\n var orig = c[method];\n var origConsole = c;\n var level = method === 'warn' ? 'warning' : method;\n c[method] = function() {\n var args = Array.prototype.slice.call(arguments);\n var message = _.formatArgsAsString(args);\n self.telemeter.captureLog(message, level);\n if (orig) {\n Function.prototype.apply.call(orig, origConsole, args);\n }\n };\n self.replacements['log'].push([method, orig]);\n }\n var methods = ['debug','info','warn','error','log'];\n try {\n for (var i=0, len=methods.length; i < len; i++) {\n wrapConsole(methods[i]);\n }\n } catch (e) {\n this.diagnostic.instrumentConsole = { error: e.message };\n }\n};\n\nInstrumenter.prototype.deinstrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n this.removeListeners('dom');\n};\n\nInstrumenter.prototype.instrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n var clickHandler = this.handleClick.bind(this);\n var blurHandler = this.handleBlur.bind(this);\n this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);\n this.addListener('dom', this._window, 'blur', 'onfocusout', blurHandler, true);\n};\n\nInstrumenter.prototype.handleClick = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n var hasTag = e && e.tagName;\n var anchorOrButton = domUtil.isDescribedElement(e, 'a') || domUtil.isDescribedElement(e, 'button');\n if (hasTag && (anchorOrButton || domUtil.isDescribedElement(e, 'input', ['button', 'submit']))) {\n this.captureDomEvent('click', e);\n } else if (domUtil.isDescribedElement(e, 'input', ['checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value, e.checked);\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleBlur = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n if (e && e.tagName) {\n if (domUtil.isDescribedElement(e, 'textarea')) {\n this.captureDomEvent('input', e, e.value);\n } else if (domUtil.isDescribedElement(e, 'select') && e.options && e.options.length) {\n this.handleSelectInputChanged(e);\n } else if (domUtil.isDescribedElement(e, 'input') && !domUtil.isDescribedElement(e, 'input', ['button', 'submit', 'hidden', 'checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value);\n }\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleSelectInputChanged = function(elem) {\n if (elem.multiple) {\n for (var i = 0; i < elem.options.length; i++) {\n if (elem.options[i].selected) {\n this.captureDomEvent('input', elem, elem.options[i].value);\n }\n }\n } else if (elem.selectedIndex >= 0 && elem.options[elem.selectedIndex]) {\n this.captureDomEvent('input', elem, elem.options[elem.selectedIndex].value);\n }\n};\n\nInstrumenter.prototype.captureDomEvent = function(subtype, element, value, isChecked) {\n if (value !== undefined) {\n if (this.scrubTelemetryInputs || (domUtil.getElementType(element) === 'password')) {\n value = '[scrubbed]';\n } else {\n var description = domUtil.describeElement(element);\n if (this.telemetryScrubber) {\n if (this.telemetryScrubber(description)) {\n value = '[scrubbed]';\n }\n } else if (this.defaultValueScrubber(description)) {\n value = '[scrubbed]';\n }\n }\n }\n var elementString = domUtil.elementArrayToString(domUtil.treeToArray(element));\n this.telemeter.captureDom(subtype, elementString, value, isChecked);\n};\n\nInstrumenter.prototype.deinstrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n restore(this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.instrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n var self = this;\n replace(this._window, 'onpopstate', function(orig) {\n return function() {\n var current = self._location.href;\n self.handleUrlChange(self._lastHref, current);\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n }, this.replacements, 'navigation');\n\n replace(this._window.history, 'pushState', function(orig) {\n return function() {\n var url = arguments.length > 2 ? arguments[2] : undefined;\n if (url) {\n self.handleUrlChange(self._lastHref, url + '');\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.handleUrlChange = function(from, to) {\n var parsedHref = urlparser.parse(this._location.href);\n var parsedTo = urlparser.parse(to);\n var parsedFrom = urlparser.parse(from);\n this._lastHref = to;\n if (parsedHref.protocol === parsedTo.protocol && parsedHref.host === parsedTo.host) {\n to = parsedTo.path + (parsedTo.hash || '');\n }\n if (parsedHref.protocol === parsedFrom.protocol && parsedHref.host === parsedFrom.host) {\n from = parsedFrom.path + (parsedFrom.hash || '');\n }\n this.telemeter.captureNavigation(from, to);\n};\n\nInstrumenter.prototype.deinstrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.removeListeners('connectivity');\n } else {\n restore(this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.instrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.addListener('connectivity', this._window, 'online', undefined, function() {\n this.telemeter.captureConnectivityChange('online');\n }.bind(this), true);\n this.addListener('connectivity', this._window, 'offline', undefined, function() {\n this.telemeter.captureConnectivityChange('offline');\n }.bind(this), true);\n } else {\n var self = this;\n replace(this._document.body, 'ononline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('online');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n replace(this._document.body, 'onoffline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('offline');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.handleCspEvent = function(cspEvent) {\n var message = 'Security Policy Violation: ' +\n 'blockedURI: ' + cspEvent.blockedURI + ', ' +\n 'violatedDirective: ' + cspEvent.violatedDirective + ', ' +\n 'effectiveDirective: ' + cspEvent.effectiveDirective + ', ';\n\n if (cspEvent.sourceFile) {\n message += 'location: ' + cspEvent.sourceFile + ', ' +\n 'line: ' + cspEvent.lineNumber + ', ' +\n 'col: ' + cspEvent.columnNumber + ', ';\n }\n\n message += 'originalPolicy: ' + cspEvent.originalPolicy;\n\n this.telemeter.captureLog(message, 'error');\n this.handleCspError(message);\n}\n\nInstrumenter.prototype.handleCspError = function(message) {\n if (this.autoInstrument.errorOnContentSecurityPolicy) {\n this.rollbar.error(message);\n }\n}\n\nInstrumenter.prototype.deinstrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._window)) { return; }\n\n this.removeListeners('contentsecuritypolicy');\n};\n\nInstrumenter.prototype.instrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._window)) { return; }\n\n var cspHandler = this.handleCspEvent.bind(this);\n this.addListener('contentsecuritypolicy', this._window, 'securitypolicyviolation', null, cspHandler, false);\n};\n\nInstrumenter.prototype.addListener = function(section, obj, type, altType, handler, capture) {\n if (obj.addEventListener) {\n obj.addEventListener(type, handler, capture);\n this.eventRemovers[section].push(function() {\n obj.removeEventListener(type, handler, capture);\n });\n } else if (altType) {\n obj.attachEvent(altType, handler);\n this.eventRemovers[section].push(function() {\n obj.detachEvent(altType, handler);\n });\n }\n};\n\nInstrumenter.prototype.removeListeners = function(section) {\n var r;\n while (this.eventRemovers[section].length) {\n r = this.eventRemovers[section].shift();\n r();\n }\n};\n\nmodule.exports = Instrumenter;\n","'use strict';\n\nfunction getElementType(e) {\n return (e.getAttribute('type') || '').toLowerCase();\n}\n\nfunction isDescribedElement(element, type, subtypes) {\n if (element.tagName.toLowerCase() !== type.toLowerCase()) {\n return false;\n }\n if (!subtypes) {\n return true;\n }\n element = getElementType(element);\n for (var i = 0; i < subtypes.length; i++) {\n if (subtypes[i] === element) {\n return true;\n }\n }\n return false;\n}\n\nfunction getElementFromEvent(evt, doc) {\n if (evt.target) {\n return evt.target;\n }\n if (doc && doc.elementFromPoint) {\n return doc.elementFromPoint(evt.clientX, evt.clientY);\n }\n return undefined;\n}\n\nfunction treeToArray(elem) {\n var MAX_HEIGHT = 5;\n var out = [];\n var nextDescription;\n for (var height = 0; elem && height < MAX_HEIGHT; height++) {\n nextDescription = describeElement(elem);\n if (nextDescription.tagName === 'html') {\n break;\n }\n out.unshift(nextDescription);\n elem = elem.parentNode;\n }\n return out;\n}\n\nfunction elementArrayToString(a) {\n var MAX_LENGTH = 80;\n var separator = ' > ', separatorLength = separator.length;\n var out = [], len = 0, nextStr, totalLength;\n\n for (var i = a.length - 1; i >= 0; i--) {\n nextStr = descriptionToString(a[i]);\n totalLength = len + (out.length * separatorLength) + nextStr.length;\n if (i < a.length - 1 && totalLength >= MAX_LENGTH + 3) {\n out.unshift('...');\n break;\n }\n out.unshift(nextStr);\n len += nextStr.length;\n }\n return out.join(separator);\n}\n\nfunction descriptionToString(desc) {\n if (!desc || !desc.tagName) {\n return '';\n }\n var out = [desc.tagName];\n if (desc.id) {\n out.push('#' + desc.id);\n }\n if (desc.classes) {\n out.push('.' + desc.classes.join('.'));\n }\n for (var i = 0; i < desc.attributes.length; i++) {\n out.push('[' + desc.attributes[i].key + '=\"' + desc.attributes[i].value + '\"]');\n }\n\n return out.join('');\n}\n\n/**\n * Input: a dom element\n * Output: null if tagName is falsey or input is falsey, else\n * {\n * tagName: String,\n * id: String | undefined,\n * classes: [String] | undefined,\n * attributes: [\n * {\n * key: OneOf(type, name, title, alt),\n * value: String\n * }\n * ]\n * }\n */\nfunction describeElement(elem) {\n if (!elem || !elem.tagName) {\n return null;\n }\n var out = {}, className, key, attr, i;\n out.tagName = elem.tagName.toLowerCase();\n if (elem.id) {\n out.id = elem.id;\n }\n className = elem.className;\n if (className && (typeof className === 'string')) {\n out.classes = className.split(/\\s+/);\n }\n var attributes = ['type', 'name', 'title', 'alt'];\n out.attributes = [];\n for (i = 0; i < attributes.length; i++) {\n key = attributes[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.attributes.push({key: key, value: attr});\n }\n }\n return out;\n}\n\nmodule.exports = {\n describeElement: describeElement,\n descriptionToString: descriptionToString,\n elementArrayToString: elementArrayToString,\n treeToArray: treeToArray,\n getElementFromEvent: getElementFromEvent,\n isDescribedElement: isDescribedElement,\n getElementType: getElementType\n};\n","'use strict';\n\nvar polyfillJSON = require('../../vendor/JSON-js/json3');\n\nmodule.exports = polyfillJSON;\n","// json3.js\n// 2017-02-21\n// Public Domain.\n// NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.\n// See http://www.JSON.org/js.html\n// This code should be minified before deployment.\n// See http://javascript.crockford.com/jsmin.html\n\n// USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO\n// NOT CONTROL.\n\n// This file creates a global JSON object containing two methods: stringify\n// and parse. This file provides the ES5 JSON capability to ES3 systems.\n// If a project might run on IE8 or earlier, then this file should be included.\n// This file does nothing on ES5 systems.\n\n// JSON.stringify(value, replacer, space)\n// value any JavaScript value, usually an object or array.\n// replacer an optional parameter that determines how object\n// values are stringified for objects. It can be a\n// function or an array of strings.\n// space an optional parameter that specifies the indentation\n// of nested structures. If it is omitted, the text will\n// be packed without extra whitespace. If it is a number,\n// it will specify the number of spaces to indent at each\n// level. If it is a string (such as \"\\t\" or \" \"),\n// it contains the characters used to indent at each level.\n// This method produces a JSON text from a JavaScript value.\n// When an object value is found, if the object contains a toJSON\n// method, its toJSON method will be called and the result will be\n// stringified. A toJSON method does not serialize: it returns the\n// value represented by the name/value pair that should be serialized,\n// or undefined if nothing should be serialized. The toJSON method\n// will be passed the key associated with the value, and this will be\n// bound to the value.\n\n// For example, this would serialize Dates as ISO strings.\n\n// Date.prototype.toJSON = function (key) {\n// function f(n) {\n// // Format integers to have at least two digits.\n// return (n < 10)\n// ? \"0\" + n\n// : n;\n// }\n// return this.getUTCFullYear() + \"-\" +\n// f(this.getUTCMonth() + 1) + \"-\" +\n// f(this.getUTCDate()) + \"T\" +\n// f(this.getUTCHours()) + \":\" +\n// f(this.getUTCMinutes()) + \":\" +\n// f(this.getUTCSeconds()) + \"Z\";\n// };\n\n// You can provide an optional replacer method. It will be passed the\n// key and value of each member, with this bound to the containing\n// object. The value that is returned from your method will be\n// serialized. If your method returns undefined, then the member will\n// be excluded from the serialization.\n\n// If the replacer parameter is an array of strings, then it will be\n// used to select the members to be serialized. It filters the results\n// such that only members with keys listed in the replacer array are\n// stringified.\n\n// Values that do not have JSON representations, such as undefined or\n// functions, will not be serialized. Such values in objects will be\n// dropped; in arrays they will be replaced with null. You can use\n// a replacer function to replace those with JSON values.\n\n// JSON.stringify(undefined) returns undefined.\n\n// The optional space parameter produces a stringification of the\n// value that is filled with line breaks and indentation to make it\n// easier to read.\n\n// If the space parameter is a non-empty string, then that string will\n// be used for indentation. If the space parameter is a number, then\n// the indentation will be that many spaces.\n\n// Example:\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}]);\n// // text is '[\"e\",{\"pluribus\":\"unum\"}]'\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}], null, \"\\t\");\n// // text is '[\\n\\t\"e\",\\n\\t{\\n\\t\\t\"pluribus\": \"unum\"\\n\\t}\\n]'\n\n// text = JSON.stringify([new Date()], function (key, value) {\n// return this[key] instanceof Date\n// ? \"Date(\" + this[key] + \")\"\n// : value;\n// });\n// // text is '[\"Date(---current time---)\"]'\n\n// JSON.parse(text, reviver)\n// This method parses a JSON text to produce an object or array.\n// It can throw a SyntaxError exception.\n// This has been modified to use JSON-js/json_parse_state.js as the\n// parser instead of the one built around eval found in JSON-js/json2.js\n\n// The optional reviver parameter is a function that can filter and\n// transform the results. It receives each of the keys and values,\n// and its return value is used instead of the original value.\n// If it returns what it received, then the structure is not modified.\n// If it returns undefined then the member is deleted.\n\n// Example:\n\n// // Parse the text. Values that look like ISO date strings will\n// // be converted to Date objects.\n\n// myData = JSON.parse(text, function (key, value) {\n// var a;\n// if (typeof value === \"string\") {\n// a =\n// /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2}(?:\\.\\d*)?)Z$/.exec(value);\n// if (a) {\n// return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],\n// +a[5], +a[6]));\n// }\n// }\n// return value;\n// });\n\n// myData = JSON.parse('[\"Date(09/09/2001)\"]', function (key, value) {\n// var d;\n// if (typeof value === \"string\" &&\n// value.slice(0, 5) === \"Date(\" &&\n// value.slice(-1) === \")\") {\n// d = new Date(value.slice(5, -1));\n// if (d) {\n// return d;\n// }\n// }\n// return value;\n// });\n\n// This is a reference implementation. You are free to copy, modify, or\n// redistribute.\n\n/*jslint\n for, this\n */\n\n/*property\n JSON, apply, call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,\n getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,\n lastIndex, length, parse, prototype, push, replace, slice, stringify,\n test, toJSON, toString, valueOf\n */\n\nvar setupCustomJSON = function(JSON) {\n\n var rx_one = /^[\\],:{}\\s]*$/;\n var rx_two = /\\\\(?:[\"\\\\\\/bfnrt]|u[0-9a-fA-F]{4})/g;\n var rx_three = /\"[^\"\\\\\\n\\r]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g;\n var rx_four = /(?:^|:|,)(?:\\s*\\[)+/g;\n var rx_escapable = /[\\\\\"\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n var rx_dangerous = /[\\u0000\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n\n function f(n) {\n // Format integers to have at least two digits.\n return n < 10\n ? \"0\" + n\n : n;\n }\n\n function this_value() {\n return this.valueOf();\n }\n\n if (typeof Date.prototype.toJSON !== \"function\") {\n\n Date.prototype.toJSON = function () {\n\n return isFinite(this.valueOf())\n ? this.getUTCFullYear() + \"-\" +\n f(this.getUTCMonth() + 1) + \"-\" +\n f(this.getUTCDate()) + \"T\" +\n f(this.getUTCHours()) + \":\" +\n f(this.getUTCMinutes()) + \":\" +\n f(this.getUTCSeconds()) + \"Z\"\n : null;\n };\n\n Boolean.prototype.toJSON = this_value;\n Number.prototype.toJSON = this_value;\n String.prototype.toJSON = this_value;\n }\n\n var gap;\n var indent;\n var meta;\n var rep;\n\n\n function quote(string) {\n\n // If the string contains no control characters, no quote characters, and no\n // backslash characters, then we can safely slap some quotes around it.\n // Otherwise we must also replace the offending characters with safe escape\n // sequences.\n\n rx_escapable.lastIndex = 0;\n return rx_escapable.test(string)\n ? \"\\\"\" + string.replace(rx_escapable, function (a) {\n var c = meta[a];\n return typeof c === \"string\"\n ? c\n : \"\\\\u\" + (\"0000\" + a.charCodeAt(0).toString(16)).slice(-4);\n }) + \"\\\"\"\n : \"\\\"\" + string + \"\\\"\";\n }\n\n\n function str(key, holder) {\n\n // Produce a string from holder[key].\n\n var i; // The loop counter.\n var k; // The member key.\n var v; // The member value.\n var length;\n var mind = gap;\n var partial;\n var value = holder[key];\n\n // If the value has a toJSON method, call it to obtain a replacement value.\n\n if (value && typeof value === \"object\" &&\n typeof value.toJSON === \"function\") {\n value = value.toJSON(key);\n }\n\n // If we were called with a replacer function, then call the replacer to\n // obtain a replacement value.\n\n if (typeof rep === \"function\") {\n value = rep.call(holder, key, value);\n }\n\n // What happens next depends on the value's type.\n\n switch (typeof value) {\n case \"string\":\n return quote(value);\n\n case \"number\":\n\n // JSON numbers must be finite. Encode non-finite numbers as null.\n\n return isFinite(value)\n ? String(value)\n : \"null\";\n\n case \"boolean\":\n case \"null\":\n\n // If the value is a boolean or null, convert it to a string. Note:\n // typeof null does not produce \"null\". The case is included here in\n // the remote chance that this gets fixed someday.\n\n return String(value);\n\n // If the type is \"object\", we might be dealing with an object or an array or\n // null.\n\n case \"object\":\n\n // Due to a specification blunder in ECMAScript, typeof null is \"object\",\n // so watch out for that case.\n\n if (!value) {\n return \"null\";\n }\n\n // Make an array to hold the partial results of stringifying this object value.\n\n gap += indent;\n partial = [];\n\n // Is the value an array?\n\n if (Object.prototype.toString.apply(value) === \"[object Array]\") {\n\n // The value is an array. Stringify every element. Use null as a placeholder\n // for non-JSON values.\n\n length = value.length;\n for (i = 0; i < length; i += 1) {\n partial[i] = str(i, value) || \"null\";\n }\n\n // Join all of the elements together, separated with commas, and wrap them in\n // brackets.\n\n v = partial.length === 0\n ? \"[]\"\n : gap\n ? \"[\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"]\"\n : \"[\" + partial.join(\",\") + \"]\";\n gap = mind;\n return v;\n }\n\n // If the replacer is an array, use it to select the members to be stringified.\n\n if (rep && typeof rep === \"object\") {\n length = rep.length;\n for (i = 0; i < length; i += 1) {\n if (typeof rep[i] === \"string\") {\n k = rep[i];\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n } else {\n\n // Otherwise, iterate through all of the keys in the object.\n\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(value, k)) {\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n }\n\n // Join all of the member texts together, separated with commas,\n // and wrap them in braces.\n\n v = partial.length === 0\n ? \"{}\"\n : gap\n ? \"{\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"}\"\n : \"{\" + partial.join(\",\") + \"}\";\n gap = mind;\n return v;\n }\n }\n\n // If the JSON object does not yet have a stringify method, give it one.\n\n if (typeof JSON.stringify !== \"function\") {\n meta = { // table of character substitutions\n \"\\b\": \"\\\\b\",\n \"\\t\": \"\\\\t\",\n \"\\n\": \"\\\\n\",\n \"\\f\": \"\\\\f\",\n \"\\r\": \"\\\\r\",\n \"\\\"\": \"\\\\\\\"\",\n \"\\\\\": \"\\\\\\\\\"\n };\n JSON.stringify = function (value, replacer, space) {\n\n // The stringify method takes a value and an optional replacer, and an optional\n // space parameter, and returns a JSON text. The replacer can be a function\n // that can replace values, or an array of strings that will select the keys.\n // A default replacer method can be provided. Use of the space parameter can\n // produce text that is more easily readable.\n\n var i;\n gap = \"\";\n indent = \"\";\n\n // If the space parameter is a number, make an indent string containing that\n // many spaces.\n\n if (typeof space === \"number\") {\n for (i = 0; i < space; i += 1) {\n indent += \" \";\n }\n\n // If the space parameter is a string, it will be used as the indent string.\n\n } else if (typeof space === \"string\") {\n indent = space;\n }\n\n // If there is a replacer, it must be a function or an array.\n // Otherwise, throw an error.\n\n rep = replacer;\n if (replacer && typeof replacer !== \"function\" &&\n (typeof replacer !== \"object\" ||\n typeof replacer.length !== \"number\")) {\n throw new Error(\"JSON.stringify\");\n }\n\n // Make a fake root object containing our value under the key of \"\".\n // Return the result of stringifying the value.\n\n return str(\"\", {\"\": value});\n };\n }\n\n\n // If the JSON object does not yet have a parse method, give it one.\n\n if (typeof JSON.parse !== \"function\") {\n JSON.parse = (function () {\n\n // This function creates a JSON parse function that uses a state machine rather\n // than the dangerous eval function to parse a JSON text.\n\n var state; // The state of the parser, one of\n // 'go' The starting state\n // 'ok' The final, accepting state\n // 'firstokey' Ready for the first key of the object or\n // the closing of an empty object\n // 'okey' Ready for the next key of the object\n // 'colon' Ready for the colon\n // 'ovalue' Ready for the value half of a key/value pair\n // 'ocomma' Ready for a comma or closing }\n // 'firstavalue' Ready for the first value of an array or\n // an empty array\n // 'avalue' Ready for the next value of an array\n // 'acomma' Ready for a comma or closing ]\n var stack; // The stack, for controlling nesting.\n var container; // The current container object or array\n var key; // The current key\n var value; // The current value\n var escapes = { // Escapement translation table\n \"\\\\\": \"\\\\\",\n \"\\\"\": \"\\\"\",\n \"/\": \"/\",\n \"t\": \"\\t\",\n \"n\": \"\\n\",\n \"r\": \"\\r\",\n \"f\": \"\\f\",\n \"b\": \"\\b\"\n };\n var string = { // The actions for string tokens\n go: function () {\n state = \"ok\";\n },\n firstokey: function () {\n key = value;\n state = \"colon\";\n },\n okey: function () {\n key = value;\n state = \"colon\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var number = { // The actions for number tokens\n go: function () {\n state = \"ok\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var action = {\n\n // The action table describes the behavior of the machine. It contains an\n // object for each token. Each object contains a method that is called when\n // a token is matched in a state. An object will lack a method for illegal\n // states.\n\n \"{\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = {};\n state = \"firstokey\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = {};\n state = \"firstokey\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n }\n },\n \"}\": {\n firstokey: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n ocomma: function () {\n var pop = stack.pop();\n container[key] = value;\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \"[\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = [];\n state = \"firstavalue\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = [];\n state = \"firstavalue\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n }\n },\n \"]\": {\n firstavalue: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n acomma: function () {\n var pop = stack.pop();\n container.push(value);\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \":\": {\n colon: function () {\n if (Object.hasOwnProperty.call(container, key)) {\n throw new SyntaxError(\"Duplicate key '\" + key + \"\\\"\");\n }\n state = \"ovalue\";\n }\n },\n \",\": {\n ocomma: function () {\n container[key] = value;\n state = \"okey\";\n },\n acomma: function () {\n container.push(value);\n state = \"avalue\";\n }\n },\n \"true\": {\n go: function () {\n value = true;\n state = \"ok\";\n },\n ovalue: function () {\n value = true;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = true;\n state = \"acomma\";\n },\n avalue: function () {\n value = true;\n state = \"acomma\";\n }\n },\n \"false\": {\n go: function () {\n value = false;\n state = \"ok\";\n },\n ovalue: function () {\n value = false;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = false;\n state = \"acomma\";\n },\n avalue: function () {\n value = false;\n state = \"acomma\";\n }\n },\n \"null\": {\n go: function () {\n value = null;\n state = \"ok\";\n },\n ovalue: function () {\n value = null;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = null;\n state = \"acomma\";\n },\n avalue: function () {\n value = null;\n state = \"acomma\";\n }\n }\n };\n\n function debackslashify(text) {\n\n // Remove and replace any backslash escapement.\n\n return text.replace(/\\\\(?:u(.{4})|([^u]))/g, function (ignore, b, c) {\n return b\n ? String.fromCharCode(parseInt(b, 16))\n : escapes[c];\n });\n }\n\n return function (source, reviver) {\n\n // A regular expression is used to extract tokens from the JSON text.\n // The extraction process is cautious.\n\n var result;\n var tx = /^[\\u0020\\t\\n\\r]*(?:([,:\\[\\]{}]|true|false|null)|(-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?)|\"((?:[^\\r\\n\\t\\\\\\\"]|\\\\(?:[\"\\\\\\/trnfb]|u[0-9a-fA-F]{4}))*)\")/;\n\n // Set the starting state.\n\n state = \"go\";\n\n // The stack records the container, key, and state for each object or array\n // that contains another object or array while processing nested structures.\n\n stack = [];\n\n // If any error occurs, we will catch it and ultimately throw a syntax error.\n\n try {\n\n // For each token...\n\n while (true) {\n result = tx.exec(source);\n if (!result) {\n break;\n }\n\n // result is the result array from matching the tokenizing regular expression.\n // result[0] contains everything that matched, including any initial whitespace.\n // result[1] contains any punctuation that was matched, or true, false, or null.\n // result[2] contains a matched number, still in string form.\n // result[3] contains a matched string, without quotes but with escapement.\n\n if (result[1]) {\n\n // Token: Execute the action for this state and token.\n\n action[result[1]][state]();\n\n } else if (result[2]) {\n\n // Number token: Convert the number string into a number value and execute\n // the action for this state and number.\n\n value = +result[2];\n number[state]();\n } else {\n\n // String token: Replace the escapement sequences and execute the action for\n // this state and string.\n\n value = debackslashify(result[3]);\n string[state]();\n }\n\n // Remove the token from the string. The loop will continue as long as there\n // are tokens. This is a slow process, but it allows the use of ^ matching,\n // which assures that no illegal tokens slip through.\n\n source = source.slice(result[0].length);\n }\n\n // If we find a state/token combination that is illegal, then the action will\n // cause an error. We handle the error by simply changing the state.\n\n } catch (e) {\n state = e;\n }\n\n // The parsing is finished. If we are not in the final \"ok\" state, or if the\n // remaining source contains anything except whitespace, then we did not have\n //a well-formed JSON text.\n\n if (state !== \"ok\" || (/[^\\u0020\\t\\n\\r]/.test(source))) {\n throw (state instanceof SyntaxError)\n ? state\n : new SyntaxError(\"JSON\");\n }\n\n // If there is a reviver function, we recursively walk the new structure,\n // passing each name/value pair to the reviver function for possible\n // transformation, starting with a temporary root object that holds the current\n // value in an empty key. If there is not a reviver function, we simply return\n // that value.\n\n return (typeof reviver === \"function\")\n ? (function walk(holder, key) {\n var k;\n var v;\n var val = holder[key];\n if (val && typeof val === \"object\") {\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(val, k)) {\n v = walk(val, k);\n if (v !== undefined) {\n val[k] = v;\n } else {\n delete val[k];\n }\n }\n }\n }\n return reviver.call(holder, key, val);\n }({\"\": value}, \"\"))\n : value;\n };\n }());\n }\n}\n\nmodule.exports = setupCustomJSON;\n","'use strict';\n\nfunction wrapGlobals(window, handler, shim) {\n if (!window) { return; }\n // Adapted from https://github.com/bugsnag/bugsnag-js\n var globals = 'EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload'.split(',');\n var i, global;\n for (i = 0; i < globals.length; ++i) {\n global = globals[i];\n\n if (window[global] && window[global].prototype) {\n _extendListenerPrototype(handler, window[global].prototype, shim);\n }\n }\n}\n\nfunction _extendListenerPrototype(handler, prototype, shim) {\n if (prototype.hasOwnProperty && prototype.hasOwnProperty('addEventListener')) {\n var oldAddEventListener = prototype.addEventListener;\n while (oldAddEventListener._rollbarOldAdd && oldAddEventListener.belongsToShim) {\n oldAddEventListener = oldAddEventListener._rollbarOldAdd;\n }\n var addFn = function(event, callback, bubble) {\n oldAddEventListener.call(this, event, handler.wrap(callback), bubble);\n };\n addFn._rollbarOldAdd = oldAddEventListener;\n addFn.belongsToShim = shim;\n prototype.addEventListener = addFn;\n\n var oldRemoveEventListener = prototype.removeEventListener;\n while (oldRemoveEventListener._rollbarOldRemove && oldRemoveEventListener.belongsToShim) {\n oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;\n }\n var removeFn = function(event, callback, bubble) {\n oldRemoveEventListener.call(this, event, callback && callback._rollbar_wrapped || callback, bubble);\n };\n removeFn._rollbarOldRemove = oldRemoveEventListener;\n removeFn.belongsToShim = shim;\n prototype.removeEventListener = removeFn;\n }\n}\n\nmodule.exports = wrapGlobals;\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction raw(payload, jsonBackup) {\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction selectFrames(frames, range) {\n var len = frames.length;\n if (len > range * 2) {\n return frames.slice(0, range).concat(frames.slice(len - range));\n }\n return frames;\n}\n\nfunction truncateFrames(payload, jsonBackup, range) {\n range = (typeof range === 'undefined') ? 30 : range;\n var body = payload.data.body;\n var frames;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n frames = chain[i].frames;\n frames = selectFrames(frames, range);\n chain[i].frames = frames;\n }\n } else if (body.trace) {\n frames = body.trace.frames;\n frames = selectFrames(frames, range);\n body.trace.frames = frames;\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction maybeTruncateValue(len, val) {\n if (!val) {\n return val;\n }\n if (val.length > len) {\n return val.slice(0, len - 3).concat('...');\n }\n return val;\n}\n\nfunction truncateStrings(len, payload, jsonBackup) {\n function truncator(k, v, seen) {\n switch (_.typeName(v)) {\n case 'string':\n return maybeTruncateValue(len, v);\n case 'object':\n case 'array':\n return traverse(v, truncator, seen);\n default:\n return v;\n }\n }\n payload = traverse(payload, truncator);\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction truncateTraceData(traceData) {\n if (traceData.exception) {\n delete traceData.exception.description;\n traceData.exception.message = maybeTruncateValue(255, traceData.exception.message);\n }\n traceData.frames = selectFrames(traceData.frames, 1);\n return traceData;\n}\n\nfunction minBody(payload, jsonBackup) {\n var body = payload.data.body;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n chain[i] = truncateTraceData(chain[i]);\n }\n } else if (body.trace) {\n body.trace = truncateTraceData(body.trace);\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction needsTruncation(payload, maxSize) {\n return _.maxByteSize(payload) > maxSize;\n}\n\nfunction truncate(payload, jsonBackup, maxSize) {\n maxSize = (typeof maxSize === 'undefined') ? (512 * 1024) : maxSize;\n var strategies = [\n raw,\n truncateFrames,\n truncateStrings.bind(null, 1024),\n truncateStrings.bind(null, 512),\n truncateStrings.bind(null, 256),\n minBody\n ];\n var strategy, results, result;\n\n while ((strategy = strategies.shift())) {\n results = strategy(payload, jsonBackup);\n payload = results[0];\n result = results[1];\n if (result.error || !needsTruncation(result.value, maxSize)) {\n return result;\n }\n }\n return result;\n}\n\nmodule.exports = {\n truncate: truncate,\n\n /* for testing */\n raw: raw,\n truncateFrames: truncateFrames,\n truncateStrings: truncateStrings,\n maybeTruncateValue: maybeTruncateValue\n};\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://rollbar/webpack/universalModuleDefinition","webpack://rollbar/webpack/bootstrap","webpack://rollbar/./src/utility.js","webpack://rollbar/./src/browser/logger.js","webpack://rollbar/./src/browser/url.js","webpack://rollbar/./src/errorParser.js","webpack://rollbar/./src/scrub.js","webpack://rollbar/./src/utility/traverse.js","webpack://rollbar/./src/browser/bundles/rollbar.noconflict.js","webpack://rollbar/./src/browser/rollbar.js","webpack://rollbar/./src/browser/core.js","webpack://rollbar/./src/rollbar.js","webpack://rollbar/./src/rateLimiter.js","webpack://rollbar/./src/merge.js","webpack://rollbar/./src/queue.js","webpack://rollbar/./src/notifier.js","webpack://rollbar/./src/api.js","webpack://rollbar/./src/apiUtility.js","webpack://rollbar/./node_modules/console-polyfill/index.js","webpack://rollbar/./src/browser/detection.js","webpack://rollbar/./src/browser/globalSetup.js","webpack://rollbar/./src/browser/transport.js","webpack://rollbar/./src/browser/transforms.js","webpack://rollbar/./node_modules/error-stack-parser/error-stack-parser.js","webpack://rollbar/./node_modules/error-stack-parser/node_modules/stackframe/stackframe.js","webpack://rollbar/./src/transforms.js","webpack://rollbar/./src/browser/predicates.js","webpack://rollbar/./src/predicates.js","webpack://rollbar/./src/defaults.js","webpack://rollbar/./src/browser/defaults/scrubFields.js","webpack://rollbar/./src/telemetry.js","webpack://rollbar/./src/browser/telemetry.js","webpack://rollbar/./src/browser/domUtility.js","webpack://rollbar/./src/utility/polyfillJSON.js","webpack://rollbar/./vendor/JSON-js/json3.js","webpack://rollbar/./src/browser/wrapGlobals.js","webpack://rollbar/./src/truncation.js"],"names":["root","factory","exports","module","define","amd","this","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","merge","RollbarJSON","isType","x","typeName","Error","toString","match","toLowerCase","isFunction","f","isNativeFunction","funcMatchString","Function","replace","reIsNative","RegExp","isObject","test","type","uuid4","now","Math","random","floor","parseUriOptions","strictMode","q","parser","strict","loose","stringify","obj","backup","error","jsonError","backupError","wrapCallback","logger","err","resp","e","nonCircularClone","clone","seen","newSeen","result","includes","slice","push","message","TELEMETRY_TYPES","TELEMETRY_LEVELS","arrayIncludes","arr","val","k","length","Date","addParamsAndAccessTokenToPath","accessToken","options","params","access_token","paramsArray","join","query","sort","path","qs","indexOf","h","substring","createItem","args","notifier","requestKeys","lambdaContext","custom","callback","request","arg","extraArgs","argTypes","typ","DOMException","j","len","undefined","item","timestamp","diagnostic","uuid","level","skipFrames","setCustomItemKeys","_originalArgs","original_arg_types","addErrorContext","errors","data","contextAdded","rollbarContext","error_context","createTelemetryEvent","metadata","filterIp","requestData","captureIp","newIp","parts","split","pop","beginning","slashIdx","concat","formatArgsAsString","substr","formatUrl","u","protocol","port","hostname","keys","handleOptions","current","input","payload","hostWhiteList","hostSafeList","log","hostBlackList","hostBlockList","updateDeprecatedOptions","overwriteScrubFields","scrubFields","isError","isFiniteNumber","Number","isFinite","isIterable","isString","String","isPromise","then","jsonParse","parse","LEVELS","debug","info","warning","critical","makeUnhandledStackInfo","url","lineno","colno","backupMessage","errorParser","location","line","column","func","guessFunctionName","context","gatherContext","href","document","useragent","window","navigator","userAgent","redact","sanitizeUrl","baseUrlParts","str","exec","uri","$0","$1","$2","parseUri","anchor","source","set","temp","replacement","setupJSON","polyfillJSON","JSON","maxByteSize","string","count","code","charCodeAt","detection","_","Array","arguments","unshift","ieVersion","console","apply","last","auth","host","hash","pathname","search","parseInt","pathParts","ErrorStackParser","ERR_CLASS_REGEXP","Frame","stackFrame","_stackFrame","fileName","lineNumber","functionName","columnNumber","Stack","exception","skip","stack","parserStack","getStack","_mostSpecificErrorName","rawStack","rawException","constructorName","constructor","guessErrorClass","errMsg","errClassMatch","errClass","nested","traceChain","traverse","scrubPath","scrubPaths","paramRes","pat","ret","_getScrubFieldRegexs","queryRes","_getScrubQueryParamRegexs","redactQueryParam","dummy0","paramPart","scrubber","v","tmpV","valScrubber","paramScrubber","seenIndex","isObj","isArray","mapped","same","rollbar","_rollbarStartTime","getTime","Rollbar","telemeter","instrumenter","wrapGlobals","scrub","truncation","setComponents","Client","API","globals","Transport","urllib","transforms","sharedTransforms","predicates","sharedPredicates","client","defaultOptions","_configuredOptions","Telemeter","components","Instrumenter","transport","api","gWindow","_gWindow","gDocument","isChrome","chrome","runtime","anonymousErrorsPending","addTransform","handleDomException","handleItemWithError","ensureItemHasSomethingToSay","addBaseInfo","addRequestInfo","addClientInfo","addPluginInfo","addBody","addMessageWithError","addTelemetryData","addConfigToPayload","addScrubber","userTransform","addConfiguredOptions","addDiagnosticKeys","itemToPayload","addTransformsToNotifier","queue","addPredicate","checkLevel","checkIgnore","userCheckIgnore","urlIsNotBlockListed","urlIsSafeListed","messageIsIgnored","setupUnhandledCapture","instrument","_instance","handleUninitialized","maybeCallback","_getFirstFunction","self","init","global","configure","payloadData","oldOptions","lastError","_createItem","warn","buildJsonPayload","sendJsonPayload","jsonPayload","unhandledExceptionsInitialized","captureUncaught","handleUncaughtExceptions","captureUncaughtExceptions","wrapGlobalEventHandlers","unhandledRejectionsInitialized","captureUnhandledRejections","handleUnhandledRejections","handleUncaughtException","inspectAnonymousErrors","stackInfo","_unhandledStackInfo","uncaughtErrorLevel","_isUncaught","handleAnonymousErrors","prepareStackTrace","_stack","_isAnonymous","handleUnhandledRejection","reason","promise","reasonResult","_rollbarContext","wrap","_before","ctxFn","_isWrap","_rollbar_wrapped","exc","_rollbarWrappedError","_wrappedSource","prop","captureEvent","event","captureDomContentLoaded","ts","captureLoad","loadFull","defaults","version","logLevel","reportLevel","endpoint","verbose","enabled","transmit","sendConfig","includeItemsInTelemetry","ignoreDuplicateErrors","RateLimiter","Queue","Notifier","platform","rateLimiter","configureGlobal","setPlatformOptions","tracer","validateTracer","setStackTraceLimit","lastErrorHash","stackTraceLimit","scope","active","maxItems","itemsPerMinute","_defaultLogLevel","_log","wait","postJsonPayload","defaultLevel","_sameAsLastError","_addTracingInfo","_captureRollbarItem","telemetryEvents","copyEvents","itemHash","generateItemHash","span","spanContext","toSpanId","toTraceId","validateSpan","setTag","opentracingSpanId","opentracingTraceId","opentracing_span_id","opentracing_trace_id","startTime","counter","perMinCounter","platformOptions","checkRate","limit","ignoreRateLimit","shouldSendValue","shouldSend","globalRateLimit","limitPerMin","perMinute","msg","environment","body","extra","language","framework","rateLimitPayload","globalSettings","elapsedTime","globalRateLimitPerMin","hasOwn","toStr","isPlainObject","hasOwnConstructor","hasIsPrototypeOf","src","copy","pendingItems","pendingRequests","retryQueue","retryHandle","waitCallback","waitIntervalID","predicate","addPendingItem","removePendingItem","idx","splice","addItem","originalError","originalItem","predicateResult","_applyPredicates","stop","_maybeLog","_makeApiRequest","_dequeuePendingRequest","_maybeCallWait","clearInterval","setInterval","rateLimitResponse","postItem","_maybeRetry","RETRIABLE_ERRORS","shouldRetry","retryInterval","maxRetries","retries","_retryApiRequest","retryObject","shift","transform","_applyTransforms","transformIndex","transformsLength","cb","helpers","Api","jsonBackup","transportOptions","_getTransport","getTransportFromOptions","buildPayload","post","stringifyResult","truncate","contextResult","timeout","proxy","opts","method","appendPathToPath","base","baseTrailingSlash","pathBeginningSlash","con","dummy","properties","methods","Detection","div","createElement","all","getElementsByTagName","innerHTML","undef","_rollbarWindowOnError","old","handler","shim","oldOnError","_rollbarOldOnError","onerror","fn","_rollbarURH","belongsToShim","removeEventListener","rejectionHandler","evt","detail","addEventListener","_makeZoneRequest","currentZone","Zone","_name","rootZone","_parent","run","_makeRequest","requestFactory","RollbarProxy","json","_msg","_proxyRequest","xmlhttp","factories","XMLHttpRequest","ActiveXObject","numFactories","_createXMLHTTPObject","onreadystatechange","readyState","parseResponse","responseText","status","_isNormalFailure","_newRetriableError","ex","open","setRequestHeader","send","e1","XDomainRequest","xdomainrequest","onprogress","ontimeout","onload","e2","writeData","addBodyMessage","stackFromItem","buildTrace","description","guess","trace","errorClass","frame","pre","contextLength","mid","raw","frames","filename","sendFrameUrl","endsWith","reverse","_savedStackTrace","chain","server","remoteString","query_string","user_ip","nav","scr","screen","runtime_ms","round","javascript","browser","cookie_enabled","cookieEnabled","width","height","cur","plugins","navPlugins","traces","traceChainLength","trace_chain","addBodyTraceChain","className","addBodyTrace","scrubFn","StackFrame","FIREFOX_SAFARI_STACK_REGEXP","CHROME_IE_STACK_REGEXP","SAFARI_NATIVE_CODE_REGEXP","stacktrace","parseOpera","parseV8OrIE","parseFFOrSafari","extractLocation","urlLike","filter","map","sanitizedLine","tokens","locationParts","functionNameRegex","matches","parseOpera9","parseOpera11","parseOpera10","lineRE","lines","argsRaw","functionCall","_capitalize","charAt","toUpperCase","_getter","booleanProps","numericProps","stringProps","props","getArgs","setArgs","TypeError","getEvalOrigin","evalOrigin","setEvalOrigin","getFileName","getLineNumber","getColumnNumber","getFunctionName","getIsEval","fromString","argsStartIndex","argsEndIndex","lastIndexOf","locationString","Boolean","isNaN","parseFloat","addFunctionOption","payloadOptions","tracePath","newExtra","newItem","response","promisedItem","configuredOptions","configured_options","is_anonymous","is_uncaught","raw_error","constructor_name","failed","settings","matchFrames","list","block","listLength","frameLength","urlIsOnAList","safeOrBlock","tracesLength","listName","levelVal","isUncaught","onSendCallback","ignoredMessages","rIgnoredMessage","messages","messagesFromItem","itemsPerMin","maxTelemetryEvents","maxQueueSize","max","min","getLevel","manual","newMaxEvents","deleteCount","events","filterTelemetry","capture","rollbarUUID","timestamp_ms","captureError","captureLog","captureNetwork","subtype","levelFromStatus","status_code","statusCode","captureDom","element","checked","captureNavigation","from","to","captureConnectivityChange","change","urlparser","domUtil","network","networkResponseHeaders","networkResponseBody","networkRequestHeaders","networkRequestBody","networkErrorOnHttp5xx","networkErrorOnHttp4xx","networkErrorOnHttp0","dom","navigation","connectivity","contentSecurityPolicy","errorOnContentSecurityPolicy","replacements","orig","restore","b","_window","_document","autoInstrument","scrubTelemetryInputs","telemetryScrubber","defaultValueScrubber","patterns","attributes","attrs","a","nameFromDescription","eventRemovers","contentsecuritypolicy","_location","_lastHref","oldSettings","deinstrumentNetwork","instrumentNetwork","deinstrumentConsole","instrumentConsole","deinstrumentDom","instrumentDom","deinstrumentNavigation","instrumentNavigation","deinstrumentConnectivity","instrumentConnectivity","deinstrumentContentSecurityPolicy","instrumentContentSecurityPolicy","wrapProp","xhr","xhrp","__rollbar_xhr","start_time_ms","end_time_ms","header","request_headers","request_content_type","onreadystatechangeHandler","__rollbar_event","headers","response_content_type","getResponseHeader","headersConfig","allHeaders","getAllResponseHeaders","trim","isJsonContentType","scrubJson","errorOnHttpStatus","trackHttpErrors","reqHeaders","Headers","fetchHeaders","text","contentType","inHeaders","outHeaders","entries","currentHeader","next","done","wrapConsole","origConsole","removeListeners","clickHandler","handleClick","blurHandler","handleBlur","addListener","getElementFromEvent","hasTag","tagName","anchorOrButton","isDescribedElement","captureDomEvent","handleSelectInputChanged","elem","multiple","selected","selectedIndex","isChecked","getElementType","describeElement","elementString","elementArrayToString","treeToArray","app","history","pushState","handleUrlChange","parsedHref","parsedTo","parsedFrom","handleCspEvent","cspEvent","blockedURI","violatedDirective","effectiveDirective","sourceFile","originalPolicy","handleCspError","cspHandler","section","altType","attachEvent","detachEvent","getAttribute","descriptionToString","desc","out","id","classes","attr","nextStr","totalLength","separatorLength","MAX_LENGTH","nextDescription","parentNode","doc","target","elementFromPoint","clientX","clientY","subtypes","gap","indent","meta","rep","state","container","escapes","number","action","rx_escapable","this_value","valueOf","quote","lastIndex","toJSON","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","\"","replacer","space","holder","partial","mind","go","firstokey","okey","ovalue","firstavalue","avalue","ocomma","acomma","colon","SyntaxError","reviver","tx","ignore","fromCharCode","walk","_extendListenerPrototype","oldAddEventListener","_rollbarOldAdd","addFn","bubble","oldRemoveEventListener","_rollbarOldRemove","removeFn","selectFrames","range","truncateFrames","maybeTruncateValue","truncateStrings","truncator","truncateTraceData","traceData","minBody","needsTruncation","maxSize","strategy","results","strategies"],"mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAiB,QAAID,IAErBD,EAAc,QAAIC,IARpB,CASGK,MAAM,WACT,O,YCTE,IAAIC,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUP,QAGnC,IAAIC,EAASI,EAAiBE,GAAY,CACzCC,EAAGD,EACHE,GAAG,EACHT,QAAS,IAUV,OANAU,EAAQH,GAAUI,KAAKV,EAAOD,QAASC,EAAQA,EAAOD,QAASM,GAG/DL,EAAOQ,GAAI,EAGJR,EAAOD,QA0Df,OArDAM,EAAoBM,EAAIF,EAGxBJ,EAAoBO,EAAIR,EAGxBC,EAAoBQ,EAAI,SAASd,EAASe,EAAMC,GAC3CV,EAAoBW,EAAEjB,EAASe,IAClCG,OAAOC,eAAenB,EAASe,EAAM,CAAEK,YAAY,EAAMC,IAAKL,K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luB,EAAEN,YAAY9D,GAAWsyB,EA0BlC58B,EAAOD,QAAU,CACf4hB,SAxBF,SAAkBrX,EAAS8W,EAAYwb,GACrCA,OAA8B,IAAZA,EAA2B,OAAeA,EAW5D,IAVA,IAQIC,EAAUC,EAASz3B,EARnB03B,EAAa,CACf/V,EACAoV,EACAE,EAAgBv6B,KAAK,KAAM,MAC3Bu6B,EAAgBv6B,KAAK,KAAM,KAC3Bu6B,EAAgBv6B,KAAK,KAAM,KAC3B26B,GAIMG,EAAWE,EAAWnc,SAI5B,GAFAtW,GADAwyB,EAAUD,EAASvyB,EAAS8W,IACV,IAClB/b,EAASy3B,EAAQ,IACNr4B,QAAUk4B,EAAgBt3B,EAAO7D,MAAOo7B,GACjD,OAAOv3B,EAGX,OAAOA,GAOP2hB,IAAKA,EACLoV,eAAgBA,EAChBE,gBAAiBA,EACjBD,mBAAoBA","file":"rollbar.noconflict.umd.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"rollbar\"] = factory();\n\telse\n\t\troot[\"rollbar\"] = factory();\n})(this, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n","'use strict';\n\nvar merge = require('./merge');\n\nvar RollbarJSON = {};\nfunction setupJSON(polyfillJSON) {\n if (isFunction(RollbarJSON.stringify) && isFunction(RollbarJSON.parse)) {\n return;\n }\n\n if (isDefined(JSON)) {\n // If polyfill is provided, prefer it over existing non-native shims.\n if(polyfillJSON) {\n if (isNativeFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isNativeFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n } else { // else accept any interface that is present.\n if (isFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n }\n }\n if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {\n polyfillJSON && polyfillJSON(RollbarJSON);\n }\n}\n\n/*\n * isType - Given a Javascript value and a string, returns true if the type of the value matches the\n * given string.\n *\n * @param x - any value\n * @param t - a lowercase string containing one of the following type names:\n * - undefined\n * - null\n * - error\n * - number\n * - boolean\n * - string\n * - symbol\n * - function\n * - object\n * - array\n * @returns true if x is of type t, otherwise false\n */\nfunction isType(x, t) {\n return t === typeName(x);\n}\n\n/*\n * typeName - Given a Javascript value, returns the type of the object as a string\n */\nfunction typeName(x) {\n var name = typeof x;\n if (name !== 'object') {\n return name;\n }\n if (!x) {\n return 'null';\n }\n if (x instanceof Error) {\n return 'error';\n }\n return ({}).toString.call(x).match(/\\s([a-zA-Z]+)/)[1].toLowerCase();\n}\n\n/* isFunction - a convenience function for checking if a value is a function\n *\n * @param f - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isFunction(f) {\n return isType(f, 'function');\n}\n\n/* isNativeFunction - a convenience function for checking if a value is a native JS function\n *\n * @param f - any value\n * @returns true if f is a native JS function, otherwise false\n */\nfunction isNativeFunction(f) {\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n var funcMatchString = Function.prototype.toString.call(Object.prototype.hasOwnProperty)\n .replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?');\n var reIsNative = RegExp('^' + funcMatchString + '$');\n return isObject(f) && reIsNative.test(f);\n}\n\n/* isObject - Checks if the argument is an object\n *\n * @param value - any value\n * @returns true is value is an object function is an object)\n*/\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/* isString - Checks if the argument is a string\n *\n * @param value - any value\n * @returns true if value is a string\n*/\nfunction isString(value) {\n return typeof value === 'string' || value instanceof String\n}\n\n/**\n * isFiniteNumber - determines whether the passed value is a finite number\n *\n * @param {*} n - any value\n * @returns true if value is a finite number\n */\n function isFiniteNumber(n) {\n return Number.isFinite(n);\n}\n\n/*\n * isDefined - a convenience function for checking if a value is not equal to undefined\n *\n * @param u - any value\n * @returns true if u is anything other than undefined\n */\nfunction isDefined(u) {\n return !isType(u, 'undefined');\n}\n\n/*\n * isIterable - convenience function for checking if a value can be iterated, essentially\n * whether it is an object or an array.\n *\n * @param i - any value\n * @returns true if i is an object or an array as determined by `typeName`\n */\nfunction isIterable(i) {\n var type = typeName(i);\n return (type === 'object' || type === 'array');\n}\n\n/*\n * isError - convenience function for checking if a value is of an error type\n *\n * @param e - any value\n * @returns true if e is an error\n */\nfunction isError(e) {\n // Detect both Error and Firefox Exception type\n return isType(e, 'error') || isType(e, 'exception');\n}\n\n/* isPromise - a convenience function for checking if a value is a promise\n *\n * @param p - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isPromise(p) {\n return isObject(p) && isType(p.then, 'function');\n}\n\nfunction redact() {\n return '********';\n}\n\n// from http://stackoverflow.com/a/8809472/1138191\nfunction uuid4() {\n var d = now();\n var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n var r = (d + Math.random() * 16) % 16 | 0;\n d = Math.floor(d / 16);\n return (c === 'x' ? r : (r & 0x7 | 0x8)).toString(16);\n });\n return uuid;\n}\n\nvar LEVELS = {\n debug: 0,\n info: 1,\n warning: 2,\n error: 3,\n critical: 4\n};\n\nfunction sanitizeUrl(url) {\n var baseUrlParts = parseUri(url);\n if (!baseUrlParts) {\n return '(unknown)';\n }\n\n // remove a trailing # if there is no anchor\n if (baseUrlParts.anchor === '') {\n baseUrlParts.source = baseUrlParts.source.replace('#', '');\n }\n\n url = baseUrlParts.source.replace('?' + baseUrlParts.query, '');\n return url;\n}\n\nvar parseUriOptions = {\n strictMode: false,\n key: [\n 'source',\n 'protocol',\n 'authority',\n 'userInfo',\n 'user',\n 'password',\n 'host',\n 'port',\n 'relative',\n 'path',\n 'directory',\n 'file',\n 'query',\n 'anchor'\n ],\n q: {\n name: 'queryKey',\n parser: /(?:^|&)([^&=]*)=?([^&]*)/g\n },\n parser: {\n strict: /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n loose: /^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/\n }\n};\n\nfunction parseUri(str) {\n if (!isType(str, 'string')) {\n return undefined;\n }\n\n var o = parseUriOptions;\n var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);\n var uri = {};\n\n for (var i = 0, l = o.key.length; i < l; ++i) {\n uri[o.key[i]] = m[i] || '';\n }\n\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) {\n uri[o.q.name][$1] = $2;\n }\n });\n\n return uri;\n}\n\nfunction addParamsAndAccessTokenToPath(accessToken, options, params) {\n params = params || {};\n params.access_token = accessToken;\n var paramsArray = [];\n var k;\n for (k in params) {\n if (Object.prototype.hasOwnProperty.call(params, k)) {\n paramsArray.push([k, params[k]].join('='));\n }\n }\n var query = '?' + paramsArray.sort().join('&');\n\n options = options || {};\n options.path = options.path || '';\n var qs = options.path.indexOf('?');\n var h = options.path.indexOf('#');\n var p;\n if (qs !== -1 && (h === -1 || h > qs)) {\n p = options.path;\n options.path = p.substring(0,qs) + query + '&' + p.substring(qs+1);\n } else {\n if (h !== -1) {\n p = options.path;\n options.path = p.substring(0,h) + query + p.substring(h);\n } else {\n options.path = options.path + query;\n }\n }\n}\n\nfunction formatUrl(u, protocol) {\n protocol = protocol || u.protocol;\n if (!protocol && u.port) {\n if (u.port === 80) {\n protocol = 'http:';\n } else if (u.port === 443) {\n protocol = 'https:';\n }\n }\n protocol = protocol || 'https:';\n\n if (!u.hostname) {\n return null;\n }\n var result = protocol + '//' + u.hostname;\n if (u.port) {\n result = result + ':' + u.port;\n }\n if (u.path) {\n result = result + u.path;\n }\n return result;\n}\n\nfunction stringify(obj, backup) {\n var value, error;\n try {\n value = RollbarJSON.stringify(obj);\n } catch (jsonError) {\n if (backup && isFunction(backup)) {\n try {\n value = backup(obj);\n } catch (backupError) {\n error = backupError;\n }\n } else {\n error = jsonError;\n }\n }\n return {error: error, value: value};\n}\n\nfunction maxByteSize(string) {\n // The transport will use utf-8, so assume utf-8 encoding.\n //\n // This minimal implementation will accurately count bytes for all UCS-2 and\n // single code point UTF-16. If presented with multi code point UTF-16,\n // which should be rare, it will safely overcount, not undercount.\n //\n // While robust utf-8 encoders exist, this is far smaller and far more performant.\n // For quickly counting payload size for truncation, smaller is better.\n\n var count = 0;\n var length = string.length;\n\n for (var i = 0; i < length; i++) {\n var code = string.charCodeAt(i);\n if (code < 128) { // up to 7 bits\n count = count + 1;\n } else if (code < 2048) { // up to 11 bits\n count = count + 2;\n } else if (code < 65536) { // up to 16 bits\n count = count + 3;\n }\n }\n\n return count;\n}\n\nfunction jsonParse(s) {\n var value, error;\n try {\n value = RollbarJSON.parse(s);\n } catch (e) {\n error = e;\n }\n return {error: error, value: value};\n}\n\nfunction makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n mode,\n backupMessage,\n errorParser\n) {\n var location = {\n url: url || '',\n line: lineno,\n column: colno\n };\n location.func = errorParser.guessFunctionName(location.url, location.line);\n location.context = errorParser.gatherContext(location.url, location.line);\n var href = typeof document !== 'undefined' && document && document.location && document.location.href;\n var useragent = typeof window !== 'undefined' && window && window.navigator && window.navigator.userAgent;\n return {\n 'mode': mode,\n 'message': error ? String(error) : (message || backupMessage),\n 'url': href,\n 'stack': [location],\n 'useragent': useragent\n };\n}\n\nfunction wrapCallback(logger, f) {\n return function(err, resp) {\n try {\n f(err, resp);\n } catch (e) {\n logger.error(e);\n }\n };\n}\n\nfunction nonCircularClone(obj) {\n var seen = [obj];\n\n function clone(obj, seen) {\n var value, name, newSeen, result = {};\n\n try {\n for (name in obj) {\n value = obj[name];\n\n if (value && (isType(value, 'object') || isType(value, 'array'))) {\n if (seen.includes(value)) {\n result[name] = 'Removed circular reference: ' + typeName(value);\n } else {\n newSeen = seen.slice();\n newSeen.push(value);\n result[name] = clone(value, newSeen);\n }\n continue;\n }\n\n result[name] = value;\n }\n } catch (e) {\n result = 'Failed cloning custom data: ' + e.message;\n }\n return result;\n }\n return clone(obj, seen);\n}\n\nfunction createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\n var diagnostic = {};\n var argTypes = [];\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n argTypes.push(typ);\n switch (typ) {\n case 'undefined':\n break;\n case 'string':\n message ? extraArgs.push(arg) : message = arg;\n break;\n case 'function':\n callback = wrapCallback(logger, arg);\n break;\n case 'date':\n extraArgs.push(arg);\n break;\n case 'error':\n case 'domexception':\n case 'exception': // Firefox Exception type\n err ? extraArgs.push(arg) : err = arg;\n break;\n case 'object':\n case 'array':\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n if (requestKeys && typ === 'object' && !request) {\n for (var j = 0, len = requestKeys.length; j < len; ++j) {\n if (arg[requestKeys[j]] !== undefined) {\n request = arg;\n break;\n }\n }\n if (request) {\n break;\n }\n }\n custom ? extraArgs.push(arg) : custom = arg;\n break;\n default:\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n extraArgs.push(arg);\n }\n }\n\n // if custom is an array this turns it into an object with integer keys\n if (custom) custom = nonCircularClone(custom);\n\n if (extraArgs.length > 0) {\n if (!custom) custom = nonCircularClone({});\n custom.extraArgs = nonCircularClone(extraArgs);\n }\n\n var item = {\n message: message,\n err: err,\n custom: custom,\n timestamp: now(),\n callback: callback,\n notifier: notifier,\n diagnostic: diagnostic,\n uuid: uuid4()\n };\n\n setCustomItemKeys(item, custom);\n\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n item.diagnostic.original_arg_types = argTypes;\n return item;\n}\n\nfunction setCustomItemKeys(item, custom) {\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (custom && custom.skipFrames !== undefined) {\n item.skipFrames = custom.skipFrames;\n delete custom.skipFrames;\n }\n}\n\nfunction addErrorContext(item, errors) {\n var custom = item.data.custom || {};\n var contextAdded = false;\n\n try {\n for (var i = 0; i < errors.length; ++i) {\n if (errors[i].hasOwnProperty('rollbarContext')) {\n custom = merge(custom, nonCircularClone(errors[i].rollbarContext));\n contextAdded = true;\n }\n }\n\n // Avoid adding an empty object to the data.\n if (contextAdded) {\n item.data.custom = custom;\n }\n } catch (e) {\n item.diagnostic.error_context = 'Failed: ' + e.message;\n }\n}\n\nvar TELEMETRY_TYPES = ['log', 'network', 'dom', 'navigation', 'error', 'manual'];\nvar TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];\n\nfunction arrayIncludes(arr, val) {\n for (var k = 0; k < arr.length; ++k) {\n if (arr[k] === val) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction createTelemetryEvent(args) {\n var type, metadata, level;\n var arg;\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n switch (typ) {\n case 'string':\n if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {\n type = arg;\n } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {\n level = arg;\n }\n break;\n case 'object':\n metadata = arg;\n break;\n default:\n break;\n }\n }\n var event = {\n type: type || 'manual',\n metadata: metadata || {},\n level: level\n };\n\n return event;\n}\n\n/*\n * get - given an obj/array and a keypath, return the value at that keypath or\n * undefined if not possible.\n *\n * @param obj - an object or array\n * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'\n * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`\n */\nfunction get(obj, path) {\n if (!obj) {\n return undefined;\n }\n var keys = path.split('.');\n var result = obj;\n try {\n for (var i = 0, len = keys.length; i < len; ++i) {\n result = result[keys[i]];\n }\n } catch (e) {\n result = undefined;\n }\n return result;\n}\n\nfunction set(obj, path, value) {\n if (!obj) {\n return;\n }\n var keys = path.split('.');\n var len = keys.length;\n if (len < 1) {\n return;\n }\n if (len === 1) {\n obj[keys[0]] = value;\n return;\n }\n try {\n var temp = obj[keys[0]] || {};\n var replacement = temp;\n for (var i = 1; i < len - 1; ++i) {\n temp[keys[i]] = temp[keys[i]] || {};\n temp = temp[keys[i]];\n }\n temp[keys[len-1]] = value;\n obj[keys[0]] = replacement;\n } catch (e) {\n return;\n }\n}\n\nfunction formatArgsAsString(args) {\n var i, len, arg;\n var result = [];\n for (i = 0, len = args.length; i < len; ++i) {\n arg = args[i];\n switch (typeName(arg)) {\n case 'object':\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500) {\n arg = arg.substr(0, 497) + '...';\n }\n break;\n case 'null':\n arg = 'null';\n break;\n case 'undefined':\n arg = 'undefined';\n break;\n case 'symbol':\n arg = arg.toString();\n break;\n }\n result.push(arg);\n }\n return result.join(' ');\n}\n\nfunction now() {\n if (Date.now) {\n return +Date.now();\n }\n return +new Date();\n}\n\nfunction filterIp(requestData, captureIp) {\n if (!requestData || !requestData['user_ip'] || captureIp === true) {\n return;\n }\n var newIp = requestData['user_ip'];\n if (!captureIp) {\n newIp = null;\n } else {\n try {\n var parts;\n if (newIp.indexOf('.') !== -1) {\n parts = newIp.split('.');\n parts.pop();\n parts.push('0');\n newIp = parts.join('.');\n } else if (newIp.indexOf(':') !== -1) {\n parts = newIp.split(':');\n if (parts.length > 2) {\n var beginning = parts.slice(0, 3);\n var slashIdx = beginning[2].indexOf('/');\n if (slashIdx !== -1) {\n beginning[2] = beginning[2].substring(0, slashIdx);\n }\n var terminal = '0000:0000:0000:0000:0000';\n newIp = beginning.concat(terminal).join(':');\n }\n } else {\n newIp = null;\n }\n } catch (e) {\n newIp = null;\n }\n }\n requestData['user_ip'] = newIp;\n}\n\nfunction handleOptions(current, input, payload, logger) {\n var result = merge(current, input, payload);\n result = updateDeprecatedOptions(result, logger);\n if (!input || input.overwriteScrubFields) {\n return result;\n }\n if (input.scrubFields) {\n result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);\n }\n return result;\n}\n\nfunction updateDeprecatedOptions(options, logger) {\n if(options.hostWhiteList && !options.hostSafeList) {\n options.hostSafeList = options.hostWhiteList;\n options.hostWhiteList = undefined;\n logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');\n }\n if(options.hostBlackList && !options.hostBlockList) {\n options.hostBlockList = options.hostBlackList;\n options.hostBlackList = undefined;\n logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');\n }\n return options;\n}\n\nmodule.exports = {\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n createItem: createItem,\n addErrorContext: addErrorContext,\n createTelemetryEvent: createTelemetryEvent,\n filterIp: filterIp,\n formatArgsAsString: formatArgsAsString,\n formatUrl: formatUrl,\n get: get,\n handleOptions: handleOptions,\n isError: isError,\n isFiniteNumber: isFiniteNumber,\n isFunction: isFunction,\n isIterable: isIterable,\n isNativeFunction: isNativeFunction,\n isObject: isObject,\n isString: isString,\n isType: isType,\n isPromise: isPromise,\n jsonParse: jsonParse,\n LEVELS: LEVELS,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n merge: merge,\n now: now,\n redact: redact,\n RollbarJSON: RollbarJSON,\n sanitizeUrl: sanitizeUrl,\n set: set,\n setupJSON: setupJSON,\n stringify: stringify,\n maxByteSize: maxByteSize,\n typeName: typeName,\n uuid4: uuid4\n};\n","'use strict';\n\n/* eslint-disable no-console */\nrequire('console-polyfill');\nvar detection = require('./detection');\nvar _ = require('../utility');\n\nfunction error() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.error(_.formatArgsAsString(args));\n } else {\n console.error.apply(console, args);\n }\n}\n\nfunction info() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.info(_.formatArgsAsString(args));\n } else {\n console.info.apply(console, args);\n }\n}\n\nfunction log() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.log(_.formatArgsAsString(args));\n } else {\n console.log.apply(console, args);\n }\n}\n\n/* eslint-enable no-console */\n\nmodule.exports = {\n error: error,\n info: info,\n log: log\n};\n","'use strict';\n\n// See https://nodejs.org/docs/latest/api/url.html\nfunction parse(url) {\n var result = {\n protocol: null, auth: null, host: null, path: null,\n hash: null, href: url, hostname: null, port: null,\n pathname: null, search: null, query: null\n };\n\n var i, last;\n i = url.indexOf('//');\n if (i !== -1) {\n result.protocol = url.substring(0,i);\n last = i+2;\n } else {\n last = 0;\n }\n \n i = url.indexOf('@', last);\n if (i !== -1) {\n result.auth = url.substring(last, i);\n last = i+1;\n }\n\n i = url.indexOf('/', last);\n if (i === -1) {\n i = url.indexOf('?', last);\n if (i === -1) {\n i = url.indexOf('#', last);\n if (i === -1) {\n result.host = url.substring(last);\n } else {\n result.host = url.substring(last, i);\n result.hash = url.substring(i);\n }\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n return result;\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n\n i = url.indexOf('#', last);\n if (i === -1) {\n result.path = url.substring(last);\n } else {\n result.path = url.substring(last, i);\n result.hash = url.substring(i);\n }\n\n if (result.path) {\n var pathParts = result.path.split('?');\n result.pathname = pathParts[0];\n result.query = pathParts[1];\n result.search = result.query ? '?' + result.query : null;\n }\n return result;\n}\n\nmodule.exports = {\n parse: parse\n};\n","'use strict';\n\nvar ErrorStackParser = require('error-stack-parser');\n\nvar UNKNOWN_FUNCTION = '?';\nvar ERR_CLASS_REGEXP = new RegExp('^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ');\n\nfunction guessFunctionName() {\n return UNKNOWN_FUNCTION;\n}\n\n\nfunction gatherContext() {\n return null;\n}\n\n\nfunction Frame(stackFrame) {\n var data = {};\n\n data._stackFrame = stackFrame;\n\n data.url = stackFrame.fileName;\n data.line = stackFrame.lineNumber;\n data.func = stackFrame.functionName;\n data.column = stackFrame.columnNumber;\n data.args = stackFrame.args;\n\n data.context = gatherContext();\n\n return data;\n}\n\n\nfunction Stack(exception, skip) {\n function getStack() {\n var parserStack = [];\n\n skip = skip || 0;\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch(e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = skip; i < parserStack.length; i++) {\n stack.push(new Frame(parserStack[i]));\n }\n\n return stack;\n }\n\n return {\n stack: getStack(),\n message: exception.message,\n name: _mostSpecificErrorName(exception),\n rawStack: exception.stack,\n rawException: exception\n };\n}\n\n\nfunction parse(e, skip) {\n var err = e;\n\n if (err.nested) {\n var traceChain = [];\n while (err) {\n traceChain.push(new Stack(err, skip));\n err = err.nested;\n\n skip = 0; // Only apply skip value to primary error\n }\n\n // Return primary error with full trace chain attached.\n traceChain[0].traceChain = traceChain;\n return traceChain[0];\n } else {\n return new Stack(err, skip);\n }\n}\n\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg || !errMsg.match) {\n return ['Unknown error. There was no error message to display.', ''];\n }\n var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);\n var errClass = '(unknown)';\n\n if (errClassMatch) {\n errClass = errClassMatch[errClassMatch.length - 1];\n errMsg = errMsg.replace((errClassMatch[errClassMatch.length - 2] || '') + errClass + ':', '');\n errMsg = errMsg.replace(/(^[\\s]+|[\\s]+$)/g, '');\n }\n return [errClass, errMsg];\n}\n\n// * Prefers any value over an empty string\n// * Prefers any value over 'Error' where possible\n// * Prefers name over constructor.name when both are more specific than 'Error'\nfunction _mostSpecificErrorName(error) {\n var name = error.name && error.name.length && error.name;\n var constructorName = error.constructor.name && error.constructor.name.length && error.constructor.name;\n\n if (!name || !constructorName) {\n return name || constructorName;\n }\n\n if (name === 'Error') {\n return constructorName;\n }\n return name;\n}\n\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame\n};\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction scrub(data, scrubFields, scrubPaths) {\n scrubFields = scrubFields || [];\n\n if (scrubPaths) {\n for (var i = 0; i < scrubPaths.length; ++i) {\n scrubPath(data, scrubPaths[i]);\n }\n }\n\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart) {\n return paramPart + _.redact();\n }\n\n function paramScrubber(v) {\n var i;\n if (_.isType(v, 'string')) {\n for (i = 0; i < queryRes.length; ++i) {\n v = v.replace(queryRes[i], redactQueryParam);\n }\n }\n return v;\n }\n\n function valScrubber(k, v) {\n var i;\n for (i = 0; i < paramRes.length; ++i) {\n if (paramRes[i].test(k)) {\n v = _.redact();\n break;\n }\n }\n return v;\n }\n\n function scrubber(k, v, seen) {\n var tmpV = valScrubber(k, v);\n if (tmpV === v) {\n if (_.isType(v, 'object') || _.isType(v, 'array')) {\n return traverse(v, scrubber, seen);\n }\n return paramScrubber(tmpV);\n } else {\n return tmpV;\n }\n }\n\n return traverse(data, scrubber);\n}\n\nfunction scrubPath(obj, path) {\n var keys = path.split('.');\n var last = keys.length - 1;\n try {\n for (var i = 0; i <= last; ++i) {\n if (i < last) {\n obj = obj[keys[i]];\n } else {\n obj[keys[i]] = _.redact();\n }\n }\n } catch (e) {\n // Missing key is OK;\n }\n}\n\nfunction _getScrubFieldRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '^\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?$';\n ret.push(new RegExp(pat, 'i'));\n }\n return ret;\n}\n\n\nfunction _getScrubQueryParamRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?';\n ret.push(new RegExp('(' + pat + '=)([^&\\\\n]+)', 'igm'));\n }\n return ret;\n}\n\nmodule.exports = scrub;\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction traverse(obj, func, seen) {\n var k, v, i;\n var isObj = _.isType(obj, 'object');\n var isArray = _.isType(obj, 'array');\n var keys = [];\n var seenIndex;\n\n // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.\n seen = seen || { obj: [], mapped: []};\n\n if (isObj) {\n seenIndex = seen.obj.indexOf(obj);\n\n if (isObj && seenIndex !== -1) {\n // Prefer the mapped object if there is one.\n return seen.mapped[seenIndex] || seen.obj[seenIndex];\n }\n\n seen.obj.push(obj);\n seenIndex = seen.obj.length - 1;\n }\n\n if (isObj) {\n for (k in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, k)) {\n keys.push(k);\n }\n }\n } else if (isArray) {\n for (i = 0; i < obj.length; ++i) {\n keys.push(i);\n }\n }\n\n var result = isObj ? {} : [];\n var same = true;\n for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n result[k] = func(k, v, seen);\n same = same && result[k] === obj[k];\n }\n\n if (isObj && !same) {\n seen.mapped[seenIndex] = result;\n }\n\n return !same ? result : obj;\n}\n\nmodule.exports = traverse;\n","'use strict';\n\nvar rollbar = require('../rollbar');\n\nif ((typeof window !== 'undefined') && !window._rollbarStartTime) {\n window._rollbarStartTime = (new Date()).getTime();\n}\n\nmodule.exports = rollbar;\n","'use strict';\n\nvar Rollbar = require('./core');\nvar telemeter = require('../telemetry');\nvar instrumenter = require('./telemetry');\nvar polyfillJSON = require('../utility/polyfillJSON');\nvar wrapGlobals = require('./wrapGlobals');\nvar scrub = require('../scrub');\nvar truncation = require('../truncation');\n\nRollbar.setComponents({\n telemeter: telemeter,\n instrumenter: instrumenter,\n polyfillJSON: polyfillJSON,\n wrapGlobals: wrapGlobals,\n scrub: scrub,\n truncation: truncation\n});\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar Client = require('../rollbar');\nvar _ = require('../utility');\nvar API = require('../api');\nvar logger = require('./logger');\nvar globals = require('./globalSetup');\n\nvar Transport = require('./transport');\nvar urllib = require('./url');\n\nvar transforms = require('./transforms');\nvar sharedTransforms = require('../transforms');\nvar predicates = require('./predicates');\nvar sharedPredicates = require('../predicates');\nvar errorParser = require('../errorParser');\n\nfunction Rollbar(options, client) {\n this.options = _.handleOptions(defaultOptions, options, null, logger);\n this.options._configuredOptions = options;\n var Telemeter = this.components.telemeter;\n var Instrumenter = this.components.instrumenter;\n var polyfillJSON = this.components.polyfillJSON;\n this.wrapGlobals = this.components.wrapGlobals;\n this.scrub = this.components.scrub;\n var truncation = this.components.truncation;\n\n var transport = new Transport(truncation);\n var api = new API(this.options, transport, urllib, truncation);\n if (Telemeter) {\n this.telemeter = new Telemeter(this.options);\n }\n this.client = client || new Client(this.options, api, logger, this.telemeter, 'browser');\n var gWindow = _gWindow();\n var gDocument = (typeof document != 'undefined') && document;\n this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers\n this.anonymousErrorsPending = 0;\n addTransformsToNotifier(this.client.notifier, this, gWindow);\n addPredicatesToQueue(this.client.queue);\n this.setupUnhandledCapture();\n if (Instrumenter) {\n this.instrumenter = new Instrumenter(this.options, this.client.telemeter, this, gWindow, gDocument);\n this.instrumenter.instrument();\n }\n _.setupJSON(polyfillJSON);\n}\n\nvar _instance = null;\nRollbar.init = function(options, client) {\n if (_instance) {\n return _instance.global(options).configure(options);\n }\n _instance = new Rollbar(options, client);\n return _instance;\n};\n\nRollbar.prototype.components = {};\n\nRollbar.setComponents = function(components) {\n Rollbar.prototype.components = components;\n}\n\nfunction handleUninitialized(maybeCallback) {\n var message = 'Rollbar is not initialized';\n logger.error(message);\n if (maybeCallback) {\n maybeCallback(new Error(message));\n }\n}\n\nRollbar.prototype.global = function(options) {\n this.client.global(options);\n return this;\n};\nRollbar.global = function(options) {\n if (_instance) {\n return _instance.global(options);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.configure = function(options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = {payload: payloadData};\n }\n this.options = _.handleOptions(oldOptions, options, payload, logger);\n this.options._configuredOptions = _.handleOptions(oldOptions._configuredOptions, options, payload);\n this.client.configure(this.options, payloadData);\n this.instrumenter && this.instrumenter.configure(this.options);\n this.setupUnhandledCapture();\n return this;\n};\nRollbar.configure = function(options, payloadData) {\n if (_instance) {\n return _instance.configure(options, payloadData);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.lastError = function() {\n return this.client.lastError;\n};\nRollbar.lastError = function() {\n if (_instance) {\n return _instance.lastError();\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.log = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.log(item);\n return {uuid: uuid};\n};\nRollbar.log = function() {\n if (_instance) {\n return _instance.log.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.debug = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.debug(item);\n return {uuid: uuid};\n};\nRollbar.debug = function() {\n if (_instance) {\n return _instance.debug.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.info = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.info(item);\n return {uuid: uuid};\n};\nRollbar.info = function() {\n if (_instance) {\n return _instance.info.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warn = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warn(item);\n return {uuid: uuid};\n};\nRollbar.warn = function() {\n if (_instance) {\n return _instance.warn.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warning = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warning(item);\n return {uuid: uuid};\n};\nRollbar.warning = function() {\n if (_instance) {\n return _instance.warning.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.error = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.error(item);\n return {uuid: uuid};\n};\nRollbar.error = function() {\n if (_instance) {\n return _instance.error.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.critical = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.critical(item);\n return {uuid: uuid};\n};\nRollbar.critical = function() {\n if (_instance) {\n return _instance.critical.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.buildJsonPayload = function(item) {\n return this.client.buildJsonPayload(item);\n};\nRollbar.buildJsonPayload = function() {\n if (_instance) {\n return _instance.buildJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.sendJsonPayload = function(jsonPayload) {\n return this.client.sendJsonPayload(jsonPayload);\n};\nRollbar.sendJsonPayload = function() {\n if (_instance) {\n return _instance.sendJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.setupUnhandledCapture = function() {\n var gWindow = _gWindow();\n\n if (!this.unhandledExceptionsInitialized) {\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(gWindow, this);\n if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {\n this.wrapGlobals(gWindow, this);\n }\n this.unhandledExceptionsInitialized = true;\n }\n }\n if (!this.unhandledRejectionsInitialized) {\n if (this.options.captureUnhandledRejections || this.options.handleUnhandledRejections) {\n globals.captureUnhandledRejections(gWindow, this);\n this.unhandledRejectionsInitialized = true;\n }\n }\n};\n\nRollbar.prototype.handleUncaughtException = function(message, url, lineno, colno, error, context) {\n if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {\n return;\n }\n\n // Chrome will always send 5+ arguments and error will be valid or null, not undefined.\n // If error is undefined, we have a different caller.\n // Chrome also sends errors from web workers with null error, but does not invoke\n // prepareStackTrace() for these. Test for empty url to skip them.\n if (this.options.inspectAnonymousErrors && this.isChrome && error === null && url === '') {\n return 'anonymous';\n }\n\n var item;\n var stackInfo = _.makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n 'onerror',\n 'uncaught exception',\n errorParser\n );\n if (_.isError(error)) {\n item = this._createItem([message, error, context]);\n item._unhandledStackInfo = stackInfo;\n } else if (_.isError(url)) {\n item = this._createItem([message, url, context]);\n item._unhandledStackInfo = stackInfo;\n } else {\n item = this._createItem([message, context]);\n item.stackInfo = stackInfo;\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n this.client.log(item);\n};\n\n/**\n * Chrome only. Other browsers will ignore.\n *\n * Use Error.prepareStackTrace to extract information about errors that\n * do not have a valid error object in onerror().\n *\n * In tested version of Chrome, onerror is called first but has no way\n * to communicate with prepareStackTrace. Use a counter to let this\n * handler know which errors to send to Rollbar.\n *\n * In config options, set inspectAnonymousErrors to enable.\n */\nRollbar.prototype.handleAnonymousErrors = function() {\n if (!this.options.inspectAnonymousErrors || !this.isChrome) {\n return;\n }\n\n var r = this;\n function prepareStackTrace(error, _stack) { // eslint-disable-line no-unused-vars\n if (r.options.inspectAnonymousErrors) {\n if (r.anonymousErrorsPending) {\n // This is the only known way to detect that onerror saw an anonymous error.\n // It depends on onerror reliably being called before Error.prepareStackTrace,\n // which so far holds true on tested versions of Chrome. If versions of Chrome\n // are tested that behave differently, this logic will need to be updated\n // accordingly.\n r.anonymousErrorsPending -= 1;\n\n if (!error) {\n // Not likely to get here, but calling handleUncaughtException from here\n // without an error object would throw off the anonymousErrorsPending counter,\n // so return now.\n return;\n }\n\n // Allow this to be tracked later.\n error._isAnonymous = true;\n\n // url, lineno, colno shouldn't be needed for these errors.\n // If that changes, update this accordingly, using the unused\n // _stack param as needed (rather than parse error.toString()).\n r.handleUncaughtException(error.message, null, null, null, error);\n }\n }\n\n // Workaround to ensure stack is preserved for normal errors.\n return error.stack;\n }\n\n // https://v8.dev/docs/stack-trace-api\n try {\n Error.prepareStackTrace = prepareStackTrace;\n } catch (e) {\n this.options.inspectAnonymousErrors = false;\n this.error('anonymous error handler failed', e);\n }\n}\n\nRollbar.prototype.handleUnhandledRejection = function(reason, promise) {\n if (!this.options.captureUnhandledRejections && !this.options.handleUnhandledRejections) {\n return;\n }\n\n var message = 'unhandled rejection was null or undefined!';\n if (reason) {\n if (reason.message) {\n message = reason.message;\n } else {\n var reasonResult = _.stringify(reason);\n if (reasonResult.value) {\n message = reasonResult.value;\n }\n }\n }\n var context = (reason && reason._rollbarContext) || (promise && promise._rollbarContext);\n\n var item;\n if (_.isError(reason)) {\n item = this._createItem([message, reason, context]);\n } else {\n item = this._createItem([message, reason, context]);\n item.stackInfo = _.makeUnhandledStackInfo(\n message,\n '',\n 0,\n 0,\n null,\n 'unhandledrejection',\n '',\n errorParser\n );\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n item._originalArgs = item._originalArgs || [];\n item._originalArgs.push(promise);\n this.client.log(item);\n};\n\nRollbar.prototype.wrap = function(f, context, _before) {\n try {\n var ctxFn;\n if(_.isFunction(context)) {\n ctxFn = context;\n } else {\n ctxFn = function() { return context || {}; };\n }\n\n if (!_.isFunction(f)) {\n return f;\n }\n\n if (f._isWrap) {\n return f;\n }\n\n if (!f._rollbar_wrapped) {\n f._rollbar_wrapped = function () {\n if (_before && _.isFunction(_before)) {\n _before.apply(this, arguments);\n }\n try {\n return f.apply(this, arguments);\n } catch(exc) {\n var e = exc;\n if (e && window._rollbarWrappedError !== e) {\n if (_.isType(e, 'string')) {\n e = new String(e);\n }\n e._rollbarContext = ctxFn() || {};\n e._rollbarContext._wrappedSource = f.toString();\n\n window._rollbarWrappedError = e;\n }\n throw e;\n }\n };\n\n f._rollbar_wrapped._isWrap = true;\n\n if (f.hasOwnProperty) {\n for (var prop in f) {\n if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {\n f._rollbar_wrapped[prop] = f[prop];\n }\n }\n }\n }\n\n return f._rollbar_wrapped;\n } catch (e) {\n // Return the original function if the wrap fails.\n return f;\n }\n};\nRollbar.wrap = function(f, context) {\n if (_instance) {\n return _instance.wrap(f, context);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.captureEvent = function() {\n var event = _.createTelemetryEvent(arguments);\n return this.client.captureEvent(event.type, event.metadata, event.level);\n};\nRollbar.captureEvent = function() {\n if (_instance) {\n return _instance.captureEvent.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\n// The following two methods are used internally and are not meant for public use\nRollbar.prototype.captureDomContentLoaded = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureLoad(ts);\n};\n\n/* Internal */\n\nfunction addTransformsToNotifier(notifier, rollbar, gWindow) {\n notifier\n .addTransform(transforms.handleDomException)\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(gWindow))\n .addTransform(transforms.addClientInfo(gWindow))\n .addTransform(transforms.addPluginInfo(gWindow))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(sharedTransforms.addConfigToPayload)\n .addTransform(transforms.addScrubber(rollbar.scrub))\n .addTransform(sharedTransforms.userTransform(logger))\n .addTransform(sharedTransforms.addConfiguredOptions)\n .addTransform(sharedTransforms.addDiagnosticKeys)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(sharedPredicates.checkLevel)\n .addPredicate(predicates.checkIgnore)\n .addPredicate(sharedPredicates.userCheckIgnore(logger))\n .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))\n .addPredicate(sharedPredicates.urlIsSafeListed(logger))\n .addPredicate(sharedPredicates.messageIsIgnored(logger));\n}\n\nRollbar.prototype.loadFull = function() {\n logger.info('Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.');\n};\n\nRollbar.prototype._createItem = function(args) {\n return _.createItem(args, logger, this);\n};\n\nfunction _getFirstFunction(args) {\n for (var i = 0, len = args.length; i < len; ++i) {\n if (_.isFunction(args[i])) {\n return args[i];\n }\n }\n return undefined;\n}\n\nfunction _gWindow() {\n return ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n}\n\nvar defaults = require('../defaults');\nvar scrubFields = require('./defaults/scrubFields');\n\nvar defaultOptions = {\n version: defaults.version,\n scrubFields: scrubFields.scrubFields,\n logLevel: defaults.logLevel,\n reportLevel: defaults.reportLevel,\n uncaughtErrorLevel: defaults.uncaughtErrorLevel,\n endpoint: defaults.endpoint,\n verbose: false,\n enabled: true,\n transmit: true,\n sendConfig: false,\n includeItemsInTelemetry: true,\n captureIp: true,\n inspectAnonymousErrors: true,\n ignoreDuplicateErrors: true,\n wrapGlobalEventHandlers: false\n};\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar _ = require('./utility');\n\n/*\n * Rollbar - the interface to Rollbar\n *\n * @param options\n * @param api\n * @param logger\n */\nfunction Rollbar(options, api, logger, telemeter, platform) {\n this.options = _.merge(options);\n this.logger = logger;\n Rollbar.rateLimiter.configureGlobal(this.options);\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.api = api;\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n\n // This must happen before the Notifier is created\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = telemeter;\n setStackTraceLimit(options);\n this.lastError = null;\n this.lastErrorHash = 'none';\n}\n\nvar defaultOptions = {\n maxItems: 0,\n itemsPerMinute: 60\n};\n\nRollbar.rateLimiter = new RateLimiter(defaultOptions);\n\nRollbar.prototype.global = function (options) {\n Rollbar.rateLimiter.configureGlobal(options);\n return this;\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n\n this.options = _.merge(oldOptions, options, payload);\n\n // This must happen before the Notifier is configured\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier && this.notifier.configure(this.options);\n this.telemeter && this.telemeter.configure(this.options);\n setStackTraceLimit(options);\n this.global(this.options);\n\n if (validateTracer(options.tracer)) {\n this.tracer = options.tracer\n }\n\n return this;\n};\n\nRollbar.prototype.log = function (item) {\n var level = this._defaultLogLevel();\n return this._log(level, item);\n};\n\nRollbar.prototype.debug = function (item) {\n this._log('debug', item);\n};\n\nRollbar.prototype.info = function (item) {\n this._log('info', item);\n};\n\nRollbar.prototype.warn = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.warning = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.error = function (item) {\n this._log('error', item);\n};\n\nRollbar.prototype.critical = function (item) {\n this._log('critical', item);\n};\n\nRollbar.prototype.wait = function (callback) {\n this.queue.wait(callback);\n};\n\nRollbar.prototype.captureEvent = function (type, metadata, level) {\n return this.telemeter && this.telemeter.captureEvent(type, metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function (ts) {\n return this.telemeter && this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (ts) {\n return this.telemeter && this.telemeter.captureLoad(ts);\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.api.buildJsonPayload(item);\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n this.api.postJsonPayload(jsonPayload);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function (defaultLevel, item) {\n var callback;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {\n if (callback) {\n var error = new Error('ignored identical item');\n error.item = item;\n callback(error);\n }\n return;\n }\n try {\n this._addTracingInfo(item);\n item.level = item.level || defaultLevel;\n this.telemeter && this.telemeter._captureRollbarItem(item);\n item.telemetryEvents = (this.telemeter && this.telemeter.copyEvents()) || [];\n this.notifier.log(item, callback);\n } catch (e) {\n if (callback) {\n callback(e);\n }\n this.logger.error(e);\n }\n};\n\nRollbar.prototype._defaultLogLevel = function () {\n return this.options.logLevel || 'debug';\n};\n\nRollbar.prototype._sameAsLastError = function (item) {\n if (!item._isUncaught) {\n return false;\n }\n var itemHash = generateItemHash(item);\n if (this.lastErrorHash === itemHash) {\n return true;\n }\n this.lastError = item.err;\n this.lastErrorHash = itemHash;\n return false;\n};\n\nRollbar.prototype._addTracingInfo = function (item) {\n // Tracer validation occurs in the constructor\n // or in the Rollbar.prototype.configure methods\n if (this.tracer) {\n // add rollbar occurrence uuid to span\n var span = this.tracer.scope().active();\n\n if (validateSpan(span)) {\n span.setTag('rollbar.error_uuid', item.uuid);\n span.setTag('rollbar.has_error', true);\n span.setTag('error', true);\n span.setTag('rollbar.item_url', `https://rollbar.com/item/uuid/?uuid=${item.uuid}`);\n span.setTag('rollbar.occurrence_url', `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`);\n\n // add span ID & trace ID to occurrence\n var opentracingSpanId = span.context().toSpanId();\n var opentracingTraceId = span.context().toTraceId();\n\n if (item.custom) {\n item.custom.opentracing_span_id = opentracingSpanId;\n item.custom.opentracing_trace_id = opentracingTraceId;\n } else {\n item.custom = {\n opentracing_span_id: opentracingSpanId,\n opentracing_trace_id: opentracingTraceId\n };\n }\n }\n }\n}\n\nfunction generateItemHash(item) {\n var message = item.message || '';\n var stack = (item.err || {}).stack || String(item.err);\n return message + '::' + stack;\n}\n\n// Node.js, Chrome, Safari, and some other browsers support this property\n// which globally sets the number of stack frames returned in an Error object.\n// If a browser can't use it, no harm done.\nfunction setStackTraceLimit(options) {\n if (options.stackTraceLimit) {\n Error.stackTraceLimit = options.stackTraceLimit;\n }\n}\n\n/**\n * Validate the Tracer object provided to the Client\n * is valid for our Opentracing use case.\n * @param {opentracer.Tracer} tracer\n */\nfunction validateTracer(tracer) {\n if (!tracer) {\n return false;\n }\n\n if (!tracer.scope || typeof tracer.scope !== 'function') {\n return false;\n }\n\n var scope = tracer.scope();\n\n if (!scope || !scope.active || typeof scope.active !== 'function') {\n return false;\n }\n\n return true;\n}\n\n/**\n * Validate the Span object provided\n * @param {opentracer.Span} span\n */\nfunction validateSpan(span) {\n if (!span || !span.context || typeof span.context !== 'function') {\n return false;\n }\n\n var spanContext = span.context();\n\n if (!spanContext\n || !spanContext.toSpanId\n || !spanContext.toTraceId\n || typeof spanContext.toSpanId !== 'function'\n || typeof spanContext.toTraceId !== 'function') {\n return false\n }\n\n return true;\n}\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar\n *\n * @param options - the same options that are accepted by configureGlobal offered as a convenience\n */\nfunction RateLimiter(options) {\n this.startTime = _.now();\n this.counter = 0;\n this.perMinCounter = 0;\n this.platform = null;\n this.platformOptions = {};\n this.configureGlobal(options);\n}\n\nRateLimiter.globalSettings = {\n startTime: _.now(),\n maxItems: undefined,\n itemsPerMinute: undefined\n};\n\n/*\n * configureGlobal - set the global rate limiter options\n *\n * @param options - Only the following values are recognized:\n * startTime: a timestamp of the form returned by (new Date()).getTime()\n * maxItems: the maximum items\n * itemsPerMinute: the max number of items to send in a given minute\n */\nRateLimiter.prototype.configureGlobal = function(options) {\n if (options.startTime !== undefined) {\n RateLimiter.globalSettings.startTime = options.startTime;\n }\n if (options.maxItems !== undefined) {\n RateLimiter.globalSettings.maxItems = options.maxItems;\n }\n if (options.itemsPerMinute !== undefined) {\n RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;\n }\n};\n\n/*\n * shouldSend - determine if we should send a given item based on rate limit settings\n *\n * @param item - the item we are about to send\n * @returns An object with the following structure:\n * error: (Error|null)\n * shouldSend: bool\n * payload: (Object|null)\n * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and\n * exactly one of error or payload will be non-null. If error is non-null, the returned Error will\n * describe the situation, but it means that we were already over a rate limit (either globally or\n * per minute) when this item was checked. If error is null, and therefore payload is non-null, it\n * means this item put us over the global rate limit and the payload should be sent to Rollbar in\n * place of the passed in item.\n */\nRateLimiter.prototype.shouldSend = function(item, now) {\n now = now || _.now();\n var elapsedTime = now - this.startTime;\n if (elapsedTime < 0 || elapsedTime >= 60000) {\n this.startTime = now;\n this.perMinCounter = 0;\n }\n\n var globalRateLimit = RateLimiter.globalSettings.maxItems;\n var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;\n\n if (checkRate(item, globalRateLimit, this.counter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimit + ' max items reached', false);\n } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimitPerMin + ' items per minute reached', false);\n }\n this.counter++;\n this.perMinCounter++;\n\n var shouldSend = !checkRate(item, globalRateLimit, this.counter);\n var perMinute = shouldSend;\n shouldSend = shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);\n return shouldSendValue(this.platform, this.platformOptions, null, shouldSend, globalRateLimit, globalRateLimitPerMin, perMinute);\n};\n\nRateLimiter.prototype.setPlatformOptions = function(platform, options) {\n this.platform = platform;\n this.platformOptions = options;\n};\n\n/* Helpers */\n\nfunction checkRate(item, limit, counter) {\n return !item.ignoreRateLimit && limit >= 1 && counter > limit;\n}\n\nfunction shouldSendValue(platform, options, error, shouldSend, globalRateLimit, limitPerMin, perMinute) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute);\n }\n return {error: error, shouldSend: shouldSend, payload: payload};\n}\n\nfunction rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute) {\n var environment = options.environment || (options.payload && options.payload.environment);\n var msg;\n if (perMinute) {\n msg = 'item per minute limit reached, ignoring errors until timeout';\n } else {\n msg = 'maxItems has been hit, ignoring errors until reset.';\n }\n var item = {\n body: {\n message: {\n body: msg,\n extra: {\n maxItems: globalRateLimit,\n itemsPerMinute: limitPerMin\n }\n }\n },\n language: 'javascript',\n environment: environment,\n notifier: {\n version: (options.notifier && options.notifier.version) || options.version\n }\n };\n if (platform === 'browser') {\n item.platform = 'browser';\n item.framework = 'browser-js';\n item.notifier.name = 'rollbar-browser-js';\n } else if (platform === 'server') {\n item.framework = options.framework || 'node-js';\n item.notifier.name = options.notifier.name;\n } else if (platform === 'react-native') {\n item.framework = options.framework || 'react-native';\n item.notifier.name = options.notifier.name;\n }\n return item;\n}\n\nmodule.exports = RateLimiter;\n","'use strict';\n\n'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isPlainObject = function isPlainObject(obj) {\n\tif (!obj || toStr.call(obj) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tvar hasOwnConstructor = hasOwn.call(obj, 'constructor');\n\tvar hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n\t// Not own constructor property must be Object\n\tif (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n\t\treturn false;\n\t}\n\n\t// Own properties are enumerated firstly, so to speed up,\n\t// if last one is own, then all properties are own.\n\tvar key;\n\tfor (key in obj) {/**/}\n\n\treturn typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\nfunction merge() {\n var i, src, copy, clone, name,\n result = {},\n current = null,\n length = arguments.length;\n\n for (i=0; i < length; i++) {\n current = arguments[i];\n if (current == null) {\n continue;\n }\n\n for (name in current) {\n src = result[name];\n copy = current[name];\n if (result !== copy) {\n if (copy && isPlainObject(copy)) {\n clone = src && isPlainObject(src) ? src : {};\n result[name] = merge(clone, copy);\n } else if (typeof copy !== 'undefined') {\n result[name] = copy;\n }\n }\n }\n }\n return result;\n}\n\nmodule.exports = merge;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Queue - an object which handles which handles a queue of items to be sent to Rollbar.\n * This object handles rate limiting via a passed in rate limiter, retries based on connection\n * errors, and filtering of items based on a set of configurable predicates. The communication to\n * the backend is performed via a given API object.\n *\n * @param rateLimiter - An object which conforms to the interface\n * rateLimiter.shouldSend(item) -> bool\n * @param api - An object which conforms to the interface\n * api.postItem(payload, function(err, response))\n * @param logger - An object used to log verbose messages if desired\n * @param options - see Queue.prototype.configure\n */\nfunction Queue(rateLimiter, api, logger, options) {\n this.rateLimiter = rateLimiter;\n this.api = api;\n this.logger = logger;\n this.options = options;\n this.predicates = [];\n this.pendingItems = [];\n this.pendingRequests = [];\n this.retryQueue = [];\n this.retryHandle = null;\n this.waitCallback = null;\n this.waitIntervalID = null;\n}\n\n/*\n * configure - updates the options this queue uses\n *\n * @param options\n */\nQueue.prototype.configure = function(options) {\n this.api && this.api.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addPredicate - adds a predicate to the end of the list of predicates for this queue\n *\n * @param predicate - function(item, options) -> (bool|{err: Error})\n * Returning true means that this predicate passes and the item is okay to go on the queue\n * Returning false means do not add the item to the queue, but it is not an error\n * Returning {err: Error} means do not add the item to the queue, and the given error explains why\n * Returning {err: undefined} is equivalent to returning true but don't do that\n */\nQueue.prototype.addPredicate = function(predicate) {\n if (_.isFunction(predicate)) {\n this.predicates.push(predicate);\n }\n return this;\n};\n\nQueue.prototype.addPendingItem = function(item) {\n this.pendingItems.push(item);\n};\n\nQueue.prototype.removePendingItem = function(item) {\n var idx = this.pendingItems.indexOf(item);\n if (idx !== -1) {\n this.pendingItems.splice(idx, 1);\n }\n};\n\n/*\n * addItem - Send an item to the Rollbar API if all of the predicates are satisfied\n *\n * @param item - The payload to send to the backend\n * @param callback - function(error, repsonse) which will be called with the response from the API\n * in the case of a success, otherwise response will be null and error will have a value. If both\n * error and response are null then the item was stopped by a predicate which did not consider this\n * to be an error condition, but nonetheless did not send the item to the API.\n * @param originalError - The original error before any transformations that is to be logged if any\n */\nQueue.prototype.addItem = function(item, callback, originalError, originalItem) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() { return; };\n }\n var predicateResult = this._applyPredicates(item);\n if (predicateResult.stop) {\n this.removePendingItem(originalItem);\n callback(predicateResult.err);\n return;\n }\n this._maybeLog(item, originalError);\n this.removePendingItem(originalItem);\n if (!this.options.transmit) {\n callback(new Error('Transmit disabled'));\n return;\n }\n this.pendingRequests.push(item);\n try {\n this._makeApiRequest(item, function(err, resp) {\n this._dequeuePendingRequest(item);\n callback(err, resp);\n }.bind(this));\n } catch (e) {\n this._dequeuePendingRequest(item);\n callback(e);\n }\n};\n\n/*\n * wait - Stop any further errors from being added to the queue, and get called back when all items\n * currently processing have finished sending to the backend.\n *\n * @param callback - function() called when all pending items have been sent\n */\nQueue.prototype.wait = function(callback) {\n if (!_.isFunction(callback)) {\n return;\n }\n this.waitCallback = callback;\n if (this._maybeCallWait()) {\n return;\n }\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitIntervalID = setInterval(function() {\n this._maybeCallWait();\n }.bind(this), 500);\n};\n\n/* _applyPredicates - Sequentially applies the predicates that have been added to the queue to the\n * given item with the currently configured options.\n *\n * @param item - An item in the queue\n * @returns {stop: bool, err: (Error|null)} - stop being true means do not add item to the queue,\n * the error value should be passed up to a callbak if we are stopping.\n */\nQueue.prototype._applyPredicates = function(item) {\n var p = null;\n for (var i = 0, len = this.predicates.length; i < len; i++) {\n p = this.predicates[i](item, this.options);\n if (!p || p.err !== undefined) {\n return {stop: true, err: p.err};\n }\n }\n return {stop: false, err: null};\n};\n\n/*\n * _makeApiRequest - Send an item to Rollbar, callback when done, if there is an error make an\n * effort to retry if we are configured to do so.\n *\n * @param item - an item ready to send to the backend\n * @param callback - function(err, response)\n */\nQueue.prototype._makeApiRequest = function(item, callback) {\n var rateLimitResponse = this.rateLimiter.shouldSend(item);\n if (rateLimitResponse.shouldSend) {\n this.api.postItem(item, function(err, resp) {\n if (err) {\n this._maybeRetry(err, item, callback);\n } else {\n callback(err, resp);\n }\n }.bind(this));\n } else if (rateLimitResponse.error) {\n callback(rateLimitResponse.error);\n } else {\n this.api.postItem(rateLimitResponse.payload, callback);\n }\n};\n\n// These are errors basically mean there is no internet connection\nvar RETRIABLE_ERRORS = ['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED', 'EHOSTUNREACH', 'EPIPE', 'EAI_AGAIN'];\n\n/*\n * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback\n * with the error.\n *\n * @param err - an error returned by the API transport\n * @param item - the item that was trying to be sent when this error occured\n * @param callback - function(err, response)\n */\nQueue.prototype._maybeRetry = function(err, item, callback) {\n var shouldRetry = false;\n if (this.options.retryInterval) {\n for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {\n if (err.code === RETRIABLE_ERRORS[i]) {\n shouldRetry = true;\n break;\n }\n }\n if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {\n item.retries = item.retries ? item.retries + 1 : 1;\n if (item.retries > this.options.maxRetries) {\n shouldRetry = false;\n }\n }\n }\n if (shouldRetry) {\n this._retryApiRequest(item, callback);\n } else {\n callback(err);\n }\n};\n\n/*\n * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process\n * that queue based on the retryInterval in the options for this queue.\n *\n * @param item - an item that failed to send due to an error we deem retriable\n * @param callback - function(err, response)\n */\nQueue.prototype._retryApiRequest = function(item, callback) {\n this.retryQueue.push({item: item, callback: callback});\n\n if (!this.retryHandle) {\n this.retryHandle = setInterval(function() {\n while (this.retryQueue.length) {\n var retryObject = this.retryQueue.shift();\n this._makeApiRequest(retryObject.item, retryObject.callback);\n }\n }.bind(this), this.options.retryInterval);\n }\n};\n\n/*\n * _dequeuePendingRequest - Removes the item from the pending request queue, this queue is used to\n * enable to functionality of providing a callback that clients can pass to `wait` to be notified\n * when the pending request queue has been emptied. This must be called when the API finishes\n * processing this item. If a `wait` callback is configured, it is called by this function.\n *\n * @param item - the item previously added to the pending request queue\n */\nQueue.prototype._dequeuePendingRequest = function(item) {\n var idx = this.pendingRequests.indexOf(item);\n if (idx !== -1) {\n this.pendingRequests.splice(idx, 1);\n this._maybeCallWait();\n }\n};\n\nQueue.prototype._maybeLog = function(data, originalError) {\n if (this.logger && this.options.verbose) {\n var message = originalError;\n message = message || _.get(data, 'body.trace.exception.message');\n message = message || _.get(data, 'body.trace_chain.0.exception.message');\n if (message) {\n this.logger.error(message);\n return;\n }\n message = _.get(data, 'body.message.body');\n if (message) {\n this.logger.log(message);\n }\n }\n};\n\nQueue.prototype._maybeCallWait = function() {\n if (_.isFunction(this.waitCallback) && this.pendingItems.length === 0 && this.pendingRequests.length === 0) {\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitCallback();\n return true;\n }\n return false;\n};\n\nmodule.exports = Queue;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Notifier - the internal object responsible for delegating between the client exposed API, the\n * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the\n * queue which handles the communcation with the Rollbar API servers.\n *\n * @param queue - an object that conforms to the interface: addItem(item, callback)\n * @param options - an object representing the options to be set for this notifier, this should have\n * any defaults already set by the caller\n */\nfunction Notifier(queue, options) {\n this.queue = queue;\n this.options = options;\n this.transforms = [];\n this.diagnostic = {};\n}\n\n/*\n * configure - updates the options for this notifier with the passed in object\n *\n * @param options - an object which gets merged with the current options set on this notifier\n * @returns this\n */\nNotifier.prototype.configure = function(options) {\n this.queue && this.queue.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addTransform - adds a transform onto the end of the queue of transforms for this notifier\n *\n * @param transform - a function which takes three arguments:\n * * item: An Object representing the data to eventually be sent to Rollbar\n * * options: The current value of the options for this notifier\n * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this\n * callback with a null value for error if it wants the processing chain to continue, otherwise\n * with an error to terminate the processing. The item should be the updated item after this\n * transform is finished modifying it.\n */\nNotifier.prototype.addTransform = function(transform) {\n if (_.isFunction(transform)) {\n this.transforms.push(transform);\n }\n return this;\n};\n\n/*\n * log - the internal log function which applies the configured transforms and then pushes onto the\n * queue to be sent to the backend.\n *\n * @param item - An object with the following structure:\n * message [String] - An optional string to be sent to rollbar\n * error [Error] - An optional error\n *\n * @param callback - A function of type function(err, resp) which will be called with exactly one\n * null argument and one non-null argument. The callback will be called once, either during the\n * transform stage if an error occurs inside a transform, or in response to the communication with\n * the backend. The second argument will be the response from the backend in case of success.\n */\nNotifier.prototype.log = function(item, callback) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!this.options.enabled) {\n return callback(new Error('Rollbar is not enabled'));\n }\n\n this.queue.addPendingItem(item);\n var originalError = item.err;\n this._applyTransforms(item, function(err, i) {\n if (err) {\n this.queue.removePendingItem(item);\n return callback(err, null);\n }\n this.queue.addItem(i, callback, originalError, item);\n }.bind(this));\n};\n\n/* Internal */\n\n/*\n * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See\n * `addTransform` for more information.\n *\n * @param item - An item to be transformed\n * @param callback - A function of type function(err, item) which will be called with a non-null\n * error and a null item in the case of a transform failure, or a null error and non-null item after\n * all transforms have been applied.\n */\nNotifier.prototype._applyTransforms = function(item, callback) {\n var transformIndex = -1;\n var transformsLength = this.transforms.length;\n var transforms = this.transforms;\n var options = this.options;\n\n var cb = function(err, i) {\n if (err) {\n callback(err, null);\n return;\n }\n\n transformIndex++;\n\n if (transformIndex === transformsLength) {\n callback(null, i);\n return;\n }\n\n transforms[transformIndex](i, options, cb);\n };\n\n cb(null, item);\n};\n\nmodule.exports = Notifier;\n","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1/item/',\n search: null,\n version: '1',\n protocol: 'https:',\n port: 443\n};\n\n/**\n * Api is an object that encapsulates methods of communicating with\n * the Rollbar API. It is a standard interface with some parts implemented\n * differently for server or browser contexts. It is an object that should\n * be instantiated when used so it can contain non-global options that may\n * be different for another instance of RollbarApi.\n *\n * @param options {\n * accessToken: the accessToken to use for posting items to rollbar\n * endpoint: an alternative endpoint to send errors to\n * must be a valid, fully qualified URL.\n * The default is: https://api.rollbar.com/api/1/item\n * proxy: if you wish to proxy requests provide an object\n * with the following keys:\n * host or hostname (required): foo.example.com\n * port (optional): 123\n * protocol (optional): https\n * }\n */\nfunction Api(options, transport, urllib, truncation, jsonBackup) {\n this.options = options;\n this.transport = transport;\n this.url = urllib;\n this.truncation = truncation;\n this.jsonBackup = jsonBackup;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, urllib);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function(data, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n this.transport.post(this.accessToken, transportOptions, payload, callback);\n};\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.buildJsonPayload = function(data, callback) {\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n\n if (stringifyResult.error) {\n if (callback) {\n callback(stringifyResult.error);\n }\n return null;\n }\n\n return stringifyResult.value;\n};\n\n/**\n *\n * @param jsonPayload\n * @param callback\n */\nApi.prototype.postJsonPayload = function(jsonPayload, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n this.transport.postJsonPayload(this.accessToken, transportOptions, jsonPayload, callback);\n};\n\nApi.prototype.configure = function(options) {\n var oldOptions = this.oldOptions;\n this.options = _.merge(oldOptions, options);\n this.transportOptions = _getTransport(this.options, this.url);\n if (this.options.accessToken !== undefined) {\n this.accessToken = this.options.accessToken;\n }\n return this;\n};\n\nfunction _getTransport(options, url) {\n return helpers.getTransportFromOptions(options, defaultOptions, url);\n}\n\nmodule.exports = Api;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (!_.isType(data.context, 'string')) {\n var contextResult = _.stringify(data.context, jsonBackup);\n if (contextResult.error) {\n data.context = 'Error: could not serialize \\'context\\'';\n } else {\n data.context = contextResult.value || '';\n }\n if (data.context.length > 255) {\n data.context = data.context.substr(0, 255);\n }\n }\n return {\n access_token: accessToken,\n data: data\n };\n}\n\nfunction getTransportFromOptions(options, defaults, url) {\n var hostname = defaults.hostname;\n var protocol = defaults.protocol;\n var port = defaults.port;\n var path = defaults.path;\n var search = defaults.search;\n var timeout = options.timeout;\n\n var proxy = options.proxy;\n if (options.endpoint) {\n var opts = url.parse(options.endpoint);\n hostname = opts.hostname;\n protocol = opts.protocol;\n port = opts.port;\n path = opts.pathname;\n search = opts.search;\n }\n return {\n timeout: timeout,\n hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy\n };\n}\n\nfunction transportOptions(transport, method) {\n var protocol = transport.protocol || 'https:';\n var port = transport.port || (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);\n var hostname = transport.hostname;\n var path = transport.path;\n var timeout = transport.timeout;\n if (transport.search) {\n path = path + transport.search;\n }\n if (transport.proxy) {\n path = protocol + '//' + hostname + path;\n hostname = transport.proxy.host || transport.proxy.hostname;\n port = transport.proxy.port;\n protocol = transport.proxy.protocol || protocol;\n }\n return {\n timeout: timeout,\n protocol: protocol,\n hostname: hostname,\n path: path,\n port: port,\n method: method\n };\n}\n\nfunction appendPathToPath(base, path) {\n var baseTrailingSlash = /\\/$/.test(base);\n var pathBeginningSlash = /^\\//.test(path);\n\n if (baseTrailingSlash && pathBeginningSlash) {\n path = path.substring(1);\n } else if (!baseTrailingSlash && !pathBeginningSlash) {\n path = '/' + path;\n }\n\n return base + path;\n}\n\nmodule.exports = {\n buildPayload: buildPayload,\n getTransportFromOptions: getTransportFromOptions,\n transportOptions: transportOptions,\n appendPathToPath: appendPathToPath\n};\n","// Console-polyfill. MIT license.\n// https://github.com/paulmillr/console-polyfill\n// Make it safe to do console.log() always.\n(function(global) {\n 'use strict';\n if (!global.console) {\n global.console = {};\n }\n var con = global.console;\n var prop, method;\n var dummy = function() {};\n var properties = ['memory'];\n var methods = ('assert,clear,count,debug,dir,dirxml,error,exception,group,' +\n 'groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,' +\n 'show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn').split(',');\n while (prop = properties.pop()) if (!con[prop]) con[prop] = {};\n while (method = methods.pop()) if (!con[method]) con[method] = dummy;\n // Using `this` for web workers & supports Browserify / Webpack.\n})(typeof window === 'undefined' ? this : window);\n","'use strict';\n\n// This detection.js module is used to encapsulate any ugly browser/feature\n// detection we may need to do.\n\n// Figure out which version of IE we're using, if any.\n// This is gleaned from http://stackoverflow.com/questions/5574842/best-way-to-check-for-ie-less-than-9-in-javascript-without-library\n// Will return an integer on IE (i.e. 8)\n// Will return undefined otherwise\nfunction getIEVersion() {\n\tvar undef;\n\tif (typeof document === 'undefined') {\n\t\treturn undef;\n\t}\n\n var v = 3,\n div = document.createElement('div'),\n all = div.getElementsByTagName('i');\n\n while (\n div.innerHTML = '',\n all[0]\n );\n\n return v > 4 ? v : undef;\n}\n\nvar Detection = {\n ieVersion: getIEVersion\n};\n\nmodule.exports = Detection;\n","'use strict';\n\nfunction captureUncaughtExceptions(window, handler, shim) {\n if (!window) { return; }\n var oldOnError;\n\n if (typeof handler._rollbarOldOnError === 'function') {\n oldOnError = handler._rollbarOldOnError;\n } else if (window.onerror) {\n oldOnError = window.onerror;\n while (oldOnError._rollbarOldOnError) {\n oldOnError = oldOnError._rollbarOldOnError;\n }\n handler._rollbarOldOnError = oldOnError;\n }\n\n handler.handleAnonymousErrors();\n\n var fn = function() {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n if (shim) {\n fn._rollbarOldOnError = oldOnError;\n }\n window.onerror = fn;\n}\n\nfunction _rollbarWindowOnError(window, r, old, args) {\n if (window._rollbarWrappedError) {\n if (!args[4]) {\n args[4] = window._rollbarWrappedError;\n }\n if (!args[5]) {\n args[5] = window._rollbarWrappedError._rollbarContext;\n }\n window._rollbarWrappedError = null;\n }\n\n var ret = r.handleUncaughtException.apply(r, args);\n\n if (old) {\n old.apply(window, args);\n }\n\n // Let other chained onerror handlers above run before setting this.\n // If an error is thrown and caught within a chained onerror handler,\n // Error.prepareStackTrace() will see that one before the one we want.\n if (ret === 'anonymous') {\n r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()\n }\n}\n\nfunction captureUnhandledRejections(window, handler, shim) {\n if (!window) { return; }\n\n if (typeof window._rollbarURH === 'function' && window._rollbarURH.belongsToShim) {\n window.removeEventListener('unhandledrejection', window._rollbarURH);\n }\n\n var rejectionHandler = function (evt) {\n var reason, promise, detail;\n try {\n reason = evt.reason;\n } catch (e) {\n reason = undefined;\n }\n try {\n promise = evt.promise;\n } catch (e) {\n promise = '[unhandledrejection] error getting `promise` from event';\n }\n try {\n detail = evt.detail;\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\n }\n } catch (e) {\n // Ignore\n }\n if (!reason) {\n reason = '[unhandledrejection] error getting `reason` from event';\n }\n\n if (handler && handler.handleUnhandledRejection) {\n handler.handleUnhandledRejection(reason, promise);\n }\n };\n rejectionHandler.belongsToShim = shim;\n window._rollbarURH = rejectionHandler;\n window.addEventListener('unhandledrejection', rejectionHandler);\n}\n\n\nmodule.exports = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections\n};\n","'use strict';\n\n/*global XDomainRequest*/\n\nvar _ = require('../utility');\nvar logger = require('./logger');\n\n/*\n * accessToken may be embedded in payload but that should not\n * be assumed\n *\n * options: {\n * hostname\n * protocol\n * path\n * port\n * method\n * }\n *\n * params is an object containing key/value pairs. These\n * will be appended to the path as 'key=value&key=value'\n *\n * payload is an unserialized object\n */\nfunction Transport(truncation) {\n this.truncation = truncation;\n}\n\nTransport.prototype.get = function(accessToken, options, params, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n _.addParamsAndAccessTokenToPath(accessToken, options, params);\n\n var method = 'GET';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, null, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.post = function(accessToken, options, payload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!payload) {\n return callback(new Error('Cannot send empty request'));\n }\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n if (stringifyResult.error) {\n return callback(stringifyResult.error);\n }\n\n var writeData = stringifyResult.value;\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, writeData, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.postJsonPayload = function (accessToken, options, jsonPayload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, jsonPayload, callback, requestFactory, options.timeout);\n}\n\n\n// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope\n// so Angular change detection isn't triggered on each API call.\n// This is the equivalent of runOutsideAngular().\n//\nfunction _makeZoneRequest() {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;\n var args = Array.prototype.slice.call(arguments);\n\n if (currentZone && currentZone._name === 'angular') {\n var rootZone = currentZone._parent;\n rootZone.run(function () {\n _makeRequest.apply(undefined, args);\n });\n } else {\n _makeRequest.apply(undefined, args);\n }\n}\n\n/* global RollbarProxy */\nfunction _proxyRequest(json, callback) {\n var rollbarProxy = new RollbarProxy();\n rollbarProxy.sendJsonPayload(\n json,\n function(_msg) { /* do nothing */ }, // eslint-disable-line no-unused-vars\n function(err) {\n callback(new Error(err));\n }\n );\n}\n\nfunction _makeRequest(accessToken, url, method, data, callback, requestFactory, timeout) {\n if (typeof RollbarProxy !== 'undefined') {\n return _proxyRequest(data, callback);\n }\n\n var request;\n if (requestFactory) {\n request = requestFactory();\n } else {\n request = _createXMLHTTPObject();\n }\n if (!request) {\n // Give up, no way to send requests\n return callback(new Error('No way to send a request'));\n }\n try {\n try {\n var onreadystatechange = function() {\n try {\n if (onreadystatechange && request.readyState === 4) {\n onreadystatechange = undefined;\n\n var parseResponse = _.jsonParse(request.responseText);\n if (_isSuccess(request)) {\n callback(parseResponse.error, parseResponse.value);\n return;\n } else if (_isNormalFailure(request)) {\n if (request.status === 403) {\n // likely caused by using a server access token\n var message = parseResponse.value && parseResponse.value.message;\n logger.error(message);\n }\n // return valid http status codes\n callback(new Error(String(request.status)));\n } else {\n // IE will return a status 12000+ on some sort of connection failure,\n // so we return a blank error\n // http://msdn.microsoft.com/en-us/library/aa383770%28VS.85%29.aspx\n var msg = 'XHR response had no status code (likely connection failure)';\n callback(_newRetriableError(msg));\n }\n }\n } catch (ex) {\n //jquery source mentions firefox may error out while accessing the\n //request members if there is a network error\n //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111\n var exc;\n if (ex && ex.stack) {\n exc = ex;\n } else {\n exc = new Error(ex);\n }\n callback(exc);\n }\n };\n\n request.open(method, url, true);\n if (request.setRequestHeader) {\n request.setRequestHeader('Content-Type', 'application/json');\n request.setRequestHeader('X-Rollbar-Access-Token', accessToken);\n }\n\n if(_.isFiniteNumber(timeout)) {\n request.timeout = timeout;\n }\n\n request.onreadystatechange = onreadystatechange;\n request.send(data);\n } catch (e1) {\n // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest\n if (typeof XDomainRequest !== 'undefined') {\n\n // Assume we are in a really old browser which has a bunch of limitations:\n // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx\n\n // Extreme paranoia: if we have XDomainRequest then we have a window, but just in case\n if (!window || !window.location) {\n return callback(new Error('No window available during request, unknown environment'));\n }\n\n // If the current page is http, try and send over http\n if (window.location.href.substring(0, 5) === 'http:' && url.substring(0, 5) === 'https') {\n url = 'http' + url.substring(5);\n }\n\n var xdomainrequest = new XDomainRequest();\n xdomainrequest.onprogress = function() {};\n xdomainrequest.ontimeout = function() {\n var msg = 'Request timed out';\n var code = 'ETIMEDOUT';\n callback(_newRetriableError(msg, code));\n };\n xdomainrequest.onerror = function() {\n callback(new Error('Error during request'));\n };\n xdomainrequest.onload = function() {\n var parseResponse = _.jsonParse(xdomainrequest.responseText);\n callback(parseResponse.error, parseResponse.value);\n };\n xdomainrequest.open(method, url, true);\n xdomainrequest.send(data);\n } else {\n callback(new Error('Cannot find a method to transport a request'));\n }\n }\n } catch (e2) {\n callback(e2);\n }\n}\n\nfunction _createXMLHTTPObject() {\n /* global ActiveXObject:false */\n\n var factories = [\n function () {\n return new XMLHttpRequest();\n },\n function () {\n return new ActiveXObject('Msxml2.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Msxml3.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Microsoft.XMLHTTP');\n }\n ];\n var xmlhttp;\n var i;\n var numFactories = factories.length;\n for (i = 0; i < numFactories; i++) {\n /* eslint-disable no-empty */\n try {\n xmlhttp = factories[i]();\n break;\n } catch (e) {\n // pass\n }\n /* eslint-enable no-empty */\n }\n return xmlhttp;\n}\n\nfunction _isSuccess(r) {\n return r && r.status && r.status === 200;\n}\n\nfunction _isNormalFailure(r) {\n return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;\n}\n\nfunction _newRetriableError(message, code) {\n var err = new Error(message);\n err.code = code || 'ENOTFOUND';\n return err;\n}\n\nmodule.exports = Transport;\n","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('../errorParser');\nvar logger = require('./logger');\n\nfunction handleDomException(item, options, callback) {\n if(item.err && errorParser.Stack(item.err).name === 'DOMException') {\n var originalError = new Error();\n originalError.name = item.err.name;\n originalError.message = item.err.message;\n originalError.stack = item.err.stack;\n originalError.nested = item.err;\n item.err = originalError;\n }\n callback(null, item);\n}\n\nfunction handleItemWithError(item, options, callback) {\n item.data = item.data || {};\n if (item.err) {\n try {\n item.stackInfo = item.err._savedStackTrace || errorParser.parse(item.err, item.skipFrames);\n\n if (options.addErrorContext) {\n addErrorContext(item);\n }\n } catch (e) {\n logger.error('Error while parsing the error object.', e);\n try {\n item.message = item.err.message || item.err.description || item.message || String(item.err);\n } catch (e2) {\n item.message = String(item.err) || String(e2);\n }\n delete item.err;\n }\n }\n callback(null, item);\n}\n\nfunction addErrorContext(item) {\n var chain = [];\n var err = item.err;\n\n chain.push(err);\n\n while (err.nested) {\n err = err.nested;\n chain.push(err);\n }\n\n _.addErrorContext(item, chain);\n}\n\nfunction ensureItemHasSomethingToSay(item, options, callback) {\n if (!item.message && !item.stackInfo && !item.custom) {\n callback(new Error('No message, stack info, or custom data'), null);\n }\n callback(null, item);\n}\n\nfunction addBaseInfo(item, options, callback) {\n var environment = (options.payload && options.payload.environment) || options.environment;\n item.data = _.merge(item.data, {\n environment: environment,\n level: item.level,\n endpoint: options.endpoint,\n platform: 'browser',\n framework: 'browser-js',\n language: 'javascript',\n server: {},\n uuid: item.uuid,\n notifier: {\n name: 'rollbar-browser-js',\n version: options.version\n },\n custom: item.custom\n });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.location) {\n return callback(null, item);\n }\n var remoteString = '$remote_ip';\n if (!options.captureIp) {\n remoteString = null;\n } else if (options.captureIp !== true) {\n remoteString += '_anonymize';\n }\n _.set(item, 'data.request', {\n url: window.location.href,\n query_string: window.location.search,\n user_ip: remoteString\n });\n callback(null, item);\n };\n}\n\nfunction addClientInfo(window) {\n return function(item, options, callback) {\n if (!window) {\n return callback(null, item);\n }\n var nav = window.navigator || {};\n var scr = window.screen || {};\n _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: nav.userAgent,\n language: nav.language,\n cookie_enabled: nav.cookieEnabled,\n screen: {\n width: scr.width,\n height: scr.height\n }\n }\n });\n callback(null, item);\n };\n}\n\nfunction addPluginInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.navigator) {\n return callback(null, item);\n }\n var plugins = [];\n var navPlugins = window.navigator.plugins || [];\n var cur;\n for (var i=0, l=navPlugins.length; i < l; ++i) {\n cur = navPlugins[i];\n plugins.push({name: cur.name, description: cur.description});\n }\n _.set(item, 'data.client.javascript.plugins', plugins);\n callback(null, item);\n };\n}\n\nfunction addBody(item, options, callback) {\n if (item.stackInfo) {\n if (item.stackInfo.traceChain) {\n addBodyTraceChain(item, options, callback);\n } else {\n addBodyTrace(item, options, callback);\n }\n } else {\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction addBodyMessage(item, options, callback) {\n var message = item.message;\n var custom = item.custom;\n\n if (!message) {\n message = 'Item sent with null or missing arguments.';\n }\n var result = {\n body: message\n };\n\n if (custom) {\n result.extra = _.merge(custom);\n }\n\n _.set(item, 'data.body', {message: result});\n callback(null, item);\n}\n\nfunction stackFromItem(item) {\n // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = item.stackInfo.stack;\n if (stack && stack.length === 0 && item._unhandledStackInfo && item._unhandledStackInfo.stack) {\n stack = item._unhandledStackInfo.stack;\n }\n return stack;\n}\n\nfunction addBodyTraceChain(item, options, callback) {\n var traceChain = item.stackInfo.traceChain;\n var traces = [];\n\n var traceChainLength = traceChain.length;\n for (var i = 0; i < traceChainLength; i++) {\n var trace = buildTrace(item, traceChain[i], options);\n traces.push(trace);\n }\n\n _.set(item, 'data.body', {trace_chain: traces});\n callback(null, item);\n}\n\nfunction addBodyTrace(item, options, callback) {\n var stack = stackFromItem(item);\n\n if (stack) {\n var trace = buildTrace(item, item.stackInfo, options);\n _.set(item, 'data.body', {trace: trace});\n callback(null, item);\n } else {\n var stackInfo = item.stackInfo;\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction buildTrace(item, stackInfo, options) {\n var description = item && item.data.description;\n var custom = item && item.custom;\n var stack = stackFromItem(item);\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n var trace = {\n exception: {\n 'class': className,\n message: message\n }\n };\n\n if (description) {\n trace.exception.description = description;\n }\n\n if (stack) {\n if (stack.length === 0) {\n trace.exception.stack = stackInfo.rawStack;\n trace.exception.raw = String(stackInfo.rawException);\n }\n var stackFrame;\n var frame;\n var code;\n var pre;\n var post;\n var contextLength;\n var i, mid;\n\n trace.frames = [];\n for (i = 0; i < stack.length; ++i) {\n stackFrame = stack[i];\n frame = {\n filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',\n lineno: stackFrame.line || null,\n method: (!stackFrame.func || stackFrame.func === '?') ? '[anonymous]' : stackFrame.func,\n colno: stackFrame.column\n };\n if (options.sendFrameUrl) {\n frame.url = stackFrame.url;\n }\n if (frame.method && frame.method.endsWith && frame.method.endsWith('_rollbar_wrapped')) {\n continue;\n }\n\n code = pre = post = null;\n contextLength = stackFrame.context ? stackFrame.context.length : 0;\n if (contextLength) {\n mid = Math.floor(contextLength / 2);\n pre = stackFrame.context.slice(0, mid);\n code = stackFrame.context[mid];\n post = stackFrame.context.slice(mid);\n }\n\n if (code) {\n frame.code = code;\n }\n\n if (pre || post) {\n frame.context = {};\n if (pre && pre.length) {\n frame.context.pre = pre;\n }\n if (post && post.length) {\n frame.context.post = post;\n }\n }\n\n if (stackFrame.args) {\n frame.args = stackFrame.args;\n }\n\n trace.frames.push(frame);\n }\n\n // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last\n trace.frames.reverse();\n\n if (custom) {\n trace.extra = _.merge(custom);\n }\n }\n\n return trace;\n}\n\nfunction errorClass(stackInfo, guess, options) {\n if (stackInfo.name) {\n return stackInfo.name;\n } else if (options.guessErrorClass) {\n return guess;\n } else {\n return '(unknown)';\n }\n}\n\nfunction addScrubber(scrubFn) {\n return function (item, options, callback) {\n if (scrubFn) {\n var scrubFields = options.scrubFields || [];\n var scrubPaths = options.scrubPaths || [];\n item.data = scrubFn(item.data, scrubFields, scrubPaths);\n }\n callback(null, item);\n }\n}\n\nmodule.exports = {\n handleDomException: handleDomException,\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n addScrubber: addScrubber\n};\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('error-stack-parser', ['stackframe'], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory(require('stackframe'));\n } else {\n root.ErrorStackParser = factory(root.StackFrame);\n }\n}(this, function ErrorStackParser(StackFrame) {\n 'use strict';\n\n var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\\S+:\\d+/;\n var CHROME_IE_STACK_REGEXP = /^\\s*at .*(\\S+:\\d+|\\(native\\))/m;\n var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\\[native code])?$/;\n\n return {\n /**\n * Given an Error object, extract the most information from it.\n *\n * @param {Error} error object\n * @return {Array} of StackFrames\n */\n parse: function ErrorStackParser$$parse(error) {\n if (typeof error.stacktrace !== 'undefined' || typeof error['opera#sourceloc'] !== 'undefined') {\n return this.parseOpera(error);\n } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {\n return this.parseV8OrIE(error);\n } else if (error.stack) {\n return this.parseFFOrSafari(error);\n } else {\n throw new Error('Cannot parse given Error object');\n }\n },\n\n // Separate line and column numbers from a string of the form: (URI:Line:Column)\n extractLocation: function ErrorStackParser$$extractLocation(urlLike) {\n // Fail-fast but return locations like \"(native)\"\n if (urlLike.indexOf(':') === -1) {\n return [urlLike];\n }\n\n var regExp = /(.+?)(?::(\\d+))?(?::(\\d+))?$/;\n var parts = regExp.exec(urlLike.replace(/[()]/g, ''));\n return [parts[1], parts[2] || undefined, parts[3] || undefined];\n },\n\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(CHROME_IE_STACK_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n if (line.indexOf('(eval ') > -1) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n line = line.replace(/eval code/g, 'eval').replace(/(\\(eval at [^()]*)|(\\),.*$)/g, '');\n }\n var sanitizedLine = line.replace(/^\\s+/, '').replace(/\\(eval code/g, '(');\n\n // capture and preseve the parenthesized location \"(/foo/my bar.js:12:87)\" in\n // case it has spaces in it, as the string is split on \\s+ later on\n var location = sanitizedLine.match(/ (\\((.+):(\\d+):(\\d+)\\)$)/);\n\n // remove the parenthesized location from the line, if it was matched\n sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;\n\n var tokens = sanitizedLine.split(/\\s+/).slice(1);\n // if a location was matched, pass it to extractLocation() otherwise pop the last token\n var locationParts = this.extractLocation(location ? location[1] : tokens.pop());\n var functionName = tokens.join(' ') || undefined;\n var fileName = ['eval', ''].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];\n\n return new StackFrame({\n functionName: functionName,\n fileName: fileName,\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n },\n\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n if (line.indexOf(' > eval') > -1) {\n line = line.replace(/ line (\\d+)(?: > eval line \\d+)* > eval:\\d+:\\d+/g, ':$1');\n }\n\n if (line.indexOf('@') === -1 && line.indexOf(':') === -1) {\n // Safari eval frames only have function names and nothing else\n return new StackFrame({\n functionName: line\n });\n } else {\n var functionNameRegex = /((.*\".+\"[^@]*)?[^@]*)(?:@)/;\n var matches = line.match(functionNameRegex);\n var functionName = matches && matches[1] ? matches[1] : undefined;\n var locationParts = this.extractLocation(line.replace(functionNameRegex, ''));\n\n return new StackFrame({\n functionName: functionName,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }\n }, this);\n },\n\n parseOpera: function ErrorStackParser$$parseOpera(e) {\n if (!e.stacktrace || (e.message.indexOf('\\n') > -1 &&\n e.message.split('\\n').length > e.stacktrace.split('\\n').length)) {\n return this.parseOpera9(e);\n } else if (!e.stack) {\n return this.parseOpera10(e);\n } else {\n return this.parseOpera11(e);\n }\n },\n\n parseOpera9: function ErrorStackParser$$parseOpera9(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)/i;\n var lines = e.message.split('\\n');\n var result = [];\n\n for (var i = 2, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(new StackFrame({\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n }));\n }\n }\n\n return result;\n },\n\n parseOpera10: function ErrorStackParser$$parseOpera10(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)(?:: In function (\\S+))?$/i;\n var lines = e.stacktrace.split('\\n');\n var result = [];\n\n for (var i = 0, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(\n new StackFrame({\n functionName: match[3] || undefined,\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n })\n );\n }\n }\n\n return result;\n },\n\n // Opera 10.65+ Error.stack very similar to FF/Safari\n parseOpera11: function ErrorStackParser$$parseOpera11(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);\n }, this);\n\n return filtered.map(function(line) {\n var tokens = line.split('@');\n var locationParts = this.extractLocation(tokens.pop());\n var functionCall = (tokens.shift() || '');\n var functionName = functionCall\n .replace(//, '$2')\n .replace(/\\([^)]*\\)/g, '') || undefined;\n var argsRaw;\n if (functionCall.match(/\\(([^)]*)\\)/)) {\n argsRaw = functionCall.replace(/^[^(]+\\(([^)]*)\\)$/, '$1');\n }\n var args = (argsRaw === undefined || argsRaw === '[arguments not available]') ?\n undefined : argsRaw.split(',');\n\n return new StackFrame({\n functionName: functionName,\n args: args,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n }\n };\n}));\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('stackframe', [], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.StackFrame = factory();\n }\n}(this, function() {\n 'use strict';\n function _isNumber(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n }\n\n function _capitalize(str) {\n return str.charAt(0).toUpperCase() + str.substring(1);\n }\n\n function _getter(p) {\n return function() {\n return this[p];\n };\n }\n\n var booleanProps = ['isConstructor', 'isEval', 'isNative', 'isToplevel'];\n var numericProps = ['columnNumber', 'lineNumber'];\n var stringProps = ['fileName', 'functionName', 'source'];\n var arrayProps = ['args'];\n var objectProps = ['evalOrigin'];\n\n var props = booleanProps.concat(numericProps, stringProps, arrayProps, objectProps);\n\n function StackFrame(obj) {\n if (!obj) return;\n for (var i = 0; i < props.length; i++) {\n if (obj[props[i]] !== undefined) {\n this['set' + _capitalize(props[i])](obj[props[i]]);\n }\n }\n }\n\n StackFrame.prototype = {\n getArgs: function() {\n return this.args;\n },\n setArgs: function(v) {\n if (Object.prototype.toString.call(v) !== '[object Array]') {\n throw new TypeError('Args must be an Array');\n }\n this.args = v;\n },\n\n getEvalOrigin: function() {\n return this.evalOrigin;\n },\n setEvalOrigin: function(v) {\n if (v instanceof StackFrame) {\n this.evalOrigin = v;\n } else if (v instanceof Object) {\n this.evalOrigin = new StackFrame(v);\n } else {\n throw new TypeError('Eval Origin must be an Object or StackFrame');\n }\n },\n\n toString: function() {\n var fileName = this.getFileName() || '';\n var lineNumber = this.getLineNumber() || '';\n var columnNumber = this.getColumnNumber() || '';\n var functionName = this.getFunctionName() || '';\n if (this.getIsEval()) {\n if (fileName) {\n return '[eval] (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return '[eval]:' + lineNumber + ':' + columnNumber;\n }\n if (functionName) {\n return functionName + ' (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return fileName + ':' + lineNumber + ':' + columnNumber;\n }\n };\n\n StackFrame.fromString = function StackFrame$$fromString(str) {\n var argsStartIndex = str.indexOf('(');\n var argsEndIndex = str.lastIndexOf(')');\n\n var functionName = str.substring(0, argsStartIndex);\n var args = str.substring(argsStartIndex + 1, argsEndIndex).split(',');\n var locationString = str.substring(argsEndIndex + 1);\n\n if (locationString.indexOf('@') === 0) {\n var parts = /@(.+?)(?::(\\d+))?(?::(\\d+))?$/.exec(locationString, '');\n var fileName = parts[1];\n var lineNumber = parts[2];\n var columnNumber = parts[3];\n }\n\n return new StackFrame({\n functionName: functionName,\n args: args || undefined,\n fileName: fileName,\n lineNumber: lineNumber || undefined,\n columnNumber: columnNumber || undefined\n });\n };\n\n for (var i = 0; i < booleanProps.length; i++) {\n StackFrame.prototype['get' + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);\n StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function(p) {\n return function(v) {\n this[p] = Boolean(v);\n };\n })(booleanProps[i]);\n }\n\n for (var j = 0; j < numericProps.length; j++) {\n StackFrame.prototype['get' + _capitalize(numericProps[j])] = _getter(numericProps[j]);\n StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function(p) {\n return function(v) {\n if (!_isNumber(v)) {\n throw new TypeError(p + ' must be a Number');\n }\n this[p] = Number(v);\n };\n })(numericProps[j]);\n }\n\n for (var k = 0; k < stringProps.length; k++) {\n StackFrame.prototype['get' + _capitalize(stringProps[k])] = _getter(stringProps[k]);\n StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function(p) {\n return function(v) {\n this[p] = String(v);\n };\n })(stringProps[k]);\n }\n\n return StackFrame;\n}));\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction itemToPayload(item, options, callback) {\n var payloadOptions = options.payload || {};\n if (payloadOptions.body) {\n delete payloadOptions.body;\n }\n\n var data = _.merge(item.data, payloadOptions);\n if (item._isUncaught) {\n data._isUncaught = true;\n }\n if (item._originalArgs) {\n data._originalArgs = item._originalArgs;\n }\n callback(null, data);\n}\n\nfunction addTelemetryData(item, options, callback) {\n if (item.telemetryEvents) {\n _.set(item, 'data.body.telemetry', item.telemetryEvents);\n }\n callback(null, item);\n}\n\nfunction addMessageWithError(item, options, callback) {\n if (!item.message) {\n callback(null, item);\n return;\n }\n var tracePath = 'data.body.trace_chain.0';\n var trace = _.get(item, tracePath);\n if (!trace) {\n tracePath = 'data.body.trace';\n trace = _.get(item, tracePath);\n }\n if (trace) {\n if (!(trace.exception && trace.exception.description)) {\n _.set(item, tracePath+'.exception.description', item.message);\n callback(null, item);\n return;\n }\n var extra = _.get(item, tracePath+'.extra') || {};\n var newExtra = _.merge(extra, {message: item.message});\n _.set(item, tracePath+'.extra', newExtra);\n }\n callback(null, item);\n}\n\nfunction userTransform(logger) {\n return function(item, options, callback) {\n var newItem = _.merge(item);\n var response = null;\n try {\n if (_.isFunction(options.transform)) {\n response = options.transform(newItem.data, item);\n }\n } catch (e) {\n options.transform = null;\n logger.error('Error while calling custom transform() function. Removing custom transform().', e);\n callback(null, item);\n return;\n }\n if(_.isPromise(response)) {\n response.then(function (promisedItem) {\n if(promisedItem) {\n newItem.data = promisedItem;\n }\n callback(null, newItem);\n }, function (error) {\n callback(error, item);\n });\n } else {\n callback(null, newItem);\n }\n }\n}\n\nfunction addConfigToPayload(item, options, callback) {\n if (!options.sendConfig) {\n return callback(null, item);\n }\n var configKey = '_rollbarConfig';\n var custom = _.get(item, 'data.custom') || {};\n custom[configKey] = options;\n item.data.custom = custom;\n callback(null, item);\n}\n\nfunction addFunctionOption(options, name) {\n if(_.isFunction(options[name])) {\n options[name] = options[name].toString();\n }\n}\n\nfunction addConfiguredOptions(item, options, callback) {\n var configuredOptions = options._configuredOptions;\n\n // These must be stringified or they'll get dropped during serialization.\n addFunctionOption(configuredOptions, 'transform');\n addFunctionOption(configuredOptions, 'checkIgnore');\n addFunctionOption(configuredOptions, 'onSendCallback');\n\n delete configuredOptions.accessToken;\n item.data.notifier.configured_options = configuredOptions;\n callback(null, item);\n}\n\nfunction addDiagnosticKeys(item, options, callback) {\n var diagnostic = _.merge(item.notifier.client.notifier.diagnostic, item.diagnostic);\n\n if (_.get(item, 'err._isAnonymous')) {\n diagnostic.is_anonymous = true;\n }\n\n if (item._isUncaught) {\n diagnostic.is_uncaught = item._isUncaught;\n }\n\n if (item.err) {\n try {\n diagnostic.raw_error = {\n message: item.err.message,\n name: item.err.name,\n constructor_name: item.err.constructor && item.err.constructor.name,\n filename: item.err.fileName,\n line: item.err.lineNumber,\n column: item.err.columnNumber,\n stack: item.err.stack\n };\n } catch (e) {\n diagnostic.raw_error = { failed: String(e) };\n }\n }\n\n item.data.notifier.diagnostic = _.merge(item.data.notifier.diagnostic, diagnostic);\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError,\n userTransform: userTransform,\n addConfigToPayload: addConfigToPayload,\n addConfiguredOptions: addConfiguredOptions,\n addDiagnosticKeys: addDiagnosticKeys\n};\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction checkIgnore(item, settings) {\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore\n};\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction checkLevel(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = settings.reportLevel;\n var reportLevelVal = _.LEVELS[reportLevel] || 0;\n\n if (levelVal < reportLevelVal) {\n return false;\n }\n return true;\n}\n\nfunction userCheckIgnore(logger) {\n return function(item, settings) {\n var isUncaught = !!item._isUncaught;\n delete item._isUncaught;\n var args = item._originalArgs;\n delete item._originalArgs;\n try {\n if (_.isFunction(settings.onSendCallback)) {\n settings.onSendCallback(isUncaught, args, item);\n }\n } catch (e) {\n settings.onSendCallback = null;\n logger.error('Error while calling onSendCallback, removing', e);\n }\n try {\n if (_.isFunction(settings.checkIgnore) && settings.checkIgnore(isUncaught, args, item)) {\n return false;\n }\n } catch (e) {\n settings.checkIgnore = null;\n logger.error('Error while calling custom checkIgnore(), removing', e);\n }\n return true;\n }\n}\n\nfunction urlIsNotBlockListed(logger) {\n return function(item, settings) {\n return !urlIsOnAList(item, settings, 'blocklist', logger);\n }\n}\n\nfunction urlIsSafeListed(logger) {\n return function(item, settings) {\n return urlIsOnAList(item, settings, 'safelist', logger);\n }\n}\n\nfunction matchFrames(trace, list, block) {\n if (!trace) { return !block }\n\n var frames = trace.frames;\n\n if (!frames || frames.length === 0) { return !block; }\n\n var frame, filename, url, urlRegex;\n var listLength = list.length;\n var frameLength = frames.length;\n for (var i = 0; i < frameLength; i++) {\n frame = frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) { return !block; }\n\n for (var j = 0; j < listLength; j++) {\n url = list[j];\n urlRegex = new RegExp(url);\n\n if (urlRegex.test(filename)) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction urlIsOnAList(item, settings, safeOrBlock, logger) {\n // safelist is the default\n var block = false;\n if (safeOrBlock === 'blocklist') {\n block = true;\n }\n\n var list, traces;\n try {\n list = block ? settings.hostBlockList : settings.hostSafeList;\n traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];\n\n // These two checks are important to come first as they are defaults\n // in case the list is missing or the trace is missing or not well-formed\n if (!list || list.length === 0) {\n return !block;\n }\n if (traces.length === 0 || !traces[0]) {\n return !block;\n }\n\n var tracesLength = traces.length;\n for (var i = 0; i < tracesLength; i++) {\n if(matchFrames(traces[i], list, block)) {\n return true;\n }\n }\n } catch (e)\n /* istanbul ignore next */\n {\n if (block) {\n settings.hostBlockList = null;\n } else {\n settings.hostSafeList = null;\n }\n var listName = block ? 'hostBlockList' : 'hostSafeList';\n logger.error('Error while reading your configuration\\'s ' + listName + ' option. Removing custom ' + listName + '.', e);\n return !block;\n }\n return false;\n}\n\nfunction messageIsIgnored(logger) {\n return function(item, settings) {\n var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n messages = messagesFromItem(item);\n\n if (messages.length === 0){\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n\n for (j = 0; j < messages.length; j++) {\n messageIsIgnored = rIgnoredMessage.test(messages[j]);\n\n if (messageIsIgnored) {\n return false;\n }\n }\n }\n } catch(e)\n /* istanbul ignore next */\n {\n settings.ignoredMessages = null;\n logger.error('Error while reading your configuration\\'s ignoredMessages option. Removing custom ignoredMessages.');\n }\n\n return true;\n }\n}\n\nfunction messagesFromItem(item) {\n var body = item.body;\n var messages = [];\n\n // The payload schema only allows one of trace_chain, message, or trace.\n // However, existing test cases are based on having both trace and message present.\n // So here we preserve the ability to collect strings from any combination of these keys.\n if (body.trace_chain) {\n var traceChain = body.trace_chain;\n for (var i = 0; i < traceChain.length; i++) {\n var trace = traceChain[i];\n messages.push(_.get(trace, 'exception.message'));\n }\n }\n if (body.trace) {\n messages.push(_.get(body, 'trace.exception.message'));\n }\n if (body.message) {\n messages.push(_.get(body, 'message.body'));\n }\n return messages;\n}\n\nmodule.exports = {\n checkLevel: checkLevel,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlockListed: urlIsNotBlockListed,\n urlIsSafeListed: urlIsSafeListed,\n messageIsIgnored: messageIsIgnored\n};\n","'use strict';\n\nmodule.exports = {\n version: '2.24.1',\n endpoint: 'api.rollbar.com/api/1/item/',\n logLevel: 'debug',\n reportLevel: 'debug',\n uncaughtErrorLevel: 'error',\n maxItems: 0,\n itemsPerMin: 60\n}\n","'use strict';\n\nmodule.exports = {\n scrubFields: [\n 'pw',\n 'pass',\n 'passwd',\n 'password',\n 'secret',\n 'confirm_password',\n 'confirmPassword',\n 'password_confirmation',\n 'passwordConfirmation',\n 'access_token',\n 'accessToken',\n 'X-Rollbar-Access-Token',\n 'secret_key',\n 'secretKey',\n 'secretToken',\n 'cc-number',\n 'card number',\n 'cardnumber',\n 'cardnum',\n 'ccnum',\n 'ccnumber',\n 'cc num',\n 'creditcardnumber',\n 'credit card number',\n 'newcreditcardnumber',\n 'new credit card',\n 'creditcardno',\n 'credit card no',\n 'card#',\n 'card #',\n 'cc-csc',\n 'cvc',\n 'cvc2',\n 'cvv2',\n 'ccv2',\n 'security code',\n 'card verification',\n 'name on credit card',\n 'name on card',\n 'nameoncard',\n 'cardholder',\n 'card holder',\n 'name des karteninhabers',\n 'ccname',\n 'card type',\n 'cardtype',\n 'cc type',\n 'cctype',\n 'payment type',\n 'expiration date',\n 'expirationdate',\n 'expdate',\n 'cc-exp',\n 'ccmonth',\n 'ccyear'\n ]\n}\n","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.merge(options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n}\n\nTelemeter.prototype.configure = function(options) {\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n var deleteCount = 0;\n if (this.maxQueueSize > newMaxEvents) {\n deleteCount = this.maxQueueSize - newMaxEvents;\n }\n this.maxQueueSize = newMaxEvents;\n this.queue.splice(0, deleteCount);\n};\n\nTelemeter.prototype.copyEvents = function() {\n var events = Array.prototype.slice.call(this.queue, 0);\n if (_.isFunction(this.options.filterTelemetry)) {\n try {\n var i = events.length;\n while (i--) {\n if (this.options.filterTelemetry(events[i])) {\n events.splice(i, 1);\n }\n }\n } catch (e) {\n this.options.filterTelemetry = null;\n }\n }\n return events;\n};\n\nTelemeter.prototype.capture = function(type, metadata, level, rollbarUUID, timestamp) {\n var e = {\n level: getLevel(type, level),\n type: type,\n timestamp_ms: timestamp || _.now(),\n body: metadata,\n source: 'client'\n };\n if (rollbarUUID) {\n e.uuid = rollbarUUID;\n }\n\n try {\n if (_.isFunction(this.options.filterTelemetry) && this.options.filterTelemetry(e)) {\n return false;\n }\n } catch (exc) {\n this.options.filterTelemetry = null;\n }\n\n this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function(type, metadata, level, rollbarUUID) {\n return this.capture(type, metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.captureError = function(err, level, rollbarUUID, timestamp) {\n var metadata = {\n message: err.message || String(err)\n };\n if (err.stack) {\n metadata.stack = err.stack;\n }\n return this.capture('error', metadata, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureLog = function(message, level, rollbarUUID, timestamp) {\n return this.capture('log', {\n message: message\n }, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID, requestData) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\n if (requestData) {\n metadata.request = requestData;\n }\n var level = this.levelFromStatus(metadata.status_code);\n return this.capture('network', metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.levelFromStatus = function(statusCode) {\n if (statusCode >= 200 && statusCode < 400) {\n return 'info';\n }\n if (statusCode === 0 || statusCode >= 400) {\n return 'error';\n }\n return 'info';\n};\n\nTelemeter.prototype.captureDom = function(subtype, element, value, checked, rollbarUUID) {\n var metadata = {\n subtype: subtype,\n element: element\n };\n if (value !== undefined) {\n metadata.value = value;\n }\n if (checked !== undefined) {\n metadata.checked = checked;\n }\n return this.capture('dom', metadata, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureNavigation = function(from, to, rollbarUUID) {\n return this.capture('navigation', {from: from, to: to}, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureDomContentLoaded = function(ts) {\n return this.capture('navigation', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n */\n};\nTelemeter.prototype.captureLoad = function(ts) {\n return this.capture('navigation', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n */\n};\n\nTelemeter.prototype.captureConnectivityChange = function(type, rollbarUUID) {\n return this.captureNetwork({change: type}, 'connectivity', rollbarUUID);\n};\n\n// Only intended to be used internally by the notifier\nTelemeter.prototype._captureRollbarItem = function(item) {\n if (!this.options.includeItemsInTelemetry) {\n return;\n }\n if (item.err) {\n return this.captureError(item.err, item.level, item.uuid, item.timestamp);\n }\n if (item.message) {\n return this.captureLog(item.message, item.level, item.uuid, item.timestamp);\n }\n if (item.custom) {\n return this.capture('log', item.custom, item.level, item.uuid, item.timestamp);\n }\n};\n\nTelemeter.prototype.push = function(e) {\n this.queue.push(e);\n if (this.queue.length > this.maxQueueSize) {\n this.queue.shift();\n }\n};\n\nfunction getLevel(type, level) {\n if (level) {\n return level;\n }\n var defaultLevel = {\n error: 'error',\n manual: 'info'\n };\n return defaultLevel[type] || 'info';\n}\n\nmodule.exports = Telemeter;\n","'use strict';\n\nvar _ = require('../utility');\nvar scrub = require('../scrub');\nvar urlparser = require('./url');\nvar domUtil = require('./domUtility');\n\nvar defaults = {\n network: true,\n networkResponseHeaders: false,\n networkResponseBody: false,\n networkRequestHeaders: false,\n networkRequestBody: false,\n networkErrorOnHttp5xx: false,\n networkErrorOnHttp4xx: false,\n networkErrorOnHttp0: false,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true,\n contentSecurityPolicy: true,\n errorOnContentSecurityPolicy: false\n};\n\nfunction replace(obj, name, replacement, replacements, type) {\n var orig = obj[name];\n obj[name] = replacement(orig);\n if (replacements) {\n replacements[type].push([obj, name, orig]);\n }\n}\n\nfunction restore(replacements, type) {\n var b;\n while (replacements[type].length) {\n b = replacements[type].shift();\n b[0][b[1]] = b[2];\n }\n}\n\nfunction nameFromDescription(description) {\n if (!description || !description.attributes) { return null; }\n var attrs = description.attributes;\n for (var a = 0; a < attrs.length; ++a) {\n if (attrs[a].key === 'name') {\n return attrs[a].value;\n }\n }\n return null;\n}\n\nfunction defaultValueScrubber(scrubFields) {\n var patterns = [];\n for (var i = 0; i < scrubFields.length; ++i) {\n patterns.push(new RegExp(scrubFields[i], 'i'));\n }\n return function(description) {\n var name = nameFromDescription(description);\n if (!name) { return false; }\n for (var i = 0; i < patterns.length; ++i) {\n if (patterns[i].test(name)) {\n return true;\n }\n }\n return false;\n };\n}\n\nfunction Instrumenter(options, telemeter, rollbar, _window, _document) {\n this.options = options;\n var autoInstrument = options.autoInstrument;\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);\n this.telemeter = telemeter;\n this.rollbar = rollbar;\n this.diagnostic = rollbar.client.notifier.diagnostic;\n this._window = _window || {};\n this._document = _document || {};\n this.replacements = {\n network: [],\n log: [],\n navigation: [],\n connectivity: []\n };\n this.eventRemovers = {\n dom: [],\n connectivity: [],\n contentsecuritypolicy: []\n };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function(options) {\n this.options = _.merge(this.options, options);\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.merge(this.autoInstrument);\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n if (options.scrubTelemetryInputs !== undefined) {\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n }\n if (options.telemetryScrubber !== undefined) {\n this.telemetryScrubber = options.telemetryScrubber;\n }\n};\n\n// eslint-disable-next-line complexity\nInstrumenter.prototype.instrument = function(oldSettings) {\n if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {\n this.instrumentNetwork();\n } else if (!this.autoInstrument.network && oldSettings && oldSettings.network) {\n this.deinstrumentNetwork();\n }\n\n if (this.autoInstrument.log && !(oldSettings && oldSettings.log)) {\n this.instrumentConsole();\n } else if (!this.autoInstrument.log && oldSettings && oldSettings.log) {\n this.deinstrumentConsole();\n }\n\n if (this.autoInstrument.dom && !(oldSettings && oldSettings.dom)) {\n this.instrumentDom();\n } else if (!this.autoInstrument.dom && oldSettings && oldSettings.dom) {\n this.deinstrumentDom();\n }\n\n if (this.autoInstrument.navigation && !(oldSettings && oldSettings.navigation)) {\n this.instrumentNavigation();\n } else if (!this.autoInstrument.navigation && oldSettings && oldSettings.navigation) {\n this.deinstrumentNavigation();\n }\n\n if (this.autoInstrument.connectivity && !(oldSettings && oldSettings.connectivity)) {\n this.instrumentConnectivity();\n } else if (!this.autoInstrument.connectivity && oldSettings && oldSettings.connectivity) {\n this.deinstrumentConnectivity();\n }\n\n if (this.autoInstrument.contentSecurityPolicy && !(oldSettings && oldSettings.contentSecurityPolicy)) {\n this.instrumentContentSecurityPolicy();\n } else if (!this.autoInstrument.contentSecurityPolicy && oldSettings && oldSettings.contentSecurityPolicy) {\n this.deinstrumentContentSecurityPolicy();\n }\n};\n\nInstrumenter.prototype.deinstrumentNetwork = function() {\n restore(this.replacements, 'network');\n};\n\nInstrumenter.prototype.instrumentNetwork = function() {\n var self = this;\n\n function wrapProp(prop, xhr) {\n if (prop in xhr && _.isFunction(xhr[prop])) {\n replace(xhr, prop, function(orig) {\n return self.rollbar.wrap(orig);\n });\n }\n }\n\n if ('XMLHttpRequest' in this._window) {\n var xhrp = this._window.XMLHttpRequest.prototype;\n replace(xhrp, 'open', function(orig) {\n return function(method, url) {\n if (_.isType(url, 'string')) {\n if (this.__rollbar_xhr) {\n this.__rollbar_xhr.method = method;\n this.__rollbar_xhr.url = url;\n this.__rollbar_xhr.status_code = null;\n this.__rollbar_xhr.start_time_ms = _.now();\n this.__rollbar_xhr.end_time_ms = null;\n } else {\n this.__rollbar_xhr = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'setRequestHeader', function(orig) {\n return function(header, value) {\n // If xhr.open is async, __rollbar_xhr may not be initialized yet.\n if (!this.__rollbar_xhr) {\n this.__rollbar_xhr = {};\n }\n if (_.isType(header, 'string') && _.isType(value, 'string')) {\n if (self.autoInstrument.networkRequestHeaders) {\n if (!this.__rollbar_xhr.request_headers) {\n this.__rollbar_xhr.request_headers = {};\n }\n this.__rollbar_xhr.request_headers[header] = value;\n }\n // We want the content type even if request header telemetry is off.\n if (header.toLowerCase() === 'content-type') {\n this.__rollbar_xhr.request_content_type = value;\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'send', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(data) {\n /* eslint-enable no-unused-vars */\n var xhr = this;\n\n function onreadystatechangeHandler() {\n if (xhr.__rollbar_xhr) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n if (self.autoInstrument.networkRequestBody) {\n xhr.__rollbar_xhr.request = data;\n }\n xhr.__rollbar_event = self.captureNetwork(xhr.__rollbar_xhr, 'xhr', undefined);\n }\n if (xhr.readyState < 2) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n }\n if (xhr.readyState > 3) {\n xhr.__rollbar_xhr.end_time_ms = _.now();\n\n var headers = null;\n xhr.__rollbar_xhr.response_content_type = xhr.getResponseHeader('Content-Type');\n if (self.autoInstrument.networkResponseHeaders) {\n var headersConfig = self.autoInstrument.networkResponseHeaders;\n headers = {};\n try {\n var header, i;\n if (headersConfig === true) {\n var allHeaders = xhr.getAllResponseHeaders();\n if (allHeaders) {\n var arr = allHeaders.trim().split(/[\\r\\n]+/);\n var parts, value;\n for (i=0; i < arr.length; i++) {\n parts = arr[i].split(': ');\n header = parts.shift();\n value = parts.join(': ');\n headers[header] = value;\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n header = headersConfig[i];\n headers[header] = xhr.getResponseHeader(header);\n }\n }\n } catch (e) {\n /* we ignore the errors here that could come from different\n * browser issues with the xhr methods */\n }\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n try {\n body = xhr.responseText;\n } catch (e) {\n /* ignore errors from reading responseText */\n }\n }\n var response = null;\n if (body || headers) {\n response = {};\n if (body) {\n if (self.isJsonContentType(xhr.__rollbar_xhr.response_content_type)) {\n response.body = self.scrubJson(body);\n } else {\n response.body = body;\n }\n }\n if (headers) {\n response.headers = headers;\n }\n }\n if (response) {\n xhr.__rollbar_xhr.response = response;\n }\n try {\n var code = xhr.status;\n code = code === 1223 ? 204 : code;\n xhr.__rollbar_xhr.status_code = code;\n xhr.__rollbar_event.level = self.telemeter.levelFromStatus(code);\n self.errorOnHttpStatus(xhr.__rollbar_xhr);\n } catch (e) {\n /* ignore possible exception from xhr.status */\n }\n }\n }\n }\n\n wrapProp('onload', xhr);\n wrapProp('onerror', xhr);\n wrapProp('onprogress', xhr);\n\n if ('onreadystatechange' in xhr && _.isFunction(xhr.onreadystatechange)) {\n replace(xhr, 'onreadystatechange', function(orig) {\n return self.rollbar.wrap(orig, undefined, onreadystatechangeHandler);\n });\n } else {\n xhr.onreadystatechange = onreadystatechangeHandler;\n }\n if (xhr.__rollbar_xhr && self.trackHttpErrors()) {\n xhr.__rollbar_xhr.stack = (new Error()).stack;\n }\n return orig.apply(this, arguments);\n }\n }, this.replacements, 'network');\n }\n\n if ('fetch' in this._window) {\n replace(this._window, 'fetch', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(fn, t) {\n /* eslint-enable no-unused-vars */\n var args = new Array(arguments.length);\n for (var i=0, len=args.length; i < len; i++) {\n args[i] = arguments[i];\n }\n var input = args[0];\n var method = 'GET';\n var url;\n if (_.isType(input, 'string')) {\n url = input;\n } else if (input) {\n url = input.url;\n if (input.method) {\n method = input.method;\n }\n }\n if (args[1] && args[1].method) {\n method = args[1].method;\n }\n var metadata = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n if (args[1] && args[1].headers) {\n // Argument may be a Headers object, or plain object. Ensure here that\n // we are working with a Headers object with case-insensitive keys.\n var reqHeaders = new Headers(args[1].headers);\n\n metadata.request_content_type = reqHeaders.get('Content-Type');\n\n if (self.autoInstrument.networkRequestHeaders) {\n metadata.request_headers = self.fetchHeaders(reqHeaders, self.autoInstrument.networkRequestHeaders)\n }\n }\n\n if (self.autoInstrument.networkRequestBody) {\n if (args[1] && args[1].body) {\n metadata.request = args[1].body;\n } else if (args[0] && !_.isType(args[0], 'string') && args[0].body) {\n metadata.request = args[0].body;\n }\n }\n self.captureNetwork(metadata, 'fetch', undefined);\n if (self.trackHttpErrors()) {\n metadata.stack = (new Error()).stack;\n }\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n metadata.response_content_type = resp.headers.get('Content-Type');\n var headers = null;\n if (self.autoInstrument.networkResponseHeaders) {\n headers = self.fetchHeaders(resp.headers, self.autoInstrument.networkResponseHeaders);\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n if (typeof resp.text === 'function') { // Response.text() is not implemented on some platforms\n // The response must be cloned to prevent reading (and locking) the original stream.\n body = resp.clone().text(); //returns a Promise\n }\n }\n if (headers || body) {\n metadata.response = {};\n if (body) {\n // Test to ensure body is a Promise, which it should always be.\n if (typeof body.then === 'function') {\n body.then(function (text) {\n if (self.isJsonContentType(metadata.response_content_type)) {\n metadata.response.body = self.scrubJson(text);\n }\n });\n } else {\n metadata.response.body = body;\n }\n }\n if (headers) {\n metadata.response.headers = headers;\n }\n }\n self.errorOnHttpStatus(metadata);\n return resp;\n });\n };\n }, this.replacements, 'network');\n }\n};\n\nInstrumenter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID) {\n if (metadata.request && this.isJsonContentType(metadata.request_content_type)) {\n metadata.request = this.scrubJson(metadata.request);\n }\n return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);\n};\n\nInstrumenter.prototype.isJsonContentType = function(contentType) {\n return (contentType && _.isType(contentType, 'string') && contentType.toLowerCase().includes('json')) ? true : false;\n}\n\nInstrumenter.prototype.scrubJson = function(json) {\n return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));\n}\n\nInstrumenter.prototype.fetchHeaders = function(inHeaders, headersConfig) {\n var outHeaders = {};\n try {\n var i;\n if (headersConfig === true) {\n if (typeof inHeaders.entries === 'function') { // Headers.entries() is not implemented in IE\n var allHeaders = inHeaders.entries();\n var currentHeader = allHeaders.next();\n while (!currentHeader.done) {\n outHeaders[currentHeader.value[0]] = currentHeader.value[1];\n currentHeader = allHeaders.next();\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n var header = headersConfig[i];\n outHeaders[header] = inHeaders.get(header);\n }\n }\n } catch (e) {\n /* ignore probable IE errors */\n }\n return outHeaders;\n}\n\nInstrumenter.prototype.trackHttpErrors = function() {\n return this.autoInstrument.networkErrorOnHttp5xx ||\n this.autoInstrument.networkErrorOnHttp4xx ||\n this.autoInstrument.networkErrorOnHttp0;\n}\n\nInstrumenter.prototype.errorOnHttpStatus = function(metadata) {\n var status = metadata.status_code;\n\n if ((status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||\n (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||\n (status === 0 && this.autoInstrument.networkErrorOnHttp0)) {\n var error = new Error('HTTP request failed with Status ' + status);\n error.stack = metadata.stack;\n this.rollbar.error(error, { skipFrames: 1 });\n }\n}\n\nInstrumenter.prototype.deinstrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n var b;\n while (this.replacements['log'].length) {\n b = this.replacements['log'].shift();\n this._window.console[b[0]] = b[1];\n }\n};\n\nInstrumenter.prototype.instrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n\n var self = this;\n var c = this._window.console;\n\n function wrapConsole(method) {\n 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778\n\n var orig = c[method];\n var origConsole = c;\n var level = method === 'warn' ? 'warning' : method;\n c[method] = function() {\n var args = Array.prototype.slice.call(arguments);\n var message = _.formatArgsAsString(args);\n self.telemeter.captureLog(message, level);\n if (orig) {\n Function.prototype.apply.call(orig, origConsole, args);\n }\n };\n self.replacements['log'].push([method, orig]);\n }\n var methods = ['debug','info','warn','error','log'];\n try {\n for (var i=0, len=methods.length; i < len; i++) {\n wrapConsole(methods[i]);\n }\n } catch (e) {\n this.diagnostic.instrumentConsole = { error: e.message };\n }\n};\n\nInstrumenter.prototype.deinstrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n this.removeListeners('dom');\n};\n\nInstrumenter.prototype.instrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n var clickHandler = this.handleClick.bind(this);\n var blurHandler = this.handleBlur.bind(this);\n this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);\n this.addListener('dom', this._window, 'blur', 'onfocusout', blurHandler, true);\n};\n\nInstrumenter.prototype.handleClick = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n var hasTag = e && e.tagName;\n var anchorOrButton = domUtil.isDescribedElement(e, 'a') || domUtil.isDescribedElement(e, 'button');\n if (hasTag && (anchorOrButton || domUtil.isDescribedElement(e, 'input', ['button', 'submit']))) {\n this.captureDomEvent('click', e);\n } else if (domUtil.isDescribedElement(e, 'input', ['checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value, e.checked);\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleBlur = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n if (e && e.tagName) {\n if (domUtil.isDescribedElement(e, 'textarea')) {\n this.captureDomEvent('input', e, e.value);\n } else if (domUtil.isDescribedElement(e, 'select') && e.options && e.options.length) {\n this.handleSelectInputChanged(e);\n } else if (domUtil.isDescribedElement(e, 'input') && !domUtil.isDescribedElement(e, 'input', ['button', 'submit', 'hidden', 'checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value);\n }\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleSelectInputChanged = function(elem) {\n if (elem.multiple) {\n for (var i = 0; i < elem.options.length; i++) {\n if (elem.options[i].selected) {\n this.captureDomEvent('input', elem, elem.options[i].value);\n }\n }\n } else if (elem.selectedIndex >= 0 && elem.options[elem.selectedIndex]) {\n this.captureDomEvent('input', elem, elem.options[elem.selectedIndex].value);\n }\n};\n\nInstrumenter.prototype.captureDomEvent = function(subtype, element, value, isChecked) {\n if (value !== undefined) {\n if (this.scrubTelemetryInputs || (domUtil.getElementType(element) === 'password')) {\n value = '[scrubbed]';\n } else {\n var description = domUtil.describeElement(element);\n if (this.telemetryScrubber) {\n if (this.telemetryScrubber(description)) {\n value = '[scrubbed]';\n }\n } else if (this.defaultValueScrubber(description)) {\n value = '[scrubbed]';\n }\n }\n }\n var elementString = domUtil.elementArrayToString(domUtil.treeToArray(element));\n this.telemeter.captureDom(subtype, elementString, value, isChecked);\n};\n\nInstrumenter.prototype.deinstrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n restore(this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.instrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n var self = this;\n replace(this._window, 'onpopstate', function(orig) {\n return function() {\n var current = self._location.href;\n self.handleUrlChange(self._lastHref, current);\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n }, this.replacements, 'navigation');\n\n replace(this._window.history, 'pushState', function(orig) {\n return function() {\n var url = arguments.length > 2 ? arguments[2] : undefined;\n if (url) {\n self.handleUrlChange(self._lastHref, url + '');\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.handleUrlChange = function(from, to) {\n var parsedHref = urlparser.parse(this._location.href);\n var parsedTo = urlparser.parse(to);\n var parsedFrom = urlparser.parse(from);\n this._lastHref = to;\n if (parsedHref.protocol === parsedTo.protocol && parsedHref.host === parsedTo.host) {\n to = parsedTo.path + (parsedTo.hash || '');\n }\n if (parsedHref.protocol === parsedFrom.protocol && parsedHref.host === parsedFrom.host) {\n from = parsedFrom.path + (parsedFrom.hash || '');\n }\n this.telemeter.captureNavigation(from, to);\n};\n\nInstrumenter.prototype.deinstrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.removeListeners('connectivity');\n } else {\n restore(this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.instrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.addListener('connectivity', this._window, 'online', undefined, function() {\n this.telemeter.captureConnectivityChange('online');\n }.bind(this), true);\n this.addListener('connectivity', this._window, 'offline', undefined, function() {\n this.telemeter.captureConnectivityChange('offline');\n }.bind(this), true);\n } else {\n var self = this;\n replace(this._document.body, 'ononline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('online');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n replace(this._document.body, 'onoffline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('offline');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.handleCspEvent = function(cspEvent) {\n var message = 'Security Policy Violation: ' +\n 'blockedURI: ' + cspEvent.blockedURI + ', ' +\n 'violatedDirective: ' + cspEvent.violatedDirective + ', ' +\n 'effectiveDirective: ' + cspEvent.effectiveDirective + ', ';\n\n if (cspEvent.sourceFile) {\n message += 'location: ' + cspEvent.sourceFile + ', ' +\n 'line: ' + cspEvent.lineNumber + ', ' +\n 'col: ' + cspEvent.columnNumber + ', ';\n }\n\n message += 'originalPolicy: ' + cspEvent.originalPolicy;\n\n this.telemeter.captureLog(message, 'error');\n this.handleCspError(message);\n}\n\nInstrumenter.prototype.handleCspError = function(message) {\n if (this.autoInstrument.errorOnContentSecurityPolicy) {\n this.rollbar.error(message);\n }\n}\n\nInstrumenter.prototype.deinstrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._window)) { return; }\n\n this.removeListeners('contentsecuritypolicy');\n};\n\nInstrumenter.prototype.instrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._window)) { return; }\n\n var cspHandler = this.handleCspEvent.bind(this);\n this.addListener('contentsecuritypolicy', this._window, 'securitypolicyviolation', null, cspHandler, false);\n};\n\nInstrumenter.prototype.addListener = function(section, obj, type, altType, handler, capture) {\n if (obj.addEventListener) {\n obj.addEventListener(type, handler, capture);\n this.eventRemovers[section].push(function() {\n obj.removeEventListener(type, handler, capture);\n });\n } else if (altType) {\n obj.attachEvent(altType, handler);\n this.eventRemovers[section].push(function() {\n obj.detachEvent(altType, handler);\n });\n }\n};\n\nInstrumenter.prototype.removeListeners = function(section) {\n var r;\n while (this.eventRemovers[section].length) {\n r = this.eventRemovers[section].shift();\n r();\n }\n};\n\nmodule.exports = Instrumenter;\n","'use strict';\n\nfunction getElementType(e) {\n return (e.getAttribute('type') || '').toLowerCase();\n}\n\nfunction isDescribedElement(element, type, subtypes) {\n if (element.tagName.toLowerCase() !== type.toLowerCase()) {\n return false;\n }\n if (!subtypes) {\n return true;\n }\n element = getElementType(element);\n for (var i = 0; i < subtypes.length; i++) {\n if (subtypes[i] === element) {\n return true;\n }\n }\n return false;\n}\n\nfunction getElementFromEvent(evt, doc) {\n if (evt.target) {\n return evt.target;\n }\n if (doc && doc.elementFromPoint) {\n return doc.elementFromPoint(evt.clientX, evt.clientY);\n }\n return undefined;\n}\n\nfunction treeToArray(elem) {\n var MAX_HEIGHT = 5;\n var out = [];\n var nextDescription;\n for (var height = 0; elem && height < MAX_HEIGHT; height++) {\n nextDescription = describeElement(elem);\n if (nextDescription.tagName === 'html') {\n break;\n }\n out.unshift(nextDescription);\n elem = elem.parentNode;\n }\n return out;\n}\n\nfunction elementArrayToString(a) {\n var MAX_LENGTH = 80;\n var separator = ' > ', separatorLength = separator.length;\n var out = [], len = 0, nextStr, totalLength;\n\n for (var i = a.length - 1; i >= 0; i--) {\n nextStr = descriptionToString(a[i]);\n totalLength = len + (out.length * separatorLength) + nextStr.length;\n if (i < a.length - 1 && totalLength >= MAX_LENGTH + 3) {\n out.unshift('...');\n break;\n }\n out.unshift(nextStr);\n len += nextStr.length;\n }\n return out.join(separator);\n}\n\nfunction descriptionToString(desc) {\n if (!desc || !desc.tagName) {\n return '';\n }\n var out = [desc.tagName];\n if (desc.id) {\n out.push('#' + desc.id);\n }\n if (desc.classes) {\n out.push('.' + desc.classes.join('.'));\n }\n for (var i = 0; i < desc.attributes.length; i++) {\n out.push('[' + desc.attributes[i].key + '=\"' + desc.attributes[i].value + '\"]');\n }\n\n return out.join('');\n}\n\n/**\n * Input: a dom element\n * Output: null if tagName is falsey or input is falsey, else\n * {\n * tagName: String,\n * id: String | undefined,\n * classes: [String] | undefined,\n * attributes: [\n * {\n * key: OneOf(type, name, title, alt),\n * value: String\n * }\n * ]\n * }\n */\nfunction describeElement(elem) {\n if (!elem || !elem.tagName) {\n return null;\n }\n var out = {}, className, key, attr, i;\n out.tagName = elem.tagName.toLowerCase();\n if (elem.id) {\n out.id = elem.id;\n }\n className = elem.className;\n if (className && (typeof className === 'string')) {\n out.classes = className.split(/\\s+/);\n }\n var attributes = ['type', 'name', 'title', 'alt'];\n out.attributes = [];\n for (i = 0; i < attributes.length; i++) {\n key = attributes[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.attributes.push({key: key, value: attr});\n }\n }\n return out;\n}\n\nmodule.exports = {\n describeElement: describeElement,\n descriptionToString: descriptionToString,\n elementArrayToString: elementArrayToString,\n treeToArray: treeToArray,\n getElementFromEvent: getElementFromEvent,\n isDescribedElement: isDescribedElement,\n getElementType: getElementType\n};\n","'use strict';\n\nvar polyfillJSON = require('../../vendor/JSON-js/json3');\n\nmodule.exports = polyfillJSON;\n","// json3.js\n// 2017-02-21\n// Public Domain.\n// NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.\n// See http://www.JSON.org/js.html\n// This code should be minified before deployment.\n// See http://javascript.crockford.com/jsmin.html\n\n// USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO\n// NOT CONTROL.\n\n// This file creates a global JSON object containing two methods: stringify\n// and parse. This file provides the ES5 JSON capability to ES3 systems.\n// If a project might run on IE8 or earlier, then this file should be included.\n// This file does nothing on ES5 systems.\n\n// JSON.stringify(value, replacer, space)\n// value any JavaScript value, usually an object or array.\n// replacer an optional parameter that determines how object\n// values are stringified for objects. It can be a\n// function or an array of strings.\n// space an optional parameter that specifies the indentation\n// of nested structures. If it is omitted, the text will\n// be packed without extra whitespace. If it is a number,\n// it will specify the number of spaces to indent at each\n// level. If it is a string (such as \"\\t\" or \" \"),\n// it contains the characters used to indent at each level.\n// This method produces a JSON text from a JavaScript value.\n// When an object value is found, if the object contains a toJSON\n// method, its toJSON method will be called and the result will be\n// stringified. A toJSON method does not serialize: it returns the\n// value represented by the name/value pair that should be serialized,\n// or undefined if nothing should be serialized. The toJSON method\n// will be passed the key associated with the value, and this will be\n// bound to the value.\n\n// For example, this would serialize Dates as ISO strings.\n\n// Date.prototype.toJSON = function (key) {\n// function f(n) {\n// // Format integers to have at least two digits.\n// return (n < 10)\n// ? \"0\" + n\n// : n;\n// }\n// return this.getUTCFullYear() + \"-\" +\n// f(this.getUTCMonth() + 1) + \"-\" +\n// f(this.getUTCDate()) + \"T\" +\n// f(this.getUTCHours()) + \":\" +\n// f(this.getUTCMinutes()) + \":\" +\n// f(this.getUTCSeconds()) + \"Z\";\n// };\n\n// You can provide an optional replacer method. It will be passed the\n// key and value of each member, with this bound to the containing\n// object. The value that is returned from your method will be\n// serialized. If your method returns undefined, then the member will\n// be excluded from the serialization.\n\n// If the replacer parameter is an array of strings, then it will be\n// used to select the members to be serialized. It filters the results\n// such that only members with keys listed in the replacer array are\n// stringified.\n\n// Values that do not have JSON representations, such as undefined or\n// functions, will not be serialized. Such values in objects will be\n// dropped; in arrays they will be replaced with null. You can use\n// a replacer function to replace those with JSON values.\n\n// JSON.stringify(undefined) returns undefined.\n\n// The optional space parameter produces a stringification of the\n// value that is filled with line breaks and indentation to make it\n// easier to read.\n\n// If the space parameter is a non-empty string, then that string will\n// be used for indentation. If the space parameter is a number, then\n// the indentation will be that many spaces.\n\n// Example:\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}]);\n// // text is '[\"e\",{\"pluribus\":\"unum\"}]'\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}], null, \"\\t\");\n// // text is '[\\n\\t\"e\",\\n\\t{\\n\\t\\t\"pluribus\": \"unum\"\\n\\t}\\n]'\n\n// text = JSON.stringify([new Date()], function (key, value) {\n// return this[key] instanceof Date\n// ? \"Date(\" + this[key] + \")\"\n// : value;\n// });\n// // text is '[\"Date(---current time---)\"]'\n\n// JSON.parse(text, reviver)\n// This method parses a JSON text to produce an object or array.\n// It can throw a SyntaxError exception.\n// This has been modified to use JSON-js/json_parse_state.js as the\n// parser instead of the one built around eval found in JSON-js/json2.js\n\n// The optional reviver parameter is a function that can filter and\n// transform the results. It receives each of the keys and values,\n// and its return value is used instead of the original value.\n// If it returns what it received, then the structure is not modified.\n// If it returns undefined then the member is deleted.\n\n// Example:\n\n// // Parse the text. Values that look like ISO date strings will\n// // be converted to Date objects.\n\n// myData = JSON.parse(text, function (key, value) {\n// var a;\n// if (typeof value === \"string\") {\n// a =\n// /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2}(?:\\.\\d*)?)Z$/.exec(value);\n// if (a) {\n// return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],\n// +a[5], +a[6]));\n// }\n// }\n// return value;\n// });\n\n// myData = JSON.parse('[\"Date(09/09/2001)\"]', function (key, value) {\n// var d;\n// if (typeof value === \"string\" &&\n// value.slice(0, 5) === \"Date(\" &&\n// value.slice(-1) === \")\") {\n// d = new Date(value.slice(5, -1));\n// if (d) {\n// return d;\n// }\n// }\n// return value;\n// });\n\n// This is a reference implementation. You are free to copy, modify, or\n// redistribute.\n\n/*jslint\n for, this\n */\n\n/*property\n JSON, apply, call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,\n getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,\n lastIndex, length, parse, prototype, push, replace, slice, stringify,\n test, toJSON, toString, valueOf\n */\n\nvar setupCustomJSON = function(JSON) {\n\n var rx_one = /^[\\],:{}\\s]*$/;\n var rx_two = /\\\\(?:[\"\\\\\\/bfnrt]|u[0-9a-fA-F]{4})/g;\n var rx_three = /\"[^\"\\\\\\n\\r]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g;\n var rx_four = /(?:^|:|,)(?:\\s*\\[)+/g;\n var rx_escapable = /[\\\\\"\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n var rx_dangerous = /[\\u0000\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n\n function f(n) {\n // Format integers to have at least two digits.\n return n < 10\n ? \"0\" + n\n : n;\n }\n\n function this_value() {\n return this.valueOf();\n }\n\n if (typeof Date.prototype.toJSON !== \"function\") {\n\n Date.prototype.toJSON = function () {\n\n return isFinite(this.valueOf())\n ? this.getUTCFullYear() + \"-\" +\n f(this.getUTCMonth() + 1) + \"-\" +\n f(this.getUTCDate()) + \"T\" +\n f(this.getUTCHours()) + \":\" +\n f(this.getUTCMinutes()) + \":\" +\n f(this.getUTCSeconds()) + \"Z\"\n : null;\n };\n\n Boolean.prototype.toJSON = this_value;\n Number.prototype.toJSON = this_value;\n String.prototype.toJSON = this_value;\n }\n\n var gap;\n var indent;\n var meta;\n var rep;\n\n\n function quote(string) {\n\n // If the string contains no control characters, no quote characters, and no\n // backslash characters, then we can safely slap some quotes around it.\n // Otherwise we must also replace the offending characters with safe escape\n // sequences.\n\n rx_escapable.lastIndex = 0;\n return rx_escapable.test(string)\n ? \"\\\"\" + string.replace(rx_escapable, function (a) {\n var c = meta[a];\n return typeof c === \"string\"\n ? c\n : \"\\\\u\" + (\"0000\" + a.charCodeAt(0).toString(16)).slice(-4);\n }) + \"\\\"\"\n : \"\\\"\" + string + \"\\\"\";\n }\n\n\n function str(key, holder) {\n\n // Produce a string from holder[key].\n\n var i; // The loop counter.\n var k; // The member key.\n var v; // The member value.\n var length;\n var mind = gap;\n var partial;\n var value = holder[key];\n\n // If the value has a toJSON method, call it to obtain a replacement value.\n\n if (value && typeof value === \"object\" &&\n typeof value.toJSON === \"function\") {\n value = value.toJSON(key);\n }\n\n // If we were called with a replacer function, then call the replacer to\n // obtain a replacement value.\n\n if (typeof rep === \"function\") {\n value = rep.call(holder, key, value);\n }\n\n // What happens next depends on the value's type.\n\n switch (typeof value) {\n case \"string\":\n return quote(value);\n\n case \"number\":\n\n // JSON numbers must be finite. Encode non-finite numbers as null.\n\n return isFinite(value)\n ? String(value)\n : \"null\";\n\n case \"boolean\":\n case \"null\":\n\n // If the value is a boolean or null, convert it to a string. Note:\n // typeof null does not produce \"null\". The case is included here in\n // the remote chance that this gets fixed someday.\n\n return String(value);\n\n // If the type is \"object\", we might be dealing with an object or an array or\n // null.\n\n case \"object\":\n\n // Due to a specification blunder in ECMAScript, typeof null is \"object\",\n // so watch out for that case.\n\n if (!value) {\n return \"null\";\n }\n\n // Make an array to hold the partial results of stringifying this object value.\n\n gap += indent;\n partial = [];\n\n // Is the value an array?\n\n if (Object.prototype.toString.apply(value) === \"[object Array]\") {\n\n // The value is an array. Stringify every element. Use null as a placeholder\n // for non-JSON values.\n\n length = value.length;\n for (i = 0; i < length; i += 1) {\n partial[i] = str(i, value) || \"null\";\n }\n\n // Join all of the elements together, separated with commas, and wrap them in\n // brackets.\n\n v = partial.length === 0\n ? \"[]\"\n : gap\n ? \"[\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"]\"\n : \"[\" + partial.join(\",\") + \"]\";\n gap = mind;\n return v;\n }\n\n // If the replacer is an array, use it to select the members to be stringified.\n\n if (rep && typeof rep === \"object\") {\n length = rep.length;\n for (i = 0; i < length; i += 1) {\n if (typeof rep[i] === \"string\") {\n k = rep[i];\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n } else {\n\n // Otherwise, iterate through all of the keys in the object.\n\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(value, k)) {\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n }\n\n // Join all of the member texts together, separated with commas,\n // and wrap them in braces.\n\n v = partial.length === 0\n ? \"{}\"\n : gap\n ? \"{\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"}\"\n : \"{\" + partial.join(\",\") + \"}\";\n gap = mind;\n return v;\n }\n }\n\n // If the JSON object does not yet have a stringify method, give it one.\n\n if (typeof JSON.stringify !== \"function\") {\n meta = { // table of character substitutions\n \"\\b\": \"\\\\b\",\n \"\\t\": \"\\\\t\",\n \"\\n\": \"\\\\n\",\n \"\\f\": \"\\\\f\",\n \"\\r\": \"\\\\r\",\n \"\\\"\": \"\\\\\\\"\",\n \"\\\\\": \"\\\\\\\\\"\n };\n JSON.stringify = function (value, replacer, space) {\n\n // The stringify method takes a value and an optional replacer, and an optional\n // space parameter, and returns a JSON text. The replacer can be a function\n // that can replace values, or an array of strings that will select the keys.\n // A default replacer method can be provided. Use of the space parameter can\n // produce text that is more easily readable.\n\n var i;\n gap = \"\";\n indent = \"\";\n\n // If the space parameter is a number, make an indent string containing that\n // many spaces.\n\n if (typeof space === \"number\") {\n for (i = 0; i < space; i += 1) {\n indent += \" \";\n }\n\n // If the space parameter is a string, it will be used as the indent string.\n\n } else if (typeof space === \"string\") {\n indent = space;\n }\n\n // If there is a replacer, it must be a function or an array.\n // Otherwise, throw an error.\n\n rep = replacer;\n if (replacer && typeof replacer !== \"function\" &&\n (typeof replacer !== \"object\" ||\n typeof replacer.length !== \"number\")) {\n throw new Error(\"JSON.stringify\");\n }\n\n // Make a fake root object containing our value under the key of \"\".\n // Return the result of stringifying the value.\n\n return str(\"\", {\"\": value});\n };\n }\n\n\n // If the JSON object does not yet have a parse method, give it one.\n\n if (typeof JSON.parse !== \"function\") {\n JSON.parse = (function () {\n\n // This function creates a JSON parse function that uses a state machine rather\n // than the dangerous eval function to parse a JSON text.\n\n var state; // The state of the parser, one of\n // 'go' The starting state\n // 'ok' The final, accepting state\n // 'firstokey' Ready for the first key of the object or\n // the closing of an empty object\n // 'okey' Ready for the next key of the object\n // 'colon' Ready for the colon\n // 'ovalue' Ready for the value half of a key/value pair\n // 'ocomma' Ready for a comma or closing }\n // 'firstavalue' Ready for the first value of an array or\n // an empty array\n // 'avalue' Ready for the next value of an array\n // 'acomma' Ready for a comma or closing ]\n var stack; // The stack, for controlling nesting.\n var container; // The current container object or array\n var key; // The current key\n var value; // The current value\n var escapes = { // Escapement translation table\n \"\\\\\": \"\\\\\",\n \"\\\"\": \"\\\"\",\n \"/\": \"/\",\n \"t\": \"\\t\",\n \"n\": \"\\n\",\n \"r\": \"\\r\",\n \"f\": \"\\f\",\n \"b\": \"\\b\"\n };\n var string = { // The actions for string tokens\n go: function () {\n state = \"ok\";\n },\n firstokey: function () {\n key = value;\n state = \"colon\";\n },\n okey: function () {\n key = value;\n state = \"colon\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var number = { // The actions for number tokens\n go: function () {\n state = \"ok\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var action = {\n\n // The action table describes the behavior of the machine. It contains an\n // object for each token. Each object contains a method that is called when\n // a token is matched in a state. An object will lack a method for illegal\n // states.\n\n \"{\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = {};\n state = \"firstokey\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = {};\n state = \"firstokey\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n }\n },\n \"}\": {\n firstokey: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n ocomma: function () {\n var pop = stack.pop();\n container[key] = value;\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \"[\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = [];\n state = \"firstavalue\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = [];\n state = \"firstavalue\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n }\n },\n \"]\": {\n firstavalue: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n acomma: function () {\n var pop = stack.pop();\n container.push(value);\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \":\": {\n colon: function () {\n if (Object.hasOwnProperty.call(container, key)) {\n throw new SyntaxError(\"Duplicate key '\" + key + \"\\\"\");\n }\n state = \"ovalue\";\n }\n },\n \",\": {\n ocomma: function () {\n container[key] = value;\n state = \"okey\";\n },\n acomma: function () {\n container.push(value);\n state = \"avalue\";\n }\n },\n \"true\": {\n go: function () {\n value = true;\n state = \"ok\";\n },\n ovalue: function () {\n value = true;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = true;\n state = \"acomma\";\n },\n avalue: function () {\n value = true;\n state = \"acomma\";\n }\n },\n \"false\": {\n go: function () {\n value = false;\n state = \"ok\";\n },\n ovalue: function () {\n value = false;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = false;\n state = \"acomma\";\n },\n avalue: function () {\n value = false;\n state = \"acomma\";\n }\n },\n \"null\": {\n go: function () {\n value = null;\n state = \"ok\";\n },\n ovalue: function () {\n value = null;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = null;\n state = \"acomma\";\n },\n avalue: function () {\n value = null;\n state = \"acomma\";\n }\n }\n };\n\n function debackslashify(text) {\n\n // Remove and replace any backslash escapement.\n\n return text.replace(/\\\\(?:u(.{4})|([^u]))/g, function (ignore, b, c) {\n return b\n ? String.fromCharCode(parseInt(b, 16))\n : escapes[c];\n });\n }\n\n return function (source, reviver) {\n\n // A regular expression is used to extract tokens from the JSON text.\n // The extraction process is cautious.\n\n var result;\n var tx = /^[\\u0020\\t\\n\\r]*(?:([,:\\[\\]{}]|true|false|null)|(-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?)|\"((?:[^\\r\\n\\t\\\\\\\"]|\\\\(?:[\"\\\\\\/trnfb]|u[0-9a-fA-F]{4}))*)\")/;\n\n // Set the starting state.\n\n state = \"go\";\n\n // The stack records the container, key, and state for each object or array\n // that contains another object or array while processing nested structures.\n\n stack = [];\n\n // If any error occurs, we will catch it and ultimately throw a syntax error.\n\n try {\n\n // For each token...\n\n while (true) {\n result = tx.exec(source);\n if (!result) {\n break;\n }\n\n // result is the result array from matching the tokenizing regular expression.\n // result[0] contains everything that matched, including any initial whitespace.\n // result[1] contains any punctuation that was matched, or true, false, or null.\n // result[2] contains a matched number, still in string form.\n // result[3] contains a matched string, without quotes but with escapement.\n\n if (result[1]) {\n\n // Token: Execute the action for this state and token.\n\n action[result[1]][state]();\n\n } else if (result[2]) {\n\n // Number token: Convert the number string into a number value and execute\n // the action for this state and number.\n\n value = +result[2];\n number[state]();\n } else {\n\n // String token: Replace the escapement sequences and execute the action for\n // this state and string.\n\n value = debackslashify(result[3]);\n string[state]();\n }\n\n // Remove the token from the string. The loop will continue as long as there\n // are tokens. This is a slow process, but it allows the use of ^ matching,\n // which assures that no illegal tokens slip through.\n\n source = source.slice(result[0].length);\n }\n\n // If we find a state/token combination that is illegal, then the action will\n // cause an error. We handle the error by simply changing the state.\n\n } catch (e) {\n state = e;\n }\n\n // The parsing is finished. If we are not in the final \"ok\" state, or if the\n // remaining source contains anything except whitespace, then we did not have\n //a well-formed JSON text.\n\n if (state !== \"ok\" || (/[^\\u0020\\t\\n\\r]/.test(source))) {\n throw (state instanceof SyntaxError)\n ? state\n : new SyntaxError(\"JSON\");\n }\n\n // If there is a reviver function, we recursively walk the new structure,\n // passing each name/value pair to the reviver function for possible\n // transformation, starting with a temporary root object that holds the current\n // value in an empty key. If there is not a reviver function, we simply return\n // that value.\n\n return (typeof reviver === \"function\")\n ? (function walk(holder, key) {\n var k;\n var v;\n var val = holder[key];\n if (val && typeof val === \"object\") {\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(val, k)) {\n v = walk(val, k);\n if (v !== undefined) {\n val[k] = v;\n } else {\n delete val[k];\n }\n }\n }\n }\n return reviver.call(holder, key, val);\n }({\"\": value}, \"\"))\n : value;\n };\n }());\n }\n}\n\nmodule.exports = setupCustomJSON;\n","'use strict';\n\nfunction wrapGlobals(window, handler, shim) {\n if (!window) { return; }\n // Adapted from https://github.com/bugsnag/bugsnag-js\n var globals = 'EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload'.split(',');\n var i, global;\n for (i = 0; i < globals.length; ++i) {\n global = globals[i];\n\n if (window[global] && window[global].prototype) {\n _extendListenerPrototype(handler, window[global].prototype, shim);\n }\n }\n}\n\nfunction _extendListenerPrototype(handler, prototype, shim) {\n if (prototype.hasOwnProperty && prototype.hasOwnProperty('addEventListener')) {\n var oldAddEventListener = prototype.addEventListener;\n while (oldAddEventListener._rollbarOldAdd && oldAddEventListener.belongsToShim) {\n oldAddEventListener = oldAddEventListener._rollbarOldAdd;\n }\n var addFn = function(event, callback, bubble) {\n oldAddEventListener.call(this, event, handler.wrap(callback), bubble);\n };\n addFn._rollbarOldAdd = oldAddEventListener;\n addFn.belongsToShim = shim;\n prototype.addEventListener = addFn;\n\n var oldRemoveEventListener = prototype.removeEventListener;\n while (oldRemoveEventListener._rollbarOldRemove && oldRemoveEventListener.belongsToShim) {\n oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;\n }\n var removeFn = function(event, callback, bubble) {\n oldRemoveEventListener.call(this, event, callback && callback._rollbar_wrapped || callback, bubble);\n };\n removeFn._rollbarOldRemove = oldRemoveEventListener;\n removeFn.belongsToShim = shim;\n prototype.removeEventListener = removeFn;\n }\n}\n\nmodule.exports = wrapGlobals;\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction raw(payload, jsonBackup) {\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction selectFrames(frames, range) {\n var len = frames.length;\n if (len > range * 2) {\n return frames.slice(0, range).concat(frames.slice(len - range));\n }\n return frames;\n}\n\nfunction truncateFrames(payload, jsonBackup, range) {\n range = (typeof range === 'undefined') ? 30 : range;\n var body = payload.data.body;\n var frames;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n frames = chain[i].frames;\n frames = selectFrames(frames, range);\n chain[i].frames = frames;\n }\n } else if (body.trace) {\n frames = body.trace.frames;\n frames = selectFrames(frames, range);\n body.trace.frames = frames;\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction maybeTruncateValue(len, val) {\n if (!val) {\n return val;\n }\n if (val.length > len) {\n return val.slice(0, len - 3).concat('...');\n }\n return val;\n}\n\nfunction truncateStrings(len, payload, jsonBackup) {\n function truncator(k, v, seen) {\n switch (_.typeName(v)) {\n case 'string':\n return maybeTruncateValue(len, v);\n case 'object':\n case 'array':\n return traverse(v, truncator, seen);\n default:\n return v;\n }\n }\n payload = traverse(payload, truncator);\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction truncateTraceData(traceData) {\n if (traceData.exception) {\n delete traceData.exception.description;\n traceData.exception.message = maybeTruncateValue(255, traceData.exception.message);\n }\n traceData.frames = selectFrames(traceData.frames, 1);\n return traceData;\n}\n\nfunction minBody(payload, jsonBackup) {\n var body = payload.data.body;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n chain[i] = truncateTraceData(chain[i]);\n }\n } else if (body.trace) {\n body.trace = truncateTraceData(body.trace);\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction needsTruncation(payload, maxSize) {\n return _.maxByteSize(payload) > maxSize;\n}\n\nfunction truncate(payload, jsonBackup, maxSize) {\n maxSize = (typeof maxSize === 'undefined') ? (512 * 1024) : maxSize;\n var strategies = [\n raw,\n truncateFrames,\n truncateStrings.bind(null, 1024),\n truncateStrings.bind(null, 512),\n truncateStrings.bind(null, 256),\n minBody\n ];\n var strategy, results, result;\n\n while ((strategy = strategies.shift())) {\n results = strategy(payload, jsonBackup);\n payload = results[0];\n result = results[1];\n if (result.error || !needsTruncation(result.value, maxSize)) {\n return result;\n }\n }\n return result;\n}\n\nmodule.exports = {\n truncate: truncate,\n\n /* for testing */\n raw: raw,\n truncateFrames: truncateFrames,\n truncateStrings: truncateStrings,\n maybeTruncateValue: maybeTruncateValue\n};\n"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/rollbar.snippet.js b/dist/rollbar.snippet.js index 9562c9f53..bc5da6b95 100644 --- a/dist/rollbar.snippet.js +++ b/dist/rollbar.snippet.js @@ -1 +1 @@ -!function(r){var e={};function o(n){if(e[n])return e[n].exports;var t=e[n]={i:n,l:!1,exports:{}};return r[n].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.m=r,o.c=e,o.d=function(r,e,n){o.o(r,e)||Object.defineProperty(r,e,{enumerable:!0,get:n})},o.r=function(r){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},o.t=function(r,e){if(1&e&&(r=o(r)),8&e)return r;if(4&e&&"object"==typeof r&&r&&r.__esModule)return r;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:r}),2&e&&"string"!=typeof r)for(var t in r)o.d(n,t,function(e){return r[e]}.bind(null,t));return n},o.n=function(r){var e=r&&r.__esModule?function(){return r.default}:function(){return r};return o.d(e,"a",e),e},o.o=function(r,e){return Object.prototype.hasOwnProperty.call(r,e)},o.p="",o(o.s=0)}([function(r,e,o){"use strict";var n=o(1),t=o(5);_rollbarConfig=_rollbarConfig||{},_rollbarConfig.rollbarJsUrl=_rollbarConfig.rollbarJsUrl||"https://cdn.rollbar.com/rollbarjs/refs/tags/v2.24.0/rollbar.min.js",_rollbarConfig.async=void 0===_rollbarConfig.async||_rollbarConfig.async;var a=n.setupShim(window,_rollbarConfig),l=t(_rollbarConfig);window.rollbar=n.Rollbar,a.loadFull(window,document,!_rollbarConfig.async,_rollbarConfig,l)},function(r,e,o){"use strict";var n=o(2),t=o(3);function a(r){return function(){try{return r.apply(this,arguments)}catch(r){try{console.error("[Rollbar]: Internal error",r)}catch(r){}}}}var l=0;function i(r,e){this.options=r,this._rollbarOldOnError=null;var o=l++;this.shimId=function(){return o},"undefined"!=typeof window&&window._rollbarShims&&(window._rollbarShims[o]={handler:e,messages:[]})}var s=o(4),d=function(r,e){return new i(r,e)},c=function(r){return new s(d,r)};function u(r){return a((function(){var e=this,o=Array.prototype.slice.call(arguments,0),n={shim:e,method:r,args:o,ts:new Date};window._rollbarShims[this.shimId()].messages.push(n)}))}i.prototype.loadFull=function(r,e,o,n,t){var l=!1,i=e.createElement("script"),s=e.getElementsByTagName("script")[0],d=s.parentNode;i.crossOrigin="",i.src=n.rollbarJsUrl,o||(i.async=!0),i.onload=i.onreadystatechange=a((function(){if(!(l||this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState)){i.onload=i.onreadystatechange=null;try{d.removeChild(i)}catch(r){}l=!0,function(){var e;if(void 0===r._rollbarDidLoad){e=new Error("rollbar.js did not load");for(var o,n,a,l,i=0;o=r._rollbarShims[i++];)for(o=o.messages||[];n=o.shift();)for(a=n.args||[],i=0;i 0) { - // if custom is an array this turns it into an object with integer keys - custom = merge(custom); - custom.extraArgs = extraArgs; + if (!custom) custom = nonCircularClone({}); + custom.extraArgs = nonCircularClone(extraArgs); } var item = { @@ -606,7 +639,7 @@ function addErrorContext(item, errors) { try { for (var i = 0; i < errors.length; ++i) { if (errors[i].hasOwnProperty('rollbarContext')) { - custom = merge(custom, errors[i].rollbarContext); + custom = merge(custom, nonCircularClone(errors[i].rollbarContext)); contextAdded = true; } } @@ -4563,7 +4596,7 @@ module.exports = { module.exports = { - version: '2.24.0', + version: '2.24.1', endpoint: 'api.rollbar.com/api/1/item/', logLevel: 'debug', reportLevel: 'debug', diff --git a/dist/rollbar.umd.js.map b/dist/rollbar.umd.js.map index b995a6a4d..6ff62c799 100644 --- a/dist/rollbar.umd.js.map +++ b/dist/rollbar.umd.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://rollbar/webpack/universalModuleDefinition","webpack://rollbar/webpack/bootstrap","webpack://rollbar/./src/utility.js","webpack://rollbar/./src/browser/logger.js","webpack://rollbar/./src/browser/url.js","webpack://rollbar/./src/errorParser.js","webpack://rollbar/./src/scrub.js","webpack://rollbar/./src/utility/traverse.js","webpack://rollbar/./src/browser/bundles/rollbar.js","webpack://rollbar/./src/browser/rollbar.js","webpack://rollbar/./src/browser/core.js","webpack://rollbar/./src/rollbar.js","webpack://rollbar/./src/rateLimiter.js","webpack://rollbar/./src/merge.js","webpack://rollbar/./src/queue.js","webpack://rollbar/./src/notifier.js","webpack://rollbar/./src/api.js","webpack://rollbar/./src/apiUtility.js","webpack://rollbar/./node_modules/console-polyfill/index.js","webpack://rollbar/./src/browser/detection.js","webpack://rollbar/./src/browser/globalSetup.js","webpack://rollbar/./src/browser/transport.js","webpack://rollbar/./src/browser/transforms.js","webpack://rollbar/./node_modules/error-stack-parser/error-stack-parser.js","webpack://rollbar/./node_modules/error-stack-parser/node_modules/stackframe/stackframe.js","webpack://rollbar/./src/transforms.js","webpack://rollbar/./src/browser/predicates.js","webpack://rollbar/./src/predicates.js","webpack://rollbar/./src/defaults.js","webpack://rollbar/./src/browser/defaults/scrubFields.js","webpack://rollbar/./src/telemetry.js","webpack://rollbar/./src/browser/telemetry.js","webpack://rollbar/./src/browser/domUtility.js","webpack://rollbar/./src/utility/polyfillJSON.js","webpack://rollbar/./vendor/JSON-js/json3.js","webpack://rollbar/./src/browser/wrapGlobals.js","webpack://rollbar/./src/truncation.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;QCVA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;AClFa;;AAEb,YAAY,mBAAO,CAAC,EAAS;;AAE7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,OAAO;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,EAAE;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,mCAAmC,OAAO;AAC1C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,iBAAiB,YAAY;AAC7B;AACA,qBAAqB;AACrB;AACA,KAAK,wBAAwB;AAC7B;AACA,KAAK,yBAAyB;AAC9B;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kCAAkC,OAAO;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,SAAS;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,kCAAkC,OAAO;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,SAAS,UAAU,YAAY,GAAG;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,aAAa;AAChC;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3uBa;;AAEb;AACA,mBAAO,CAAC,EAAkB;AAC1B,gBAAgB,mBAAO,CAAC,EAAa;AACrC,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;AC3Ca;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;AChFa;;AAEb,uBAAuB,mBAAO,CAAC,EAAoB;;AAEnD;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;;AAEA,sBAAsB,wBAAwB;AAC9C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,eAAe;AACf;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7Ha;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,eAAe,mBAAO,CAAC,CAAoB;;AAE3C;AACA;;AAEA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe,qBAAqB;AACpC;AAC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U,mBAAO,CAAC,EAAQ;AAC1B,aAAa,mBAAO,CAAC,CAAU;AAC/B,cAAc,mBAAO,CAAC,EAAe;;AAErC,gBAAgB,mBAAO,CAAC,EAAa;AACrC,aAAa,mBAAO,CAAC,CAAO;;AAE5B,iBAAiB,mBAAO,CAAC,EAAc;AACvC,uBAAuB,mBAAO,CAAC,EAAe;AAC9C,iBAAiB,mBAAO,CAAC,EAAc;AACvC,uBAAuB,mBAAO,CAAC,EAAe;AAC9C,kBAAkB,mBAAO,CAAC,CAAgB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,0BAA0B,sBAAsB;AAChD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,oCAAoC,SAAS;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,eAAe,mBAAO,CAAC,EAAa;AACpC,kBAAkB,mBAAO,CAAC,EAAwB;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACpjBa;;AAEb,kBAAkB,mBAAO,CAAC,EAAe;AACzC,YAAY,mBAAO,CAAC,EAAS;AAC7B,eAAe,mBAAO,CAAC,EAAY;AACnC,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,6EAA6E,UAAU;AACvF,yFAAyF,UAAU;;AAEnG;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,6BAA6B;AAC7B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACnRa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AChJa;;AAEb;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA,WAAW,YAAY;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACvDa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wDAAwD,WAAW;AACnE;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,QAAQ;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,aAAa,8BAA8B;AAC3C;AACA;AACA;AACA;AACA,+CAA+C,SAAS;AACxD;AACA;AACA,cAAc;AACd;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,SAAS;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,+BAA+B;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC7Qa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACxHa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,cAAc,mBAAO,CAAC,EAAc;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;ACvGa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC7FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;AClBY;;AAEb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;AC/Ba;;AAEb;AACA,gBAAgB,QAAQ;AACxB;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;;AAEA;AACA,gBAAgB,QAAQ;;AAExB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;;;;;;;AClGa;;AAEb;;AAEA,QAAQ,mBAAO,CAAC,CAAY;AAC5B,aAAa,mBAAO,CAAC,CAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACvQa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,kBAAkB,mBAAO,CAAC,CAAgB;AAC1C,aAAa,mBAAO,CAAC,CAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,OAAO;AAC7C;AACA,oBAAoB,6CAA6C;AACjE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,4BAA4B,gBAAgB;AAC5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,sBAAsB;AACvC;AACA;AACA;;AAEA,4BAA4B,oBAAoB;AAChD;AACA;;AAEA;AACA;;AAEA;AACA;AACA,8BAA8B,aAAa;AAC3C;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,kBAAkB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC9UA;AACA;AACA;;AAEA;AACA,QAAQ,IAA0C;AAClD,QAAQ,iCAA6B,CAAC,uBAAY,CAAC,oCAAE,OAAO;AAAA;AAAA;AAAA,oGAAC;AAC7D,KAAK,MAAM,EAIN;AACL,CAAC;AACD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,MAAM;AACzB,oBAAoB,MAAM;AAC1B;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA,CAAC;;;;;;;ACzMD;AACA;AACA;;AAEA;AACA,QAAQ,IAA0C;AAClD,QAAQ,iCAAqB,EAAE,oCAAE,OAAO;AAAA;AAAA;AAAA,oGAAC;AACzC,KAAK,MAAM,EAIN;AACL,CAAC;AACD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,wBAAwB;AAC3C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA,CAAC;;;;;;;;AC9IY;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,sBAAsB;AAC1D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,8BAA8B;AAC9B;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrJa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;ACba;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe;;AAEf;;AAEA,uCAAuC,eAAe;;AAEtD;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA;;AAEA,wCAAwC,eAAe;;AAEvD,mBAAmB,gBAAgB;AACnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,SAAS;AAC1B;;AAEA,mBAAmB,qBAAqB;AACxC;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClMa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACVa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5Da;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qCAAqC,mBAAmB;AACxD;;AAEA;AACA,qCAAqC,4BAA4B;AACjE;AACA;AACA,8BAA8B,4BAA4B;AAC1D;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD;AACA;AACA,8BAA8B,gBAAgB;AAC9C;AACA;;AAEA;AACA,8BAA8B,aAAa;AAC3C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AClLa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,YAAY,mBAAO,CAAC,CAAU;AAC9B,gBAAgB,mBAAO,CAAC,CAAO;AAC/B,cAAc,mBAAO,CAAC,EAAc;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gDAAgD,aAAa;AAC7D;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B,mBAAmB,qBAAqB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,6BAA6B,0BAA0B;AACvD;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,eAAe,0BAA0B;AACzC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB;;AAEjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,SAAS;AAC9C;AACA;AACA,GAAG;AACH,yCAAyC;AACzC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,8CAA8C,QAAQ;;AAEtD;AACA;;AAEA;AACA,8CAA8C,QAAQ;;AAEtD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC/vBa;;AAEb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,6BAA6B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,4BAA4B,QAAQ;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,4BAA4B;AAC7C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,uBAAuB;AACpC;AACA;AACA;AACA,2BAA2B,sBAAsB;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnIa;;AAEb,mBAAmB,mBAAO,CAAC,EAA4B;;AAEvD;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB;AACpB;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,yCAAyC,iBAAiB;AAC1D,8BAA8B,kBAAkB;;AAEhD,yCAAyC,iBAAiB;AAC1D,sCAAsC,6BAA6B;;AAEnE;AACA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,wBAAwB;AACxB,+CAA+C,EAAE;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;;AAGA;;AAEA;;AAEA,UAAU;AACV,UAAU;AACV,UAAU;AACV;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA,qBAAqB,YAAY;AACjC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,qBAAqB,YAAY;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,eAAe;AACf;AACA,cAAc,wDAAwD;AACtE,cAAc,0BAA0B;AACxC;AACA;AACA;AACA;;AAEA;;AAEA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,mBAAmB,WAAW;AAC9B;AACA;;AAEA;;AAEA,OAAO;AACP;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,sBAAsB,UAAU;AAChC;AACA;;;AAGA;;AAEA;AACA;;AAEA;AACA;;AAEA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB,oBAAoB;AACpB,cAAc;AACd,gBAAgB;AAChB,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,UAAU;AACV;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,WAAW;AACX;AACA,wBAAwB,gDAAgD;AACxE;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,SAAS;AACT,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,WAAW;AACX;AACA,wBAAwB,gDAAgD;AACxE;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,sCAAsC,EAAE;AACxC;AACA;AACA;AACA,SAAS;AACT;;AAEA;;AAEA;AACA;;AAEA;AACA,+CAA+C,yGAAyG,EAAE;;AAE1J;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,SAAS;AACT;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE,UAAU;AACvB;AACA;AACA,KAAK;AACL;AACA;;AAEA;;;;;;;;AC1vBa;;AAEb;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,aAAa,oBAAoB;AACjC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC1Ca;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,eAAe,mBAAO,CAAC,CAAoB;;AAE3C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA","file":"rollbar.umd.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"rollbar\"] = factory();\n\telse\n\t\troot[\"rollbar\"] = factory();\n})(this, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n","'use strict';\n\nvar merge = require('./merge');\n\nvar RollbarJSON = {};\nfunction setupJSON(polyfillJSON) {\n if (isFunction(RollbarJSON.stringify) && isFunction(RollbarJSON.parse)) {\n return;\n }\n\n if (isDefined(JSON)) {\n // If polyfill is provided, prefer it over existing non-native shims.\n if(polyfillJSON) {\n if (isNativeFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isNativeFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n } else { // else accept any interface that is present.\n if (isFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n }\n }\n if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {\n polyfillJSON && polyfillJSON(RollbarJSON);\n }\n}\n\n/*\n * isType - Given a Javascript value and a string, returns true if the type of the value matches the\n * given string.\n *\n * @param x - any value\n * @param t - a lowercase string containing one of the following type names:\n * - undefined\n * - null\n * - error\n * - number\n * - boolean\n * - string\n * - symbol\n * - function\n * - object\n * - array\n * @returns true if x is of type t, otherwise false\n */\nfunction isType(x, t) {\n return t === typeName(x);\n}\n\n/*\n * typeName - Given a Javascript value, returns the type of the object as a string\n */\nfunction typeName(x) {\n var name = typeof x;\n if (name !== 'object') {\n return name;\n }\n if (!x) {\n return 'null';\n }\n if (x instanceof Error) {\n return 'error';\n }\n return ({}).toString.call(x).match(/\\s([a-zA-Z]+)/)[1].toLowerCase();\n}\n\n/* isFunction - a convenience function for checking if a value is a function\n *\n * @param f - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isFunction(f) {\n return isType(f, 'function');\n}\n\n/* isNativeFunction - a convenience function for checking if a value is a native JS function\n *\n * @param f - any value\n * @returns true if f is a native JS function, otherwise false\n */\nfunction isNativeFunction(f) {\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n var funcMatchString = Function.prototype.toString.call(Object.prototype.hasOwnProperty)\n .replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?');\n var reIsNative = RegExp('^' + funcMatchString + '$');\n return isObject(f) && reIsNative.test(f);\n}\n\n/* isObject - Checks if the argument is an object\n *\n * @param value - any value\n * @returns true is value is an object function is an object)\n*/\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/* isString - Checks if the argument is a string\n *\n * @param value - any value\n * @returns true if value is a string\n*/\nfunction isString(value) {\n return typeof value === 'string' || value instanceof String\n}\n\n/**\n * isFiniteNumber - determines whether the passed value is a finite number\n *\n * @param {*} n - any value\n * @returns true if value is a finite number\n */\n function isFiniteNumber(n) {\n return Number.isFinite(n);\n}\n\n/*\n * isDefined - a convenience function for checking if a value is not equal to undefined\n *\n * @param u - any value\n * @returns true if u is anything other than undefined\n */\nfunction isDefined(u) {\n return !isType(u, 'undefined');\n}\n\n/*\n * isIterable - convenience function for checking if a value can be iterated, essentially\n * whether it is an object or an array.\n *\n * @param i - any value\n * @returns true if i is an object or an array as determined by `typeName`\n */\nfunction isIterable(i) {\n var type = typeName(i);\n return (type === 'object' || type === 'array');\n}\n\n/*\n * isError - convenience function for checking if a value is of an error type\n *\n * @param e - any value\n * @returns true if e is an error\n */\nfunction isError(e) {\n // Detect both Error and Firefox Exception type\n return isType(e, 'error') || isType(e, 'exception');\n}\n\n/* isPromise - a convenience function for checking if a value is a promise\n *\n * @param p - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isPromise(p) {\n return isObject(p) && isType(p.then, 'function');\n}\n\nfunction redact() {\n return '********';\n}\n\n// from http://stackoverflow.com/a/8809472/1138191\nfunction uuid4() {\n var d = now();\n var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n var r = (d + Math.random() * 16) % 16 | 0;\n d = Math.floor(d / 16);\n return (c === 'x' ? r : (r & 0x7 | 0x8)).toString(16);\n });\n return uuid;\n}\n\nvar LEVELS = {\n debug: 0,\n info: 1,\n warning: 2,\n error: 3,\n critical: 4\n};\n\nfunction sanitizeUrl(url) {\n var baseUrlParts = parseUri(url);\n if (!baseUrlParts) {\n return '(unknown)';\n }\n\n // remove a trailing # if there is no anchor\n if (baseUrlParts.anchor === '') {\n baseUrlParts.source = baseUrlParts.source.replace('#', '');\n }\n\n url = baseUrlParts.source.replace('?' + baseUrlParts.query, '');\n return url;\n}\n\nvar parseUriOptions = {\n strictMode: false,\n key: [\n 'source',\n 'protocol',\n 'authority',\n 'userInfo',\n 'user',\n 'password',\n 'host',\n 'port',\n 'relative',\n 'path',\n 'directory',\n 'file',\n 'query',\n 'anchor'\n ],\n q: {\n name: 'queryKey',\n parser: /(?:^|&)([^&=]*)=?([^&]*)/g\n },\n parser: {\n strict: /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n loose: /^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/\n }\n};\n\nfunction parseUri(str) {\n if (!isType(str, 'string')) {\n return undefined;\n }\n\n var o = parseUriOptions;\n var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);\n var uri = {};\n\n for (var i = 0, l = o.key.length; i < l; ++i) {\n uri[o.key[i]] = m[i] || '';\n }\n\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) {\n uri[o.q.name][$1] = $2;\n }\n });\n\n return uri;\n}\n\nfunction addParamsAndAccessTokenToPath(accessToken, options, params) {\n params = params || {};\n params.access_token = accessToken;\n var paramsArray = [];\n var k;\n for (k in params) {\n if (Object.prototype.hasOwnProperty.call(params, k)) {\n paramsArray.push([k, params[k]].join('='));\n }\n }\n var query = '?' + paramsArray.sort().join('&');\n\n options = options || {};\n options.path = options.path || '';\n var qs = options.path.indexOf('?');\n var h = options.path.indexOf('#');\n var p;\n if (qs !== -1 && (h === -1 || h > qs)) {\n p = options.path;\n options.path = p.substring(0,qs) + query + '&' + p.substring(qs+1);\n } else {\n if (h !== -1) {\n p = options.path;\n options.path = p.substring(0,h) + query + p.substring(h);\n } else {\n options.path = options.path + query;\n }\n }\n}\n\nfunction formatUrl(u, protocol) {\n protocol = protocol || u.protocol;\n if (!protocol && u.port) {\n if (u.port === 80) {\n protocol = 'http:';\n } else if (u.port === 443) {\n protocol = 'https:';\n }\n }\n protocol = protocol || 'https:';\n\n if (!u.hostname) {\n return null;\n }\n var result = protocol + '//' + u.hostname;\n if (u.port) {\n result = result + ':' + u.port;\n }\n if (u.path) {\n result = result + u.path;\n }\n return result;\n}\n\nfunction stringify(obj, backup) {\n var value, error;\n try {\n value = RollbarJSON.stringify(obj);\n } catch (jsonError) {\n if (backup && isFunction(backup)) {\n try {\n value = backup(obj);\n } catch (backupError) {\n error = backupError;\n }\n } else {\n error = jsonError;\n }\n }\n return {error: error, value: value};\n}\n\nfunction maxByteSize(string) {\n // The transport will use utf-8, so assume utf-8 encoding.\n //\n // This minimal implementation will accurately count bytes for all UCS-2 and\n // single code point UTF-16. If presented with multi code point UTF-16,\n // which should be rare, it will safely overcount, not undercount.\n //\n // While robust utf-8 encoders exist, this is far smaller and far more performant.\n // For quickly counting payload size for truncation, smaller is better.\n\n var count = 0;\n var length = string.length;\n\n for (var i = 0; i < length; i++) {\n var code = string.charCodeAt(i);\n if (code < 128) { // up to 7 bits\n count = count + 1;\n } else if (code < 2048) { // up to 11 bits\n count = count + 2;\n } else if (code < 65536) { // up to 16 bits\n count = count + 3;\n }\n }\n\n return count;\n}\n\nfunction jsonParse(s) {\n var value, error;\n try {\n value = RollbarJSON.parse(s);\n } catch (e) {\n error = e;\n }\n return {error: error, value: value};\n}\n\nfunction makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n mode,\n backupMessage,\n errorParser\n) {\n var location = {\n url: url || '',\n line: lineno,\n column: colno\n };\n location.func = errorParser.guessFunctionName(location.url, location.line);\n location.context = errorParser.gatherContext(location.url, location.line);\n var href = typeof document !== 'undefined' && document && document.location && document.location.href;\n var useragent = typeof window !== 'undefined' && window && window.navigator && window.navigator.userAgent;\n return {\n 'mode': mode,\n 'message': error ? String(error) : (message || backupMessage),\n 'url': href,\n 'stack': [location],\n 'useragent': useragent\n };\n}\n\nfunction wrapCallback(logger, f) {\n return function(err, resp) {\n try {\n f(err, resp);\n } catch (e) {\n logger.error(e);\n }\n };\n}\n\nfunction createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\n var diagnostic = {};\n var argTypes = [];\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n argTypes.push(typ);\n switch (typ) {\n case 'undefined':\n break;\n case 'string':\n message ? extraArgs.push(arg) : message = arg;\n break;\n case 'function':\n callback = wrapCallback(logger, arg);\n break;\n case 'date':\n extraArgs.push(arg);\n break;\n case 'error':\n case 'domexception':\n case 'exception': // Firefox Exception type\n err ? extraArgs.push(arg) : err = arg;\n break;\n case 'object':\n case 'array':\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n if (requestKeys && typ === 'object' && !request) {\n for (var j = 0, len = requestKeys.length; j < len; ++j) {\n if (arg[requestKeys[j]] !== undefined) {\n request = arg;\n break;\n }\n }\n if (request) {\n break;\n }\n }\n custom ? extraArgs.push(arg) : custom = arg;\n break;\n default:\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n extraArgs.push(arg);\n }\n }\n\n if (extraArgs.length > 0) {\n // if custom is an array this turns it into an object with integer keys\n custom = merge(custom);\n custom.extraArgs = extraArgs;\n }\n\n var item = {\n message: message,\n err: err,\n custom: custom,\n timestamp: now(),\n callback: callback,\n notifier: notifier,\n diagnostic: diagnostic,\n uuid: uuid4()\n };\n\n setCustomItemKeys(item, custom);\n\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n item.diagnostic.original_arg_types = argTypes;\n return item;\n}\n\nfunction setCustomItemKeys(item, custom) {\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (custom && custom.skipFrames !== undefined) {\n item.skipFrames = custom.skipFrames;\n delete custom.skipFrames;\n }\n}\n\nfunction addErrorContext(item, errors) {\n var custom = item.data.custom || {};\n var contextAdded = false;\n\n try {\n for (var i = 0; i < errors.length; ++i) {\n if (errors[i].hasOwnProperty('rollbarContext')) {\n custom = merge(custom, errors[i].rollbarContext);\n contextAdded = true;\n }\n }\n\n // Avoid adding an empty object to the data.\n if (contextAdded) {\n item.data.custom = custom;\n }\n } catch (e) {\n item.diagnostic.error_context = 'Failed: ' + e.message;\n }\n}\n\nvar TELEMETRY_TYPES = ['log', 'network', 'dom', 'navigation', 'error', 'manual'];\nvar TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];\n\nfunction arrayIncludes(arr, val) {\n for (var k = 0; k < arr.length; ++k) {\n if (arr[k] === val) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction createTelemetryEvent(args) {\n var type, metadata, level;\n var arg;\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n switch (typ) {\n case 'string':\n if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {\n type = arg;\n } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {\n level = arg;\n }\n break;\n case 'object':\n metadata = arg;\n break;\n default:\n break;\n }\n }\n var event = {\n type: type || 'manual',\n metadata: metadata || {},\n level: level\n };\n\n return event;\n}\n\n/*\n * get - given an obj/array and a keypath, return the value at that keypath or\n * undefined if not possible.\n *\n * @param obj - an object or array\n * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'\n * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`\n */\nfunction get(obj, path) {\n if (!obj) {\n return undefined;\n }\n var keys = path.split('.');\n var result = obj;\n try {\n for (var i = 0, len = keys.length; i < len; ++i) {\n result = result[keys[i]];\n }\n } catch (e) {\n result = undefined;\n }\n return result;\n}\n\nfunction set(obj, path, value) {\n if (!obj) {\n return;\n }\n var keys = path.split('.');\n var len = keys.length;\n if (len < 1) {\n return;\n }\n if (len === 1) {\n obj[keys[0]] = value;\n return;\n }\n try {\n var temp = obj[keys[0]] || {};\n var replacement = temp;\n for (var i = 1; i < len - 1; ++i) {\n temp[keys[i]] = temp[keys[i]] || {};\n temp = temp[keys[i]];\n }\n temp[keys[len-1]] = value;\n obj[keys[0]] = replacement;\n } catch (e) {\n return;\n }\n}\n\nfunction formatArgsAsString(args) {\n var i, len, arg;\n var result = [];\n for (i = 0, len = args.length; i < len; ++i) {\n arg = args[i];\n switch (typeName(arg)) {\n case 'object':\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500) {\n arg = arg.substr(0, 497) + '...';\n }\n break;\n case 'null':\n arg = 'null';\n break;\n case 'undefined':\n arg = 'undefined';\n break;\n case 'symbol':\n arg = arg.toString();\n break;\n }\n result.push(arg);\n }\n return result.join(' ');\n}\n\nfunction now() {\n if (Date.now) {\n return +Date.now();\n }\n return +new Date();\n}\n\nfunction filterIp(requestData, captureIp) {\n if (!requestData || !requestData['user_ip'] || captureIp === true) {\n return;\n }\n var newIp = requestData['user_ip'];\n if (!captureIp) {\n newIp = null;\n } else {\n try {\n var parts;\n if (newIp.indexOf('.') !== -1) {\n parts = newIp.split('.');\n parts.pop();\n parts.push('0');\n newIp = parts.join('.');\n } else if (newIp.indexOf(':') !== -1) {\n parts = newIp.split(':');\n if (parts.length > 2) {\n var beginning = parts.slice(0, 3);\n var slashIdx = beginning[2].indexOf('/');\n if (slashIdx !== -1) {\n beginning[2] = beginning[2].substring(0, slashIdx);\n }\n var terminal = '0000:0000:0000:0000:0000';\n newIp = beginning.concat(terminal).join(':');\n }\n } else {\n newIp = null;\n }\n } catch (e) {\n newIp = null;\n }\n }\n requestData['user_ip'] = newIp;\n}\n\nfunction handleOptions(current, input, payload, logger) {\n var result = merge(current, input, payload);\n result = updateDeprecatedOptions(result, logger);\n if (!input || input.overwriteScrubFields) {\n return result;\n }\n if (input.scrubFields) {\n result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);\n }\n return result;\n}\n\nfunction updateDeprecatedOptions(options, logger) {\n if(options.hostWhiteList && !options.hostSafeList) {\n options.hostSafeList = options.hostWhiteList;\n options.hostWhiteList = undefined;\n logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');\n }\n if(options.hostBlackList && !options.hostBlockList) {\n options.hostBlockList = options.hostBlackList;\n options.hostBlackList = undefined;\n logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');\n }\n return options;\n}\n\nmodule.exports = {\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n createItem: createItem,\n addErrorContext: addErrorContext,\n createTelemetryEvent: createTelemetryEvent,\n filterIp: filterIp,\n formatArgsAsString: formatArgsAsString,\n formatUrl: formatUrl,\n get: get,\n handleOptions: handleOptions,\n isError: isError,\n isFiniteNumber: isFiniteNumber,\n isFunction: isFunction,\n isIterable: isIterable,\n isNativeFunction: isNativeFunction,\n isObject: isObject,\n isString: isString,\n isType: isType,\n isPromise: isPromise,\n jsonParse: jsonParse,\n LEVELS: LEVELS,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n merge: merge,\n now: now,\n redact: redact,\n RollbarJSON: RollbarJSON,\n sanitizeUrl: sanitizeUrl,\n set: set,\n setupJSON: setupJSON,\n stringify: stringify,\n maxByteSize: maxByteSize,\n typeName: typeName,\n uuid4: uuid4\n};\n","'use strict';\n\n/* eslint-disable no-console */\nrequire('console-polyfill');\nvar detection = require('./detection');\nvar _ = require('../utility');\n\nfunction error() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.error(_.formatArgsAsString(args));\n } else {\n console.error.apply(console, args);\n }\n}\n\nfunction info() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.info(_.formatArgsAsString(args));\n } else {\n console.info.apply(console, args);\n }\n}\n\nfunction log() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.log(_.formatArgsAsString(args));\n } else {\n console.log.apply(console, args);\n }\n}\n\n/* eslint-enable no-console */\n\nmodule.exports = {\n error: error,\n info: info,\n log: log\n};\n","'use strict';\n\n// See https://nodejs.org/docs/latest/api/url.html\nfunction parse(url) {\n var result = {\n protocol: null, auth: null, host: null, path: null,\n hash: null, href: url, hostname: null, port: null,\n pathname: null, search: null, query: null\n };\n\n var i, last;\n i = url.indexOf('//');\n if (i !== -1) {\n result.protocol = url.substring(0,i);\n last = i+2;\n } else {\n last = 0;\n }\n \n i = url.indexOf('@', last);\n if (i !== -1) {\n result.auth = url.substring(last, i);\n last = i+1;\n }\n\n i = url.indexOf('/', last);\n if (i === -1) {\n i = url.indexOf('?', last);\n if (i === -1) {\n i = url.indexOf('#', last);\n if (i === -1) {\n result.host = url.substring(last);\n } else {\n result.host = url.substring(last, i);\n result.hash = url.substring(i);\n }\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n return result;\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n\n i = url.indexOf('#', last);\n if (i === -1) {\n result.path = url.substring(last);\n } else {\n result.path = url.substring(last, i);\n result.hash = url.substring(i);\n }\n\n if (result.path) {\n var pathParts = result.path.split('?');\n result.pathname = pathParts[0];\n result.query = pathParts[1];\n result.search = result.query ? '?' + result.query : null;\n }\n return result;\n}\n\nmodule.exports = {\n parse: parse\n};\n","'use strict';\n\nvar ErrorStackParser = require('error-stack-parser');\n\nvar UNKNOWN_FUNCTION = '?';\nvar ERR_CLASS_REGEXP = new RegExp('^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ');\n\nfunction guessFunctionName() {\n return UNKNOWN_FUNCTION;\n}\n\n\nfunction gatherContext() {\n return null;\n}\n\n\nfunction Frame(stackFrame) {\n var data = {};\n\n data._stackFrame = stackFrame;\n\n data.url = stackFrame.fileName;\n data.line = stackFrame.lineNumber;\n data.func = stackFrame.functionName;\n data.column = stackFrame.columnNumber;\n data.args = stackFrame.args;\n\n data.context = gatherContext();\n\n return data;\n}\n\n\nfunction Stack(exception, skip) {\n function getStack() {\n var parserStack = [];\n\n skip = skip || 0;\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch(e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = skip; i < parserStack.length; i++) {\n stack.push(new Frame(parserStack[i]));\n }\n\n return stack;\n }\n\n return {\n stack: getStack(),\n message: exception.message,\n name: _mostSpecificErrorName(exception),\n rawStack: exception.stack,\n rawException: exception\n };\n}\n\n\nfunction parse(e, skip) {\n var err = e;\n\n if (err.nested) {\n var traceChain = [];\n while (err) {\n traceChain.push(new Stack(err, skip));\n err = err.nested;\n\n skip = 0; // Only apply skip value to primary error\n }\n\n // Return primary error with full trace chain attached.\n traceChain[0].traceChain = traceChain;\n return traceChain[0];\n } else {\n return new Stack(err, skip);\n }\n}\n\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg || !errMsg.match) {\n return ['Unknown error. There was no error message to display.', ''];\n }\n var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);\n var errClass = '(unknown)';\n\n if (errClassMatch) {\n errClass = errClassMatch[errClassMatch.length - 1];\n errMsg = errMsg.replace((errClassMatch[errClassMatch.length - 2] || '') + errClass + ':', '');\n errMsg = errMsg.replace(/(^[\\s]+|[\\s]+$)/g, '');\n }\n return [errClass, errMsg];\n}\n\n// * Prefers any value over an empty string\n// * Prefers any value over 'Error' where possible\n// * Prefers name over constructor.name when both are more specific than 'Error'\nfunction _mostSpecificErrorName(error) {\n var name = error.name && error.name.length && error.name;\n var constructorName = error.constructor.name && error.constructor.name.length && error.constructor.name;\n\n if (!name || !constructorName) {\n return name || constructorName;\n }\n\n if (name === 'Error') {\n return constructorName;\n }\n return name;\n}\n\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame\n};\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction scrub(data, scrubFields, scrubPaths) {\n scrubFields = scrubFields || [];\n\n if (scrubPaths) {\n for (var i = 0; i < scrubPaths.length; ++i) {\n scrubPath(data, scrubPaths[i]);\n }\n }\n\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart) {\n return paramPart + _.redact();\n }\n\n function paramScrubber(v) {\n var i;\n if (_.isType(v, 'string')) {\n for (i = 0; i < queryRes.length; ++i) {\n v = v.replace(queryRes[i], redactQueryParam);\n }\n }\n return v;\n }\n\n function valScrubber(k, v) {\n var i;\n for (i = 0; i < paramRes.length; ++i) {\n if (paramRes[i].test(k)) {\n v = _.redact();\n break;\n }\n }\n return v;\n }\n\n function scrubber(k, v, seen) {\n var tmpV = valScrubber(k, v);\n if (tmpV === v) {\n if (_.isType(v, 'object') || _.isType(v, 'array')) {\n return traverse(v, scrubber, seen);\n }\n return paramScrubber(tmpV);\n } else {\n return tmpV;\n }\n }\n\n return traverse(data, scrubber);\n}\n\nfunction scrubPath(obj, path) {\n var keys = path.split('.');\n var last = keys.length - 1;\n try {\n for (var i = 0; i <= last; ++i) {\n if (i < last) {\n obj = obj[keys[i]];\n } else {\n obj[keys[i]] = _.redact();\n }\n }\n } catch (e) {\n // Missing key is OK;\n }\n}\n\nfunction _getScrubFieldRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '^\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?$';\n ret.push(new RegExp(pat, 'i'));\n }\n return ret;\n}\n\n\nfunction _getScrubQueryParamRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?';\n ret.push(new RegExp('(' + pat + '=)([^&\\\\n]+)', 'igm'));\n }\n return ret;\n}\n\nmodule.exports = scrub;\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction traverse(obj, func, seen) {\n var k, v, i;\n var isObj = _.isType(obj, 'object');\n var isArray = _.isType(obj, 'array');\n var keys = [];\n var seenIndex;\n\n // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.\n seen = seen || { obj: [], mapped: []};\n\n if (isObj) {\n seenIndex = seen.obj.indexOf(obj);\n\n if (isObj && seenIndex !== -1) {\n // Prefer the mapped object if there is one.\n return seen.mapped[seenIndex] || seen.obj[seenIndex];\n }\n\n seen.obj.push(obj);\n seenIndex = seen.obj.length - 1;\n }\n\n if (isObj) {\n for (k in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, k)) {\n keys.push(k);\n }\n }\n } else if (isArray) {\n for (i = 0; i < obj.length; ++i) {\n keys.push(i);\n }\n }\n\n var result = isObj ? {} : [];\n var same = true;\n for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n result[k] = func(k, v, seen);\n same = same && result[k] === obj[k];\n }\n\n if (isObj && !same) {\n seen.mapped[seenIndex] = result;\n }\n\n return !same ? result : obj;\n}\n\nmodule.exports = traverse;\n","'use strict';\n\nvar rollbar = require('../rollbar');\n\nvar options = (typeof window !== 'undefined') && window._rollbarConfig;\nvar alias = options && options.globalAlias || 'Rollbar';\nvar shimRunning = (typeof window !== 'undefined') && window[alias] && typeof window[alias].shimId === 'function' && window[alias].shimId() !== undefined;\n\nif ((typeof window !== 'undefined') && !window._rollbarStartTime) {\n window._rollbarStartTime = (new Date()).getTime();\n}\n\nif (!shimRunning && options) {\n var Rollbar = new rollbar(options);\n window[alias] = Rollbar;\n} else if (typeof window !== 'undefined') {\n window.rollbar = rollbar;\n window._rollbarDidLoad = true;\n} else if (typeof self !== 'undefined') {\n self.rollbar = rollbar;\n self._rollbarDidLoad = true;\n}\n\nmodule.exports = rollbar;\n","'use strict';\n\nvar Rollbar = require('./core');\nvar telemeter = require('../telemetry');\nvar instrumenter = require('./telemetry');\nvar polyfillJSON = require('../utility/polyfillJSON');\nvar wrapGlobals = require('./wrapGlobals');\nvar scrub = require('../scrub');\nvar truncation = require('../truncation');\n\nRollbar.setComponents({\n telemeter: telemeter,\n instrumenter: instrumenter,\n polyfillJSON: polyfillJSON,\n wrapGlobals: wrapGlobals,\n scrub: scrub,\n truncation: truncation\n});\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar Client = require('../rollbar');\nvar _ = require('../utility');\nvar API = require('../api');\nvar logger = require('./logger');\nvar globals = require('./globalSetup');\n\nvar Transport = require('./transport');\nvar urllib = require('./url');\n\nvar transforms = require('./transforms');\nvar sharedTransforms = require('../transforms');\nvar predicates = require('./predicates');\nvar sharedPredicates = require('../predicates');\nvar errorParser = require('../errorParser');\n\nfunction Rollbar(options, client) {\n this.options = _.handleOptions(defaultOptions, options, null, logger);\n this.options._configuredOptions = options;\n var Telemeter = this.components.telemeter;\n var Instrumenter = this.components.instrumenter;\n var polyfillJSON = this.components.polyfillJSON;\n this.wrapGlobals = this.components.wrapGlobals;\n this.scrub = this.components.scrub;\n var truncation = this.components.truncation;\n\n var transport = new Transport(truncation);\n var api = new API(this.options, transport, urllib, truncation);\n if (Telemeter) {\n this.telemeter = new Telemeter(this.options);\n }\n this.client = client || new Client(this.options, api, logger, this.telemeter, 'browser');\n var gWindow = _gWindow();\n var gDocument = (typeof document != 'undefined') && document;\n this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers\n this.anonymousErrorsPending = 0;\n addTransformsToNotifier(this.client.notifier, this, gWindow);\n addPredicatesToQueue(this.client.queue);\n this.setupUnhandledCapture();\n if (Instrumenter) {\n this.instrumenter = new Instrumenter(this.options, this.client.telemeter, this, gWindow, gDocument);\n this.instrumenter.instrument();\n }\n _.setupJSON(polyfillJSON);\n}\n\nvar _instance = null;\nRollbar.init = function(options, client) {\n if (_instance) {\n return _instance.global(options).configure(options);\n }\n _instance = new Rollbar(options, client);\n return _instance;\n};\n\nRollbar.prototype.components = {};\n\nRollbar.setComponents = function(components) {\n Rollbar.prototype.components = components;\n}\n\nfunction handleUninitialized(maybeCallback) {\n var message = 'Rollbar is not initialized';\n logger.error(message);\n if (maybeCallback) {\n maybeCallback(new Error(message));\n }\n}\n\nRollbar.prototype.global = function(options) {\n this.client.global(options);\n return this;\n};\nRollbar.global = function(options) {\n if (_instance) {\n return _instance.global(options);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.configure = function(options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = {payload: payloadData};\n }\n this.options = _.handleOptions(oldOptions, options, payload, logger);\n this.options._configuredOptions = _.handleOptions(oldOptions._configuredOptions, options, payload);\n this.client.configure(this.options, payloadData);\n this.instrumenter && this.instrumenter.configure(this.options);\n this.setupUnhandledCapture();\n return this;\n};\nRollbar.configure = function(options, payloadData) {\n if (_instance) {\n return _instance.configure(options, payloadData);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.lastError = function() {\n return this.client.lastError;\n};\nRollbar.lastError = function() {\n if (_instance) {\n return _instance.lastError();\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.log = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.log(item);\n return {uuid: uuid};\n};\nRollbar.log = function() {\n if (_instance) {\n return _instance.log.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.debug = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.debug(item);\n return {uuid: uuid};\n};\nRollbar.debug = function() {\n if (_instance) {\n return _instance.debug.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.info = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.info(item);\n return {uuid: uuid};\n};\nRollbar.info = function() {\n if (_instance) {\n return _instance.info.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warn = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warn(item);\n return {uuid: uuid};\n};\nRollbar.warn = function() {\n if (_instance) {\n return _instance.warn.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warning = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warning(item);\n return {uuid: uuid};\n};\nRollbar.warning = function() {\n if (_instance) {\n return _instance.warning.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.error = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.error(item);\n return {uuid: uuid};\n};\nRollbar.error = function() {\n if (_instance) {\n return _instance.error.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.critical = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.critical(item);\n return {uuid: uuid};\n};\nRollbar.critical = function() {\n if (_instance) {\n return _instance.critical.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.buildJsonPayload = function(item) {\n return this.client.buildJsonPayload(item);\n};\nRollbar.buildJsonPayload = function() {\n if (_instance) {\n return _instance.buildJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.sendJsonPayload = function(jsonPayload) {\n return this.client.sendJsonPayload(jsonPayload);\n};\nRollbar.sendJsonPayload = function() {\n if (_instance) {\n return _instance.sendJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.setupUnhandledCapture = function() {\n var gWindow = _gWindow();\n\n if (!this.unhandledExceptionsInitialized) {\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(gWindow, this);\n if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {\n this.wrapGlobals(gWindow, this);\n }\n this.unhandledExceptionsInitialized = true;\n }\n }\n if (!this.unhandledRejectionsInitialized) {\n if (this.options.captureUnhandledRejections || this.options.handleUnhandledRejections) {\n globals.captureUnhandledRejections(gWindow, this);\n this.unhandledRejectionsInitialized = true;\n }\n }\n};\n\nRollbar.prototype.handleUncaughtException = function(message, url, lineno, colno, error, context) {\n if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {\n return;\n }\n\n // Chrome will always send 5+ arguments and error will be valid or null, not undefined.\n // If error is undefined, we have a different caller.\n // Chrome also sends errors from web workers with null error, but does not invoke\n // prepareStackTrace() for these. Test for empty url to skip them.\n if (this.options.inspectAnonymousErrors && this.isChrome && error === null && url === '') {\n return 'anonymous';\n }\n\n var item;\n var stackInfo = _.makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n 'onerror',\n 'uncaught exception',\n errorParser\n );\n if (_.isError(error)) {\n item = this._createItem([message, error, context]);\n item._unhandledStackInfo = stackInfo;\n } else if (_.isError(url)) {\n item = this._createItem([message, url, context]);\n item._unhandledStackInfo = stackInfo;\n } else {\n item = this._createItem([message, context]);\n item.stackInfo = stackInfo;\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n this.client.log(item);\n};\n\n/**\n * Chrome only. Other browsers will ignore.\n *\n * Use Error.prepareStackTrace to extract information about errors that\n * do not have a valid error object in onerror().\n *\n * In tested version of Chrome, onerror is called first but has no way\n * to communicate with prepareStackTrace. Use a counter to let this\n * handler know which errors to send to Rollbar.\n *\n * In config options, set inspectAnonymousErrors to enable.\n */\nRollbar.prototype.handleAnonymousErrors = function() {\n if (!this.options.inspectAnonymousErrors || !this.isChrome) {\n return;\n }\n\n var r = this;\n function prepareStackTrace(error, _stack) { // eslint-disable-line no-unused-vars\n if (r.options.inspectAnonymousErrors) {\n if (r.anonymousErrorsPending) {\n // This is the only known way to detect that onerror saw an anonymous error.\n // It depends on onerror reliably being called before Error.prepareStackTrace,\n // which so far holds true on tested versions of Chrome. If versions of Chrome\n // are tested that behave differently, this logic will need to be updated\n // accordingly.\n r.anonymousErrorsPending -= 1;\n\n if (!error) {\n // Not likely to get here, but calling handleUncaughtException from here\n // without an error object would throw off the anonymousErrorsPending counter,\n // so return now.\n return;\n }\n\n // Allow this to be tracked later.\n error._isAnonymous = true;\n\n // url, lineno, colno shouldn't be needed for these errors.\n // If that changes, update this accordingly, using the unused\n // _stack param as needed (rather than parse error.toString()).\n r.handleUncaughtException(error.message, null, null, null, error);\n }\n }\n\n // Workaround to ensure stack is preserved for normal errors.\n return error.stack;\n }\n\n // https://v8.dev/docs/stack-trace-api\n try {\n Error.prepareStackTrace = prepareStackTrace;\n } catch (e) {\n this.options.inspectAnonymousErrors = false;\n this.error('anonymous error handler failed', e);\n }\n}\n\nRollbar.prototype.handleUnhandledRejection = function(reason, promise) {\n if (!this.options.captureUnhandledRejections && !this.options.handleUnhandledRejections) {\n return;\n }\n\n var message = 'unhandled rejection was null or undefined!';\n if (reason) {\n if (reason.message) {\n message = reason.message;\n } else {\n var reasonResult = _.stringify(reason);\n if (reasonResult.value) {\n message = reasonResult.value;\n }\n }\n }\n var context = (reason && reason._rollbarContext) || (promise && promise._rollbarContext);\n\n var item;\n if (_.isError(reason)) {\n item = this._createItem([message, reason, context]);\n } else {\n item = this._createItem([message, reason, context]);\n item.stackInfo = _.makeUnhandledStackInfo(\n message,\n '',\n 0,\n 0,\n null,\n 'unhandledrejection',\n '',\n errorParser\n );\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n item._originalArgs = item._originalArgs || [];\n item._originalArgs.push(promise);\n this.client.log(item);\n};\n\nRollbar.prototype.wrap = function(f, context, _before) {\n try {\n var ctxFn;\n if(_.isFunction(context)) {\n ctxFn = context;\n } else {\n ctxFn = function() { return context || {}; };\n }\n\n if (!_.isFunction(f)) {\n return f;\n }\n\n if (f._isWrap) {\n return f;\n }\n\n if (!f._rollbar_wrapped) {\n f._rollbar_wrapped = function () {\n if (_before && _.isFunction(_before)) {\n _before.apply(this, arguments);\n }\n try {\n return f.apply(this, arguments);\n } catch(exc) {\n var e = exc;\n if (e && window._rollbarWrappedError !== e) {\n if (_.isType(e, 'string')) {\n e = new String(e);\n }\n e._rollbarContext = ctxFn() || {};\n e._rollbarContext._wrappedSource = f.toString();\n\n window._rollbarWrappedError = e;\n }\n throw e;\n }\n };\n\n f._rollbar_wrapped._isWrap = true;\n\n if (f.hasOwnProperty) {\n for (var prop in f) {\n if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {\n f._rollbar_wrapped[prop] = f[prop];\n }\n }\n }\n }\n\n return f._rollbar_wrapped;\n } catch (e) {\n // Return the original function if the wrap fails.\n return f;\n }\n};\nRollbar.wrap = function(f, context) {\n if (_instance) {\n return _instance.wrap(f, context);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.captureEvent = function() {\n var event = _.createTelemetryEvent(arguments);\n return this.client.captureEvent(event.type, event.metadata, event.level);\n};\nRollbar.captureEvent = function() {\n if (_instance) {\n return _instance.captureEvent.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\n// The following two methods are used internally and are not meant for public use\nRollbar.prototype.captureDomContentLoaded = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureLoad(ts);\n};\n\n/* Internal */\n\nfunction addTransformsToNotifier(notifier, rollbar, gWindow) {\n notifier\n .addTransform(transforms.handleDomException)\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(gWindow))\n .addTransform(transforms.addClientInfo(gWindow))\n .addTransform(transforms.addPluginInfo(gWindow))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(sharedTransforms.addConfigToPayload)\n .addTransform(transforms.addScrubber(rollbar.scrub))\n .addTransform(sharedTransforms.userTransform(logger))\n .addTransform(sharedTransforms.addConfiguredOptions)\n .addTransform(sharedTransforms.addDiagnosticKeys)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(sharedPredicates.checkLevel)\n .addPredicate(predicates.checkIgnore)\n .addPredicate(sharedPredicates.userCheckIgnore(logger))\n .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))\n .addPredicate(sharedPredicates.urlIsSafeListed(logger))\n .addPredicate(sharedPredicates.messageIsIgnored(logger));\n}\n\nRollbar.prototype.loadFull = function() {\n logger.info('Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.');\n};\n\nRollbar.prototype._createItem = function(args) {\n return _.createItem(args, logger, this);\n};\n\nfunction _getFirstFunction(args) {\n for (var i = 0, len = args.length; i < len; ++i) {\n if (_.isFunction(args[i])) {\n return args[i];\n }\n }\n return undefined;\n}\n\nfunction _gWindow() {\n return ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n}\n\nvar defaults = require('../defaults');\nvar scrubFields = require('./defaults/scrubFields');\n\nvar defaultOptions = {\n version: defaults.version,\n scrubFields: scrubFields.scrubFields,\n logLevel: defaults.logLevel,\n reportLevel: defaults.reportLevel,\n uncaughtErrorLevel: defaults.uncaughtErrorLevel,\n endpoint: defaults.endpoint,\n verbose: false,\n enabled: true,\n transmit: true,\n sendConfig: false,\n includeItemsInTelemetry: true,\n captureIp: true,\n inspectAnonymousErrors: true,\n ignoreDuplicateErrors: true,\n wrapGlobalEventHandlers: false\n};\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar _ = require('./utility');\n\n/*\n * Rollbar - the interface to Rollbar\n *\n * @param options\n * @param api\n * @param logger\n */\nfunction Rollbar(options, api, logger, telemeter, platform) {\n this.options = _.merge(options);\n this.logger = logger;\n Rollbar.rateLimiter.configureGlobal(this.options);\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.api = api;\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n\n // This must happen before the Notifier is created\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = telemeter;\n setStackTraceLimit(options);\n this.lastError = null;\n this.lastErrorHash = 'none';\n}\n\nvar defaultOptions = {\n maxItems: 0,\n itemsPerMinute: 60\n};\n\nRollbar.rateLimiter = new RateLimiter(defaultOptions);\n\nRollbar.prototype.global = function (options) {\n Rollbar.rateLimiter.configureGlobal(options);\n return this;\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n\n this.options = _.merge(oldOptions, options, payload);\n\n // This must happen before the Notifier is configured\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier && this.notifier.configure(this.options);\n this.telemeter && this.telemeter.configure(this.options);\n setStackTraceLimit(options);\n this.global(this.options);\n\n if (validateTracer(options.tracer)) {\n this.tracer = options.tracer\n }\n\n return this;\n};\n\nRollbar.prototype.log = function (item) {\n var level = this._defaultLogLevel();\n return this._log(level, item);\n};\n\nRollbar.prototype.debug = function (item) {\n this._log('debug', item);\n};\n\nRollbar.prototype.info = function (item) {\n this._log('info', item);\n};\n\nRollbar.prototype.warn = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.warning = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.error = function (item) {\n this._log('error', item);\n};\n\nRollbar.prototype.critical = function (item) {\n this._log('critical', item);\n};\n\nRollbar.prototype.wait = function (callback) {\n this.queue.wait(callback);\n};\n\nRollbar.prototype.captureEvent = function (type, metadata, level) {\n return this.telemeter && this.telemeter.captureEvent(type, metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function (ts) {\n return this.telemeter && this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (ts) {\n return this.telemeter && this.telemeter.captureLoad(ts);\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.api.buildJsonPayload(item);\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n this.api.postJsonPayload(jsonPayload);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function (defaultLevel, item) {\n var callback;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {\n if (callback) {\n var error = new Error('ignored identical item');\n error.item = item;\n callback(error);\n }\n return;\n }\n try {\n this._addTracingInfo(item);\n item.level = item.level || defaultLevel;\n this.telemeter && this.telemeter._captureRollbarItem(item);\n item.telemetryEvents = (this.telemeter && this.telemeter.copyEvents()) || [];\n this.notifier.log(item, callback);\n } catch (e) {\n if (callback) {\n callback(e);\n }\n this.logger.error(e);\n }\n};\n\nRollbar.prototype._defaultLogLevel = function () {\n return this.options.logLevel || 'debug';\n};\n\nRollbar.prototype._sameAsLastError = function (item) {\n if (!item._isUncaught) {\n return false;\n }\n var itemHash = generateItemHash(item);\n if (this.lastErrorHash === itemHash) {\n return true;\n }\n this.lastError = item.err;\n this.lastErrorHash = itemHash;\n return false;\n};\n\nRollbar.prototype._addTracingInfo = function (item) {\n // Tracer validation occurs in the constructor\n // or in the Rollbar.prototype.configure methods\n if (this.tracer) {\n // add rollbar occurrence uuid to span\n var span = this.tracer.scope().active();\n\n if (validateSpan(span)) {\n span.setTag('rollbar.error_uuid', item.uuid);\n span.setTag('rollbar.has_error', true);\n span.setTag('error', true);\n span.setTag('rollbar.item_url', `https://rollbar.com/item/uuid/?uuid=${item.uuid}`);\n span.setTag('rollbar.occurrence_url', `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`);\n\n // add span ID & trace ID to occurrence\n var opentracingSpanId = span.context().toSpanId();\n var opentracingTraceId = span.context().toTraceId();\n\n if (item.custom) {\n item.custom.opentracing_span_id = opentracingSpanId;\n item.custom.opentracing_trace_id = opentracingTraceId;\n } else {\n item.custom = {\n opentracing_span_id: opentracingSpanId,\n opentracing_trace_id: opentracingTraceId\n };\n }\n }\n }\n}\n\nfunction generateItemHash(item) {\n var message = item.message || '';\n var stack = (item.err || {}).stack || String(item.err);\n return message + '::' + stack;\n}\n\n// Node.js, Chrome, Safari, and some other browsers support this property\n// which globally sets the number of stack frames returned in an Error object.\n// If a browser can't use it, no harm done.\nfunction setStackTraceLimit(options) {\n if (options.stackTraceLimit) {\n Error.stackTraceLimit = options.stackTraceLimit;\n }\n}\n\n/**\n * Validate the Tracer object provided to the Client\n * is valid for our Opentracing use case.\n * @param {opentracer.Tracer} tracer\n */\nfunction validateTracer(tracer) {\n if (!tracer) {\n return false;\n }\n\n if (!tracer.scope || typeof tracer.scope !== 'function') {\n return false;\n }\n\n var scope = tracer.scope();\n\n if (!scope || !scope.active || typeof scope.active !== 'function') {\n return false;\n }\n\n return true;\n}\n\n/**\n * Validate the Span object provided\n * @param {opentracer.Span} span\n */\nfunction validateSpan(span) {\n if (!span || !span.context || typeof span.context !== 'function') {\n return false;\n }\n\n var spanContext = span.context();\n\n if (!spanContext\n || !spanContext.toSpanId\n || !spanContext.toTraceId\n || typeof spanContext.toSpanId !== 'function'\n || typeof spanContext.toTraceId !== 'function') {\n return false\n }\n\n return true;\n}\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar\n *\n * @param options - the same options that are accepted by configureGlobal offered as a convenience\n */\nfunction RateLimiter(options) {\n this.startTime = _.now();\n this.counter = 0;\n this.perMinCounter = 0;\n this.platform = null;\n this.platformOptions = {};\n this.configureGlobal(options);\n}\n\nRateLimiter.globalSettings = {\n startTime: _.now(),\n maxItems: undefined,\n itemsPerMinute: undefined\n};\n\n/*\n * configureGlobal - set the global rate limiter options\n *\n * @param options - Only the following values are recognized:\n * startTime: a timestamp of the form returned by (new Date()).getTime()\n * maxItems: the maximum items\n * itemsPerMinute: the max number of items to send in a given minute\n */\nRateLimiter.prototype.configureGlobal = function(options) {\n if (options.startTime !== undefined) {\n RateLimiter.globalSettings.startTime = options.startTime;\n }\n if (options.maxItems !== undefined) {\n RateLimiter.globalSettings.maxItems = options.maxItems;\n }\n if (options.itemsPerMinute !== undefined) {\n RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;\n }\n};\n\n/*\n * shouldSend - determine if we should send a given item based on rate limit settings\n *\n * @param item - the item we are about to send\n * @returns An object with the following structure:\n * error: (Error|null)\n * shouldSend: bool\n * payload: (Object|null)\n * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and\n * exactly one of error or payload will be non-null. If error is non-null, the returned Error will\n * describe the situation, but it means that we were already over a rate limit (either globally or\n * per minute) when this item was checked. If error is null, and therefore payload is non-null, it\n * means this item put us over the global rate limit and the payload should be sent to Rollbar in\n * place of the passed in item.\n */\nRateLimiter.prototype.shouldSend = function(item, now) {\n now = now || _.now();\n var elapsedTime = now - this.startTime;\n if (elapsedTime < 0 || elapsedTime >= 60000) {\n this.startTime = now;\n this.perMinCounter = 0;\n }\n\n var globalRateLimit = RateLimiter.globalSettings.maxItems;\n var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;\n\n if (checkRate(item, globalRateLimit, this.counter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimit + ' max items reached', false);\n } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimitPerMin + ' items per minute reached', false);\n }\n this.counter++;\n this.perMinCounter++;\n\n var shouldSend = !checkRate(item, globalRateLimit, this.counter);\n var perMinute = shouldSend;\n shouldSend = shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);\n return shouldSendValue(this.platform, this.platformOptions, null, shouldSend, globalRateLimit, globalRateLimitPerMin, perMinute);\n};\n\nRateLimiter.prototype.setPlatformOptions = function(platform, options) {\n this.platform = platform;\n this.platformOptions = options;\n};\n\n/* Helpers */\n\nfunction checkRate(item, limit, counter) {\n return !item.ignoreRateLimit && limit >= 1 && counter > limit;\n}\n\nfunction shouldSendValue(platform, options, error, shouldSend, globalRateLimit, limitPerMin, perMinute) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute);\n }\n return {error: error, shouldSend: shouldSend, payload: payload};\n}\n\nfunction rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute) {\n var environment = options.environment || (options.payload && options.payload.environment);\n var msg;\n if (perMinute) {\n msg = 'item per minute limit reached, ignoring errors until timeout';\n } else {\n msg = 'maxItems has been hit, ignoring errors until reset.';\n }\n var item = {\n body: {\n message: {\n body: msg,\n extra: {\n maxItems: globalRateLimit,\n itemsPerMinute: limitPerMin\n }\n }\n },\n language: 'javascript',\n environment: environment,\n notifier: {\n version: (options.notifier && options.notifier.version) || options.version\n }\n };\n if (platform === 'browser') {\n item.platform = 'browser';\n item.framework = 'browser-js';\n item.notifier.name = 'rollbar-browser-js';\n } else if (platform === 'server') {\n item.framework = options.framework || 'node-js';\n item.notifier.name = options.notifier.name;\n } else if (platform === 'react-native') {\n item.framework = options.framework || 'react-native';\n item.notifier.name = options.notifier.name;\n }\n return item;\n}\n\nmodule.exports = RateLimiter;\n","'use strict';\n\n'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isPlainObject = function isPlainObject(obj) {\n\tif (!obj || toStr.call(obj) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tvar hasOwnConstructor = hasOwn.call(obj, 'constructor');\n\tvar hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n\t// Not own constructor property must be Object\n\tif (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n\t\treturn false;\n\t}\n\n\t// Own properties are enumerated firstly, so to speed up,\n\t// if last one is own, then all properties are own.\n\tvar key;\n\tfor (key in obj) {/**/}\n\n\treturn typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\nfunction merge() {\n var i, src, copy, clone, name,\n result = {},\n current = null,\n length = arguments.length;\n\n for (i=0; i < length; i++) {\n current = arguments[i];\n if (current == null) {\n continue;\n }\n\n for (name in current) {\n src = result[name];\n copy = current[name];\n if (result !== copy) {\n if (copy && isPlainObject(copy)) {\n clone = src && isPlainObject(src) ? src : {};\n result[name] = merge(clone, copy);\n } else if (typeof copy !== 'undefined') {\n result[name] = copy;\n }\n }\n }\n }\n return result;\n}\n\nmodule.exports = merge;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Queue - an object which handles which handles a queue of items to be sent to Rollbar.\n * This object handles rate limiting via a passed in rate limiter, retries based on connection\n * errors, and filtering of items based on a set of configurable predicates. The communication to\n * the backend is performed via a given API object.\n *\n * @param rateLimiter - An object which conforms to the interface\n * rateLimiter.shouldSend(item) -> bool\n * @param api - An object which conforms to the interface\n * api.postItem(payload, function(err, response))\n * @param logger - An object used to log verbose messages if desired\n * @param options - see Queue.prototype.configure\n */\nfunction Queue(rateLimiter, api, logger, options) {\n this.rateLimiter = rateLimiter;\n this.api = api;\n this.logger = logger;\n this.options = options;\n this.predicates = [];\n this.pendingItems = [];\n this.pendingRequests = [];\n this.retryQueue = [];\n this.retryHandle = null;\n this.waitCallback = null;\n this.waitIntervalID = null;\n}\n\n/*\n * configure - updates the options this queue uses\n *\n * @param options\n */\nQueue.prototype.configure = function(options) {\n this.api && this.api.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addPredicate - adds a predicate to the end of the list of predicates for this queue\n *\n * @param predicate - function(item, options) -> (bool|{err: Error})\n * Returning true means that this predicate passes and the item is okay to go on the queue\n * Returning false means do not add the item to the queue, but it is not an error\n * Returning {err: Error} means do not add the item to the queue, and the given error explains why\n * Returning {err: undefined} is equivalent to returning true but don't do that\n */\nQueue.prototype.addPredicate = function(predicate) {\n if (_.isFunction(predicate)) {\n this.predicates.push(predicate);\n }\n return this;\n};\n\nQueue.prototype.addPendingItem = function(item) {\n this.pendingItems.push(item);\n};\n\nQueue.prototype.removePendingItem = function(item) {\n var idx = this.pendingItems.indexOf(item);\n if (idx !== -1) {\n this.pendingItems.splice(idx, 1);\n }\n};\n\n/*\n * addItem - Send an item to the Rollbar API if all of the predicates are satisfied\n *\n * @param item - The payload to send to the backend\n * @param callback - function(error, repsonse) which will be called with the response from the API\n * in the case of a success, otherwise response will be null and error will have a value. If both\n * error and response are null then the item was stopped by a predicate which did not consider this\n * to be an error condition, but nonetheless did not send the item to the API.\n * @param originalError - The original error before any transformations that is to be logged if any\n */\nQueue.prototype.addItem = function(item, callback, originalError, originalItem) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() { return; };\n }\n var predicateResult = this._applyPredicates(item);\n if (predicateResult.stop) {\n this.removePendingItem(originalItem);\n callback(predicateResult.err);\n return;\n }\n this._maybeLog(item, originalError);\n this.removePendingItem(originalItem);\n if (!this.options.transmit) {\n callback(new Error('Transmit disabled'));\n return;\n }\n this.pendingRequests.push(item);\n try {\n this._makeApiRequest(item, function(err, resp) {\n this._dequeuePendingRequest(item);\n callback(err, resp);\n }.bind(this));\n } catch (e) {\n this._dequeuePendingRequest(item);\n callback(e);\n }\n};\n\n/*\n * wait - Stop any further errors from being added to the queue, and get called back when all items\n * currently processing have finished sending to the backend.\n *\n * @param callback - function() called when all pending items have been sent\n */\nQueue.prototype.wait = function(callback) {\n if (!_.isFunction(callback)) {\n return;\n }\n this.waitCallback = callback;\n if (this._maybeCallWait()) {\n return;\n }\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitIntervalID = setInterval(function() {\n this._maybeCallWait();\n }.bind(this), 500);\n};\n\n/* _applyPredicates - Sequentially applies the predicates that have been added to the queue to the\n * given item with the currently configured options.\n *\n * @param item - An item in the queue\n * @returns {stop: bool, err: (Error|null)} - stop being true means do not add item to the queue,\n * the error value should be passed up to a callbak if we are stopping.\n */\nQueue.prototype._applyPredicates = function(item) {\n var p = null;\n for (var i = 0, len = this.predicates.length; i < len; i++) {\n p = this.predicates[i](item, this.options);\n if (!p || p.err !== undefined) {\n return {stop: true, err: p.err};\n }\n }\n return {stop: false, err: null};\n};\n\n/*\n * _makeApiRequest - Send an item to Rollbar, callback when done, if there is an error make an\n * effort to retry if we are configured to do so.\n *\n * @param item - an item ready to send to the backend\n * @param callback - function(err, response)\n */\nQueue.prototype._makeApiRequest = function(item, callback) {\n var rateLimitResponse = this.rateLimiter.shouldSend(item);\n if (rateLimitResponse.shouldSend) {\n this.api.postItem(item, function(err, resp) {\n if (err) {\n this._maybeRetry(err, item, callback);\n } else {\n callback(err, resp);\n }\n }.bind(this));\n } else if (rateLimitResponse.error) {\n callback(rateLimitResponse.error);\n } else {\n this.api.postItem(rateLimitResponse.payload, callback);\n }\n};\n\n// These are errors basically mean there is no internet connection\nvar RETRIABLE_ERRORS = ['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED', 'EHOSTUNREACH', 'EPIPE', 'EAI_AGAIN'];\n\n/*\n * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback\n * with the error.\n *\n * @param err - an error returned by the API transport\n * @param item - the item that was trying to be sent when this error occured\n * @param callback - function(err, response)\n */\nQueue.prototype._maybeRetry = function(err, item, callback) {\n var shouldRetry = false;\n if (this.options.retryInterval) {\n for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {\n if (err.code === RETRIABLE_ERRORS[i]) {\n shouldRetry = true;\n break;\n }\n }\n if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {\n item.retries = item.retries ? item.retries + 1 : 1;\n if (item.retries > this.options.maxRetries) {\n shouldRetry = false;\n }\n }\n }\n if (shouldRetry) {\n this._retryApiRequest(item, callback);\n } else {\n callback(err);\n }\n};\n\n/*\n * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process\n * that queue based on the retryInterval in the options for this queue.\n *\n * @param item - an item that failed to send due to an error we deem retriable\n * @param callback - function(err, response)\n */\nQueue.prototype._retryApiRequest = function(item, callback) {\n this.retryQueue.push({item: item, callback: callback});\n\n if (!this.retryHandle) {\n this.retryHandle = setInterval(function() {\n while (this.retryQueue.length) {\n var retryObject = this.retryQueue.shift();\n this._makeApiRequest(retryObject.item, retryObject.callback);\n }\n }.bind(this), this.options.retryInterval);\n }\n};\n\n/*\n * _dequeuePendingRequest - Removes the item from the pending request queue, this queue is used to\n * enable to functionality of providing a callback that clients can pass to `wait` to be notified\n * when the pending request queue has been emptied. This must be called when the API finishes\n * processing this item. If a `wait` callback is configured, it is called by this function.\n *\n * @param item - the item previously added to the pending request queue\n */\nQueue.prototype._dequeuePendingRequest = function(item) {\n var idx = this.pendingRequests.indexOf(item);\n if (idx !== -1) {\n this.pendingRequests.splice(idx, 1);\n this._maybeCallWait();\n }\n};\n\nQueue.prototype._maybeLog = function(data, originalError) {\n if (this.logger && this.options.verbose) {\n var message = originalError;\n message = message || _.get(data, 'body.trace.exception.message');\n message = message || _.get(data, 'body.trace_chain.0.exception.message');\n if (message) {\n this.logger.error(message);\n return;\n }\n message = _.get(data, 'body.message.body');\n if (message) {\n this.logger.log(message);\n }\n }\n};\n\nQueue.prototype._maybeCallWait = function() {\n if (_.isFunction(this.waitCallback) && this.pendingItems.length === 0 && this.pendingRequests.length === 0) {\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitCallback();\n return true;\n }\n return false;\n};\n\nmodule.exports = Queue;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Notifier - the internal object responsible for delegating between the client exposed API, the\n * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the\n * queue which handles the communcation with the Rollbar API servers.\n *\n * @param queue - an object that conforms to the interface: addItem(item, callback)\n * @param options - an object representing the options to be set for this notifier, this should have\n * any defaults already set by the caller\n */\nfunction Notifier(queue, options) {\n this.queue = queue;\n this.options = options;\n this.transforms = [];\n this.diagnostic = {};\n}\n\n/*\n * configure - updates the options for this notifier with the passed in object\n *\n * @param options - an object which gets merged with the current options set on this notifier\n * @returns this\n */\nNotifier.prototype.configure = function(options) {\n this.queue && this.queue.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addTransform - adds a transform onto the end of the queue of transforms for this notifier\n *\n * @param transform - a function which takes three arguments:\n * * item: An Object representing the data to eventually be sent to Rollbar\n * * options: The current value of the options for this notifier\n * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this\n * callback with a null value for error if it wants the processing chain to continue, otherwise\n * with an error to terminate the processing. The item should be the updated item after this\n * transform is finished modifying it.\n */\nNotifier.prototype.addTransform = function(transform) {\n if (_.isFunction(transform)) {\n this.transforms.push(transform);\n }\n return this;\n};\n\n/*\n * log - the internal log function which applies the configured transforms and then pushes onto the\n * queue to be sent to the backend.\n *\n * @param item - An object with the following structure:\n * message [String] - An optional string to be sent to rollbar\n * error [Error] - An optional error\n *\n * @param callback - A function of type function(err, resp) which will be called with exactly one\n * null argument and one non-null argument. The callback will be called once, either during the\n * transform stage if an error occurs inside a transform, or in response to the communication with\n * the backend. The second argument will be the response from the backend in case of success.\n */\nNotifier.prototype.log = function(item, callback) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!this.options.enabled) {\n return callback(new Error('Rollbar is not enabled'));\n }\n\n this.queue.addPendingItem(item);\n var originalError = item.err;\n this._applyTransforms(item, function(err, i) {\n if (err) {\n this.queue.removePendingItem(item);\n return callback(err, null);\n }\n this.queue.addItem(i, callback, originalError, item);\n }.bind(this));\n};\n\n/* Internal */\n\n/*\n * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See\n * `addTransform` for more information.\n *\n * @param item - An item to be transformed\n * @param callback - A function of type function(err, item) which will be called with a non-null\n * error and a null item in the case of a transform failure, or a null error and non-null item after\n * all transforms have been applied.\n */\nNotifier.prototype._applyTransforms = function(item, callback) {\n var transformIndex = -1;\n var transformsLength = this.transforms.length;\n var transforms = this.transforms;\n var options = this.options;\n\n var cb = function(err, i) {\n if (err) {\n callback(err, null);\n return;\n }\n\n transformIndex++;\n\n if (transformIndex === transformsLength) {\n callback(null, i);\n return;\n }\n\n transforms[transformIndex](i, options, cb);\n };\n\n cb(null, item);\n};\n\nmodule.exports = Notifier;\n","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1/item/',\n search: null,\n version: '1',\n protocol: 'https:',\n port: 443\n};\n\n/**\n * Api is an object that encapsulates methods of communicating with\n * the Rollbar API. It is a standard interface with some parts implemented\n * differently for server or browser contexts. It is an object that should\n * be instantiated when used so it can contain non-global options that may\n * be different for another instance of RollbarApi.\n *\n * @param options {\n * accessToken: the accessToken to use for posting items to rollbar\n * endpoint: an alternative endpoint to send errors to\n * must be a valid, fully qualified URL.\n * The default is: https://api.rollbar.com/api/1/item\n * proxy: if you wish to proxy requests provide an object\n * with the following keys:\n * host or hostname (required): foo.example.com\n * port (optional): 123\n * protocol (optional): https\n * }\n */\nfunction Api(options, transport, urllib, truncation, jsonBackup) {\n this.options = options;\n this.transport = transport;\n this.url = urllib;\n this.truncation = truncation;\n this.jsonBackup = jsonBackup;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, urllib);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function(data, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n this.transport.post(this.accessToken, transportOptions, payload, callback);\n};\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.buildJsonPayload = function(data, callback) {\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n\n if (stringifyResult.error) {\n if (callback) {\n callback(stringifyResult.error);\n }\n return null;\n }\n\n return stringifyResult.value;\n};\n\n/**\n *\n * @param jsonPayload\n * @param callback\n */\nApi.prototype.postJsonPayload = function(jsonPayload, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n this.transport.postJsonPayload(this.accessToken, transportOptions, jsonPayload, callback);\n};\n\nApi.prototype.configure = function(options) {\n var oldOptions = this.oldOptions;\n this.options = _.merge(oldOptions, options);\n this.transportOptions = _getTransport(this.options, this.url);\n if (this.options.accessToken !== undefined) {\n this.accessToken = this.options.accessToken;\n }\n return this;\n};\n\nfunction _getTransport(options, url) {\n return helpers.getTransportFromOptions(options, defaultOptions, url);\n}\n\nmodule.exports = Api;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (!_.isType(data.context, 'string')) {\n var contextResult = _.stringify(data.context, jsonBackup);\n if (contextResult.error) {\n data.context = 'Error: could not serialize \\'context\\'';\n } else {\n data.context = contextResult.value || '';\n }\n if (data.context.length > 255) {\n data.context = data.context.substr(0, 255);\n }\n }\n return {\n access_token: accessToken,\n data: data\n };\n}\n\nfunction getTransportFromOptions(options, defaults, url) {\n var hostname = defaults.hostname;\n var protocol = defaults.protocol;\n var port = defaults.port;\n var path = defaults.path;\n var search = defaults.search;\n var timeout = options.timeout;\n\n var proxy = options.proxy;\n if (options.endpoint) {\n var opts = url.parse(options.endpoint);\n hostname = opts.hostname;\n protocol = opts.protocol;\n port = opts.port;\n path = opts.pathname;\n search = opts.search;\n }\n return {\n timeout: timeout,\n hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy\n };\n}\n\nfunction transportOptions(transport, method) {\n var protocol = transport.protocol || 'https:';\n var port = transport.port || (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);\n var hostname = transport.hostname;\n var path = transport.path;\n var timeout = transport.timeout;\n if (transport.search) {\n path = path + transport.search;\n }\n if (transport.proxy) {\n path = protocol + '//' + hostname + path;\n hostname = transport.proxy.host || transport.proxy.hostname;\n port = transport.proxy.port;\n protocol = transport.proxy.protocol || protocol;\n }\n return {\n timeout: timeout,\n protocol: protocol,\n hostname: hostname,\n path: path,\n port: port,\n method: method\n };\n}\n\nfunction appendPathToPath(base, path) {\n var baseTrailingSlash = /\\/$/.test(base);\n var pathBeginningSlash = /^\\//.test(path);\n\n if (baseTrailingSlash && pathBeginningSlash) {\n path = path.substring(1);\n } else if (!baseTrailingSlash && !pathBeginningSlash) {\n path = '/' + path;\n }\n\n return base + path;\n}\n\nmodule.exports = {\n buildPayload: buildPayload,\n getTransportFromOptions: getTransportFromOptions,\n transportOptions: transportOptions,\n appendPathToPath: appendPathToPath\n};\n","// Console-polyfill. MIT license.\n// https://github.com/paulmillr/console-polyfill\n// Make it safe to do console.log() always.\n(function(global) {\n 'use strict';\n if (!global.console) {\n global.console = {};\n }\n var con = global.console;\n var prop, method;\n var dummy = function() {};\n var properties = ['memory'];\n var methods = ('assert,clear,count,debug,dir,dirxml,error,exception,group,' +\n 'groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,' +\n 'show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn').split(',');\n while (prop = properties.pop()) if (!con[prop]) con[prop] = {};\n while (method = methods.pop()) if (!con[method]) con[method] = dummy;\n // Using `this` for web workers & supports Browserify / Webpack.\n})(typeof window === 'undefined' ? this : window);\n","'use strict';\n\n// This detection.js module is used to encapsulate any ugly browser/feature\n// detection we may need to do.\n\n// Figure out which version of IE we're using, if any.\n// This is gleaned from http://stackoverflow.com/questions/5574842/best-way-to-check-for-ie-less-than-9-in-javascript-without-library\n// Will return an integer on IE (i.e. 8)\n// Will return undefined otherwise\nfunction getIEVersion() {\n\tvar undef;\n\tif (typeof document === 'undefined') {\n\t\treturn undef;\n\t}\n\n var v = 3,\n div = document.createElement('div'),\n all = div.getElementsByTagName('i');\n\n while (\n div.innerHTML = '',\n all[0]\n );\n\n return v > 4 ? v : undef;\n}\n\nvar Detection = {\n ieVersion: getIEVersion\n};\n\nmodule.exports = Detection;\n","'use strict';\n\nfunction captureUncaughtExceptions(window, handler, shim) {\n if (!window) { return; }\n var oldOnError;\n\n if (typeof handler._rollbarOldOnError === 'function') {\n oldOnError = handler._rollbarOldOnError;\n } else if (window.onerror) {\n oldOnError = window.onerror;\n while (oldOnError._rollbarOldOnError) {\n oldOnError = oldOnError._rollbarOldOnError;\n }\n handler._rollbarOldOnError = oldOnError;\n }\n\n handler.handleAnonymousErrors();\n\n var fn = function() {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n if (shim) {\n fn._rollbarOldOnError = oldOnError;\n }\n window.onerror = fn;\n}\n\nfunction _rollbarWindowOnError(window, r, old, args) {\n if (window._rollbarWrappedError) {\n if (!args[4]) {\n args[4] = window._rollbarWrappedError;\n }\n if (!args[5]) {\n args[5] = window._rollbarWrappedError._rollbarContext;\n }\n window._rollbarWrappedError = null;\n }\n\n var ret = r.handleUncaughtException.apply(r, args);\n\n if (old) {\n old.apply(window, args);\n }\n\n // Let other chained onerror handlers above run before setting this.\n // If an error is thrown and caught within a chained onerror handler,\n // Error.prepareStackTrace() will see that one before the one we want.\n if (ret === 'anonymous') {\n r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()\n }\n}\n\nfunction captureUnhandledRejections(window, handler, shim) {\n if (!window) { return; }\n\n if (typeof window._rollbarURH === 'function' && window._rollbarURH.belongsToShim) {\n window.removeEventListener('unhandledrejection', window._rollbarURH);\n }\n\n var rejectionHandler = function (evt) {\n var reason, promise, detail;\n try {\n reason = evt.reason;\n } catch (e) {\n reason = undefined;\n }\n try {\n promise = evt.promise;\n } catch (e) {\n promise = '[unhandledrejection] error getting `promise` from event';\n }\n try {\n detail = evt.detail;\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\n }\n } catch (e) {\n // Ignore\n }\n if (!reason) {\n reason = '[unhandledrejection] error getting `reason` from event';\n }\n\n if (handler && handler.handleUnhandledRejection) {\n handler.handleUnhandledRejection(reason, promise);\n }\n };\n rejectionHandler.belongsToShim = shim;\n window._rollbarURH = rejectionHandler;\n window.addEventListener('unhandledrejection', rejectionHandler);\n}\n\n\nmodule.exports = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections\n};\n","'use strict';\n\n/*global XDomainRequest*/\n\nvar _ = require('../utility');\nvar logger = require('./logger');\n\n/*\n * accessToken may be embedded in payload but that should not\n * be assumed\n *\n * options: {\n * hostname\n * protocol\n * path\n * port\n * method\n * }\n *\n * params is an object containing key/value pairs. These\n * will be appended to the path as 'key=value&key=value'\n *\n * payload is an unserialized object\n */\nfunction Transport(truncation) {\n this.truncation = truncation;\n}\n\nTransport.prototype.get = function(accessToken, options, params, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n _.addParamsAndAccessTokenToPath(accessToken, options, params);\n\n var method = 'GET';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, null, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.post = function(accessToken, options, payload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!payload) {\n return callback(new Error('Cannot send empty request'));\n }\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n if (stringifyResult.error) {\n return callback(stringifyResult.error);\n }\n\n var writeData = stringifyResult.value;\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, writeData, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.postJsonPayload = function (accessToken, options, jsonPayload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, jsonPayload, callback, requestFactory, options.timeout);\n}\n\n\n// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope\n// so Angular change detection isn't triggered on each API call.\n// This is the equivalent of runOutsideAngular().\n//\nfunction _makeZoneRequest() {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;\n var args = Array.prototype.slice.call(arguments);\n\n if (currentZone && currentZone._name === 'angular') {\n var rootZone = currentZone._parent;\n rootZone.run(function () {\n _makeRequest.apply(undefined, args);\n });\n } else {\n _makeRequest.apply(undefined, args);\n }\n}\n\n/* global RollbarProxy */\nfunction _proxyRequest(json, callback) {\n var rollbarProxy = new RollbarProxy();\n rollbarProxy.sendJsonPayload(\n json,\n function(_msg) { /* do nothing */ }, // eslint-disable-line no-unused-vars\n function(err) {\n callback(new Error(err));\n }\n );\n}\n\nfunction _makeRequest(accessToken, url, method, data, callback, requestFactory, timeout) {\n if (typeof RollbarProxy !== 'undefined') {\n return _proxyRequest(data, callback);\n }\n\n var request;\n if (requestFactory) {\n request = requestFactory();\n } else {\n request = _createXMLHTTPObject();\n }\n if (!request) {\n // Give up, no way to send requests\n return callback(new Error('No way to send a request'));\n }\n try {\n try {\n var onreadystatechange = function() {\n try {\n if (onreadystatechange && request.readyState === 4) {\n onreadystatechange = undefined;\n\n var parseResponse = _.jsonParse(request.responseText);\n if (_isSuccess(request)) {\n callback(parseResponse.error, parseResponse.value);\n return;\n } else if (_isNormalFailure(request)) {\n if (request.status === 403) {\n // likely caused by using a server access token\n var message = parseResponse.value && parseResponse.value.message;\n logger.error(message);\n }\n // return valid http status codes\n callback(new Error(String(request.status)));\n } else {\n // IE will return a status 12000+ on some sort of connection failure,\n // so we return a blank error\n // http://msdn.microsoft.com/en-us/library/aa383770%28VS.85%29.aspx\n var msg = 'XHR response had no status code (likely connection failure)';\n callback(_newRetriableError(msg));\n }\n }\n } catch (ex) {\n //jquery source mentions firefox may error out while accessing the\n //request members if there is a network error\n //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111\n var exc;\n if (ex && ex.stack) {\n exc = ex;\n } else {\n exc = new Error(ex);\n }\n callback(exc);\n }\n };\n\n request.open(method, url, true);\n if (request.setRequestHeader) {\n request.setRequestHeader('Content-Type', 'application/json');\n request.setRequestHeader('X-Rollbar-Access-Token', accessToken);\n }\n\n if(_.isFiniteNumber(timeout)) {\n request.timeout = timeout;\n }\n\n request.onreadystatechange = onreadystatechange;\n request.send(data);\n } catch (e1) {\n // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest\n if (typeof XDomainRequest !== 'undefined') {\n\n // Assume we are in a really old browser which has a bunch of limitations:\n // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx\n\n // Extreme paranoia: if we have XDomainRequest then we have a window, but just in case\n if (!window || !window.location) {\n return callback(new Error('No window available during request, unknown environment'));\n }\n\n // If the current page is http, try and send over http\n if (window.location.href.substring(0, 5) === 'http:' && url.substring(0, 5) === 'https') {\n url = 'http' + url.substring(5);\n }\n\n var xdomainrequest = new XDomainRequest();\n xdomainrequest.onprogress = function() {};\n xdomainrequest.ontimeout = function() {\n var msg = 'Request timed out';\n var code = 'ETIMEDOUT';\n callback(_newRetriableError(msg, code));\n };\n xdomainrequest.onerror = function() {\n callback(new Error('Error during request'));\n };\n xdomainrequest.onload = function() {\n var parseResponse = _.jsonParse(xdomainrequest.responseText);\n callback(parseResponse.error, parseResponse.value);\n };\n xdomainrequest.open(method, url, true);\n xdomainrequest.send(data);\n } else {\n callback(new Error('Cannot find a method to transport a request'));\n }\n }\n } catch (e2) {\n callback(e2);\n }\n}\n\nfunction _createXMLHTTPObject() {\n /* global ActiveXObject:false */\n\n var factories = [\n function () {\n return new XMLHttpRequest();\n },\n function () {\n return new ActiveXObject('Msxml2.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Msxml3.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Microsoft.XMLHTTP');\n }\n ];\n var xmlhttp;\n var i;\n var numFactories = factories.length;\n for (i = 0; i < numFactories; i++) {\n /* eslint-disable no-empty */\n try {\n xmlhttp = factories[i]();\n break;\n } catch (e) {\n // pass\n }\n /* eslint-enable no-empty */\n }\n return xmlhttp;\n}\n\nfunction _isSuccess(r) {\n return r && r.status && r.status === 200;\n}\n\nfunction _isNormalFailure(r) {\n return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;\n}\n\nfunction _newRetriableError(message, code) {\n var err = new Error(message);\n err.code = code || 'ENOTFOUND';\n return err;\n}\n\nmodule.exports = Transport;\n","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('../errorParser');\nvar logger = require('./logger');\n\nfunction handleDomException(item, options, callback) {\n if(item.err && errorParser.Stack(item.err).name === 'DOMException') {\n var originalError = new Error();\n originalError.name = item.err.name;\n originalError.message = item.err.message;\n originalError.stack = item.err.stack;\n originalError.nested = item.err;\n item.err = originalError;\n }\n callback(null, item);\n}\n\nfunction handleItemWithError(item, options, callback) {\n item.data = item.data || {};\n if (item.err) {\n try {\n item.stackInfo = item.err._savedStackTrace || errorParser.parse(item.err, item.skipFrames);\n\n if (options.addErrorContext) {\n addErrorContext(item);\n }\n } catch (e) {\n logger.error('Error while parsing the error object.', e);\n try {\n item.message = item.err.message || item.err.description || item.message || String(item.err);\n } catch (e2) {\n item.message = String(item.err) || String(e2);\n }\n delete item.err;\n }\n }\n callback(null, item);\n}\n\nfunction addErrorContext(item) {\n var chain = [];\n var err = item.err;\n\n chain.push(err);\n\n while (err.nested) {\n err = err.nested;\n chain.push(err);\n }\n\n _.addErrorContext(item, chain);\n}\n\nfunction ensureItemHasSomethingToSay(item, options, callback) {\n if (!item.message && !item.stackInfo && !item.custom) {\n callback(new Error('No message, stack info, or custom data'), null);\n }\n callback(null, item);\n}\n\nfunction addBaseInfo(item, options, callback) {\n var environment = (options.payload && options.payload.environment) || options.environment;\n item.data = _.merge(item.data, {\n environment: environment,\n level: item.level,\n endpoint: options.endpoint,\n platform: 'browser',\n framework: 'browser-js',\n language: 'javascript',\n server: {},\n uuid: item.uuid,\n notifier: {\n name: 'rollbar-browser-js',\n version: options.version\n },\n custom: item.custom\n });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.location) {\n return callback(null, item);\n }\n var remoteString = '$remote_ip';\n if (!options.captureIp) {\n remoteString = null;\n } else if (options.captureIp !== true) {\n remoteString += '_anonymize';\n }\n _.set(item, 'data.request', {\n url: window.location.href,\n query_string: window.location.search,\n user_ip: remoteString\n });\n callback(null, item);\n };\n}\n\nfunction addClientInfo(window) {\n return function(item, options, callback) {\n if (!window) {\n return callback(null, item);\n }\n var nav = window.navigator || {};\n var scr = window.screen || {};\n _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: nav.userAgent,\n language: nav.language,\n cookie_enabled: nav.cookieEnabled,\n screen: {\n width: scr.width,\n height: scr.height\n }\n }\n });\n callback(null, item);\n };\n}\n\nfunction addPluginInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.navigator) {\n return callback(null, item);\n }\n var plugins = [];\n var navPlugins = window.navigator.plugins || [];\n var cur;\n for (var i=0, l=navPlugins.length; i < l; ++i) {\n cur = navPlugins[i];\n plugins.push({name: cur.name, description: cur.description});\n }\n _.set(item, 'data.client.javascript.plugins', plugins);\n callback(null, item);\n };\n}\n\nfunction addBody(item, options, callback) {\n if (item.stackInfo) {\n if (item.stackInfo.traceChain) {\n addBodyTraceChain(item, options, callback);\n } else {\n addBodyTrace(item, options, callback);\n }\n } else {\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction addBodyMessage(item, options, callback) {\n var message = item.message;\n var custom = item.custom;\n\n if (!message) {\n message = 'Item sent with null or missing arguments.';\n }\n var result = {\n body: message\n };\n\n if (custom) {\n result.extra = _.merge(custom);\n }\n\n _.set(item, 'data.body', {message: result});\n callback(null, item);\n}\n\nfunction stackFromItem(item) {\n // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = item.stackInfo.stack;\n if (stack && stack.length === 0 && item._unhandledStackInfo && item._unhandledStackInfo.stack) {\n stack = item._unhandledStackInfo.stack;\n }\n return stack;\n}\n\nfunction addBodyTraceChain(item, options, callback) {\n var traceChain = item.stackInfo.traceChain;\n var traces = [];\n\n var traceChainLength = traceChain.length;\n for (var i = 0; i < traceChainLength; i++) {\n var trace = buildTrace(item, traceChain[i], options);\n traces.push(trace);\n }\n\n _.set(item, 'data.body', {trace_chain: traces});\n callback(null, item);\n}\n\nfunction addBodyTrace(item, options, callback) {\n var stack = stackFromItem(item);\n\n if (stack) {\n var trace = buildTrace(item, item.stackInfo, options);\n _.set(item, 'data.body', {trace: trace});\n callback(null, item);\n } else {\n var stackInfo = item.stackInfo;\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction buildTrace(item, stackInfo, options) {\n var description = item && item.data.description;\n var custom = item && item.custom;\n var stack = stackFromItem(item);\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n var trace = {\n exception: {\n 'class': className,\n message: message\n }\n };\n\n if (description) {\n trace.exception.description = description;\n }\n\n if (stack) {\n if (stack.length === 0) {\n trace.exception.stack = stackInfo.rawStack;\n trace.exception.raw = String(stackInfo.rawException);\n }\n var stackFrame;\n var frame;\n var code;\n var pre;\n var post;\n var contextLength;\n var i, mid;\n\n trace.frames = [];\n for (i = 0; i < stack.length; ++i) {\n stackFrame = stack[i];\n frame = {\n filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',\n lineno: stackFrame.line || null,\n method: (!stackFrame.func || stackFrame.func === '?') ? '[anonymous]' : stackFrame.func,\n colno: stackFrame.column\n };\n if (options.sendFrameUrl) {\n frame.url = stackFrame.url;\n }\n if (frame.method && frame.method.endsWith && frame.method.endsWith('_rollbar_wrapped')) {\n continue;\n }\n\n code = pre = post = null;\n contextLength = stackFrame.context ? stackFrame.context.length : 0;\n if (contextLength) {\n mid = Math.floor(contextLength / 2);\n pre = stackFrame.context.slice(0, mid);\n code = stackFrame.context[mid];\n post = stackFrame.context.slice(mid);\n }\n\n if (code) {\n frame.code = code;\n }\n\n if (pre || post) {\n frame.context = {};\n if (pre && pre.length) {\n frame.context.pre = pre;\n }\n if (post && post.length) {\n frame.context.post = post;\n }\n }\n\n if (stackFrame.args) {\n frame.args = stackFrame.args;\n }\n\n trace.frames.push(frame);\n }\n\n // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last\n trace.frames.reverse();\n\n if (custom) {\n trace.extra = _.merge(custom);\n }\n }\n\n return trace;\n}\n\nfunction errorClass(stackInfo, guess, options) {\n if (stackInfo.name) {\n return stackInfo.name;\n } else if (options.guessErrorClass) {\n return guess;\n } else {\n return '(unknown)';\n }\n}\n\nfunction addScrubber(scrubFn) {\n return function (item, options, callback) {\n if (scrubFn) {\n var scrubFields = options.scrubFields || [];\n var scrubPaths = options.scrubPaths || [];\n item.data = scrubFn(item.data, scrubFields, scrubPaths);\n }\n callback(null, item);\n }\n}\n\nmodule.exports = {\n handleDomException: handleDomException,\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n addScrubber: addScrubber\n};\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('error-stack-parser', ['stackframe'], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory(require('stackframe'));\n } else {\n root.ErrorStackParser = factory(root.StackFrame);\n }\n}(this, function ErrorStackParser(StackFrame) {\n 'use strict';\n\n var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\\S+:\\d+/;\n var CHROME_IE_STACK_REGEXP = /^\\s*at .*(\\S+:\\d+|\\(native\\))/m;\n var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\\[native code])?$/;\n\n return {\n /**\n * Given an Error object, extract the most information from it.\n *\n * @param {Error} error object\n * @return {Array} of StackFrames\n */\n parse: function ErrorStackParser$$parse(error) {\n if (typeof error.stacktrace !== 'undefined' || typeof error['opera#sourceloc'] !== 'undefined') {\n return this.parseOpera(error);\n } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {\n return this.parseV8OrIE(error);\n } else if (error.stack) {\n return this.parseFFOrSafari(error);\n } else {\n throw new Error('Cannot parse given Error object');\n }\n },\n\n // Separate line and column numbers from a string of the form: (URI:Line:Column)\n extractLocation: function ErrorStackParser$$extractLocation(urlLike) {\n // Fail-fast but return locations like \"(native)\"\n if (urlLike.indexOf(':') === -1) {\n return [urlLike];\n }\n\n var regExp = /(.+?)(?::(\\d+))?(?::(\\d+))?$/;\n var parts = regExp.exec(urlLike.replace(/[()]/g, ''));\n return [parts[1], parts[2] || undefined, parts[3] || undefined];\n },\n\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(CHROME_IE_STACK_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n if (line.indexOf('(eval ') > -1) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n line = line.replace(/eval code/g, 'eval').replace(/(\\(eval at [^()]*)|(\\),.*$)/g, '');\n }\n var sanitizedLine = line.replace(/^\\s+/, '').replace(/\\(eval code/g, '(');\n\n // capture and preseve the parenthesized location \"(/foo/my bar.js:12:87)\" in\n // case it has spaces in it, as the string is split on \\s+ later on\n var location = sanitizedLine.match(/ (\\((.+):(\\d+):(\\d+)\\)$)/);\n\n // remove the parenthesized location from the line, if it was matched\n sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;\n\n var tokens = sanitizedLine.split(/\\s+/).slice(1);\n // if a location was matched, pass it to extractLocation() otherwise pop the last token\n var locationParts = this.extractLocation(location ? location[1] : tokens.pop());\n var functionName = tokens.join(' ') || undefined;\n var fileName = ['eval', ''].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];\n\n return new StackFrame({\n functionName: functionName,\n fileName: fileName,\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n },\n\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n if (line.indexOf(' > eval') > -1) {\n line = line.replace(/ line (\\d+)(?: > eval line \\d+)* > eval:\\d+:\\d+/g, ':$1');\n }\n\n if (line.indexOf('@') === -1 && line.indexOf(':') === -1) {\n // Safari eval frames only have function names and nothing else\n return new StackFrame({\n functionName: line\n });\n } else {\n var functionNameRegex = /((.*\".+\"[^@]*)?[^@]*)(?:@)/;\n var matches = line.match(functionNameRegex);\n var functionName = matches && matches[1] ? matches[1] : undefined;\n var locationParts = this.extractLocation(line.replace(functionNameRegex, ''));\n\n return new StackFrame({\n functionName: functionName,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }\n }, this);\n },\n\n parseOpera: function ErrorStackParser$$parseOpera(e) {\n if (!e.stacktrace || (e.message.indexOf('\\n') > -1 &&\n e.message.split('\\n').length > e.stacktrace.split('\\n').length)) {\n return this.parseOpera9(e);\n } else if (!e.stack) {\n return this.parseOpera10(e);\n } else {\n return this.parseOpera11(e);\n }\n },\n\n parseOpera9: function ErrorStackParser$$parseOpera9(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)/i;\n var lines = e.message.split('\\n');\n var result = [];\n\n for (var i = 2, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(new StackFrame({\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n }));\n }\n }\n\n return result;\n },\n\n parseOpera10: function ErrorStackParser$$parseOpera10(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)(?:: In function (\\S+))?$/i;\n var lines = e.stacktrace.split('\\n');\n var result = [];\n\n for (var i = 0, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(\n new StackFrame({\n functionName: match[3] || undefined,\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n })\n );\n }\n }\n\n return result;\n },\n\n // Opera 10.65+ Error.stack very similar to FF/Safari\n parseOpera11: function ErrorStackParser$$parseOpera11(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);\n }, this);\n\n return filtered.map(function(line) {\n var tokens = line.split('@');\n var locationParts = this.extractLocation(tokens.pop());\n var functionCall = (tokens.shift() || '');\n var functionName = functionCall\n .replace(//, '$2')\n .replace(/\\([^)]*\\)/g, '') || undefined;\n var argsRaw;\n if (functionCall.match(/\\(([^)]*)\\)/)) {\n argsRaw = functionCall.replace(/^[^(]+\\(([^)]*)\\)$/, '$1');\n }\n var args = (argsRaw === undefined || argsRaw === '[arguments not available]') ?\n undefined : argsRaw.split(',');\n\n return new StackFrame({\n functionName: functionName,\n args: args,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n }\n };\n}));\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('stackframe', [], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.StackFrame = factory();\n }\n}(this, function() {\n 'use strict';\n function _isNumber(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n }\n\n function _capitalize(str) {\n return str.charAt(0).toUpperCase() + str.substring(1);\n }\n\n function _getter(p) {\n return function() {\n return this[p];\n };\n }\n\n var booleanProps = ['isConstructor', 'isEval', 'isNative', 'isToplevel'];\n var numericProps = ['columnNumber', 'lineNumber'];\n var stringProps = ['fileName', 'functionName', 'source'];\n var arrayProps = ['args'];\n var objectProps = ['evalOrigin'];\n\n var props = booleanProps.concat(numericProps, stringProps, arrayProps, objectProps);\n\n function StackFrame(obj) {\n if (!obj) return;\n for (var i = 0; i < props.length; i++) {\n if (obj[props[i]] !== undefined) {\n this['set' + _capitalize(props[i])](obj[props[i]]);\n }\n }\n }\n\n StackFrame.prototype = {\n getArgs: function() {\n return this.args;\n },\n setArgs: function(v) {\n if (Object.prototype.toString.call(v) !== '[object Array]') {\n throw new TypeError('Args must be an Array');\n }\n this.args = v;\n },\n\n getEvalOrigin: function() {\n return this.evalOrigin;\n },\n setEvalOrigin: function(v) {\n if (v instanceof StackFrame) {\n this.evalOrigin = v;\n } else if (v instanceof Object) {\n this.evalOrigin = new StackFrame(v);\n } else {\n throw new TypeError('Eval Origin must be an Object or StackFrame');\n }\n },\n\n toString: function() {\n var fileName = this.getFileName() || '';\n var lineNumber = this.getLineNumber() || '';\n var columnNumber = this.getColumnNumber() || '';\n var functionName = this.getFunctionName() || '';\n if (this.getIsEval()) {\n if (fileName) {\n return '[eval] (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return '[eval]:' + lineNumber + ':' + columnNumber;\n }\n if (functionName) {\n return functionName + ' (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return fileName + ':' + lineNumber + ':' + columnNumber;\n }\n };\n\n StackFrame.fromString = function StackFrame$$fromString(str) {\n var argsStartIndex = str.indexOf('(');\n var argsEndIndex = str.lastIndexOf(')');\n\n var functionName = str.substring(0, argsStartIndex);\n var args = str.substring(argsStartIndex + 1, argsEndIndex).split(',');\n var locationString = str.substring(argsEndIndex + 1);\n\n if (locationString.indexOf('@') === 0) {\n var parts = /@(.+?)(?::(\\d+))?(?::(\\d+))?$/.exec(locationString, '');\n var fileName = parts[1];\n var lineNumber = parts[2];\n var columnNumber = parts[3];\n }\n\n return new StackFrame({\n functionName: functionName,\n args: args || undefined,\n fileName: fileName,\n lineNumber: lineNumber || undefined,\n columnNumber: columnNumber || undefined\n });\n };\n\n for (var i = 0; i < booleanProps.length; i++) {\n StackFrame.prototype['get' + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);\n StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function(p) {\n return function(v) {\n this[p] = Boolean(v);\n };\n })(booleanProps[i]);\n }\n\n for (var j = 0; j < numericProps.length; j++) {\n StackFrame.prototype['get' + _capitalize(numericProps[j])] = _getter(numericProps[j]);\n StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function(p) {\n return function(v) {\n if (!_isNumber(v)) {\n throw new TypeError(p + ' must be a Number');\n }\n this[p] = Number(v);\n };\n })(numericProps[j]);\n }\n\n for (var k = 0; k < stringProps.length; k++) {\n StackFrame.prototype['get' + _capitalize(stringProps[k])] = _getter(stringProps[k]);\n StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function(p) {\n return function(v) {\n this[p] = String(v);\n };\n })(stringProps[k]);\n }\n\n return StackFrame;\n}));\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction itemToPayload(item, options, callback) {\n var payloadOptions = options.payload || {};\n if (payloadOptions.body) {\n delete payloadOptions.body;\n }\n\n var data = _.merge(item.data, payloadOptions);\n if (item._isUncaught) {\n data._isUncaught = true;\n }\n if (item._originalArgs) {\n data._originalArgs = item._originalArgs;\n }\n callback(null, data);\n}\n\nfunction addTelemetryData(item, options, callback) {\n if (item.telemetryEvents) {\n _.set(item, 'data.body.telemetry', item.telemetryEvents);\n }\n callback(null, item);\n}\n\nfunction addMessageWithError(item, options, callback) {\n if (!item.message) {\n callback(null, item);\n return;\n }\n var tracePath = 'data.body.trace_chain.0';\n var trace = _.get(item, tracePath);\n if (!trace) {\n tracePath = 'data.body.trace';\n trace = _.get(item, tracePath);\n }\n if (trace) {\n if (!(trace.exception && trace.exception.description)) {\n _.set(item, tracePath+'.exception.description', item.message);\n callback(null, item);\n return;\n }\n var extra = _.get(item, tracePath+'.extra') || {};\n var newExtra = _.merge(extra, {message: item.message});\n _.set(item, tracePath+'.extra', newExtra);\n }\n callback(null, item);\n}\n\nfunction userTransform(logger) {\n return function(item, options, callback) {\n var newItem = _.merge(item);\n var response = null;\n try {\n if (_.isFunction(options.transform)) {\n response = options.transform(newItem.data, item);\n }\n } catch (e) {\n options.transform = null;\n logger.error('Error while calling custom transform() function. Removing custom transform().', e);\n callback(null, item);\n return;\n }\n if(_.isPromise(response)) {\n response.then(function (promisedItem) {\n if(promisedItem) {\n newItem.data = promisedItem;\n }\n callback(null, newItem);\n }, function (error) {\n callback(error, item);\n });\n } else {\n callback(null, newItem);\n }\n }\n}\n\nfunction addConfigToPayload(item, options, callback) {\n if (!options.sendConfig) {\n return callback(null, item);\n }\n var configKey = '_rollbarConfig';\n var custom = _.get(item, 'data.custom') || {};\n custom[configKey] = options;\n item.data.custom = custom;\n callback(null, item);\n}\n\nfunction addFunctionOption(options, name) {\n if(_.isFunction(options[name])) {\n options[name] = options[name].toString();\n }\n}\n\nfunction addConfiguredOptions(item, options, callback) {\n var configuredOptions = options._configuredOptions;\n\n // These must be stringified or they'll get dropped during serialization.\n addFunctionOption(configuredOptions, 'transform');\n addFunctionOption(configuredOptions, 'checkIgnore');\n addFunctionOption(configuredOptions, 'onSendCallback');\n\n delete configuredOptions.accessToken;\n item.data.notifier.configured_options = configuredOptions;\n callback(null, item);\n}\n\nfunction addDiagnosticKeys(item, options, callback) {\n var diagnostic = _.merge(item.notifier.client.notifier.diagnostic, item.diagnostic);\n\n if (_.get(item, 'err._isAnonymous')) {\n diagnostic.is_anonymous = true;\n }\n\n if (item._isUncaught) {\n diagnostic.is_uncaught = item._isUncaught;\n }\n\n if (item.err) {\n try {\n diagnostic.raw_error = {\n message: item.err.message,\n name: item.err.name,\n constructor_name: item.err.constructor && item.err.constructor.name,\n filename: item.err.fileName,\n line: item.err.lineNumber,\n column: item.err.columnNumber,\n stack: item.err.stack\n };\n } catch (e) {\n diagnostic.raw_error = { failed: String(e) };\n }\n }\n\n item.data.notifier.diagnostic = _.merge(item.data.notifier.diagnostic, diagnostic);\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError,\n userTransform: userTransform,\n addConfigToPayload: addConfigToPayload,\n addConfiguredOptions: addConfiguredOptions,\n addDiagnosticKeys: addDiagnosticKeys\n};\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction checkIgnore(item, settings) {\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore\n};\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction checkLevel(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = settings.reportLevel;\n var reportLevelVal = _.LEVELS[reportLevel] || 0;\n\n if (levelVal < reportLevelVal) {\n return false;\n }\n return true;\n}\n\nfunction userCheckIgnore(logger) {\n return function(item, settings) {\n var isUncaught = !!item._isUncaught;\n delete item._isUncaught;\n var args = item._originalArgs;\n delete item._originalArgs;\n try {\n if (_.isFunction(settings.onSendCallback)) {\n settings.onSendCallback(isUncaught, args, item);\n }\n } catch (e) {\n settings.onSendCallback = null;\n logger.error('Error while calling onSendCallback, removing', e);\n }\n try {\n if (_.isFunction(settings.checkIgnore) && settings.checkIgnore(isUncaught, args, item)) {\n return false;\n }\n } catch (e) {\n settings.checkIgnore = null;\n logger.error('Error while calling custom checkIgnore(), removing', e);\n }\n return true;\n }\n}\n\nfunction urlIsNotBlockListed(logger) {\n return function(item, settings) {\n return !urlIsOnAList(item, settings, 'blocklist', logger);\n }\n}\n\nfunction urlIsSafeListed(logger) {\n return function(item, settings) {\n return urlIsOnAList(item, settings, 'safelist', logger);\n }\n}\n\nfunction matchFrames(trace, list, block) {\n if (!trace) { return !block }\n\n var frames = trace.frames;\n\n if (!frames || frames.length === 0) { return !block; }\n\n var frame, filename, url, urlRegex;\n var listLength = list.length;\n var frameLength = frames.length;\n for (var i = 0; i < frameLength; i++) {\n frame = frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) { return !block; }\n\n for (var j = 0; j < listLength; j++) {\n url = list[j];\n urlRegex = new RegExp(url);\n\n if (urlRegex.test(filename)) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction urlIsOnAList(item, settings, safeOrBlock, logger) {\n // safelist is the default\n var block = false;\n if (safeOrBlock === 'blocklist') {\n block = true;\n }\n\n var list, traces;\n try {\n list = block ? settings.hostBlockList : settings.hostSafeList;\n traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];\n\n // These two checks are important to come first as they are defaults\n // in case the list is missing or the trace is missing or not well-formed\n if (!list || list.length === 0) {\n return !block;\n }\n if (traces.length === 0 || !traces[0]) {\n return !block;\n }\n\n var tracesLength = traces.length;\n for (var i = 0; i < tracesLength; i++) {\n if(matchFrames(traces[i], list, block)) {\n return true;\n }\n }\n } catch (e)\n /* istanbul ignore next */\n {\n if (block) {\n settings.hostBlockList = null;\n } else {\n settings.hostSafeList = null;\n }\n var listName = block ? 'hostBlockList' : 'hostSafeList';\n logger.error('Error while reading your configuration\\'s ' + listName + ' option. Removing custom ' + listName + '.', e);\n return !block;\n }\n return false;\n}\n\nfunction messageIsIgnored(logger) {\n return function(item, settings) {\n var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n messages = messagesFromItem(item);\n\n if (messages.length === 0){\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n\n for (j = 0; j < messages.length; j++) {\n messageIsIgnored = rIgnoredMessage.test(messages[j]);\n\n if (messageIsIgnored) {\n return false;\n }\n }\n }\n } catch(e)\n /* istanbul ignore next */\n {\n settings.ignoredMessages = null;\n logger.error('Error while reading your configuration\\'s ignoredMessages option. Removing custom ignoredMessages.');\n }\n\n return true;\n }\n}\n\nfunction messagesFromItem(item) {\n var body = item.body;\n var messages = [];\n\n // The payload schema only allows one of trace_chain, message, or trace.\n // However, existing test cases are based on having both trace and message present.\n // So here we preserve the ability to collect strings from any combination of these keys.\n if (body.trace_chain) {\n var traceChain = body.trace_chain;\n for (var i = 0; i < traceChain.length; i++) {\n var trace = traceChain[i];\n messages.push(_.get(trace, 'exception.message'));\n }\n }\n if (body.trace) {\n messages.push(_.get(body, 'trace.exception.message'));\n }\n if (body.message) {\n messages.push(_.get(body, 'message.body'));\n }\n return messages;\n}\n\nmodule.exports = {\n checkLevel: checkLevel,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlockListed: urlIsNotBlockListed,\n urlIsSafeListed: urlIsSafeListed,\n messageIsIgnored: messageIsIgnored\n};\n","'use strict';\n\nmodule.exports = {\n version: '2.24.0',\n endpoint: 'api.rollbar.com/api/1/item/',\n logLevel: 'debug',\n reportLevel: 'debug',\n uncaughtErrorLevel: 'error',\n maxItems: 0,\n itemsPerMin: 60\n}\n","'use strict';\n\nmodule.exports = {\n scrubFields: [\n 'pw',\n 'pass',\n 'passwd',\n 'password',\n 'secret',\n 'confirm_password',\n 'confirmPassword',\n 'password_confirmation',\n 'passwordConfirmation',\n 'access_token',\n 'accessToken',\n 'X-Rollbar-Access-Token',\n 'secret_key',\n 'secretKey',\n 'secretToken',\n 'cc-number',\n 'card number',\n 'cardnumber',\n 'cardnum',\n 'ccnum',\n 'ccnumber',\n 'cc num',\n 'creditcardnumber',\n 'credit card number',\n 'newcreditcardnumber',\n 'new credit card',\n 'creditcardno',\n 'credit card no',\n 'card#',\n 'card #',\n 'cc-csc',\n 'cvc',\n 'cvc2',\n 'cvv2',\n 'ccv2',\n 'security code',\n 'card verification',\n 'name on credit card',\n 'name on card',\n 'nameoncard',\n 'cardholder',\n 'card holder',\n 'name des karteninhabers',\n 'ccname',\n 'card type',\n 'cardtype',\n 'cc type',\n 'cctype',\n 'payment type',\n 'expiration date',\n 'expirationdate',\n 'expdate',\n 'cc-exp',\n 'ccmonth',\n 'ccyear'\n ]\n}\n","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.merge(options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n}\n\nTelemeter.prototype.configure = function(options) {\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n var deleteCount = 0;\n if (this.maxQueueSize > newMaxEvents) {\n deleteCount = this.maxQueueSize - newMaxEvents;\n }\n this.maxQueueSize = newMaxEvents;\n this.queue.splice(0, deleteCount);\n};\n\nTelemeter.prototype.copyEvents = function() {\n var events = Array.prototype.slice.call(this.queue, 0);\n if (_.isFunction(this.options.filterTelemetry)) {\n try {\n var i = events.length;\n while (i--) {\n if (this.options.filterTelemetry(events[i])) {\n events.splice(i, 1);\n }\n }\n } catch (e) {\n this.options.filterTelemetry = null;\n }\n }\n return events;\n};\n\nTelemeter.prototype.capture = function(type, metadata, level, rollbarUUID, timestamp) {\n var e = {\n level: getLevel(type, level),\n type: type,\n timestamp_ms: timestamp || _.now(),\n body: metadata,\n source: 'client'\n };\n if (rollbarUUID) {\n e.uuid = rollbarUUID;\n }\n\n try {\n if (_.isFunction(this.options.filterTelemetry) && this.options.filterTelemetry(e)) {\n return false;\n }\n } catch (exc) {\n this.options.filterTelemetry = null;\n }\n\n this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function(type, metadata, level, rollbarUUID) {\n return this.capture(type, metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.captureError = function(err, level, rollbarUUID, timestamp) {\n var metadata = {\n message: err.message || String(err)\n };\n if (err.stack) {\n metadata.stack = err.stack;\n }\n return this.capture('error', metadata, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureLog = function(message, level, rollbarUUID, timestamp) {\n return this.capture('log', {\n message: message\n }, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID, requestData) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\n if (requestData) {\n metadata.request = requestData;\n }\n var level = this.levelFromStatus(metadata.status_code);\n return this.capture('network', metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.levelFromStatus = function(statusCode) {\n if (statusCode >= 200 && statusCode < 400) {\n return 'info';\n }\n if (statusCode === 0 || statusCode >= 400) {\n return 'error';\n }\n return 'info';\n};\n\nTelemeter.prototype.captureDom = function(subtype, element, value, checked, rollbarUUID) {\n var metadata = {\n subtype: subtype,\n element: element\n };\n if (value !== undefined) {\n metadata.value = value;\n }\n if (checked !== undefined) {\n metadata.checked = checked;\n }\n return this.capture('dom', metadata, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureNavigation = function(from, to, rollbarUUID) {\n return this.capture('navigation', {from: from, to: to}, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureDomContentLoaded = function(ts) {\n return this.capture('navigation', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n */\n};\nTelemeter.prototype.captureLoad = function(ts) {\n return this.capture('navigation', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n */\n};\n\nTelemeter.prototype.captureConnectivityChange = function(type, rollbarUUID) {\n return this.captureNetwork({change: type}, 'connectivity', rollbarUUID);\n};\n\n// Only intended to be used internally by the notifier\nTelemeter.prototype._captureRollbarItem = function(item) {\n if (!this.options.includeItemsInTelemetry) {\n return;\n }\n if (item.err) {\n return this.captureError(item.err, item.level, item.uuid, item.timestamp);\n }\n if (item.message) {\n return this.captureLog(item.message, item.level, item.uuid, item.timestamp);\n }\n if (item.custom) {\n return this.capture('log', item.custom, item.level, item.uuid, item.timestamp);\n }\n};\n\nTelemeter.prototype.push = function(e) {\n this.queue.push(e);\n if (this.queue.length > this.maxQueueSize) {\n this.queue.shift();\n }\n};\n\nfunction getLevel(type, level) {\n if (level) {\n return level;\n }\n var defaultLevel = {\n error: 'error',\n manual: 'info'\n };\n return defaultLevel[type] || 'info';\n}\n\nmodule.exports = Telemeter;\n","'use strict';\n\nvar _ = require('../utility');\nvar scrub = require('../scrub');\nvar urlparser = require('./url');\nvar domUtil = require('./domUtility');\n\nvar defaults = {\n network: true,\n networkResponseHeaders: false,\n networkResponseBody: false,\n networkRequestHeaders: false,\n networkRequestBody: false,\n networkErrorOnHttp5xx: false,\n networkErrorOnHttp4xx: false,\n networkErrorOnHttp0: false,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true,\n contentSecurityPolicy: true,\n errorOnContentSecurityPolicy: false\n};\n\nfunction replace(obj, name, replacement, replacements, type) {\n var orig = obj[name];\n obj[name] = replacement(orig);\n if (replacements) {\n replacements[type].push([obj, name, orig]);\n }\n}\n\nfunction restore(replacements, type) {\n var b;\n while (replacements[type].length) {\n b = replacements[type].shift();\n b[0][b[1]] = b[2];\n }\n}\n\nfunction nameFromDescription(description) {\n if (!description || !description.attributes) { return null; }\n var attrs = description.attributes;\n for (var a = 0; a < attrs.length; ++a) {\n if (attrs[a].key === 'name') {\n return attrs[a].value;\n }\n }\n return null;\n}\n\nfunction defaultValueScrubber(scrubFields) {\n var patterns = [];\n for (var i = 0; i < scrubFields.length; ++i) {\n patterns.push(new RegExp(scrubFields[i], 'i'));\n }\n return function(description) {\n var name = nameFromDescription(description);\n if (!name) { return false; }\n for (var i = 0; i < patterns.length; ++i) {\n if (patterns[i].test(name)) {\n return true;\n }\n }\n return false;\n };\n}\n\nfunction Instrumenter(options, telemeter, rollbar, _window, _document) {\n this.options = options;\n var autoInstrument = options.autoInstrument;\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);\n this.telemeter = telemeter;\n this.rollbar = rollbar;\n this.diagnostic = rollbar.client.notifier.diagnostic;\n this._window = _window || {};\n this._document = _document || {};\n this.replacements = {\n network: [],\n log: [],\n navigation: [],\n connectivity: []\n };\n this.eventRemovers = {\n dom: [],\n connectivity: [],\n contentsecuritypolicy: []\n };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function(options) {\n this.options = _.merge(this.options, options);\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.merge(this.autoInstrument);\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n if (options.scrubTelemetryInputs !== undefined) {\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n }\n if (options.telemetryScrubber !== undefined) {\n this.telemetryScrubber = options.telemetryScrubber;\n }\n};\n\n// eslint-disable-next-line complexity\nInstrumenter.prototype.instrument = function(oldSettings) {\n if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {\n this.instrumentNetwork();\n } else if (!this.autoInstrument.network && oldSettings && oldSettings.network) {\n this.deinstrumentNetwork();\n }\n\n if (this.autoInstrument.log && !(oldSettings && oldSettings.log)) {\n this.instrumentConsole();\n } else if (!this.autoInstrument.log && oldSettings && oldSettings.log) {\n this.deinstrumentConsole();\n }\n\n if (this.autoInstrument.dom && !(oldSettings && oldSettings.dom)) {\n this.instrumentDom();\n } else if (!this.autoInstrument.dom && oldSettings && oldSettings.dom) {\n this.deinstrumentDom();\n }\n\n if (this.autoInstrument.navigation && !(oldSettings && oldSettings.navigation)) {\n this.instrumentNavigation();\n } else if (!this.autoInstrument.navigation && oldSettings && oldSettings.navigation) {\n this.deinstrumentNavigation();\n }\n\n if (this.autoInstrument.connectivity && !(oldSettings && oldSettings.connectivity)) {\n this.instrumentConnectivity();\n } else if (!this.autoInstrument.connectivity && oldSettings && oldSettings.connectivity) {\n this.deinstrumentConnectivity();\n }\n\n if (this.autoInstrument.contentSecurityPolicy && !(oldSettings && oldSettings.contentSecurityPolicy)) {\n this.instrumentContentSecurityPolicy();\n } else if (!this.autoInstrument.contentSecurityPolicy && oldSettings && oldSettings.contentSecurityPolicy) {\n this.deinstrumentContentSecurityPolicy();\n }\n};\n\nInstrumenter.prototype.deinstrumentNetwork = function() {\n restore(this.replacements, 'network');\n};\n\nInstrumenter.prototype.instrumentNetwork = function() {\n var self = this;\n\n function wrapProp(prop, xhr) {\n if (prop in xhr && _.isFunction(xhr[prop])) {\n replace(xhr, prop, function(orig) {\n return self.rollbar.wrap(orig);\n });\n }\n }\n\n if ('XMLHttpRequest' in this._window) {\n var xhrp = this._window.XMLHttpRequest.prototype;\n replace(xhrp, 'open', function(orig) {\n return function(method, url) {\n if (_.isType(url, 'string')) {\n if (this.__rollbar_xhr) {\n this.__rollbar_xhr.method = method;\n this.__rollbar_xhr.url = url;\n this.__rollbar_xhr.status_code = null;\n this.__rollbar_xhr.start_time_ms = _.now();\n this.__rollbar_xhr.end_time_ms = null;\n } else {\n this.__rollbar_xhr = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'setRequestHeader', function(orig) {\n return function(header, value) {\n // If xhr.open is async, __rollbar_xhr may not be initialized yet.\n if (!this.__rollbar_xhr) {\n this.__rollbar_xhr = {};\n }\n if (_.isType(header, 'string') && _.isType(value, 'string')) {\n if (self.autoInstrument.networkRequestHeaders) {\n if (!this.__rollbar_xhr.request_headers) {\n this.__rollbar_xhr.request_headers = {};\n }\n this.__rollbar_xhr.request_headers[header] = value;\n }\n // We want the content type even if request header telemetry is off.\n if (header.toLowerCase() === 'content-type') {\n this.__rollbar_xhr.request_content_type = value;\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'send', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(data) {\n /* eslint-enable no-unused-vars */\n var xhr = this;\n\n function onreadystatechangeHandler() {\n if (xhr.__rollbar_xhr) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n if (self.autoInstrument.networkRequestBody) {\n xhr.__rollbar_xhr.request = data;\n }\n xhr.__rollbar_event = self.captureNetwork(xhr.__rollbar_xhr, 'xhr', undefined);\n }\n if (xhr.readyState < 2) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n }\n if (xhr.readyState > 3) {\n xhr.__rollbar_xhr.end_time_ms = _.now();\n\n var headers = null;\n xhr.__rollbar_xhr.response_content_type = xhr.getResponseHeader('Content-Type');\n if (self.autoInstrument.networkResponseHeaders) {\n var headersConfig = self.autoInstrument.networkResponseHeaders;\n headers = {};\n try {\n var header, i;\n if (headersConfig === true) {\n var allHeaders = xhr.getAllResponseHeaders();\n if (allHeaders) {\n var arr = allHeaders.trim().split(/[\\r\\n]+/);\n var parts, value;\n for (i=0; i < arr.length; i++) {\n parts = arr[i].split(': ');\n header = parts.shift();\n value = parts.join(': ');\n headers[header] = value;\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n header = headersConfig[i];\n headers[header] = xhr.getResponseHeader(header);\n }\n }\n } catch (e) {\n /* we ignore the errors here that could come from different\n * browser issues with the xhr methods */\n }\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n try {\n body = xhr.responseText;\n } catch (e) {\n /* ignore errors from reading responseText */\n }\n }\n var response = null;\n if (body || headers) {\n response = {};\n if (body) {\n if (self.isJsonContentType(xhr.__rollbar_xhr.response_content_type)) {\n response.body = self.scrubJson(body);\n } else {\n response.body = body;\n }\n }\n if (headers) {\n response.headers = headers;\n }\n }\n if (response) {\n xhr.__rollbar_xhr.response = response;\n }\n try {\n var code = xhr.status;\n code = code === 1223 ? 204 : code;\n xhr.__rollbar_xhr.status_code = code;\n xhr.__rollbar_event.level = self.telemeter.levelFromStatus(code);\n self.errorOnHttpStatus(xhr.__rollbar_xhr);\n } catch (e) {\n /* ignore possible exception from xhr.status */\n }\n }\n }\n }\n\n wrapProp('onload', xhr);\n wrapProp('onerror', xhr);\n wrapProp('onprogress', xhr);\n\n if ('onreadystatechange' in xhr && _.isFunction(xhr.onreadystatechange)) {\n replace(xhr, 'onreadystatechange', function(orig) {\n return self.rollbar.wrap(orig, undefined, onreadystatechangeHandler);\n });\n } else {\n xhr.onreadystatechange = onreadystatechangeHandler;\n }\n if (xhr.__rollbar_xhr && self.trackHttpErrors()) {\n xhr.__rollbar_xhr.stack = (new Error()).stack;\n }\n return orig.apply(this, arguments);\n }\n }, this.replacements, 'network');\n }\n\n if ('fetch' in this._window) {\n replace(this._window, 'fetch', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(fn, t) {\n /* eslint-enable no-unused-vars */\n var args = new Array(arguments.length);\n for (var i=0, len=args.length; i < len; i++) {\n args[i] = arguments[i];\n }\n var input = args[0];\n var method = 'GET';\n var url;\n if (_.isType(input, 'string')) {\n url = input;\n } else if (input) {\n url = input.url;\n if (input.method) {\n method = input.method;\n }\n }\n if (args[1] && args[1].method) {\n method = args[1].method;\n }\n var metadata = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n if (args[1] && args[1].headers) {\n // Argument may be a Headers object, or plain object. Ensure here that\n // we are working with a Headers object with case-insensitive keys.\n var reqHeaders = new Headers(args[1].headers);\n\n metadata.request_content_type = reqHeaders.get('Content-Type');\n\n if (self.autoInstrument.networkRequestHeaders) {\n metadata.request_headers = self.fetchHeaders(reqHeaders, self.autoInstrument.networkRequestHeaders)\n }\n }\n\n if (self.autoInstrument.networkRequestBody) {\n if (args[1] && args[1].body) {\n metadata.request = args[1].body;\n } else if (args[0] && !_.isType(args[0], 'string') && args[0].body) {\n metadata.request = args[0].body;\n }\n }\n self.captureNetwork(metadata, 'fetch', undefined);\n if (self.trackHttpErrors()) {\n metadata.stack = (new Error()).stack;\n }\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n metadata.response_content_type = resp.headers.get('Content-Type');\n var headers = null;\n if (self.autoInstrument.networkResponseHeaders) {\n headers = self.fetchHeaders(resp.headers, self.autoInstrument.networkResponseHeaders);\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n if (typeof resp.text === 'function') { // Response.text() is not implemented on some platforms\n // The response must be cloned to prevent reading (and locking) the original stream.\n body = resp.clone().text(); //returns a Promise\n }\n }\n if (headers || body) {\n metadata.response = {};\n if (body) {\n // Test to ensure body is a Promise, which it should always be.\n if (typeof body.then === 'function') {\n body.then(function (text) {\n if (self.isJsonContentType(metadata.response_content_type)) {\n metadata.response.body = self.scrubJson(text);\n }\n });\n } else {\n metadata.response.body = body;\n }\n }\n if (headers) {\n metadata.response.headers = headers;\n }\n }\n self.errorOnHttpStatus(metadata);\n return resp;\n });\n };\n }, this.replacements, 'network');\n }\n};\n\nInstrumenter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID) {\n if (metadata.request && this.isJsonContentType(metadata.request_content_type)) {\n metadata.request = this.scrubJson(metadata.request);\n }\n return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);\n};\n\nInstrumenter.prototype.isJsonContentType = function(contentType) {\n return (contentType && _.isType(contentType, 'string') && contentType.toLowerCase().includes('json')) ? true : false;\n}\n\nInstrumenter.prototype.scrubJson = function(json) {\n return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));\n}\n\nInstrumenter.prototype.fetchHeaders = function(inHeaders, headersConfig) {\n var outHeaders = {};\n try {\n var i;\n if (headersConfig === true) {\n if (typeof inHeaders.entries === 'function') { // Headers.entries() is not implemented in IE\n var allHeaders = inHeaders.entries();\n var currentHeader = allHeaders.next();\n while (!currentHeader.done) {\n outHeaders[currentHeader.value[0]] = currentHeader.value[1];\n currentHeader = allHeaders.next();\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n var header = headersConfig[i];\n outHeaders[header] = inHeaders.get(header);\n }\n }\n } catch (e) {\n /* ignore probable IE errors */\n }\n return outHeaders;\n}\n\nInstrumenter.prototype.trackHttpErrors = function() {\n return this.autoInstrument.networkErrorOnHttp5xx ||\n this.autoInstrument.networkErrorOnHttp4xx ||\n this.autoInstrument.networkErrorOnHttp0;\n}\n\nInstrumenter.prototype.errorOnHttpStatus = function(metadata) {\n var status = metadata.status_code;\n\n if ((status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||\n (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||\n (status === 0 && this.autoInstrument.networkErrorOnHttp0)) {\n var error = new Error('HTTP request failed with Status ' + status);\n error.stack = metadata.stack;\n this.rollbar.error(error, { skipFrames: 1 });\n }\n}\n\nInstrumenter.prototype.deinstrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n var b;\n while (this.replacements['log'].length) {\n b = this.replacements['log'].shift();\n this._window.console[b[0]] = b[1];\n }\n};\n\nInstrumenter.prototype.instrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n\n var self = this;\n var c = this._window.console;\n\n function wrapConsole(method) {\n 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778\n\n var orig = c[method];\n var origConsole = c;\n var level = method === 'warn' ? 'warning' : method;\n c[method] = function() {\n var args = Array.prototype.slice.call(arguments);\n var message = _.formatArgsAsString(args);\n self.telemeter.captureLog(message, level);\n if (orig) {\n Function.prototype.apply.call(orig, origConsole, args);\n }\n };\n self.replacements['log'].push([method, orig]);\n }\n var methods = ['debug','info','warn','error','log'];\n try {\n for (var i=0, len=methods.length; i < len; i++) {\n wrapConsole(methods[i]);\n }\n } catch (e) {\n this.diagnostic.instrumentConsole = { error: e.message };\n }\n};\n\nInstrumenter.prototype.deinstrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n this.removeListeners('dom');\n};\n\nInstrumenter.prototype.instrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n var clickHandler = this.handleClick.bind(this);\n var blurHandler = this.handleBlur.bind(this);\n this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);\n this.addListener('dom', this._window, 'blur', 'onfocusout', blurHandler, true);\n};\n\nInstrumenter.prototype.handleClick = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n var hasTag = e && e.tagName;\n var anchorOrButton = domUtil.isDescribedElement(e, 'a') || domUtil.isDescribedElement(e, 'button');\n if (hasTag && (anchorOrButton || domUtil.isDescribedElement(e, 'input', ['button', 'submit']))) {\n this.captureDomEvent('click', e);\n } else if (domUtil.isDescribedElement(e, 'input', ['checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value, e.checked);\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleBlur = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n if (e && e.tagName) {\n if (domUtil.isDescribedElement(e, 'textarea')) {\n this.captureDomEvent('input', e, e.value);\n } else if (domUtil.isDescribedElement(e, 'select') && e.options && e.options.length) {\n this.handleSelectInputChanged(e);\n } else if (domUtil.isDescribedElement(e, 'input') && !domUtil.isDescribedElement(e, 'input', ['button', 'submit', 'hidden', 'checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value);\n }\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleSelectInputChanged = function(elem) {\n if (elem.multiple) {\n for (var i = 0; i < elem.options.length; i++) {\n if (elem.options[i].selected) {\n this.captureDomEvent('input', elem, elem.options[i].value);\n }\n }\n } else if (elem.selectedIndex >= 0 && elem.options[elem.selectedIndex]) {\n this.captureDomEvent('input', elem, elem.options[elem.selectedIndex].value);\n }\n};\n\nInstrumenter.prototype.captureDomEvent = function(subtype, element, value, isChecked) {\n if (value !== undefined) {\n if (this.scrubTelemetryInputs || (domUtil.getElementType(element) === 'password')) {\n value = '[scrubbed]';\n } else {\n var description = domUtil.describeElement(element);\n if (this.telemetryScrubber) {\n if (this.telemetryScrubber(description)) {\n value = '[scrubbed]';\n }\n } else if (this.defaultValueScrubber(description)) {\n value = '[scrubbed]';\n }\n }\n }\n var elementString = domUtil.elementArrayToString(domUtil.treeToArray(element));\n this.telemeter.captureDom(subtype, elementString, value, isChecked);\n};\n\nInstrumenter.prototype.deinstrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n restore(this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.instrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n var self = this;\n replace(this._window, 'onpopstate', function(orig) {\n return function() {\n var current = self._location.href;\n self.handleUrlChange(self._lastHref, current);\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n }, this.replacements, 'navigation');\n\n replace(this._window.history, 'pushState', function(orig) {\n return function() {\n var url = arguments.length > 2 ? arguments[2] : undefined;\n if (url) {\n self.handleUrlChange(self._lastHref, url + '');\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.handleUrlChange = function(from, to) {\n var parsedHref = urlparser.parse(this._location.href);\n var parsedTo = urlparser.parse(to);\n var parsedFrom = urlparser.parse(from);\n this._lastHref = to;\n if (parsedHref.protocol === parsedTo.protocol && parsedHref.host === parsedTo.host) {\n to = parsedTo.path + (parsedTo.hash || '');\n }\n if (parsedHref.protocol === parsedFrom.protocol && parsedHref.host === parsedFrom.host) {\n from = parsedFrom.path + (parsedFrom.hash || '');\n }\n this.telemeter.captureNavigation(from, to);\n};\n\nInstrumenter.prototype.deinstrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.removeListeners('connectivity');\n } else {\n restore(this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.instrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.addListener('connectivity', this._window, 'online', undefined, function() {\n this.telemeter.captureConnectivityChange('online');\n }.bind(this), true);\n this.addListener('connectivity', this._window, 'offline', undefined, function() {\n this.telemeter.captureConnectivityChange('offline');\n }.bind(this), true);\n } else {\n var self = this;\n replace(this._document.body, 'ononline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('online');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n replace(this._document.body, 'onoffline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('offline');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.handleCspEvent = function(cspEvent) {\n var message = 'Security Policy Violation: ' +\n 'blockedURI: ' + cspEvent.blockedURI + ', ' +\n 'violatedDirective: ' + cspEvent.violatedDirective + ', ' +\n 'effectiveDirective: ' + cspEvent.effectiveDirective + ', ';\n\n if (cspEvent.sourceFile) {\n message += 'location: ' + cspEvent.sourceFile + ', ' +\n 'line: ' + cspEvent.lineNumber + ', ' +\n 'col: ' + cspEvent.columnNumber + ', ';\n }\n\n message += 'originalPolicy: ' + cspEvent.originalPolicy;\n\n this.telemeter.captureLog(message, 'error');\n this.handleCspError(message);\n}\n\nInstrumenter.prototype.handleCspError = function(message) {\n if (this.autoInstrument.errorOnContentSecurityPolicy) {\n this.rollbar.error(message);\n }\n}\n\nInstrumenter.prototype.deinstrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._window)) { return; }\n\n this.removeListeners('contentsecuritypolicy');\n};\n\nInstrumenter.prototype.instrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._window)) { return; }\n\n var cspHandler = this.handleCspEvent.bind(this);\n this.addListener('contentsecuritypolicy', this._window, 'securitypolicyviolation', null, cspHandler, false);\n};\n\nInstrumenter.prototype.addListener = function(section, obj, type, altType, handler, capture) {\n if (obj.addEventListener) {\n obj.addEventListener(type, handler, capture);\n this.eventRemovers[section].push(function() {\n obj.removeEventListener(type, handler, capture);\n });\n } else if (altType) {\n obj.attachEvent(altType, handler);\n this.eventRemovers[section].push(function() {\n obj.detachEvent(altType, handler);\n });\n }\n};\n\nInstrumenter.prototype.removeListeners = function(section) {\n var r;\n while (this.eventRemovers[section].length) {\n r = this.eventRemovers[section].shift();\n r();\n }\n};\n\nmodule.exports = Instrumenter;\n","'use strict';\n\nfunction getElementType(e) {\n return (e.getAttribute('type') || '').toLowerCase();\n}\n\nfunction isDescribedElement(element, type, subtypes) {\n if (element.tagName.toLowerCase() !== type.toLowerCase()) {\n return false;\n }\n if (!subtypes) {\n return true;\n }\n element = getElementType(element);\n for (var i = 0; i < subtypes.length; i++) {\n if (subtypes[i] === element) {\n return true;\n }\n }\n return false;\n}\n\nfunction getElementFromEvent(evt, doc) {\n if (evt.target) {\n return evt.target;\n }\n if (doc && doc.elementFromPoint) {\n return doc.elementFromPoint(evt.clientX, evt.clientY);\n }\n return undefined;\n}\n\nfunction treeToArray(elem) {\n var MAX_HEIGHT = 5;\n var out = [];\n var nextDescription;\n for (var height = 0; elem && height < MAX_HEIGHT; height++) {\n nextDescription = describeElement(elem);\n if (nextDescription.tagName === 'html') {\n break;\n }\n out.unshift(nextDescription);\n elem = elem.parentNode;\n }\n return out;\n}\n\nfunction elementArrayToString(a) {\n var MAX_LENGTH = 80;\n var separator = ' > ', separatorLength = separator.length;\n var out = [], len = 0, nextStr, totalLength;\n\n for (var i = a.length - 1; i >= 0; i--) {\n nextStr = descriptionToString(a[i]);\n totalLength = len + (out.length * separatorLength) + nextStr.length;\n if (i < a.length - 1 && totalLength >= MAX_LENGTH + 3) {\n out.unshift('...');\n break;\n }\n out.unshift(nextStr);\n len += nextStr.length;\n }\n return out.join(separator);\n}\n\nfunction descriptionToString(desc) {\n if (!desc || !desc.tagName) {\n return '';\n }\n var out = [desc.tagName];\n if (desc.id) {\n out.push('#' + desc.id);\n }\n if (desc.classes) {\n out.push('.' + desc.classes.join('.'));\n }\n for (var i = 0; i < desc.attributes.length; i++) {\n out.push('[' + desc.attributes[i].key + '=\"' + desc.attributes[i].value + '\"]');\n }\n\n return out.join('');\n}\n\n/**\n * Input: a dom element\n * Output: null if tagName is falsey or input is falsey, else\n * {\n * tagName: String,\n * id: String | undefined,\n * classes: [String] | undefined,\n * attributes: [\n * {\n * key: OneOf(type, name, title, alt),\n * value: String\n * }\n * ]\n * }\n */\nfunction describeElement(elem) {\n if (!elem || !elem.tagName) {\n return null;\n }\n var out = {}, className, key, attr, i;\n out.tagName = elem.tagName.toLowerCase();\n if (elem.id) {\n out.id = elem.id;\n }\n className = elem.className;\n if (className && (typeof className === 'string')) {\n out.classes = className.split(/\\s+/);\n }\n var attributes = ['type', 'name', 'title', 'alt'];\n out.attributes = [];\n for (i = 0; i < attributes.length; i++) {\n key = attributes[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.attributes.push({key: key, value: attr});\n }\n }\n return out;\n}\n\nmodule.exports = {\n describeElement: describeElement,\n descriptionToString: descriptionToString,\n elementArrayToString: elementArrayToString,\n treeToArray: treeToArray,\n getElementFromEvent: getElementFromEvent,\n isDescribedElement: isDescribedElement,\n getElementType: getElementType\n};\n","'use strict';\n\nvar polyfillJSON = require('../../vendor/JSON-js/json3');\n\nmodule.exports = polyfillJSON;\n","// json3.js\n// 2017-02-21\n// Public Domain.\n// NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.\n// See http://www.JSON.org/js.html\n// This code should be minified before deployment.\n// See http://javascript.crockford.com/jsmin.html\n\n// USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO\n// NOT CONTROL.\n\n// This file creates a global JSON object containing two methods: stringify\n// and parse. This file provides the ES5 JSON capability to ES3 systems.\n// If a project might run on IE8 or earlier, then this file should be included.\n// This file does nothing on ES5 systems.\n\n// JSON.stringify(value, replacer, space)\n// value any JavaScript value, usually an object or array.\n// replacer an optional parameter that determines how object\n// values are stringified for objects. It can be a\n// function or an array of strings.\n// space an optional parameter that specifies the indentation\n// of nested structures. If it is omitted, the text will\n// be packed without extra whitespace. If it is a number,\n// it will specify the number of spaces to indent at each\n// level. If it is a string (such as \"\\t\" or \" \"),\n// it contains the characters used to indent at each level.\n// This method produces a JSON text from a JavaScript value.\n// When an object value is found, if the object contains a toJSON\n// method, its toJSON method will be called and the result will be\n// stringified. A toJSON method does not serialize: it returns the\n// value represented by the name/value pair that should be serialized,\n// or undefined if nothing should be serialized. The toJSON method\n// will be passed the key associated with the value, and this will be\n// bound to the value.\n\n// For example, this would serialize Dates as ISO strings.\n\n// Date.prototype.toJSON = function (key) {\n// function f(n) {\n// // Format integers to have at least two digits.\n// return (n < 10)\n// ? \"0\" + n\n// : n;\n// }\n// return this.getUTCFullYear() + \"-\" +\n// f(this.getUTCMonth() + 1) + \"-\" +\n// f(this.getUTCDate()) + \"T\" +\n// f(this.getUTCHours()) + \":\" +\n// f(this.getUTCMinutes()) + \":\" +\n// f(this.getUTCSeconds()) + \"Z\";\n// };\n\n// You can provide an optional replacer method. It will be passed the\n// key and value of each member, with this bound to the containing\n// object. The value that is returned from your method will be\n// serialized. If your method returns undefined, then the member will\n// be excluded from the serialization.\n\n// If the replacer parameter is an array of strings, then it will be\n// used to select the members to be serialized. It filters the results\n// such that only members with keys listed in the replacer array are\n// stringified.\n\n// Values that do not have JSON representations, such as undefined or\n// functions, will not be serialized. Such values in objects will be\n// dropped; in arrays they will be replaced with null. You can use\n// a replacer function to replace those with JSON values.\n\n// JSON.stringify(undefined) returns undefined.\n\n// The optional space parameter produces a stringification of the\n// value that is filled with line breaks and indentation to make it\n// easier to read.\n\n// If the space parameter is a non-empty string, then that string will\n// be used for indentation. If the space parameter is a number, then\n// the indentation will be that many spaces.\n\n// Example:\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}]);\n// // text is '[\"e\",{\"pluribus\":\"unum\"}]'\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}], null, \"\\t\");\n// // text is '[\\n\\t\"e\",\\n\\t{\\n\\t\\t\"pluribus\": \"unum\"\\n\\t}\\n]'\n\n// text = JSON.stringify([new Date()], function (key, value) {\n// return this[key] instanceof Date\n// ? \"Date(\" + this[key] + \")\"\n// : value;\n// });\n// // text is '[\"Date(---current time---)\"]'\n\n// JSON.parse(text, reviver)\n// This method parses a JSON text to produce an object or array.\n// It can throw a SyntaxError exception.\n// This has been modified to use JSON-js/json_parse_state.js as the\n// parser instead of the one built around eval found in JSON-js/json2.js\n\n// The optional reviver parameter is a function that can filter and\n// transform the results. It receives each of the keys and values,\n// and its return value is used instead of the original value.\n// If it returns what it received, then the structure is not modified.\n// If it returns undefined then the member is deleted.\n\n// Example:\n\n// // Parse the text. Values that look like ISO date strings will\n// // be converted to Date objects.\n\n// myData = JSON.parse(text, function (key, value) {\n// var a;\n// if (typeof value === \"string\") {\n// a =\n// /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2}(?:\\.\\d*)?)Z$/.exec(value);\n// if (a) {\n// return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],\n// +a[5], +a[6]));\n// }\n// }\n// return value;\n// });\n\n// myData = JSON.parse('[\"Date(09/09/2001)\"]', function (key, value) {\n// var d;\n// if (typeof value === \"string\" &&\n// value.slice(0, 5) === \"Date(\" &&\n// value.slice(-1) === \")\") {\n// d = new Date(value.slice(5, -1));\n// if (d) {\n// return d;\n// }\n// }\n// return value;\n// });\n\n// This is a reference implementation. You are free to copy, modify, or\n// redistribute.\n\n/*jslint\n for, this\n */\n\n/*property\n JSON, apply, call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,\n getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,\n lastIndex, length, parse, prototype, push, replace, slice, stringify,\n test, toJSON, toString, valueOf\n */\n\nvar setupCustomJSON = function(JSON) {\n\n var rx_one = /^[\\],:{}\\s]*$/;\n var rx_two = /\\\\(?:[\"\\\\\\/bfnrt]|u[0-9a-fA-F]{4})/g;\n var rx_three = /\"[^\"\\\\\\n\\r]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g;\n var rx_four = /(?:^|:|,)(?:\\s*\\[)+/g;\n var rx_escapable = /[\\\\\"\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n var rx_dangerous = /[\\u0000\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n\n function f(n) {\n // Format integers to have at least two digits.\n return n < 10\n ? \"0\" + n\n : n;\n }\n\n function this_value() {\n return this.valueOf();\n }\n\n if (typeof Date.prototype.toJSON !== \"function\") {\n\n Date.prototype.toJSON = function () {\n\n return isFinite(this.valueOf())\n ? this.getUTCFullYear() + \"-\" +\n f(this.getUTCMonth() + 1) + \"-\" +\n f(this.getUTCDate()) + \"T\" +\n f(this.getUTCHours()) + \":\" +\n f(this.getUTCMinutes()) + \":\" +\n f(this.getUTCSeconds()) + \"Z\"\n : null;\n };\n\n Boolean.prototype.toJSON = this_value;\n Number.prototype.toJSON = this_value;\n String.prototype.toJSON = this_value;\n }\n\n var gap;\n var indent;\n var meta;\n var rep;\n\n\n function quote(string) {\n\n // If the string contains no control characters, no quote characters, and no\n // backslash characters, then we can safely slap some quotes around it.\n // Otherwise we must also replace the offending characters with safe escape\n // sequences.\n\n rx_escapable.lastIndex = 0;\n return rx_escapable.test(string)\n ? \"\\\"\" + string.replace(rx_escapable, function (a) {\n var c = meta[a];\n return typeof c === \"string\"\n ? c\n : \"\\\\u\" + (\"0000\" + a.charCodeAt(0).toString(16)).slice(-4);\n }) + \"\\\"\"\n : \"\\\"\" + string + \"\\\"\";\n }\n\n\n function str(key, holder) {\n\n // Produce a string from holder[key].\n\n var i; // The loop counter.\n var k; // The member key.\n var v; // The member value.\n var length;\n var mind = gap;\n var partial;\n var value = holder[key];\n\n // If the value has a toJSON method, call it to obtain a replacement value.\n\n if (value && typeof value === \"object\" &&\n typeof value.toJSON === \"function\") {\n value = value.toJSON(key);\n }\n\n // If we were called with a replacer function, then call the replacer to\n // obtain a replacement value.\n\n if (typeof rep === \"function\") {\n value = rep.call(holder, key, value);\n }\n\n // What happens next depends on the value's type.\n\n switch (typeof value) {\n case \"string\":\n return quote(value);\n\n case \"number\":\n\n // JSON numbers must be finite. Encode non-finite numbers as null.\n\n return isFinite(value)\n ? String(value)\n : \"null\";\n\n case \"boolean\":\n case \"null\":\n\n // If the value is a boolean or null, convert it to a string. Note:\n // typeof null does not produce \"null\". The case is included here in\n // the remote chance that this gets fixed someday.\n\n return String(value);\n\n // If the type is \"object\", we might be dealing with an object or an array or\n // null.\n\n case \"object\":\n\n // Due to a specification blunder in ECMAScript, typeof null is \"object\",\n // so watch out for that case.\n\n if (!value) {\n return \"null\";\n }\n\n // Make an array to hold the partial results of stringifying this object value.\n\n gap += indent;\n partial = [];\n\n // Is the value an array?\n\n if (Object.prototype.toString.apply(value) === \"[object Array]\") {\n\n // The value is an array. Stringify every element. Use null as a placeholder\n // for non-JSON values.\n\n length = value.length;\n for (i = 0; i < length; i += 1) {\n partial[i] = str(i, value) || \"null\";\n }\n\n // Join all of the elements together, separated with commas, and wrap them in\n // brackets.\n\n v = partial.length === 0\n ? \"[]\"\n : gap\n ? \"[\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"]\"\n : \"[\" + partial.join(\",\") + \"]\";\n gap = mind;\n return v;\n }\n\n // If the replacer is an array, use it to select the members to be stringified.\n\n if (rep && typeof rep === \"object\") {\n length = rep.length;\n for (i = 0; i < length; i += 1) {\n if (typeof rep[i] === \"string\") {\n k = rep[i];\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n } else {\n\n // Otherwise, iterate through all of the keys in the object.\n\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(value, k)) {\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n }\n\n // Join all of the member texts together, separated with commas,\n // and wrap them in braces.\n\n v = partial.length === 0\n ? \"{}\"\n : gap\n ? \"{\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"}\"\n : \"{\" + partial.join(\",\") + \"}\";\n gap = mind;\n return v;\n }\n }\n\n // If the JSON object does not yet have a stringify method, give it one.\n\n if (typeof JSON.stringify !== \"function\") {\n meta = { // table of character substitutions\n \"\\b\": \"\\\\b\",\n \"\\t\": \"\\\\t\",\n \"\\n\": \"\\\\n\",\n \"\\f\": \"\\\\f\",\n \"\\r\": \"\\\\r\",\n \"\\\"\": \"\\\\\\\"\",\n \"\\\\\": \"\\\\\\\\\"\n };\n JSON.stringify = function (value, replacer, space) {\n\n // The stringify method takes a value and an optional replacer, and an optional\n // space parameter, and returns a JSON text. The replacer can be a function\n // that can replace values, or an array of strings that will select the keys.\n // A default replacer method can be provided. Use of the space parameter can\n // produce text that is more easily readable.\n\n var i;\n gap = \"\";\n indent = \"\";\n\n // If the space parameter is a number, make an indent string containing that\n // many spaces.\n\n if (typeof space === \"number\") {\n for (i = 0; i < space; i += 1) {\n indent += \" \";\n }\n\n // If the space parameter is a string, it will be used as the indent string.\n\n } else if (typeof space === \"string\") {\n indent = space;\n }\n\n // If there is a replacer, it must be a function or an array.\n // Otherwise, throw an error.\n\n rep = replacer;\n if (replacer && typeof replacer !== \"function\" &&\n (typeof replacer !== \"object\" ||\n typeof replacer.length !== \"number\")) {\n throw new Error(\"JSON.stringify\");\n }\n\n // Make a fake root object containing our value under the key of \"\".\n // Return the result of stringifying the value.\n\n return str(\"\", {\"\": value});\n };\n }\n\n\n // If the JSON object does not yet have a parse method, give it one.\n\n if (typeof JSON.parse !== \"function\") {\n JSON.parse = (function () {\n\n // This function creates a JSON parse function that uses a state machine rather\n // than the dangerous eval function to parse a JSON text.\n\n var state; // The state of the parser, one of\n // 'go' The starting state\n // 'ok' The final, accepting state\n // 'firstokey' Ready for the first key of the object or\n // the closing of an empty object\n // 'okey' Ready for the next key of the object\n // 'colon' Ready for the colon\n // 'ovalue' Ready for the value half of a key/value pair\n // 'ocomma' Ready for a comma or closing }\n // 'firstavalue' Ready for the first value of an array or\n // an empty array\n // 'avalue' Ready for the next value of an array\n // 'acomma' Ready for a comma or closing ]\n var stack; // The stack, for controlling nesting.\n var container; // The current container object or array\n var key; // The current key\n var value; // The current value\n var escapes = { // Escapement translation table\n \"\\\\\": \"\\\\\",\n \"\\\"\": \"\\\"\",\n \"/\": \"/\",\n \"t\": \"\\t\",\n \"n\": \"\\n\",\n \"r\": \"\\r\",\n \"f\": \"\\f\",\n \"b\": \"\\b\"\n };\n var string = { // The actions for string tokens\n go: function () {\n state = \"ok\";\n },\n firstokey: function () {\n key = value;\n state = \"colon\";\n },\n okey: function () {\n key = value;\n state = \"colon\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var number = { // The actions for number tokens\n go: function () {\n state = \"ok\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var action = {\n\n // The action table describes the behavior of the machine. It contains an\n // object for each token. Each object contains a method that is called when\n // a token is matched in a state. An object will lack a method for illegal\n // states.\n\n \"{\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = {};\n state = \"firstokey\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = {};\n state = \"firstokey\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n }\n },\n \"}\": {\n firstokey: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n ocomma: function () {\n var pop = stack.pop();\n container[key] = value;\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \"[\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = [];\n state = \"firstavalue\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = [];\n state = \"firstavalue\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n }\n },\n \"]\": {\n firstavalue: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n acomma: function () {\n var pop = stack.pop();\n container.push(value);\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \":\": {\n colon: function () {\n if (Object.hasOwnProperty.call(container, key)) {\n throw new SyntaxError(\"Duplicate key '\" + key + \"\\\"\");\n }\n state = \"ovalue\";\n }\n },\n \",\": {\n ocomma: function () {\n container[key] = value;\n state = \"okey\";\n },\n acomma: function () {\n container.push(value);\n state = \"avalue\";\n }\n },\n \"true\": {\n go: function () {\n value = true;\n state = \"ok\";\n },\n ovalue: function () {\n value = true;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = true;\n state = \"acomma\";\n },\n avalue: function () {\n value = true;\n state = \"acomma\";\n }\n },\n \"false\": {\n go: function () {\n value = false;\n state = \"ok\";\n },\n ovalue: function () {\n value = false;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = false;\n state = \"acomma\";\n },\n avalue: function () {\n value = false;\n state = \"acomma\";\n }\n },\n \"null\": {\n go: function () {\n value = null;\n state = \"ok\";\n },\n ovalue: function () {\n value = null;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = null;\n state = \"acomma\";\n },\n avalue: function () {\n value = null;\n state = \"acomma\";\n }\n }\n };\n\n function debackslashify(text) {\n\n // Remove and replace any backslash escapement.\n\n return text.replace(/\\\\(?:u(.{4})|([^u]))/g, function (ignore, b, c) {\n return b\n ? String.fromCharCode(parseInt(b, 16))\n : escapes[c];\n });\n }\n\n return function (source, reviver) {\n\n // A regular expression is used to extract tokens from the JSON text.\n // The extraction process is cautious.\n\n var result;\n var tx = /^[\\u0020\\t\\n\\r]*(?:([,:\\[\\]{}]|true|false|null)|(-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?)|\"((?:[^\\r\\n\\t\\\\\\\"]|\\\\(?:[\"\\\\\\/trnfb]|u[0-9a-fA-F]{4}))*)\")/;\n\n // Set the starting state.\n\n state = \"go\";\n\n // The stack records the container, key, and state for each object or array\n // that contains another object or array while processing nested structures.\n\n stack = [];\n\n // If any error occurs, we will catch it and ultimately throw a syntax error.\n\n try {\n\n // For each token...\n\n while (true) {\n result = tx.exec(source);\n if (!result) {\n break;\n }\n\n // result is the result array from matching the tokenizing regular expression.\n // result[0] contains everything that matched, including any initial whitespace.\n // result[1] contains any punctuation that was matched, or true, false, or null.\n // result[2] contains a matched number, still in string form.\n // result[3] contains a matched string, without quotes but with escapement.\n\n if (result[1]) {\n\n // Token: Execute the action for this state and token.\n\n action[result[1]][state]();\n\n } else if (result[2]) {\n\n // Number token: Convert the number string into a number value and execute\n // the action for this state and number.\n\n value = +result[2];\n number[state]();\n } else {\n\n // String token: Replace the escapement sequences and execute the action for\n // this state and string.\n\n value = debackslashify(result[3]);\n string[state]();\n }\n\n // Remove the token from the string. The loop will continue as long as there\n // are tokens. This is a slow process, but it allows the use of ^ matching,\n // which assures that no illegal tokens slip through.\n\n source = source.slice(result[0].length);\n }\n\n // If we find a state/token combination that is illegal, then the action will\n // cause an error. We handle the error by simply changing the state.\n\n } catch (e) {\n state = e;\n }\n\n // The parsing is finished. If we are not in the final \"ok\" state, or if the\n // remaining source contains anything except whitespace, then we did not have\n //a well-formed JSON text.\n\n if (state !== \"ok\" || (/[^\\u0020\\t\\n\\r]/.test(source))) {\n throw (state instanceof SyntaxError)\n ? state\n : new SyntaxError(\"JSON\");\n }\n\n // If there is a reviver function, we recursively walk the new structure,\n // passing each name/value pair to the reviver function for possible\n // transformation, starting with a temporary root object that holds the current\n // value in an empty key. If there is not a reviver function, we simply return\n // that value.\n\n return (typeof reviver === \"function\")\n ? (function walk(holder, key) {\n var k;\n var v;\n var val = holder[key];\n if (val && typeof val === \"object\") {\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(val, k)) {\n v = walk(val, k);\n if (v !== undefined) {\n val[k] = v;\n } else {\n delete val[k];\n }\n }\n }\n }\n return reviver.call(holder, key, val);\n }({\"\": value}, \"\"))\n : value;\n };\n }());\n }\n}\n\nmodule.exports = setupCustomJSON;\n","'use strict';\n\nfunction wrapGlobals(window, handler, shim) {\n if (!window) { return; }\n // Adapted from https://github.com/bugsnag/bugsnag-js\n var globals = 'EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload'.split(',');\n var i, global;\n for (i = 0; i < globals.length; ++i) {\n global = globals[i];\n\n if (window[global] && window[global].prototype) {\n _extendListenerPrototype(handler, window[global].prototype, shim);\n }\n }\n}\n\nfunction _extendListenerPrototype(handler, prototype, shim) {\n if (prototype.hasOwnProperty && prototype.hasOwnProperty('addEventListener')) {\n var oldAddEventListener = prototype.addEventListener;\n while (oldAddEventListener._rollbarOldAdd && oldAddEventListener.belongsToShim) {\n oldAddEventListener = oldAddEventListener._rollbarOldAdd;\n }\n var addFn = function(event, callback, bubble) {\n oldAddEventListener.call(this, event, handler.wrap(callback), bubble);\n };\n addFn._rollbarOldAdd = oldAddEventListener;\n addFn.belongsToShim = shim;\n prototype.addEventListener = addFn;\n\n var oldRemoveEventListener = prototype.removeEventListener;\n while (oldRemoveEventListener._rollbarOldRemove && oldRemoveEventListener.belongsToShim) {\n oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;\n }\n var removeFn = function(event, callback, bubble) {\n oldRemoveEventListener.call(this, event, callback && callback._rollbar_wrapped || callback, bubble);\n };\n removeFn._rollbarOldRemove = oldRemoveEventListener;\n removeFn.belongsToShim = shim;\n prototype.removeEventListener = removeFn;\n }\n}\n\nmodule.exports = wrapGlobals;\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction raw(payload, jsonBackup) {\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction selectFrames(frames, range) {\n var len = frames.length;\n if (len > range * 2) {\n return frames.slice(0, range).concat(frames.slice(len - range));\n }\n return frames;\n}\n\nfunction truncateFrames(payload, jsonBackup, range) {\n range = (typeof range === 'undefined') ? 30 : range;\n var body = payload.data.body;\n var frames;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n frames = chain[i].frames;\n frames = selectFrames(frames, range);\n chain[i].frames = frames;\n }\n } else if (body.trace) {\n frames = body.trace.frames;\n frames = selectFrames(frames, range);\n body.trace.frames = frames;\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction maybeTruncateValue(len, val) {\n if (!val) {\n return val;\n }\n if (val.length > len) {\n return val.slice(0, len - 3).concat('...');\n }\n return val;\n}\n\nfunction truncateStrings(len, payload, jsonBackup) {\n function truncator(k, v, seen) {\n switch (_.typeName(v)) {\n case 'string':\n return maybeTruncateValue(len, v);\n case 'object':\n case 'array':\n return traverse(v, truncator, seen);\n default:\n return v;\n }\n }\n payload = traverse(payload, truncator);\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction truncateTraceData(traceData) {\n if (traceData.exception) {\n delete traceData.exception.description;\n traceData.exception.message = maybeTruncateValue(255, traceData.exception.message);\n }\n traceData.frames = selectFrames(traceData.frames, 1);\n return traceData;\n}\n\nfunction minBody(payload, jsonBackup) {\n var body = payload.data.body;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n chain[i] = truncateTraceData(chain[i]);\n }\n } else if (body.trace) {\n body.trace = truncateTraceData(body.trace);\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction needsTruncation(payload, maxSize) {\n return _.maxByteSize(payload) > maxSize;\n}\n\nfunction truncate(payload, jsonBackup, maxSize) {\n maxSize = (typeof maxSize === 'undefined') ? (512 * 1024) : maxSize;\n var strategies = [\n raw,\n truncateFrames,\n truncateStrings.bind(null, 1024),\n truncateStrings.bind(null, 512),\n truncateStrings.bind(null, 256),\n minBody\n ];\n var strategy, results, result;\n\n while ((strategy = strategies.shift())) {\n results = strategy(payload, jsonBackup);\n payload = results[0];\n result = results[1];\n if (result.error || !needsTruncation(result.value, maxSize)) {\n return result;\n }\n }\n return result;\n}\n\nmodule.exports = {\n truncate: truncate,\n\n /* for testing */\n raw: raw,\n truncateFrames: truncateFrames,\n truncateStrings: truncateStrings,\n maybeTruncateValue: maybeTruncateValue\n};\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://rollbar/webpack/universalModuleDefinition","webpack://rollbar/webpack/bootstrap","webpack://rollbar/./src/utility.js","webpack://rollbar/./src/browser/logger.js","webpack://rollbar/./src/browser/url.js","webpack://rollbar/./src/errorParser.js","webpack://rollbar/./src/scrub.js","webpack://rollbar/./src/utility/traverse.js","webpack://rollbar/./src/browser/bundles/rollbar.js","webpack://rollbar/./src/browser/rollbar.js","webpack://rollbar/./src/browser/core.js","webpack://rollbar/./src/rollbar.js","webpack://rollbar/./src/rateLimiter.js","webpack://rollbar/./src/merge.js","webpack://rollbar/./src/queue.js","webpack://rollbar/./src/notifier.js","webpack://rollbar/./src/api.js","webpack://rollbar/./src/apiUtility.js","webpack://rollbar/./node_modules/console-polyfill/index.js","webpack://rollbar/./src/browser/detection.js","webpack://rollbar/./src/browser/globalSetup.js","webpack://rollbar/./src/browser/transport.js","webpack://rollbar/./src/browser/transforms.js","webpack://rollbar/./node_modules/error-stack-parser/error-stack-parser.js","webpack://rollbar/./node_modules/error-stack-parser/node_modules/stackframe/stackframe.js","webpack://rollbar/./src/transforms.js","webpack://rollbar/./src/browser/predicates.js","webpack://rollbar/./src/predicates.js","webpack://rollbar/./src/defaults.js","webpack://rollbar/./src/browser/defaults/scrubFields.js","webpack://rollbar/./src/telemetry.js","webpack://rollbar/./src/browser/telemetry.js","webpack://rollbar/./src/browser/domUtility.js","webpack://rollbar/./src/utility/polyfillJSON.js","webpack://rollbar/./vendor/JSON-js/json3.js","webpack://rollbar/./src/browser/wrapGlobals.js","webpack://rollbar/./src/truncation.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;QCVA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;AClFa;;AAEb,YAAY,mBAAO,CAAC,EAAS;;AAE7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,OAAO;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,EAAE;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,mCAAmC,OAAO;AAC1C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,iBAAiB,YAAY;AAC7B;AACA,qBAAqB;AACrB;AACA,KAAK,wBAAwB;AAC7B;AACA,KAAK,yBAAyB;AAC9B;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kCAAkC,OAAO;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,SAAS;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,kCAAkC,OAAO;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,SAAS,UAAU,YAAY,GAAG;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,aAAa;AAChC;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5wBa;;AAEb;AACA,mBAAO,CAAC,EAAkB;AAC1B,gBAAgB,mBAAO,CAAC,EAAa;AACrC,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;AC3Ca;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;AChFa;;AAEb,uBAAuB,mBAAO,CAAC,EAAoB;;AAEnD;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;;AAEA,sBAAsB,wBAAwB;AAC9C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,eAAe;AACf;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7Ha;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,eAAe,mBAAO,CAAC,CAAoB;;AAE3C;AACA;;AAEA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,WAAW;AAC9B;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA;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AAuB,mBAAO,CAAC,EAAe;AAC9C,kBAAkB,mBAAO,CAAC,CAAgB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,0BAA0B,sBAAsB;AAChD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,oCAAoC,SAAS;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,eAAe,mBAAO,CAAC,EAAa;AACpC,kBAAkB,mBAAO,CAAC,EAAwB;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACpjBa;;AAEb,kBAAkB,mBAAO,CAAC,EAAe;AACzC,YAAY,mBAAO,CAAC,EAAS;AAC7B,eAAe,mBAAO,CAAC,EAAY;AACnC,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,6EAA6E,UAAU;AACvF,yFAAyF,UAAU;;AAEnG;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,6BAA6B;AAC7B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACnRa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AChJa;;AAEb;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA,WAAW,YAAY;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACvDa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wDAAwD,WAAW;AACnE;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,QAAQ;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,aAAa,8BAA8B;AAC3C;AACA;AACA;AACA;AACA,+CAA+C,SAAS;AACxD;AACA;AACA,cAAc;AACd;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,SAAS;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,+BAA+B;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC7Qa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACxHa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,cAAc,mBAAO,CAAC,EAAc;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;ACvGa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC7FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;AClBY;;AAEb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;AC/Ba;;AAEb;AACA,gBAAgB,QAAQ;AACxB;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;;AAEA;AACA,gBAAgB,QAAQ;;AAExB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;;;;;;;AClGa;;AAEb;;AAEA,QAAQ,mBAAO,CAAC,CAAY;AAC5B,aAAa,mBAAO,CAAC,CAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACvQa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,kBAAkB,mBAAO,CAAC,CAAgB;AAC1C,aAAa,mBAAO,CAAC,CAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,OAAO;AAC7C;AACA,oBAAoB,6CAA6C;AACjE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,4BAA4B,gBAAgB;AAC5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,sBAAsB;AACvC;AACA;AACA;;AAEA,4BAA4B,oBAAoB;AAChD;AACA;;AAEA;AACA;;AAEA;AACA;AACA,8BAA8B,aAAa;AAC3C;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,kBAAkB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC9UA;AACA;AACA;;AAEA;AACA,QAAQ,IAA0C;AAClD,QAAQ,iCAA6B,CAAC,uBAAY,CAAC,oCAAE,OAAO;AAAA;AAAA;AAAA,oGAAC;AAC7D,KAAK,MAAM,EAIN;AACL,CAAC;AACD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,MAAM;AACzB,oBAAoB,MAAM;AAC1B;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA,CAAC;;;;;;;ACzMD;AACA;AACA;;AAEA;AACA,QAAQ,IAA0C;AAClD,QAAQ,iCAAqB,EAAE,oCAAE,OAAO;AAAA;AAAA;AAAA,oGAAC;AACzC,KAAK,MAAM,EAIN;AACL,CAAC;AACD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,wBAAwB;AAC3C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA,CAAC;;;;;;;;AC9IY;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,sBAAsB;AAC1D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,8BAA8B;AAC9B;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrJa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;ACba;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe;;AAEf;;AAEA,uCAAuC,eAAe;;AAEtD;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA;;AAEA,wCAAwC,eAAe;;AAEvD,mBAAmB,gBAAgB;AACnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,SAAS;AAC1B;;AAEA,mBAAmB,qBAAqB;AACxC;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClMa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACVa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5Da;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qCAAqC,mBAAmB;AACxD;;AAEA;AACA,qCAAqC,4BAA4B;AACjE;AACA;AACA,8BAA8B,4BAA4B;AAC1D;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD;AACA;AACA,8BAA8B,gBAAgB;AAC9C;AACA;;AAEA;AACA,8BAA8B,aAAa;AAC3C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AClLa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,YAAY,mBAAO,CAAC,CAAU;AAC9B,gBAAgB,mBAAO,CAAC,CAAO;AAC/B,cAAc,mBAAO,CAAC,EAAc;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gDAAgD,aAAa;AAC7D;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B,mBAAmB,qBAAqB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,6BAA6B,0BAA0B;AACvD;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,eAAe,0BAA0B;AACzC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB;;AAEjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,SAAS;AAC9C;AACA;AACA,GAAG;AACH,yCAAyC;AACzC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,8CAA8C,QAAQ;;AAEtD;AACA;;AAEA;AACA,8CAA8C,QAAQ;;AAEtD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC/vBa;;AAEb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,6BAA6B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,4BAA4B,QAAQ;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,4BAA4B;AAC7C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,uBAAuB;AACpC;AACA;AACA;AACA,2BAA2B,sBAAsB;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnIa;;AAEb,mBAAmB,mBAAO,CAAC,EAA4B;;AAEvD;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB;AACpB;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,yCAAyC,iBAAiB;AAC1D,8BAA8B,kBAAkB;;AAEhD,yCAAyC,iBAAiB;AAC1D,sCAAsC,6BAA6B;;AAEnE;AACA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,wBAAwB;AACxB,+CAA+C,EAAE;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;;AAGA;;AAEA;;AAEA,UAAU;AACV,UAAU;AACV,UAAU;AACV;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA,qBAAqB,YAAY;AACjC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,qBAAqB,YAAY;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,eAAe;AACf;AACA,cAAc,wDAAwD;AACtE,cAAc,0BAA0B;AACxC;AACA;AACA;AACA;;AAEA;;AAEA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,mBAAmB,WAAW;AAC9B;AACA;;AAEA;;AAEA,OAAO;AACP;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,sBAAsB,UAAU;AAChC;AACA;;;AAGA;;AAEA;AACA;;AAEA;AACA;;AAEA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB,oBAAoB;AACpB,cAAc;AACd,gBAAgB;AAChB,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,UAAU;AACV;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,WAAW;AACX;AACA,wBAAwB,gDAAgD;AACxE;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,SAAS;AACT,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,WAAW;AACX;AACA,wBAAwB,gDAAgD;AACxE;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,sCAAsC,EAAE;AACxC;AACA;AACA;AACA,SAAS;AACT;;AAEA;;AAEA;AACA;;AAEA;AACA,+CAA+C,yGAAyG,EAAE;;AAE1J;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,SAAS;AACT;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE,UAAU;AACvB;AACA;AACA,KAAK;AACL;AACA;;AAEA;;;;;;;;AC1vBa;;AAEb;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,aAAa,oBAAoB;AACjC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC1Ca;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,eAAe,mBAAO,CAAC,CAAoB;;AAE3C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA","file":"rollbar.umd.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"rollbar\"] = factory();\n\telse\n\t\troot[\"rollbar\"] = factory();\n})(this, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n","'use strict';\n\nvar merge = require('./merge');\n\nvar RollbarJSON = {};\nfunction setupJSON(polyfillJSON) {\n if (isFunction(RollbarJSON.stringify) && isFunction(RollbarJSON.parse)) {\n return;\n }\n\n if (isDefined(JSON)) {\n // If polyfill is provided, prefer it over existing non-native shims.\n if(polyfillJSON) {\n if (isNativeFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isNativeFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n } else { // else accept any interface that is present.\n if (isFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n }\n }\n if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {\n polyfillJSON && polyfillJSON(RollbarJSON);\n }\n}\n\n/*\n * isType - Given a Javascript value and a string, returns true if the type of the value matches the\n * given string.\n *\n * @param x - any value\n * @param t - a lowercase string containing one of the following type names:\n * - undefined\n * - null\n * - error\n * - number\n * - boolean\n * - string\n * - symbol\n * - function\n * - object\n * - array\n * @returns true if x is of type t, otherwise false\n */\nfunction isType(x, t) {\n return t === typeName(x);\n}\n\n/*\n * typeName - Given a Javascript value, returns the type of the object as a string\n */\nfunction typeName(x) {\n var name = typeof x;\n if (name !== 'object') {\n return name;\n }\n if (!x) {\n return 'null';\n }\n if (x instanceof Error) {\n return 'error';\n }\n return ({}).toString.call(x).match(/\\s([a-zA-Z]+)/)[1].toLowerCase();\n}\n\n/* isFunction - a convenience function for checking if a value is a function\n *\n * @param f - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isFunction(f) {\n return isType(f, 'function');\n}\n\n/* isNativeFunction - a convenience function for checking if a value is a native JS function\n *\n * @param f - any value\n * @returns true if f is a native JS function, otherwise false\n */\nfunction isNativeFunction(f) {\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n var funcMatchString = Function.prototype.toString.call(Object.prototype.hasOwnProperty)\n .replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?');\n var reIsNative = RegExp('^' + funcMatchString + '$');\n return isObject(f) && reIsNative.test(f);\n}\n\n/* isObject - Checks if the argument is an object\n *\n * @param value - any value\n * @returns true is value is an object function is an object)\n*/\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/* isString - Checks if the argument is a string\n *\n * @param value - any value\n * @returns true if value is a string\n*/\nfunction isString(value) {\n return typeof value === 'string' || value instanceof String\n}\n\n/**\n * isFiniteNumber - determines whether the passed value is a finite number\n *\n * @param {*} n - any value\n * @returns true if value is a finite number\n */\n function isFiniteNumber(n) {\n return Number.isFinite(n);\n}\n\n/*\n * isDefined - a convenience function for checking if a value is not equal to undefined\n *\n * @param u - any value\n * @returns true if u is anything other than undefined\n */\nfunction isDefined(u) {\n return !isType(u, 'undefined');\n}\n\n/*\n * isIterable - convenience function for checking if a value can be iterated, essentially\n * whether it is an object or an array.\n *\n * @param i - any value\n * @returns true if i is an object or an array as determined by `typeName`\n */\nfunction isIterable(i) {\n var type = typeName(i);\n return (type === 'object' || type === 'array');\n}\n\n/*\n * isError - convenience function for checking if a value is of an error type\n *\n * @param e - any value\n * @returns true if e is an error\n */\nfunction isError(e) {\n // Detect both Error and Firefox Exception type\n return isType(e, 'error') || isType(e, 'exception');\n}\n\n/* isPromise - a convenience function for checking if a value is a promise\n *\n * @param p - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isPromise(p) {\n return isObject(p) && isType(p.then, 'function');\n}\n\nfunction redact() {\n return '********';\n}\n\n// from http://stackoverflow.com/a/8809472/1138191\nfunction uuid4() {\n var d = now();\n var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n var r = (d + Math.random() * 16) % 16 | 0;\n d = Math.floor(d / 16);\n return (c === 'x' ? r : (r & 0x7 | 0x8)).toString(16);\n });\n return uuid;\n}\n\nvar LEVELS = {\n debug: 0,\n info: 1,\n warning: 2,\n error: 3,\n critical: 4\n};\n\nfunction sanitizeUrl(url) {\n var baseUrlParts = parseUri(url);\n if (!baseUrlParts) {\n return '(unknown)';\n }\n\n // remove a trailing # if there is no anchor\n if (baseUrlParts.anchor === '') {\n baseUrlParts.source = baseUrlParts.source.replace('#', '');\n }\n\n url = baseUrlParts.source.replace('?' + baseUrlParts.query, '');\n return url;\n}\n\nvar parseUriOptions = {\n strictMode: false,\n key: [\n 'source',\n 'protocol',\n 'authority',\n 'userInfo',\n 'user',\n 'password',\n 'host',\n 'port',\n 'relative',\n 'path',\n 'directory',\n 'file',\n 'query',\n 'anchor'\n ],\n q: {\n name: 'queryKey',\n parser: /(?:^|&)([^&=]*)=?([^&]*)/g\n },\n parser: {\n strict: /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n loose: /^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/\n }\n};\n\nfunction parseUri(str) {\n if (!isType(str, 'string')) {\n return undefined;\n }\n\n var o = parseUriOptions;\n var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);\n var uri = {};\n\n for (var i = 0, l = o.key.length; i < l; ++i) {\n uri[o.key[i]] = m[i] || '';\n }\n\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) {\n uri[o.q.name][$1] = $2;\n }\n });\n\n return uri;\n}\n\nfunction addParamsAndAccessTokenToPath(accessToken, options, params) {\n params = params || {};\n params.access_token = accessToken;\n var paramsArray = [];\n var k;\n for (k in params) {\n if (Object.prototype.hasOwnProperty.call(params, k)) {\n paramsArray.push([k, params[k]].join('='));\n }\n }\n var query = '?' + paramsArray.sort().join('&');\n\n options = options || {};\n options.path = options.path || '';\n var qs = options.path.indexOf('?');\n var h = options.path.indexOf('#');\n var p;\n if (qs !== -1 && (h === -1 || h > qs)) {\n p = options.path;\n options.path = p.substring(0,qs) + query + '&' + p.substring(qs+1);\n } else {\n if (h !== -1) {\n p = options.path;\n options.path = p.substring(0,h) + query + p.substring(h);\n } else {\n options.path = options.path + query;\n }\n }\n}\n\nfunction formatUrl(u, protocol) {\n protocol = protocol || u.protocol;\n if (!protocol && u.port) {\n if (u.port === 80) {\n protocol = 'http:';\n } else if (u.port === 443) {\n protocol = 'https:';\n }\n }\n protocol = protocol || 'https:';\n\n if (!u.hostname) {\n return null;\n }\n var result = protocol + '//' + u.hostname;\n if (u.port) {\n result = result + ':' + u.port;\n }\n if (u.path) {\n result = result + u.path;\n }\n return result;\n}\n\nfunction stringify(obj, backup) {\n var value, error;\n try {\n value = RollbarJSON.stringify(obj);\n } catch (jsonError) {\n if (backup && isFunction(backup)) {\n try {\n value = backup(obj);\n } catch (backupError) {\n error = backupError;\n }\n } else {\n error = jsonError;\n }\n }\n return {error: error, value: value};\n}\n\nfunction maxByteSize(string) {\n // The transport will use utf-8, so assume utf-8 encoding.\n //\n // This minimal implementation will accurately count bytes for all UCS-2 and\n // single code point UTF-16. If presented with multi code point UTF-16,\n // which should be rare, it will safely overcount, not undercount.\n //\n // While robust utf-8 encoders exist, this is far smaller and far more performant.\n // For quickly counting payload size for truncation, smaller is better.\n\n var count = 0;\n var length = string.length;\n\n for (var i = 0; i < length; i++) {\n var code = string.charCodeAt(i);\n if (code < 128) { // up to 7 bits\n count = count + 1;\n } else if (code < 2048) { // up to 11 bits\n count = count + 2;\n } else if (code < 65536) { // up to 16 bits\n count = count + 3;\n }\n }\n\n return count;\n}\n\nfunction jsonParse(s) {\n var value, error;\n try {\n value = RollbarJSON.parse(s);\n } catch (e) {\n error = e;\n }\n return {error: error, value: value};\n}\n\nfunction makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n mode,\n backupMessage,\n errorParser\n) {\n var location = {\n url: url || '',\n line: lineno,\n column: colno\n };\n location.func = errorParser.guessFunctionName(location.url, location.line);\n location.context = errorParser.gatherContext(location.url, location.line);\n var href = typeof document !== 'undefined' && document && document.location && document.location.href;\n var useragent = typeof window !== 'undefined' && window && window.navigator && window.navigator.userAgent;\n return {\n 'mode': mode,\n 'message': error ? String(error) : (message || backupMessage),\n 'url': href,\n 'stack': [location],\n 'useragent': useragent\n };\n}\n\nfunction wrapCallback(logger, f) {\n return function(err, resp) {\n try {\n f(err, resp);\n } catch (e) {\n logger.error(e);\n }\n };\n}\n\nfunction nonCircularClone(obj) {\n var seen = [obj];\n\n function clone(obj, seen) {\n var value, name, newSeen, result = {};\n\n try {\n for (name in obj) {\n value = obj[name];\n\n if (value && (isType(value, 'object') || isType(value, 'array'))) {\n if (seen.includes(value)) {\n result[name] = 'Removed circular reference: ' + typeName(value);\n } else {\n newSeen = seen.slice();\n newSeen.push(value);\n result[name] = clone(value, newSeen);\n }\n continue;\n }\n\n result[name] = value;\n }\n } catch (e) {\n result = 'Failed cloning custom data: ' + e.message;\n }\n return result;\n }\n return clone(obj, seen);\n}\n\nfunction createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\n var diagnostic = {};\n var argTypes = [];\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n argTypes.push(typ);\n switch (typ) {\n case 'undefined':\n break;\n case 'string':\n message ? extraArgs.push(arg) : message = arg;\n break;\n case 'function':\n callback = wrapCallback(logger, arg);\n break;\n case 'date':\n extraArgs.push(arg);\n break;\n case 'error':\n case 'domexception':\n case 'exception': // Firefox Exception type\n err ? extraArgs.push(arg) : err = arg;\n break;\n case 'object':\n case 'array':\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n if (requestKeys && typ === 'object' && !request) {\n for (var j = 0, len = requestKeys.length; j < len; ++j) {\n if (arg[requestKeys[j]] !== undefined) {\n request = arg;\n break;\n }\n }\n if (request) {\n break;\n }\n }\n custom ? extraArgs.push(arg) : custom = arg;\n break;\n default:\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n extraArgs.push(arg);\n }\n }\n\n // if custom is an array this turns it into an object with integer keys\n if (custom) custom = nonCircularClone(custom);\n\n if (extraArgs.length > 0) {\n if (!custom) custom = nonCircularClone({});\n custom.extraArgs = nonCircularClone(extraArgs);\n }\n\n var item = {\n message: message,\n err: err,\n custom: custom,\n timestamp: now(),\n callback: callback,\n notifier: notifier,\n diagnostic: diagnostic,\n uuid: uuid4()\n };\n\n setCustomItemKeys(item, custom);\n\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n item.diagnostic.original_arg_types = argTypes;\n return item;\n}\n\nfunction setCustomItemKeys(item, custom) {\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (custom && custom.skipFrames !== undefined) {\n item.skipFrames = custom.skipFrames;\n delete custom.skipFrames;\n }\n}\n\nfunction addErrorContext(item, errors) {\n var custom = item.data.custom || {};\n var contextAdded = false;\n\n try {\n for (var i = 0; i < errors.length; ++i) {\n if (errors[i].hasOwnProperty('rollbarContext')) {\n custom = merge(custom, nonCircularClone(errors[i].rollbarContext));\n contextAdded = true;\n }\n }\n\n // Avoid adding an empty object to the data.\n if (contextAdded) {\n item.data.custom = custom;\n }\n } catch (e) {\n item.diagnostic.error_context = 'Failed: ' + e.message;\n }\n}\n\nvar TELEMETRY_TYPES = ['log', 'network', 'dom', 'navigation', 'error', 'manual'];\nvar TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];\n\nfunction arrayIncludes(arr, val) {\n for (var k = 0; k < arr.length; ++k) {\n if (arr[k] === val) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction createTelemetryEvent(args) {\n var type, metadata, level;\n var arg;\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n switch (typ) {\n case 'string':\n if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {\n type = arg;\n } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {\n level = arg;\n }\n break;\n case 'object':\n metadata = arg;\n break;\n default:\n break;\n }\n }\n var event = {\n type: type || 'manual',\n metadata: metadata || {},\n level: level\n };\n\n return event;\n}\n\n/*\n * get - given an obj/array and a keypath, return the value at that keypath or\n * undefined if not possible.\n *\n * @param obj - an object or array\n * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'\n * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`\n */\nfunction get(obj, path) {\n if (!obj) {\n return undefined;\n }\n var keys = path.split('.');\n var result = obj;\n try {\n for (var i = 0, len = keys.length; i < len; ++i) {\n result = result[keys[i]];\n }\n } catch (e) {\n result = undefined;\n }\n return result;\n}\n\nfunction set(obj, path, value) {\n if (!obj) {\n return;\n }\n var keys = path.split('.');\n var len = keys.length;\n if (len < 1) {\n return;\n }\n if (len === 1) {\n obj[keys[0]] = value;\n return;\n }\n try {\n var temp = obj[keys[0]] || {};\n var replacement = temp;\n for (var i = 1; i < len - 1; ++i) {\n temp[keys[i]] = temp[keys[i]] || {};\n temp = temp[keys[i]];\n }\n temp[keys[len-1]] = value;\n obj[keys[0]] = replacement;\n } catch (e) {\n return;\n }\n}\n\nfunction formatArgsAsString(args) {\n var i, len, arg;\n var result = [];\n for (i = 0, len = args.length; i < len; ++i) {\n arg = args[i];\n switch (typeName(arg)) {\n case 'object':\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500) {\n arg = arg.substr(0, 497) + '...';\n }\n break;\n case 'null':\n arg = 'null';\n break;\n case 'undefined':\n arg = 'undefined';\n break;\n case 'symbol':\n arg = arg.toString();\n break;\n }\n result.push(arg);\n }\n return result.join(' ');\n}\n\nfunction now() {\n if (Date.now) {\n return +Date.now();\n }\n return +new Date();\n}\n\nfunction filterIp(requestData, captureIp) {\n if (!requestData || !requestData['user_ip'] || captureIp === true) {\n return;\n }\n var newIp = requestData['user_ip'];\n if (!captureIp) {\n newIp = null;\n } else {\n try {\n var parts;\n if (newIp.indexOf('.') !== -1) {\n parts = newIp.split('.');\n parts.pop();\n parts.push('0');\n newIp = parts.join('.');\n } else if (newIp.indexOf(':') !== -1) {\n parts = newIp.split(':');\n if (parts.length > 2) {\n var beginning = parts.slice(0, 3);\n var slashIdx = beginning[2].indexOf('/');\n if (slashIdx !== -1) {\n beginning[2] = beginning[2].substring(0, slashIdx);\n }\n var terminal = '0000:0000:0000:0000:0000';\n newIp = beginning.concat(terminal).join(':');\n }\n } else {\n newIp = null;\n }\n } catch (e) {\n newIp = null;\n }\n }\n requestData['user_ip'] = newIp;\n}\n\nfunction handleOptions(current, input, payload, logger) {\n var result = merge(current, input, payload);\n result = updateDeprecatedOptions(result, logger);\n if (!input || input.overwriteScrubFields) {\n return result;\n }\n if (input.scrubFields) {\n result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);\n }\n return result;\n}\n\nfunction updateDeprecatedOptions(options, logger) {\n if(options.hostWhiteList && !options.hostSafeList) {\n options.hostSafeList = options.hostWhiteList;\n options.hostWhiteList = undefined;\n logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');\n }\n if(options.hostBlackList && !options.hostBlockList) {\n options.hostBlockList = options.hostBlackList;\n options.hostBlackList = undefined;\n logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');\n }\n return options;\n}\n\nmodule.exports = {\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n createItem: createItem,\n addErrorContext: addErrorContext,\n createTelemetryEvent: createTelemetryEvent,\n filterIp: filterIp,\n formatArgsAsString: formatArgsAsString,\n formatUrl: formatUrl,\n get: get,\n handleOptions: handleOptions,\n isError: isError,\n isFiniteNumber: isFiniteNumber,\n isFunction: isFunction,\n isIterable: isIterable,\n isNativeFunction: isNativeFunction,\n isObject: isObject,\n isString: isString,\n isType: isType,\n isPromise: isPromise,\n jsonParse: jsonParse,\n LEVELS: LEVELS,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n merge: merge,\n now: now,\n redact: redact,\n RollbarJSON: RollbarJSON,\n sanitizeUrl: sanitizeUrl,\n set: set,\n setupJSON: setupJSON,\n stringify: stringify,\n maxByteSize: maxByteSize,\n typeName: typeName,\n uuid4: uuid4\n};\n","'use strict';\n\n/* eslint-disable no-console */\nrequire('console-polyfill');\nvar detection = require('./detection');\nvar _ = require('../utility');\n\nfunction error() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.error(_.formatArgsAsString(args));\n } else {\n console.error.apply(console, args);\n }\n}\n\nfunction info() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.info(_.formatArgsAsString(args));\n } else {\n console.info.apply(console, args);\n }\n}\n\nfunction log() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.log(_.formatArgsAsString(args));\n } else {\n console.log.apply(console, args);\n }\n}\n\n/* eslint-enable no-console */\n\nmodule.exports = {\n error: error,\n info: info,\n log: log\n};\n","'use strict';\n\n// See https://nodejs.org/docs/latest/api/url.html\nfunction parse(url) {\n var result = {\n protocol: null, auth: null, host: null, path: null,\n hash: null, href: url, hostname: null, port: null,\n pathname: null, search: null, query: null\n };\n\n var i, last;\n i = url.indexOf('//');\n if (i !== -1) {\n result.protocol = url.substring(0,i);\n last = i+2;\n } else {\n last = 0;\n }\n \n i = url.indexOf('@', last);\n if (i !== -1) {\n result.auth = url.substring(last, i);\n last = i+1;\n }\n\n i = url.indexOf('/', last);\n if (i === -1) {\n i = url.indexOf('?', last);\n if (i === -1) {\n i = url.indexOf('#', last);\n if (i === -1) {\n result.host = url.substring(last);\n } else {\n result.host = url.substring(last, i);\n result.hash = url.substring(i);\n }\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n return result;\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n\n i = url.indexOf('#', last);\n if (i === -1) {\n result.path = url.substring(last);\n } else {\n result.path = url.substring(last, i);\n result.hash = url.substring(i);\n }\n\n if (result.path) {\n var pathParts = result.path.split('?');\n result.pathname = pathParts[0];\n result.query = pathParts[1];\n result.search = result.query ? '?' + result.query : null;\n }\n return result;\n}\n\nmodule.exports = {\n parse: parse\n};\n","'use strict';\n\nvar ErrorStackParser = require('error-stack-parser');\n\nvar UNKNOWN_FUNCTION = '?';\nvar ERR_CLASS_REGEXP = new RegExp('^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ');\n\nfunction guessFunctionName() {\n return UNKNOWN_FUNCTION;\n}\n\n\nfunction gatherContext() {\n return null;\n}\n\n\nfunction Frame(stackFrame) {\n var data = {};\n\n data._stackFrame = stackFrame;\n\n data.url = stackFrame.fileName;\n data.line = stackFrame.lineNumber;\n data.func = stackFrame.functionName;\n data.column = stackFrame.columnNumber;\n data.args = stackFrame.args;\n\n data.context = gatherContext();\n\n return data;\n}\n\n\nfunction Stack(exception, skip) {\n function getStack() {\n var parserStack = [];\n\n skip = skip || 0;\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch(e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = skip; i < parserStack.length; i++) {\n stack.push(new Frame(parserStack[i]));\n }\n\n return stack;\n }\n\n return {\n stack: getStack(),\n message: exception.message,\n name: _mostSpecificErrorName(exception),\n rawStack: exception.stack,\n rawException: exception\n };\n}\n\n\nfunction parse(e, skip) {\n var err = e;\n\n if (err.nested) {\n var traceChain = [];\n while (err) {\n traceChain.push(new Stack(err, skip));\n err = err.nested;\n\n skip = 0; // Only apply skip value to primary error\n }\n\n // Return primary error with full trace chain attached.\n traceChain[0].traceChain = traceChain;\n return traceChain[0];\n } else {\n return new Stack(err, skip);\n }\n}\n\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg || !errMsg.match) {\n return ['Unknown error. There was no error message to display.', ''];\n }\n var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);\n var errClass = '(unknown)';\n\n if (errClassMatch) {\n errClass = errClassMatch[errClassMatch.length - 1];\n errMsg = errMsg.replace((errClassMatch[errClassMatch.length - 2] || '') + errClass + ':', '');\n errMsg = errMsg.replace(/(^[\\s]+|[\\s]+$)/g, '');\n }\n return [errClass, errMsg];\n}\n\n// * Prefers any value over an empty string\n// * Prefers any value over 'Error' where possible\n// * Prefers name over constructor.name when both are more specific than 'Error'\nfunction _mostSpecificErrorName(error) {\n var name = error.name && error.name.length && error.name;\n var constructorName = error.constructor.name && error.constructor.name.length && error.constructor.name;\n\n if (!name || !constructorName) {\n return name || constructorName;\n }\n\n if (name === 'Error') {\n return constructorName;\n }\n return name;\n}\n\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame\n};\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction scrub(data, scrubFields, scrubPaths) {\n scrubFields = scrubFields || [];\n\n if (scrubPaths) {\n for (var i = 0; i < scrubPaths.length; ++i) {\n scrubPath(data, scrubPaths[i]);\n }\n }\n\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart) {\n return paramPart + _.redact();\n }\n\n function paramScrubber(v) {\n var i;\n if (_.isType(v, 'string')) {\n for (i = 0; i < queryRes.length; ++i) {\n v = v.replace(queryRes[i], redactQueryParam);\n }\n }\n return v;\n }\n\n function valScrubber(k, v) {\n var i;\n for (i = 0; i < paramRes.length; ++i) {\n if (paramRes[i].test(k)) {\n v = _.redact();\n break;\n }\n }\n return v;\n }\n\n function scrubber(k, v, seen) {\n var tmpV = valScrubber(k, v);\n if (tmpV === v) {\n if (_.isType(v, 'object') || _.isType(v, 'array')) {\n return traverse(v, scrubber, seen);\n }\n return paramScrubber(tmpV);\n } else {\n return tmpV;\n }\n }\n\n return traverse(data, scrubber);\n}\n\nfunction scrubPath(obj, path) {\n var keys = path.split('.');\n var last = keys.length - 1;\n try {\n for (var i = 0; i <= last; ++i) {\n if (i < last) {\n obj = obj[keys[i]];\n } else {\n obj[keys[i]] = _.redact();\n }\n }\n } catch (e) {\n // Missing key is OK;\n }\n}\n\nfunction _getScrubFieldRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '^\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?$';\n ret.push(new RegExp(pat, 'i'));\n }\n return ret;\n}\n\n\nfunction _getScrubQueryParamRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?';\n ret.push(new RegExp('(' + pat + '=)([^&\\\\n]+)', 'igm'));\n }\n return ret;\n}\n\nmodule.exports = scrub;\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction traverse(obj, func, seen) {\n var k, v, i;\n var isObj = _.isType(obj, 'object');\n var isArray = _.isType(obj, 'array');\n var keys = [];\n var seenIndex;\n\n // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.\n seen = seen || { obj: [], mapped: []};\n\n if (isObj) {\n seenIndex = seen.obj.indexOf(obj);\n\n if (isObj && seenIndex !== -1) {\n // Prefer the mapped object if there is one.\n return seen.mapped[seenIndex] || seen.obj[seenIndex];\n }\n\n seen.obj.push(obj);\n seenIndex = seen.obj.length - 1;\n }\n\n if (isObj) {\n for (k in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, k)) {\n keys.push(k);\n }\n }\n } else if (isArray) {\n for (i = 0; i < obj.length; ++i) {\n keys.push(i);\n }\n }\n\n var result = isObj ? {} : [];\n var same = true;\n for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n result[k] = func(k, v, seen);\n same = same && result[k] === obj[k];\n }\n\n if (isObj && !same) {\n seen.mapped[seenIndex] = result;\n }\n\n return !same ? result : obj;\n}\n\nmodule.exports = traverse;\n","'use strict';\n\nvar rollbar = require('../rollbar');\n\nvar options = (typeof window !== 'undefined') && window._rollbarConfig;\nvar alias = options && options.globalAlias || 'Rollbar';\nvar shimRunning = (typeof window !== 'undefined') && window[alias] && typeof window[alias].shimId === 'function' && window[alias].shimId() !== undefined;\n\nif ((typeof window !== 'undefined') && !window._rollbarStartTime) {\n window._rollbarStartTime = (new Date()).getTime();\n}\n\nif (!shimRunning && options) {\n var Rollbar = new rollbar(options);\n window[alias] = Rollbar;\n} else if (typeof window !== 'undefined') {\n window.rollbar = rollbar;\n window._rollbarDidLoad = true;\n} else if (typeof self !== 'undefined') {\n self.rollbar = rollbar;\n self._rollbarDidLoad = true;\n}\n\nmodule.exports = rollbar;\n","'use strict';\n\nvar Rollbar = require('./core');\nvar telemeter = require('../telemetry');\nvar instrumenter = require('./telemetry');\nvar polyfillJSON = require('../utility/polyfillJSON');\nvar wrapGlobals = require('./wrapGlobals');\nvar scrub = require('../scrub');\nvar truncation = require('../truncation');\n\nRollbar.setComponents({\n telemeter: telemeter,\n instrumenter: instrumenter,\n polyfillJSON: polyfillJSON,\n wrapGlobals: wrapGlobals,\n scrub: scrub,\n truncation: truncation\n});\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar Client = require('../rollbar');\nvar _ = require('../utility');\nvar API = require('../api');\nvar logger = require('./logger');\nvar globals = require('./globalSetup');\n\nvar Transport = require('./transport');\nvar urllib = require('./url');\n\nvar transforms = require('./transforms');\nvar sharedTransforms = require('../transforms');\nvar predicates = require('./predicates');\nvar sharedPredicates = require('../predicates');\nvar errorParser = require('../errorParser');\n\nfunction Rollbar(options, client) {\n this.options = _.handleOptions(defaultOptions, options, null, logger);\n this.options._configuredOptions = options;\n var Telemeter = this.components.telemeter;\n var Instrumenter = this.components.instrumenter;\n var polyfillJSON = this.components.polyfillJSON;\n this.wrapGlobals = this.components.wrapGlobals;\n this.scrub = this.components.scrub;\n var truncation = this.components.truncation;\n\n var transport = new Transport(truncation);\n var api = new API(this.options, transport, urllib, truncation);\n if (Telemeter) {\n this.telemeter = new Telemeter(this.options);\n }\n this.client = client || new Client(this.options, api, logger, this.telemeter, 'browser');\n var gWindow = _gWindow();\n var gDocument = (typeof document != 'undefined') && document;\n this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers\n this.anonymousErrorsPending = 0;\n addTransformsToNotifier(this.client.notifier, this, gWindow);\n addPredicatesToQueue(this.client.queue);\n this.setupUnhandledCapture();\n if (Instrumenter) {\n this.instrumenter = new Instrumenter(this.options, this.client.telemeter, this, gWindow, gDocument);\n this.instrumenter.instrument();\n }\n _.setupJSON(polyfillJSON);\n}\n\nvar _instance = null;\nRollbar.init = function(options, client) {\n if (_instance) {\n return _instance.global(options).configure(options);\n }\n _instance = new Rollbar(options, client);\n return _instance;\n};\n\nRollbar.prototype.components = {};\n\nRollbar.setComponents = function(components) {\n Rollbar.prototype.components = components;\n}\n\nfunction handleUninitialized(maybeCallback) {\n var message = 'Rollbar is not initialized';\n logger.error(message);\n if (maybeCallback) {\n maybeCallback(new Error(message));\n }\n}\n\nRollbar.prototype.global = function(options) {\n this.client.global(options);\n return this;\n};\nRollbar.global = function(options) {\n if (_instance) {\n return _instance.global(options);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.configure = function(options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = {payload: payloadData};\n }\n this.options = _.handleOptions(oldOptions, options, payload, logger);\n this.options._configuredOptions = _.handleOptions(oldOptions._configuredOptions, options, payload);\n this.client.configure(this.options, payloadData);\n this.instrumenter && this.instrumenter.configure(this.options);\n this.setupUnhandledCapture();\n return this;\n};\nRollbar.configure = function(options, payloadData) {\n if (_instance) {\n return _instance.configure(options, payloadData);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.lastError = function() {\n return this.client.lastError;\n};\nRollbar.lastError = function() {\n if (_instance) {\n return _instance.lastError();\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.log = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.log(item);\n return {uuid: uuid};\n};\nRollbar.log = function() {\n if (_instance) {\n return _instance.log.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.debug = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.debug(item);\n return {uuid: uuid};\n};\nRollbar.debug = function() {\n if (_instance) {\n return _instance.debug.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.info = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.info(item);\n return {uuid: uuid};\n};\nRollbar.info = function() {\n if (_instance) {\n return _instance.info.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warn = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warn(item);\n return {uuid: uuid};\n};\nRollbar.warn = function() {\n if (_instance) {\n return _instance.warn.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warning = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warning(item);\n return {uuid: uuid};\n};\nRollbar.warning = function() {\n if (_instance) {\n return _instance.warning.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.error = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.error(item);\n return {uuid: uuid};\n};\nRollbar.error = function() {\n if (_instance) {\n return _instance.error.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.critical = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.critical(item);\n return {uuid: uuid};\n};\nRollbar.critical = function() {\n if (_instance) {\n return _instance.critical.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.buildJsonPayload = function(item) {\n return this.client.buildJsonPayload(item);\n};\nRollbar.buildJsonPayload = function() {\n if (_instance) {\n return _instance.buildJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.sendJsonPayload = function(jsonPayload) {\n return this.client.sendJsonPayload(jsonPayload);\n};\nRollbar.sendJsonPayload = function() {\n if (_instance) {\n return _instance.sendJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.setupUnhandledCapture = function() {\n var gWindow = _gWindow();\n\n if (!this.unhandledExceptionsInitialized) {\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(gWindow, this);\n if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {\n this.wrapGlobals(gWindow, this);\n }\n this.unhandledExceptionsInitialized = true;\n }\n }\n if (!this.unhandledRejectionsInitialized) {\n if (this.options.captureUnhandledRejections || this.options.handleUnhandledRejections) {\n globals.captureUnhandledRejections(gWindow, this);\n this.unhandledRejectionsInitialized = true;\n }\n }\n};\n\nRollbar.prototype.handleUncaughtException = function(message, url, lineno, colno, error, context) {\n if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {\n return;\n }\n\n // Chrome will always send 5+ arguments and error will be valid or null, not undefined.\n // If error is undefined, we have a different caller.\n // Chrome also sends errors from web workers with null error, but does not invoke\n // prepareStackTrace() for these. Test for empty url to skip them.\n if (this.options.inspectAnonymousErrors && this.isChrome && error === null && url === '') {\n return 'anonymous';\n }\n\n var item;\n var stackInfo = _.makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n 'onerror',\n 'uncaught exception',\n errorParser\n );\n if (_.isError(error)) {\n item = this._createItem([message, error, context]);\n item._unhandledStackInfo = stackInfo;\n } else if (_.isError(url)) {\n item = this._createItem([message, url, context]);\n item._unhandledStackInfo = stackInfo;\n } else {\n item = this._createItem([message, context]);\n item.stackInfo = stackInfo;\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n this.client.log(item);\n};\n\n/**\n * Chrome only. Other browsers will ignore.\n *\n * Use Error.prepareStackTrace to extract information about errors that\n * do not have a valid error object in onerror().\n *\n * In tested version of Chrome, onerror is called first but has no way\n * to communicate with prepareStackTrace. Use a counter to let this\n * handler know which errors to send to Rollbar.\n *\n * In config options, set inspectAnonymousErrors to enable.\n */\nRollbar.prototype.handleAnonymousErrors = function() {\n if (!this.options.inspectAnonymousErrors || !this.isChrome) {\n return;\n }\n\n var r = this;\n function prepareStackTrace(error, _stack) { // eslint-disable-line no-unused-vars\n if (r.options.inspectAnonymousErrors) {\n if (r.anonymousErrorsPending) {\n // This is the only known way to detect that onerror saw an anonymous error.\n // It depends on onerror reliably being called before Error.prepareStackTrace,\n // which so far holds true on tested versions of Chrome. If versions of Chrome\n // are tested that behave differently, this logic will need to be updated\n // accordingly.\n r.anonymousErrorsPending -= 1;\n\n if (!error) {\n // Not likely to get here, but calling handleUncaughtException from here\n // without an error object would throw off the anonymousErrorsPending counter,\n // so return now.\n return;\n }\n\n // Allow this to be tracked later.\n error._isAnonymous = true;\n\n // url, lineno, colno shouldn't be needed for these errors.\n // If that changes, update this accordingly, using the unused\n // _stack param as needed (rather than parse error.toString()).\n r.handleUncaughtException(error.message, null, null, null, error);\n }\n }\n\n // Workaround to ensure stack is preserved for normal errors.\n return error.stack;\n }\n\n // https://v8.dev/docs/stack-trace-api\n try {\n Error.prepareStackTrace = prepareStackTrace;\n } catch (e) {\n this.options.inspectAnonymousErrors = false;\n this.error('anonymous error handler failed', e);\n }\n}\n\nRollbar.prototype.handleUnhandledRejection = function(reason, promise) {\n if (!this.options.captureUnhandledRejections && !this.options.handleUnhandledRejections) {\n return;\n }\n\n var message = 'unhandled rejection was null or undefined!';\n if (reason) {\n if (reason.message) {\n message = reason.message;\n } else {\n var reasonResult = _.stringify(reason);\n if (reasonResult.value) {\n message = reasonResult.value;\n }\n }\n }\n var context = (reason && reason._rollbarContext) || (promise && promise._rollbarContext);\n\n var item;\n if (_.isError(reason)) {\n item = this._createItem([message, reason, context]);\n } else {\n item = this._createItem([message, reason, context]);\n item.stackInfo = _.makeUnhandledStackInfo(\n message,\n '',\n 0,\n 0,\n null,\n 'unhandledrejection',\n '',\n errorParser\n );\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n item._originalArgs = item._originalArgs || [];\n item._originalArgs.push(promise);\n this.client.log(item);\n};\n\nRollbar.prototype.wrap = function(f, context, _before) {\n try {\n var ctxFn;\n if(_.isFunction(context)) {\n ctxFn = context;\n } else {\n ctxFn = function() { return context || {}; };\n }\n\n if (!_.isFunction(f)) {\n return f;\n }\n\n if (f._isWrap) {\n return f;\n }\n\n if (!f._rollbar_wrapped) {\n f._rollbar_wrapped = function () {\n if (_before && _.isFunction(_before)) {\n _before.apply(this, arguments);\n }\n try {\n return f.apply(this, arguments);\n } catch(exc) {\n var e = exc;\n if (e && window._rollbarWrappedError !== e) {\n if (_.isType(e, 'string')) {\n e = new String(e);\n }\n e._rollbarContext = ctxFn() || {};\n e._rollbarContext._wrappedSource = f.toString();\n\n window._rollbarWrappedError = e;\n }\n throw e;\n }\n };\n\n f._rollbar_wrapped._isWrap = true;\n\n if (f.hasOwnProperty) {\n for (var prop in f) {\n if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {\n f._rollbar_wrapped[prop] = f[prop];\n }\n }\n }\n }\n\n return f._rollbar_wrapped;\n } catch (e) {\n // Return the original function if the wrap fails.\n return f;\n }\n};\nRollbar.wrap = function(f, context) {\n if (_instance) {\n return _instance.wrap(f, context);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.captureEvent = function() {\n var event = _.createTelemetryEvent(arguments);\n return this.client.captureEvent(event.type, event.metadata, event.level);\n};\nRollbar.captureEvent = function() {\n if (_instance) {\n return _instance.captureEvent.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\n// The following two methods are used internally and are not meant for public use\nRollbar.prototype.captureDomContentLoaded = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureLoad(ts);\n};\n\n/* Internal */\n\nfunction addTransformsToNotifier(notifier, rollbar, gWindow) {\n notifier\n .addTransform(transforms.handleDomException)\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(gWindow))\n .addTransform(transforms.addClientInfo(gWindow))\n .addTransform(transforms.addPluginInfo(gWindow))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(sharedTransforms.addConfigToPayload)\n .addTransform(transforms.addScrubber(rollbar.scrub))\n .addTransform(sharedTransforms.userTransform(logger))\n .addTransform(sharedTransforms.addConfiguredOptions)\n .addTransform(sharedTransforms.addDiagnosticKeys)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(sharedPredicates.checkLevel)\n .addPredicate(predicates.checkIgnore)\n .addPredicate(sharedPredicates.userCheckIgnore(logger))\n .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))\n .addPredicate(sharedPredicates.urlIsSafeListed(logger))\n .addPredicate(sharedPredicates.messageIsIgnored(logger));\n}\n\nRollbar.prototype.loadFull = function() {\n logger.info('Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.');\n};\n\nRollbar.prototype._createItem = function(args) {\n return _.createItem(args, logger, this);\n};\n\nfunction _getFirstFunction(args) {\n for (var i = 0, len = args.length; i < len; ++i) {\n if (_.isFunction(args[i])) {\n return args[i];\n }\n }\n return undefined;\n}\n\nfunction _gWindow() {\n return ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n}\n\nvar defaults = require('../defaults');\nvar scrubFields = require('./defaults/scrubFields');\n\nvar defaultOptions = {\n version: defaults.version,\n scrubFields: scrubFields.scrubFields,\n logLevel: defaults.logLevel,\n reportLevel: defaults.reportLevel,\n uncaughtErrorLevel: defaults.uncaughtErrorLevel,\n endpoint: defaults.endpoint,\n verbose: false,\n enabled: true,\n transmit: true,\n sendConfig: false,\n includeItemsInTelemetry: true,\n captureIp: true,\n inspectAnonymousErrors: true,\n ignoreDuplicateErrors: true,\n wrapGlobalEventHandlers: false\n};\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar _ = require('./utility');\n\n/*\n * Rollbar - the interface to Rollbar\n *\n * @param options\n * @param api\n * @param logger\n */\nfunction Rollbar(options, api, logger, telemeter, platform) {\n this.options = _.merge(options);\n this.logger = logger;\n Rollbar.rateLimiter.configureGlobal(this.options);\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.api = api;\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n\n // This must happen before the Notifier is created\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = telemeter;\n setStackTraceLimit(options);\n this.lastError = null;\n this.lastErrorHash = 'none';\n}\n\nvar defaultOptions = {\n maxItems: 0,\n itemsPerMinute: 60\n};\n\nRollbar.rateLimiter = new RateLimiter(defaultOptions);\n\nRollbar.prototype.global = function (options) {\n Rollbar.rateLimiter.configureGlobal(options);\n return this;\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n\n this.options = _.merge(oldOptions, options, payload);\n\n // This must happen before the Notifier is configured\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier && this.notifier.configure(this.options);\n this.telemeter && this.telemeter.configure(this.options);\n setStackTraceLimit(options);\n this.global(this.options);\n\n if (validateTracer(options.tracer)) {\n this.tracer = options.tracer\n }\n\n return this;\n};\n\nRollbar.prototype.log = function (item) {\n var level = this._defaultLogLevel();\n return this._log(level, item);\n};\n\nRollbar.prototype.debug = function (item) {\n this._log('debug', item);\n};\n\nRollbar.prototype.info = function (item) {\n this._log('info', item);\n};\n\nRollbar.prototype.warn = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.warning = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.error = function (item) {\n this._log('error', item);\n};\n\nRollbar.prototype.critical = function (item) {\n this._log('critical', item);\n};\n\nRollbar.prototype.wait = function (callback) {\n this.queue.wait(callback);\n};\n\nRollbar.prototype.captureEvent = function (type, metadata, level) {\n return this.telemeter && this.telemeter.captureEvent(type, metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function (ts) {\n return this.telemeter && this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (ts) {\n return this.telemeter && this.telemeter.captureLoad(ts);\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.api.buildJsonPayload(item);\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n this.api.postJsonPayload(jsonPayload);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function (defaultLevel, item) {\n var callback;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {\n if (callback) {\n var error = new Error('ignored identical item');\n error.item = item;\n callback(error);\n }\n return;\n }\n try {\n this._addTracingInfo(item);\n item.level = item.level || defaultLevel;\n this.telemeter && this.telemeter._captureRollbarItem(item);\n item.telemetryEvents = (this.telemeter && this.telemeter.copyEvents()) || [];\n this.notifier.log(item, callback);\n } catch (e) {\n if (callback) {\n callback(e);\n }\n this.logger.error(e);\n }\n};\n\nRollbar.prototype._defaultLogLevel = function () {\n return this.options.logLevel || 'debug';\n};\n\nRollbar.prototype._sameAsLastError = function (item) {\n if (!item._isUncaught) {\n return false;\n }\n var itemHash = generateItemHash(item);\n if (this.lastErrorHash === itemHash) {\n return true;\n }\n this.lastError = item.err;\n this.lastErrorHash = itemHash;\n return false;\n};\n\nRollbar.prototype._addTracingInfo = function (item) {\n // Tracer validation occurs in the constructor\n // or in the Rollbar.prototype.configure methods\n if (this.tracer) {\n // add rollbar occurrence uuid to span\n var span = this.tracer.scope().active();\n\n if (validateSpan(span)) {\n span.setTag('rollbar.error_uuid', item.uuid);\n span.setTag('rollbar.has_error', true);\n span.setTag('error', true);\n span.setTag('rollbar.item_url', `https://rollbar.com/item/uuid/?uuid=${item.uuid}`);\n span.setTag('rollbar.occurrence_url', `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`);\n\n // add span ID & trace ID to occurrence\n var opentracingSpanId = span.context().toSpanId();\n var opentracingTraceId = span.context().toTraceId();\n\n if (item.custom) {\n item.custom.opentracing_span_id = opentracingSpanId;\n item.custom.opentracing_trace_id = opentracingTraceId;\n } else {\n item.custom = {\n opentracing_span_id: opentracingSpanId,\n opentracing_trace_id: opentracingTraceId\n };\n }\n }\n }\n}\n\nfunction generateItemHash(item) {\n var message = item.message || '';\n var stack = (item.err || {}).stack || String(item.err);\n return message + '::' + stack;\n}\n\n// Node.js, Chrome, Safari, and some other browsers support this property\n// which globally sets the number of stack frames returned in an Error object.\n// If a browser can't use it, no harm done.\nfunction setStackTraceLimit(options) {\n if (options.stackTraceLimit) {\n Error.stackTraceLimit = options.stackTraceLimit;\n }\n}\n\n/**\n * Validate the Tracer object provided to the Client\n * is valid for our Opentracing use case.\n * @param {opentracer.Tracer} tracer\n */\nfunction validateTracer(tracer) {\n if (!tracer) {\n return false;\n }\n\n if (!tracer.scope || typeof tracer.scope !== 'function') {\n return false;\n }\n\n var scope = tracer.scope();\n\n if (!scope || !scope.active || typeof scope.active !== 'function') {\n return false;\n }\n\n return true;\n}\n\n/**\n * Validate the Span object provided\n * @param {opentracer.Span} span\n */\nfunction validateSpan(span) {\n if (!span || !span.context || typeof span.context !== 'function') {\n return false;\n }\n\n var spanContext = span.context();\n\n if (!spanContext\n || !spanContext.toSpanId\n || !spanContext.toTraceId\n || typeof spanContext.toSpanId !== 'function'\n || typeof spanContext.toTraceId !== 'function') {\n return false\n }\n\n return true;\n}\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar\n *\n * @param options - the same options that are accepted by configureGlobal offered as a convenience\n */\nfunction RateLimiter(options) {\n this.startTime = _.now();\n this.counter = 0;\n this.perMinCounter = 0;\n this.platform = null;\n this.platformOptions = {};\n this.configureGlobal(options);\n}\n\nRateLimiter.globalSettings = {\n startTime: _.now(),\n maxItems: undefined,\n itemsPerMinute: undefined\n};\n\n/*\n * configureGlobal - set the global rate limiter options\n *\n * @param options - Only the following values are recognized:\n * startTime: a timestamp of the form returned by (new Date()).getTime()\n * maxItems: the maximum items\n * itemsPerMinute: the max number of items to send in a given minute\n */\nRateLimiter.prototype.configureGlobal = function(options) {\n if (options.startTime !== undefined) {\n RateLimiter.globalSettings.startTime = options.startTime;\n }\n if (options.maxItems !== undefined) {\n RateLimiter.globalSettings.maxItems = options.maxItems;\n }\n if (options.itemsPerMinute !== undefined) {\n RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;\n }\n};\n\n/*\n * shouldSend - determine if we should send a given item based on rate limit settings\n *\n * @param item - the item we are about to send\n * @returns An object with the following structure:\n * error: (Error|null)\n * shouldSend: bool\n * payload: (Object|null)\n * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and\n * exactly one of error or payload will be non-null. If error is non-null, the returned Error will\n * describe the situation, but it means that we were already over a rate limit (either globally or\n * per minute) when this item was checked. If error is null, and therefore payload is non-null, it\n * means this item put us over the global rate limit and the payload should be sent to Rollbar in\n * place of the passed in item.\n */\nRateLimiter.prototype.shouldSend = function(item, now) {\n now = now || _.now();\n var elapsedTime = now - this.startTime;\n if (elapsedTime < 0 || elapsedTime >= 60000) {\n this.startTime = now;\n this.perMinCounter = 0;\n }\n\n var globalRateLimit = RateLimiter.globalSettings.maxItems;\n var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;\n\n if (checkRate(item, globalRateLimit, this.counter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimit + ' max items reached', false);\n } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimitPerMin + ' items per minute reached', false);\n }\n this.counter++;\n this.perMinCounter++;\n\n var shouldSend = !checkRate(item, globalRateLimit, this.counter);\n var perMinute = shouldSend;\n shouldSend = shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);\n return shouldSendValue(this.platform, this.platformOptions, null, shouldSend, globalRateLimit, globalRateLimitPerMin, perMinute);\n};\n\nRateLimiter.prototype.setPlatformOptions = function(platform, options) {\n this.platform = platform;\n this.platformOptions = options;\n};\n\n/* Helpers */\n\nfunction checkRate(item, limit, counter) {\n return !item.ignoreRateLimit && limit >= 1 && counter > limit;\n}\n\nfunction shouldSendValue(platform, options, error, shouldSend, globalRateLimit, limitPerMin, perMinute) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute);\n }\n return {error: error, shouldSend: shouldSend, payload: payload};\n}\n\nfunction rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute) {\n var environment = options.environment || (options.payload && options.payload.environment);\n var msg;\n if (perMinute) {\n msg = 'item per minute limit reached, ignoring errors until timeout';\n } else {\n msg = 'maxItems has been hit, ignoring errors until reset.';\n }\n var item = {\n body: {\n message: {\n body: msg,\n extra: {\n maxItems: globalRateLimit,\n itemsPerMinute: limitPerMin\n }\n }\n },\n language: 'javascript',\n environment: environment,\n notifier: {\n version: (options.notifier && options.notifier.version) || options.version\n }\n };\n if (platform === 'browser') {\n item.platform = 'browser';\n item.framework = 'browser-js';\n item.notifier.name = 'rollbar-browser-js';\n } else if (platform === 'server') {\n item.framework = options.framework || 'node-js';\n item.notifier.name = options.notifier.name;\n } else if (platform === 'react-native') {\n item.framework = options.framework || 'react-native';\n item.notifier.name = options.notifier.name;\n }\n return item;\n}\n\nmodule.exports = RateLimiter;\n","'use strict';\n\n'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isPlainObject = function isPlainObject(obj) {\n\tif (!obj || toStr.call(obj) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tvar hasOwnConstructor = hasOwn.call(obj, 'constructor');\n\tvar hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n\t// Not own constructor property must be Object\n\tif (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n\t\treturn false;\n\t}\n\n\t// Own properties are enumerated firstly, so to speed up,\n\t// if last one is own, then all properties are own.\n\tvar key;\n\tfor (key in obj) {/**/}\n\n\treturn typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\nfunction merge() {\n var i, src, copy, clone, name,\n result = {},\n current = null,\n length = arguments.length;\n\n for (i=0; i < length; i++) {\n current = arguments[i];\n if (current == null) {\n continue;\n }\n\n for (name in current) {\n src = result[name];\n copy = current[name];\n if (result !== copy) {\n if (copy && isPlainObject(copy)) {\n clone = src && isPlainObject(src) ? src : {};\n result[name] = merge(clone, copy);\n } else if (typeof copy !== 'undefined') {\n result[name] = copy;\n }\n }\n }\n }\n return result;\n}\n\nmodule.exports = merge;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Queue - an object which handles which handles a queue of items to be sent to Rollbar.\n * This object handles rate limiting via a passed in rate limiter, retries based on connection\n * errors, and filtering of items based on a set of configurable predicates. The communication to\n * the backend is performed via a given API object.\n *\n * @param rateLimiter - An object which conforms to the interface\n * rateLimiter.shouldSend(item) -> bool\n * @param api - An object which conforms to the interface\n * api.postItem(payload, function(err, response))\n * @param logger - An object used to log verbose messages if desired\n * @param options - see Queue.prototype.configure\n */\nfunction Queue(rateLimiter, api, logger, options) {\n this.rateLimiter = rateLimiter;\n this.api = api;\n this.logger = logger;\n this.options = options;\n this.predicates = [];\n this.pendingItems = [];\n this.pendingRequests = [];\n this.retryQueue = [];\n this.retryHandle = null;\n this.waitCallback = null;\n this.waitIntervalID = null;\n}\n\n/*\n * configure - updates the options this queue uses\n *\n * @param options\n */\nQueue.prototype.configure = function(options) {\n this.api && this.api.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addPredicate - adds a predicate to the end of the list of predicates for this queue\n *\n * @param predicate - function(item, options) -> (bool|{err: Error})\n * Returning true means that this predicate passes and the item is okay to go on the queue\n * Returning false means do not add the item to the queue, but it is not an error\n * Returning {err: Error} means do not add the item to the queue, and the given error explains why\n * Returning {err: undefined} is equivalent to returning true but don't do that\n */\nQueue.prototype.addPredicate = function(predicate) {\n if (_.isFunction(predicate)) {\n this.predicates.push(predicate);\n }\n return this;\n};\n\nQueue.prototype.addPendingItem = function(item) {\n this.pendingItems.push(item);\n};\n\nQueue.prototype.removePendingItem = function(item) {\n var idx = this.pendingItems.indexOf(item);\n if (idx !== -1) {\n this.pendingItems.splice(idx, 1);\n }\n};\n\n/*\n * addItem - Send an item to the Rollbar API if all of the predicates are satisfied\n *\n * @param item - The payload to send to the backend\n * @param callback - function(error, repsonse) which will be called with the response from the API\n * in the case of a success, otherwise response will be null and error will have a value. If both\n * error and response are null then the item was stopped by a predicate which did not consider this\n * to be an error condition, but nonetheless did not send the item to the API.\n * @param originalError - The original error before any transformations that is to be logged if any\n */\nQueue.prototype.addItem = function(item, callback, originalError, originalItem) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() { return; };\n }\n var predicateResult = this._applyPredicates(item);\n if (predicateResult.stop) {\n this.removePendingItem(originalItem);\n callback(predicateResult.err);\n return;\n }\n this._maybeLog(item, originalError);\n this.removePendingItem(originalItem);\n if (!this.options.transmit) {\n callback(new Error('Transmit disabled'));\n return;\n }\n this.pendingRequests.push(item);\n try {\n this._makeApiRequest(item, function(err, resp) {\n this._dequeuePendingRequest(item);\n callback(err, resp);\n }.bind(this));\n } catch (e) {\n this._dequeuePendingRequest(item);\n callback(e);\n }\n};\n\n/*\n * wait - Stop any further errors from being added to the queue, and get called back when all items\n * currently processing have finished sending to the backend.\n *\n * @param callback - function() called when all pending items have been sent\n */\nQueue.prototype.wait = function(callback) {\n if (!_.isFunction(callback)) {\n return;\n }\n this.waitCallback = callback;\n if (this._maybeCallWait()) {\n return;\n }\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitIntervalID = setInterval(function() {\n this._maybeCallWait();\n }.bind(this), 500);\n};\n\n/* _applyPredicates - Sequentially applies the predicates that have been added to the queue to the\n * given item with the currently configured options.\n *\n * @param item - An item in the queue\n * @returns {stop: bool, err: (Error|null)} - stop being true means do not add item to the queue,\n * the error value should be passed up to a callbak if we are stopping.\n */\nQueue.prototype._applyPredicates = function(item) {\n var p = null;\n for (var i = 0, len = this.predicates.length; i < len; i++) {\n p = this.predicates[i](item, this.options);\n if (!p || p.err !== undefined) {\n return {stop: true, err: p.err};\n }\n }\n return {stop: false, err: null};\n};\n\n/*\n * _makeApiRequest - Send an item to Rollbar, callback when done, if there is an error make an\n * effort to retry if we are configured to do so.\n *\n * @param item - an item ready to send to the backend\n * @param callback - function(err, response)\n */\nQueue.prototype._makeApiRequest = function(item, callback) {\n var rateLimitResponse = this.rateLimiter.shouldSend(item);\n if (rateLimitResponse.shouldSend) {\n this.api.postItem(item, function(err, resp) {\n if (err) {\n this._maybeRetry(err, item, callback);\n } else {\n callback(err, resp);\n }\n }.bind(this));\n } else if (rateLimitResponse.error) {\n callback(rateLimitResponse.error);\n } else {\n this.api.postItem(rateLimitResponse.payload, callback);\n }\n};\n\n// These are errors basically mean there is no internet connection\nvar RETRIABLE_ERRORS = ['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED', 'EHOSTUNREACH', 'EPIPE', 'EAI_AGAIN'];\n\n/*\n * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback\n * with the error.\n *\n * @param err - an error returned by the API transport\n * @param item - the item that was trying to be sent when this error occured\n * @param callback - function(err, response)\n */\nQueue.prototype._maybeRetry = function(err, item, callback) {\n var shouldRetry = false;\n if (this.options.retryInterval) {\n for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {\n if (err.code === RETRIABLE_ERRORS[i]) {\n shouldRetry = true;\n break;\n }\n }\n if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {\n item.retries = item.retries ? item.retries + 1 : 1;\n if (item.retries > this.options.maxRetries) {\n shouldRetry = false;\n }\n }\n }\n if (shouldRetry) {\n this._retryApiRequest(item, callback);\n } else {\n callback(err);\n }\n};\n\n/*\n * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process\n * that queue based on the retryInterval in the options for this queue.\n *\n * @param item - an item that failed to send due to an error we deem retriable\n * @param callback - function(err, response)\n */\nQueue.prototype._retryApiRequest = function(item, callback) {\n this.retryQueue.push({item: item, callback: callback});\n\n if (!this.retryHandle) {\n this.retryHandle = setInterval(function() {\n while (this.retryQueue.length) {\n var retryObject = this.retryQueue.shift();\n this._makeApiRequest(retryObject.item, retryObject.callback);\n }\n }.bind(this), this.options.retryInterval);\n }\n};\n\n/*\n * _dequeuePendingRequest - Removes the item from the pending request queue, this queue is used to\n * enable to functionality of providing a callback that clients can pass to `wait` to be notified\n * when the pending request queue has been emptied. This must be called when the API finishes\n * processing this item. If a `wait` callback is configured, it is called by this function.\n *\n * @param item - the item previously added to the pending request queue\n */\nQueue.prototype._dequeuePendingRequest = function(item) {\n var idx = this.pendingRequests.indexOf(item);\n if (idx !== -1) {\n this.pendingRequests.splice(idx, 1);\n this._maybeCallWait();\n }\n};\n\nQueue.prototype._maybeLog = function(data, originalError) {\n if (this.logger && this.options.verbose) {\n var message = originalError;\n message = message || _.get(data, 'body.trace.exception.message');\n message = message || _.get(data, 'body.trace_chain.0.exception.message');\n if (message) {\n this.logger.error(message);\n return;\n }\n message = _.get(data, 'body.message.body');\n if (message) {\n this.logger.log(message);\n }\n }\n};\n\nQueue.prototype._maybeCallWait = function() {\n if (_.isFunction(this.waitCallback) && this.pendingItems.length === 0 && this.pendingRequests.length === 0) {\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitCallback();\n return true;\n }\n return false;\n};\n\nmodule.exports = Queue;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Notifier - the internal object responsible for delegating between the client exposed API, the\n * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the\n * queue which handles the communcation with the Rollbar API servers.\n *\n * @param queue - an object that conforms to the interface: addItem(item, callback)\n * @param options - an object representing the options to be set for this notifier, this should have\n * any defaults already set by the caller\n */\nfunction Notifier(queue, options) {\n this.queue = queue;\n this.options = options;\n this.transforms = [];\n this.diagnostic = {};\n}\n\n/*\n * configure - updates the options for this notifier with the passed in object\n *\n * @param options - an object which gets merged with the current options set on this notifier\n * @returns this\n */\nNotifier.prototype.configure = function(options) {\n this.queue && this.queue.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addTransform - adds a transform onto the end of the queue of transforms for this notifier\n *\n * @param transform - a function which takes three arguments:\n * * item: An Object representing the data to eventually be sent to Rollbar\n * * options: The current value of the options for this notifier\n * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this\n * callback with a null value for error if it wants the processing chain to continue, otherwise\n * with an error to terminate the processing. The item should be the updated item after this\n * transform is finished modifying it.\n */\nNotifier.prototype.addTransform = function(transform) {\n if (_.isFunction(transform)) {\n this.transforms.push(transform);\n }\n return this;\n};\n\n/*\n * log - the internal log function which applies the configured transforms and then pushes onto the\n * queue to be sent to the backend.\n *\n * @param item - An object with the following structure:\n * message [String] - An optional string to be sent to rollbar\n * error [Error] - An optional error\n *\n * @param callback - A function of type function(err, resp) which will be called with exactly one\n * null argument and one non-null argument. The callback will be called once, either during the\n * transform stage if an error occurs inside a transform, or in response to the communication with\n * the backend. The second argument will be the response from the backend in case of success.\n */\nNotifier.prototype.log = function(item, callback) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!this.options.enabled) {\n return callback(new Error('Rollbar is not enabled'));\n }\n\n this.queue.addPendingItem(item);\n var originalError = item.err;\n this._applyTransforms(item, function(err, i) {\n if (err) {\n this.queue.removePendingItem(item);\n return callback(err, null);\n }\n this.queue.addItem(i, callback, originalError, item);\n }.bind(this));\n};\n\n/* Internal */\n\n/*\n * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See\n * `addTransform` for more information.\n *\n * @param item - An item to be transformed\n * @param callback - A function of type function(err, item) which will be called with a non-null\n * error and a null item in the case of a transform failure, or a null error and non-null item after\n * all transforms have been applied.\n */\nNotifier.prototype._applyTransforms = function(item, callback) {\n var transformIndex = -1;\n var transformsLength = this.transforms.length;\n var transforms = this.transforms;\n var options = this.options;\n\n var cb = function(err, i) {\n if (err) {\n callback(err, null);\n return;\n }\n\n transformIndex++;\n\n if (transformIndex === transformsLength) {\n callback(null, i);\n return;\n }\n\n transforms[transformIndex](i, options, cb);\n };\n\n cb(null, item);\n};\n\nmodule.exports = Notifier;\n","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1/item/',\n search: null,\n version: '1',\n protocol: 'https:',\n port: 443\n};\n\n/**\n * Api is an object that encapsulates methods of communicating with\n * the Rollbar API. It is a standard interface with some parts implemented\n * differently for server or browser contexts. It is an object that should\n * be instantiated when used so it can contain non-global options that may\n * be different for another instance of RollbarApi.\n *\n * @param options {\n * accessToken: the accessToken to use for posting items to rollbar\n * endpoint: an alternative endpoint to send errors to\n * must be a valid, fully qualified URL.\n * The default is: https://api.rollbar.com/api/1/item\n * proxy: if you wish to proxy requests provide an object\n * with the following keys:\n * host or hostname (required): foo.example.com\n * port (optional): 123\n * protocol (optional): https\n * }\n */\nfunction Api(options, transport, urllib, truncation, jsonBackup) {\n this.options = options;\n this.transport = transport;\n this.url = urllib;\n this.truncation = truncation;\n this.jsonBackup = jsonBackup;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, urllib);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function(data, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n this.transport.post(this.accessToken, transportOptions, payload, callback);\n};\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.buildJsonPayload = function(data, callback) {\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n\n if (stringifyResult.error) {\n if (callback) {\n callback(stringifyResult.error);\n }\n return null;\n }\n\n return stringifyResult.value;\n};\n\n/**\n *\n * @param jsonPayload\n * @param callback\n */\nApi.prototype.postJsonPayload = function(jsonPayload, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n this.transport.postJsonPayload(this.accessToken, transportOptions, jsonPayload, callback);\n};\n\nApi.prototype.configure = function(options) {\n var oldOptions = this.oldOptions;\n this.options = _.merge(oldOptions, options);\n this.transportOptions = _getTransport(this.options, this.url);\n if (this.options.accessToken !== undefined) {\n this.accessToken = this.options.accessToken;\n }\n return this;\n};\n\nfunction _getTransport(options, url) {\n return helpers.getTransportFromOptions(options, defaultOptions, url);\n}\n\nmodule.exports = Api;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (!_.isType(data.context, 'string')) {\n var contextResult = _.stringify(data.context, jsonBackup);\n if (contextResult.error) {\n data.context = 'Error: could not serialize \\'context\\'';\n } else {\n data.context = contextResult.value || '';\n }\n if (data.context.length > 255) {\n data.context = data.context.substr(0, 255);\n }\n }\n return {\n access_token: accessToken,\n data: data\n };\n}\n\nfunction getTransportFromOptions(options, defaults, url) {\n var hostname = defaults.hostname;\n var protocol = defaults.protocol;\n var port = defaults.port;\n var path = defaults.path;\n var search = defaults.search;\n var timeout = options.timeout;\n\n var proxy = options.proxy;\n if (options.endpoint) {\n var opts = url.parse(options.endpoint);\n hostname = opts.hostname;\n protocol = opts.protocol;\n port = opts.port;\n path = opts.pathname;\n search = opts.search;\n }\n return {\n timeout: timeout,\n hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy\n };\n}\n\nfunction transportOptions(transport, method) {\n var protocol = transport.protocol || 'https:';\n var port = transport.port || (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);\n var hostname = transport.hostname;\n var path = transport.path;\n var timeout = transport.timeout;\n if (transport.search) {\n path = path + transport.search;\n }\n if (transport.proxy) {\n path = protocol + '//' + hostname + path;\n hostname = transport.proxy.host || transport.proxy.hostname;\n port = transport.proxy.port;\n protocol = transport.proxy.protocol || protocol;\n }\n return {\n timeout: timeout,\n protocol: protocol,\n hostname: hostname,\n path: path,\n port: port,\n method: method\n };\n}\n\nfunction appendPathToPath(base, path) {\n var baseTrailingSlash = /\\/$/.test(base);\n var pathBeginningSlash = /^\\//.test(path);\n\n if (baseTrailingSlash && pathBeginningSlash) {\n path = path.substring(1);\n } else if (!baseTrailingSlash && !pathBeginningSlash) {\n path = '/' + path;\n }\n\n return base + path;\n}\n\nmodule.exports = {\n buildPayload: buildPayload,\n getTransportFromOptions: getTransportFromOptions,\n transportOptions: transportOptions,\n appendPathToPath: appendPathToPath\n};\n","// Console-polyfill. MIT license.\n// https://github.com/paulmillr/console-polyfill\n// Make it safe to do console.log() always.\n(function(global) {\n 'use strict';\n if (!global.console) {\n global.console = {};\n }\n var con = global.console;\n var prop, method;\n var dummy = function() {};\n var properties = ['memory'];\n var methods = ('assert,clear,count,debug,dir,dirxml,error,exception,group,' +\n 'groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,' +\n 'show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn').split(',');\n while (prop = properties.pop()) if (!con[prop]) con[prop] = {};\n while (method = methods.pop()) if (!con[method]) con[method] = dummy;\n // Using `this` for web workers & supports Browserify / Webpack.\n})(typeof window === 'undefined' ? this : window);\n","'use strict';\n\n// This detection.js module is used to encapsulate any ugly browser/feature\n// detection we may need to do.\n\n// Figure out which version of IE we're using, if any.\n// This is gleaned from http://stackoverflow.com/questions/5574842/best-way-to-check-for-ie-less-than-9-in-javascript-without-library\n// Will return an integer on IE (i.e. 8)\n// Will return undefined otherwise\nfunction getIEVersion() {\n\tvar undef;\n\tif (typeof document === 'undefined') {\n\t\treturn undef;\n\t}\n\n var v = 3,\n div = document.createElement('div'),\n all = div.getElementsByTagName('i');\n\n while (\n div.innerHTML = '',\n all[0]\n );\n\n return v > 4 ? v : undef;\n}\n\nvar Detection = {\n ieVersion: getIEVersion\n};\n\nmodule.exports = Detection;\n","'use strict';\n\nfunction captureUncaughtExceptions(window, handler, shim) {\n if (!window) { return; }\n var oldOnError;\n\n if (typeof handler._rollbarOldOnError === 'function') {\n oldOnError = handler._rollbarOldOnError;\n } else if (window.onerror) {\n oldOnError = window.onerror;\n while (oldOnError._rollbarOldOnError) {\n oldOnError = oldOnError._rollbarOldOnError;\n }\n handler._rollbarOldOnError = oldOnError;\n }\n\n handler.handleAnonymousErrors();\n\n var fn = function() {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n if (shim) {\n fn._rollbarOldOnError = oldOnError;\n }\n window.onerror = fn;\n}\n\nfunction _rollbarWindowOnError(window, r, old, args) {\n if (window._rollbarWrappedError) {\n if (!args[4]) {\n args[4] = window._rollbarWrappedError;\n }\n if (!args[5]) {\n args[5] = window._rollbarWrappedError._rollbarContext;\n }\n window._rollbarWrappedError = null;\n }\n\n var ret = r.handleUncaughtException.apply(r, args);\n\n if (old) {\n old.apply(window, args);\n }\n\n // Let other chained onerror handlers above run before setting this.\n // If an error is thrown and caught within a chained onerror handler,\n // Error.prepareStackTrace() will see that one before the one we want.\n if (ret === 'anonymous') {\n r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()\n }\n}\n\nfunction captureUnhandledRejections(window, handler, shim) {\n if (!window) { return; }\n\n if (typeof window._rollbarURH === 'function' && window._rollbarURH.belongsToShim) {\n window.removeEventListener('unhandledrejection', window._rollbarURH);\n }\n\n var rejectionHandler = function (evt) {\n var reason, promise, detail;\n try {\n reason = evt.reason;\n } catch (e) {\n reason = undefined;\n }\n try {\n promise = evt.promise;\n } catch (e) {\n promise = '[unhandledrejection] error getting `promise` from event';\n }\n try {\n detail = evt.detail;\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\n }\n } catch (e) {\n // Ignore\n }\n if (!reason) {\n reason = '[unhandledrejection] error getting `reason` from event';\n }\n\n if (handler && handler.handleUnhandledRejection) {\n handler.handleUnhandledRejection(reason, promise);\n }\n };\n rejectionHandler.belongsToShim = shim;\n window._rollbarURH = rejectionHandler;\n window.addEventListener('unhandledrejection', rejectionHandler);\n}\n\n\nmodule.exports = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections\n};\n","'use strict';\n\n/*global XDomainRequest*/\n\nvar _ = require('../utility');\nvar logger = require('./logger');\n\n/*\n * accessToken may be embedded in payload but that should not\n * be assumed\n *\n * options: {\n * hostname\n * protocol\n * path\n * port\n * method\n * }\n *\n * params is an object containing key/value pairs. These\n * will be appended to the path as 'key=value&key=value'\n *\n * payload is an unserialized object\n */\nfunction Transport(truncation) {\n this.truncation = truncation;\n}\n\nTransport.prototype.get = function(accessToken, options, params, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n _.addParamsAndAccessTokenToPath(accessToken, options, params);\n\n var method = 'GET';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, null, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.post = function(accessToken, options, payload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!payload) {\n return callback(new Error('Cannot send empty request'));\n }\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n if (stringifyResult.error) {\n return callback(stringifyResult.error);\n }\n\n var writeData = stringifyResult.value;\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, writeData, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.postJsonPayload = function (accessToken, options, jsonPayload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, jsonPayload, callback, requestFactory, options.timeout);\n}\n\n\n// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope\n// so Angular change detection isn't triggered on each API call.\n// This is the equivalent of runOutsideAngular().\n//\nfunction _makeZoneRequest() {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;\n var args = Array.prototype.slice.call(arguments);\n\n if (currentZone && currentZone._name === 'angular') {\n var rootZone = currentZone._parent;\n rootZone.run(function () {\n _makeRequest.apply(undefined, args);\n });\n } else {\n _makeRequest.apply(undefined, args);\n }\n}\n\n/* global RollbarProxy */\nfunction _proxyRequest(json, callback) {\n var rollbarProxy = new RollbarProxy();\n rollbarProxy.sendJsonPayload(\n json,\n function(_msg) { /* do nothing */ }, // eslint-disable-line no-unused-vars\n function(err) {\n callback(new Error(err));\n }\n );\n}\n\nfunction _makeRequest(accessToken, url, method, data, callback, requestFactory, timeout) {\n if (typeof RollbarProxy !== 'undefined') {\n return _proxyRequest(data, callback);\n }\n\n var request;\n if (requestFactory) {\n request = requestFactory();\n } else {\n request = _createXMLHTTPObject();\n }\n if (!request) {\n // Give up, no way to send requests\n return callback(new Error('No way to send a request'));\n }\n try {\n try {\n var onreadystatechange = function() {\n try {\n if (onreadystatechange && request.readyState === 4) {\n onreadystatechange = undefined;\n\n var parseResponse = _.jsonParse(request.responseText);\n if (_isSuccess(request)) {\n callback(parseResponse.error, parseResponse.value);\n return;\n } else if (_isNormalFailure(request)) {\n if (request.status === 403) {\n // likely caused by using a server access token\n var message = parseResponse.value && parseResponse.value.message;\n logger.error(message);\n }\n // return valid http status codes\n callback(new Error(String(request.status)));\n } else {\n // IE will return a status 12000+ on some sort of connection failure,\n // so we return a blank error\n // http://msdn.microsoft.com/en-us/library/aa383770%28VS.85%29.aspx\n var msg = 'XHR response had no status code (likely connection failure)';\n callback(_newRetriableError(msg));\n }\n }\n } catch (ex) {\n //jquery source mentions firefox may error out while accessing the\n //request members if there is a network error\n //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111\n var exc;\n if (ex && ex.stack) {\n exc = ex;\n } else {\n exc = new Error(ex);\n }\n callback(exc);\n }\n };\n\n request.open(method, url, true);\n if (request.setRequestHeader) {\n request.setRequestHeader('Content-Type', 'application/json');\n request.setRequestHeader('X-Rollbar-Access-Token', accessToken);\n }\n\n if(_.isFiniteNumber(timeout)) {\n request.timeout = timeout;\n }\n\n request.onreadystatechange = onreadystatechange;\n request.send(data);\n } catch (e1) {\n // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest\n if (typeof XDomainRequest !== 'undefined') {\n\n // Assume we are in a really old browser which has a bunch of limitations:\n // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx\n\n // Extreme paranoia: if we have XDomainRequest then we have a window, but just in case\n if (!window || !window.location) {\n return callback(new Error('No window available during request, unknown environment'));\n }\n\n // If the current page is http, try and send over http\n if (window.location.href.substring(0, 5) === 'http:' && url.substring(0, 5) === 'https') {\n url = 'http' + url.substring(5);\n }\n\n var xdomainrequest = new XDomainRequest();\n xdomainrequest.onprogress = function() {};\n xdomainrequest.ontimeout = function() {\n var msg = 'Request timed out';\n var code = 'ETIMEDOUT';\n callback(_newRetriableError(msg, code));\n };\n xdomainrequest.onerror = function() {\n callback(new Error('Error during request'));\n };\n xdomainrequest.onload = function() {\n var parseResponse = _.jsonParse(xdomainrequest.responseText);\n callback(parseResponse.error, parseResponse.value);\n };\n xdomainrequest.open(method, url, true);\n xdomainrequest.send(data);\n } else {\n callback(new Error('Cannot find a method to transport a request'));\n }\n }\n } catch (e2) {\n callback(e2);\n }\n}\n\nfunction _createXMLHTTPObject() {\n /* global ActiveXObject:false */\n\n var factories = [\n function () {\n return new XMLHttpRequest();\n },\n function () {\n return new ActiveXObject('Msxml2.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Msxml3.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Microsoft.XMLHTTP');\n }\n ];\n var xmlhttp;\n var i;\n var numFactories = factories.length;\n for (i = 0; i < numFactories; i++) {\n /* eslint-disable no-empty */\n try {\n xmlhttp = factories[i]();\n break;\n } catch (e) {\n // pass\n }\n /* eslint-enable no-empty */\n }\n return xmlhttp;\n}\n\nfunction _isSuccess(r) {\n return r && r.status && r.status === 200;\n}\n\nfunction _isNormalFailure(r) {\n return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;\n}\n\nfunction _newRetriableError(message, code) {\n var err = new Error(message);\n err.code = code || 'ENOTFOUND';\n return err;\n}\n\nmodule.exports = Transport;\n","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('../errorParser');\nvar logger = require('./logger');\n\nfunction handleDomException(item, options, callback) {\n if(item.err && errorParser.Stack(item.err).name === 'DOMException') {\n var originalError = new Error();\n originalError.name = item.err.name;\n originalError.message = item.err.message;\n originalError.stack = item.err.stack;\n originalError.nested = item.err;\n item.err = originalError;\n }\n callback(null, item);\n}\n\nfunction handleItemWithError(item, options, callback) {\n item.data = item.data || {};\n if (item.err) {\n try {\n item.stackInfo = item.err._savedStackTrace || errorParser.parse(item.err, item.skipFrames);\n\n if (options.addErrorContext) {\n addErrorContext(item);\n }\n } catch (e) {\n logger.error('Error while parsing the error object.', e);\n try {\n item.message = item.err.message || item.err.description || item.message || String(item.err);\n } catch (e2) {\n item.message = String(item.err) || String(e2);\n }\n delete item.err;\n }\n }\n callback(null, item);\n}\n\nfunction addErrorContext(item) {\n var chain = [];\n var err = item.err;\n\n chain.push(err);\n\n while (err.nested) {\n err = err.nested;\n chain.push(err);\n }\n\n _.addErrorContext(item, chain);\n}\n\nfunction ensureItemHasSomethingToSay(item, options, callback) {\n if (!item.message && !item.stackInfo && !item.custom) {\n callback(new Error('No message, stack info, or custom data'), null);\n }\n callback(null, item);\n}\n\nfunction addBaseInfo(item, options, callback) {\n var environment = (options.payload && options.payload.environment) || options.environment;\n item.data = _.merge(item.data, {\n environment: environment,\n level: item.level,\n endpoint: options.endpoint,\n platform: 'browser',\n framework: 'browser-js',\n language: 'javascript',\n server: {},\n uuid: item.uuid,\n notifier: {\n name: 'rollbar-browser-js',\n version: options.version\n },\n custom: item.custom\n });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.location) {\n return callback(null, item);\n }\n var remoteString = '$remote_ip';\n if (!options.captureIp) {\n remoteString = null;\n } else if (options.captureIp !== true) {\n remoteString += '_anonymize';\n }\n _.set(item, 'data.request', {\n url: window.location.href,\n query_string: window.location.search,\n user_ip: remoteString\n });\n callback(null, item);\n };\n}\n\nfunction addClientInfo(window) {\n return function(item, options, callback) {\n if (!window) {\n return callback(null, item);\n }\n var nav = window.navigator || {};\n var scr = window.screen || {};\n _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: nav.userAgent,\n language: nav.language,\n cookie_enabled: nav.cookieEnabled,\n screen: {\n width: scr.width,\n height: scr.height\n }\n }\n });\n callback(null, item);\n };\n}\n\nfunction addPluginInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.navigator) {\n return callback(null, item);\n }\n var plugins = [];\n var navPlugins = window.navigator.plugins || [];\n var cur;\n for (var i=0, l=navPlugins.length; i < l; ++i) {\n cur = navPlugins[i];\n plugins.push({name: cur.name, description: cur.description});\n }\n _.set(item, 'data.client.javascript.plugins', plugins);\n callback(null, item);\n };\n}\n\nfunction addBody(item, options, callback) {\n if (item.stackInfo) {\n if (item.stackInfo.traceChain) {\n addBodyTraceChain(item, options, callback);\n } else {\n addBodyTrace(item, options, callback);\n }\n } else {\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction addBodyMessage(item, options, callback) {\n var message = item.message;\n var custom = item.custom;\n\n if (!message) {\n message = 'Item sent with null or missing arguments.';\n }\n var result = {\n body: message\n };\n\n if (custom) {\n result.extra = _.merge(custom);\n }\n\n _.set(item, 'data.body', {message: result});\n callback(null, item);\n}\n\nfunction stackFromItem(item) {\n // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = item.stackInfo.stack;\n if (stack && stack.length === 0 && item._unhandledStackInfo && item._unhandledStackInfo.stack) {\n stack = item._unhandledStackInfo.stack;\n }\n return stack;\n}\n\nfunction addBodyTraceChain(item, options, callback) {\n var traceChain = item.stackInfo.traceChain;\n var traces = [];\n\n var traceChainLength = traceChain.length;\n for (var i = 0; i < traceChainLength; i++) {\n var trace = buildTrace(item, traceChain[i], options);\n traces.push(trace);\n }\n\n _.set(item, 'data.body', {trace_chain: traces});\n callback(null, item);\n}\n\nfunction addBodyTrace(item, options, callback) {\n var stack = stackFromItem(item);\n\n if (stack) {\n var trace = buildTrace(item, item.stackInfo, options);\n _.set(item, 'data.body', {trace: trace});\n callback(null, item);\n } else {\n var stackInfo = item.stackInfo;\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction buildTrace(item, stackInfo, options) {\n var description = item && item.data.description;\n var custom = item && item.custom;\n var stack = stackFromItem(item);\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n var trace = {\n exception: {\n 'class': className,\n message: message\n }\n };\n\n if (description) {\n trace.exception.description = description;\n }\n\n if (stack) {\n if (stack.length === 0) {\n trace.exception.stack = stackInfo.rawStack;\n trace.exception.raw = String(stackInfo.rawException);\n }\n var stackFrame;\n var frame;\n var code;\n var pre;\n var post;\n var contextLength;\n var i, mid;\n\n trace.frames = [];\n for (i = 0; i < stack.length; ++i) {\n stackFrame = stack[i];\n frame = {\n filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',\n lineno: stackFrame.line || null,\n method: (!stackFrame.func || stackFrame.func === '?') ? '[anonymous]' : stackFrame.func,\n colno: stackFrame.column\n };\n if (options.sendFrameUrl) {\n frame.url = stackFrame.url;\n }\n if (frame.method && frame.method.endsWith && frame.method.endsWith('_rollbar_wrapped')) {\n continue;\n }\n\n code = pre = post = null;\n contextLength = stackFrame.context ? stackFrame.context.length : 0;\n if (contextLength) {\n mid = Math.floor(contextLength / 2);\n pre = stackFrame.context.slice(0, mid);\n code = stackFrame.context[mid];\n post = stackFrame.context.slice(mid);\n }\n\n if (code) {\n frame.code = code;\n }\n\n if (pre || post) {\n frame.context = {};\n if (pre && pre.length) {\n frame.context.pre = pre;\n }\n if (post && post.length) {\n frame.context.post = post;\n }\n }\n\n if (stackFrame.args) {\n frame.args = stackFrame.args;\n }\n\n trace.frames.push(frame);\n }\n\n // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last\n trace.frames.reverse();\n\n if (custom) {\n trace.extra = _.merge(custom);\n }\n }\n\n return trace;\n}\n\nfunction errorClass(stackInfo, guess, options) {\n if (stackInfo.name) {\n return stackInfo.name;\n } else if (options.guessErrorClass) {\n return guess;\n } else {\n return '(unknown)';\n }\n}\n\nfunction addScrubber(scrubFn) {\n return function (item, options, callback) {\n if (scrubFn) {\n var scrubFields = options.scrubFields || [];\n var scrubPaths = options.scrubPaths || [];\n item.data = scrubFn(item.data, scrubFields, scrubPaths);\n }\n callback(null, item);\n }\n}\n\nmodule.exports = {\n handleDomException: handleDomException,\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n addScrubber: addScrubber\n};\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('error-stack-parser', ['stackframe'], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory(require('stackframe'));\n } else {\n root.ErrorStackParser = factory(root.StackFrame);\n }\n}(this, function ErrorStackParser(StackFrame) {\n 'use strict';\n\n var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\\S+:\\d+/;\n var CHROME_IE_STACK_REGEXP = /^\\s*at .*(\\S+:\\d+|\\(native\\))/m;\n var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\\[native code])?$/;\n\n return {\n /**\n * Given an Error object, extract the most information from it.\n *\n * @param {Error} error object\n * @return {Array} of StackFrames\n */\n parse: function ErrorStackParser$$parse(error) {\n if (typeof error.stacktrace !== 'undefined' || typeof error['opera#sourceloc'] !== 'undefined') {\n return this.parseOpera(error);\n } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {\n return this.parseV8OrIE(error);\n } else if (error.stack) {\n return this.parseFFOrSafari(error);\n } else {\n throw new Error('Cannot parse given Error object');\n }\n },\n\n // Separate line and column numbers from a string of the form: (URI:Line:Column)\n extractLocation: function ErrorStackParser$$extractLocation(urlLike) {\n // Fail-fast but return locations like \"(native)\"\n if (urlLike.indexOf(':') === -1) {\n return [urlLike];\n }\n\n var regExp = /(.+?)(?::(\\d+))?(?::(\\d+))?$/;\n var parts = regExp.exec(urlLike.replace(/[()]/g, ''));\n return [parts[1], parts[2] || undefined, parts[3] || undefined];\n },\n\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(CHROME_IE_STACK_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n if (line.indexOf('(eval ') > -1) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n line = line.replace(/eval code/g, 'eval').replace(/(\\(eval at [^()]*)|(\\),.*$)/g, '');\n }\n var sanitizedLine = line.replace(/^\\s+/, '').replace(/\\(eval code/g, '(');\n\n // capture and preseve the parenthesized location \"(/foo/my bar.js:12:87)\" in\n // case it has spaces in it, as the string is split on \\s+ later on\n var location = sanitizedLine.match(/ (\\((.+):(\\d+):(\\d+)\\)$)/);\n\n // remove the parenthesized location from the line, if it was matched\n sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;\n\n var tokens = sanitizedLine.split(/\\s+/).slice(1);\n // if a location was matched, pass it to extractLocation() otherwise pop the last token\n var locationParts = this.extractLocation(location ? location[1] : tokens.pop());\n var functionName = tokens.join(' ') || undefined;\n var fileName = ['eval', ''].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];\n\n return new StackFrame({\n functionName: functionName,\n fileName: fileName,\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n },\n\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n if (line.indexOf(' > eval') > -1) {\n line = line.replace(/ line (\\d+)(?: > eval line \\d+)* > eval:\\d+:\\d+/g, ':$1');\n }\n\n if (line.indexOf('@') === -1 && line.indexOf(':') === -1) {\n // Safari eval frames only have function names and nothing else\n return new StackFrame({\n functionName: line\n });\n } else {\n var functionNameRegex = /((.*\".+\"[^@]*)?[^@]*)(?:@)/;\n var matches = line.match(functionNameRegex);\n var functionName = matches && matches[1] ? matches[1] : undefined;\n var locationParts = this.extractLocation(line.replace(functionNameRegex, ''));\n\n return new StackFrame({\n functionName: functionName,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }\n }, this);\n },\n\n parseOpera: function ErrorStackParser$$parseOpera(e) {\n if (!e.stacktrace || (e.message.indexOf('\\n') > -1 &&\n e.message.split('\\n').length > e.stacktrace.split('\\n').length)) {\n return this.parseOpera9(e);\n } else if (!e.stack) {\n return this.parseOpera10(e);\n } else {\n return this.parseOpera11(e);\n }\n },\n\n parseOpera9: function ErrorStackParser$$parseOpera9(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)/i;\n var lines = e.message.split('\\n');\n var result = [];\n\n for (var i = 2, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(new StackFrame({\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n }));\n }\n }\n\n return result;\n },\n\n parseOpera10: function ErrorStackParser$$parseOpera10(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)(?:: In function (\\S+))?$/i;\n var lines = e.stacktrace.split('\\n');\n var result = [];\n\n for (var i = 0, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(\n new StackFrame({\n functionName: match[3] || undefined,\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n })\n );\n }\n }\n\n return result;\n },\n\n // Opera 10.65+ Error.stack very similar to FF/Safari\n parseOpera11: function ErrorStackParser$$parseOpera11(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);\n }, this);\n\n return filtered.map(function(line) {\n var tokens = line.split('@');\n var locationParts = this.extractLocation(tokens.pop());\n var functionCall = (tokens.shift() || '');\n var functionName = functionCall\n .replace(//, '$2')\n .replace(/\\([^)]*\\)/g, '') || undefined;\n var argsRaw;\n if (functionCall.match(/\\(([^)]*)\\)/)) {\n argsRaw = functionCall.replace(/^[^(]+\\(([^)]*)\\)$/, '$1');\n }\n var args = (argsRaw === undefined || argsRaw === '[arguments not available]') ?\n undefined : argsRaw.split(',');\n\n return new StackFrame({\n functionName: functionName,\n args: args,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n }\n };\n}));\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('stackframe', [], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.StackFrame = factory();\n }\n}(this, function() {\n 'use strict';\n function _isNumber(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n }\n\n function _capitalize(str) {\n return str.charAt(0).toUpperCase() + str.substring(1);\n }\n\n function _getter(p) {\n return function() {\n return this[p];\n };\n }\n\n var booleanProps = ['isConstructor', 'isEval', 'isNative', 'isToplevel'];\n var numericProps = ['columnNumber', 'lineNumber'];\n var stringProps = ['fileName', 'functionName', 'source'];\n var arrayProps = ['args'];\n var objectProps = ['evalOrigin'];\n\n var props = booleanProps.concat(numericProps, stringProps, arrayProps, objectProps);\n\n function StackFrame(obj) {\n if (!obj) return;\n for (var i = 0; i < props.length; i++) {\n if (obj[props[i]] !== undefined) {\n this['set' + _capitalize(props[i])](obj[props[i]]);\n }\n }\n }\n\n StackFrame.prototype = {\n getArgs: function() {\n return this.args;\n },\n setArgs: function(v) {\n if (Object.prototype.toString.call(v) !== '[object Array]') {\n throw new TypeError('Args must be an Array');\n }\n this.args = v;\n },\n\n getEvalOrigin: function() {\n return this.evalOrigin;\n },\n setEvalOrigin: function(v) {\n if (v instanceof StackFrame) {\n this.evalOrigin = v;\n } else if (v instanceof Object) {\n this.evalOrigin = new StackFrame(v);\n } else {\n throw new TypeError('Eval Origin must be an Object or StackFrame');\n }\n },\n\n toString: function() {\n var fileName = this.getFileName() || '';\n var lineNumber = this.getLineNumber() || '';\n var columnNumber = this.getColumnNumber() || '';\n var functionName = this.getFunctionName() || '';\n if (this.getIsEval()) {\n if (fileName) {\n return '[eval] (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return '[eval]:' + lineNumber + ':' + columnNumber;\n }\n if (functionName) {\n return functionName + ' (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return fileName + ':' + lineNumber + ':' + columnNumber;\n }\n };\n\n StackFrame.fromString = function StackFrame$$fromString(str) {\n var argsStartIndex = str.indexOf('(');\n var argsEndIndex = str.lastIndexOf(')');\n\n var functionName = str.substring(0, argsStartIndex);\n var args = str.substring(argsStartIndex + 1, argsEndIndex).split(',');\n var locationString = str.substring(argsEndIndex + 1);\n\n if (locationString.indexOf('@') === 0) {\n var parts = /@(.+?)(?::(\\d+))?(?::(\\d+))?$/.exec(locationString, '');\n var fileName = parts[1];\n var lineNumber = parts[2];\n var columnNumber = parts[3];\n }\n\n return new StackFrame({\n functionName: functionName,\n args: args || undefined,\n fileName: fileName,\n lineNumber: lineNumber || undefined,\n columnNumber: columnNumber || undefined\n });\n };\n\n for (var i = 0; i < booleanProps.length; i++) {\n StackFrame.prototype['get' + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);\n StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function(p) {\n return function(v) {\n this[p] = Boolean(v);\n };\n })(booleanProps[i]);\n }\n\n for (var j = 0; j < numericProps.length; j++) {\n StackFrame.prototype['get' + _capitalize(numericProps[j])] = _getter(numericProps[j]);\n StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function(p) {\n return function(v) {\n if (!_isNumber(v)) {\n throw new TypeError(p + ' must be a Number');\n }\n this[p] = Number(v);\n };\n })(numericProps[j]);\n }\n\n for (var k = 0; k < stringProps.length; k++) {\n StackFrame.prototype['get' + _capitalize(stringProps[k])] = _getter(stringProps[k]);\n StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function(p) {\n return function(v) {\n this[p] = String(v);\n };\n })(stringProps[k]);\n }\n\n return StackFrame;\n}));\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction itemToPayload(item, options, callback) {\n var payloadOptions = options.payload || {};\n if (payloadOptions.body) {\n delete payloadOptions.body;\n }\n\n var data = _.merge(item.data, payloadOptions);\n if (item._isUncaught) {\n data._isUncaught = true;\n }\n if (item._originalArgs) {\n data._originalArgs = item._originalArgs;\n }\n callback(null, data);\n}\n\nfunction addTelemetryData(item, options, callback) {\n if (item.telemetryEvents) {\n _.set(item, 'data.body.telemetry', item.telemetryEvents);\n }\n callback(null, item);\n}\n\nfunction addMessageWithError(item, options, callback) {\n if (!item.message) {\n callback(null, item);\n return;\n }\n var tracePath = 'data.body.trace_chain.0';\n var trace = _.get(item, tracePath);\n if (!trace) {\n tracePath = 'data.body.trace';\n trace = _.get(item, tracePath);\n }\n if (trace) {\n if (!(trace.exception && trace.exception.description)) {\n _.set(item, tracePath+'.exception.description', item.message);\n callback(null, item);\n return;\n }\n var extra = _.get(item, tracePath+'.extra') || {};\n var newExtra = _.merge(extra, {message: item.message});\n _.set(item, tracePath+'.extra', newExtra);\n }\n callback(null, item);\n}\n\nfunction userTransform(logger) {\n return function(item, options, callback) {\n var newItem = _.merge(item);\n var response = null;\n try {\n if (_.isFunction(options.transform)) {\n response = options.transform(newItem.data, item);\n }\n } catch (e) {\n options.transform = null;\n logger.error('Error while calling custom transform() function. Removing custom transform().', e);\n callback(null, item);\n return;\n }\n if(_.isPromise(response)) {\n response.then(function (promisedItem) {\n if(promisedItem) {\n newItem.data = promisedItem;\n }\n callback(null, newItem);\n }, function (error) {\n callback(error, item);\n });\n } else {\n callback(null, newItem);\n }\n }\n}\n\nfunction addConfigToPayload(item, options, callback) {\n if (!options.sendConfig) {\n return callback(null, item);\n }\n var configKey = '_rollbarConfig';\n var custom = _.get(item, 'data.custom') || {};\n custom[configKey] = options;\n item.data.custom = custom;\n callback(null, item);\n}\n\nfunction addFunctionOption(options, name) {\n if(_.isFunction(options[name])) {\n options[name] = options[name].toString();\n }\n}\n\nfunction addConfiguredOptions(item, options, callback) {\n var configuredOptions = options._configuredOptions;\n\n // These must be stringified or they'll get dropped during serialization.\n addFunctionOption(configuredOptions, 'transform');\n addFunctionOption(configuredOptions, 'checkIgnore');\n addFunctionOption(configuredOptions, 'onSendCallback');\n\n delete configuredOptions.accessToken;\n item.data.notifier.configured_options = configuredOptions;\n callback(null, item);\n}\n\nfunction addDiagnosticKeys(item, options, callback) {\n var diagnostic = _.merge(item.notifier.client.notifier.diagnostic, item.diagnostic);\n\n if (_.get(item, 'err._isAnonymous')) {\n diagnostic.is_anonymous = true;\n }\n\n if (item._isUncaught) {\n diagnostic.is_uncaught = item._isUncaught;\n }\n\n if (item.err) {\n try {\n diagnostic.raw_error = {\n message: item.err.message,\n name: item.err.name,\n constructor_name: item.err.constructor && item.err.constructor.name,\n filename: item.err.fileName,\n line: item.err.lineNumber,\n column: item.err.columnNumber,\n stack: item.err.stack\n };\n } catch (e) {\n diagnostic.raw_error = { failed: String(e) };\n }\n }\n\n item.data.notifier.diagnostic = _.merge(item.data.notifier.diagnostic, diagnostic);\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError,\n userTransform: userTransform,\n addConfigToPayload: addConfigToPayload,\n addConfiguredOptions: addConfiguredOptions,\n addDiagnosticKeys: addDiagnosticKeys\n};\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction checkIgnore(item, settings) {\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore\n};\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction checkLevel(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = settings.reportLevel;\n var reportLevelVal = _.LEVELS[reportLevel] || 0;\n\n if (levelVal < reportLevelVal) {\n return false;\n }\n return true;\n}\n\nfunction userCheckIgnore(logger) {\n return function(item, settings) {\n var isUncaught = !!item._isUncaught;\n delete item._isUncaught;\n var args = item._originalArgs;\n delete item._originalArgs;\n try {\n if (_.isFunction(settings.onSendCallback)) {\n settings.onSendCallback(isUncaught, args, item);\n }\n } catch (e) {\n settings.onSendCallback = null;\n logger.error('Error while calling onSendCallback, removing', e);\n }\n try {\n if (_.isFunction(settings.checkIgnore) && settings.checkIgnore(isUncaught, args, item)) {\n return false;\n }\n } catch (e) {\n settings.checkIgnore = null;\n logger.error('Error while calling custom checkIgnore(), removing', e);\n }\n return true;\n }\n}\n\nfunction urlIsNotBlockListed(logger) {\n return function(item, settings) {\n return !urlIsOnAList(item, settings, 'blocklist', logger);\n }\n}\n\nfunction urlIsSafeListed(logger) {\n return function(item, settings) {\n return urlIsOnAList(item, settings, 'safelist', logger);\n }\n}\n\nfunction matchFrames(trace, list, block) {\n if (!trace) { return !block }\n\n var frames = trace.frames;\n\n if (!frames || frames.length === 0) { return !block; }\n\n var frame, filename, url, urlRegex;\n var listLength = list.length;\n var frameLength = frames.length;\n for (var i = 0; i < frameLength; i++) {\n frame = frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) { return !block; }\n\n for (var j = 0; j < listLength; j++) {\n url = list[j];\n urlRegex = new RegExp(url);\n\n if (urlRegex.test(filename)) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction urlIsOnAList(item, settings, safeOrBlock, logger) {\n // safelist is the default\n var block = false;\n if (safeOrBlock === 'blocklist') {\n block = true;\n }\n\n var list, traces;\n try {\n list = block ? settings.hostBlockList : settings.hostSafeList;\n traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];\n\n // These two checks are important to come first as they are defaults\n // in case the list is missing or the trace is missing or not well-formed\n if (!list || list.length === 0) {\n return !block;\n }\n if (traces.length === 0 || !traces[0]) {\n return !block;\n }\n\n var tracesLength = traces.length;\n for (var i = 0; i < tracesLength; i++) {\n if(matchFrames(traces[i], list, block)) {\n return true;\n }\n }\n } catch (e)\n /* istanbul ignore next */\n {\n if (block) {\n settings.hostBlockList = null;\n } else {\n settings.hostSafeList = null;\n }\n var listName = block ? 'hostBlockList' : 'hostSafeList';\n logger.error('Error while reading your configuration\\'s ' + listName + ' option. Removing custom ' + listName + '.', e);\n return !block;\n }\n return false;\n}\n\nfunction messageIsIgnored(logger) {\n return function(item, settings) {\n var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n messages = messagesFromItem(item);\n\n if (messages.length === 0){\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n\n for (j = 0; j < messages.length; j++) {\n messageIsIgnored = rIgnoredMessage.test(messages[j]);\n\n if (messageIsIgnored) {\n return false;\n }\n }\n }\n } catch(e)\n /* istanbul ignore next */\n {\n settings.ignoredMessages = null;\n logger.error('Error while reading your configuration\\'s ignoredMessages option. Removing custom ignoredMessages.');\n }\n\n return true;\n }\n}\n\nfunction messagesFromItem(item) {\n var body = item.body;\n var messages = [];\n\n // The payload schema only allows one of trace_chain, message, or trace.\n // However, existing test cases are based on having both trace and message present.\n // So here we preserve the ability to collect strings from any combination of these keys.\n if (body.trace_chain) {\n var traceChain = body.trace_chain;\n for (var i = 0; i < traceChain.length; i++) {\n var trace = traceChain[i];\n messages.push(_.get(trace, 'exception.message'));\n }\n }\n if (body.trace) {\n messages.push(_.get(body, 'trace.exception.message'));\n }\n if (body.message) {\n messages.push(_.get(body, 'message.body'));\n }\n return messages;\n}\n\nmodule.exports = {\n checkLevel: checkLevel,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlockListed: urlIsNotBlockListed,\n urlIsSafeListed: urlIsSafeListed,\n messageIsIgnored: messageIsIgnored\n};\n","'use strict';\n\nmodule.exports = {\n version: '2.24.1',\n endpoint: 'api.rollbar.com/api/1/item/',\n logLevel: 'debug',\n reportLevel: 'debug',\n uncaughtErrorLevel: 'error',\n maxItems: 0,\n itemsPerMin: 60\n}\n","'use strict';\n\nmodule.exports = {\n scrubFields: [\n 'pw',\n 'pass',\n 'passwd',\n 'password',\n 'secret',\n 'confirm_password',\n 'confirmPassword',\n 'password_confirmation',\n 'passwordConfirmation',\n 'access_token',\n 'accessToken',\n 'X-Rollbar-Access-Token',\n 'secret_key',\n 'secretKey',\n 'secretToken',\n 'cc-number',\n 'card number',\n 'cardnumber',\n 'cardnum',\n 'ccnum',\n 'ccnumber',\n 'cc num',\n 'creditcardnumber',\n 'credit card number',\n 'newcreditcardnumber',\n 'new credit card',\n 'creditcardno',\n 'credit card no',\n 'card#',\n 'card #',\n 'cc-csc',\n 'cvc',\n 'cvc2',\n 'cvv2',\n 'ccv2',\n 'security code',\n 'card verification',\n 'name on credit card',\n 'name on card',\n 'nameoncard',\n 'cardholder',\n 'card holder',\n 'name des karteninhabers',\n 'ccname',\n 'card type',\n 'cardtype',\n 'cc type',\n 'cctype',\n 'payment type',\n 'expiration date',\n 'expirationdate',\n 'expdate',\n 'cc-exp',\n 'ccmonth',\n 'ccyear'\n ]\n}\n","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.merge(options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n}\n\nTelemeter.prototype.configure = function(options) {\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n var deleteCount = 0;\n if (this.maxQueueSize > newMaxEvents) {\n deleteCount = this.maxQueueSize - newMaxEvents;\n }\n this.maxQueueSize = newMaxEvents;\n this.queue.splice(0, deleteCount);\n};\n\nTelemeter.prototype.copyEvents = function() {\n var events = Array.prototype.slice.call(this.queue, 0);\n if (_.isFunction(this.options.filterTelemetry)) {\n try {\n var i = events.length;\n while (i--) {\n if (this.options.filterTelemetry(events[i])) {\n events.splice(i, 1);\n }\n }\n } catch (e) {\n this.options.filterTelemetry = null;\n }\n }\n return events;\n};\n\nTelemeter.prototype.capture = function(type, metadata, level, rollbarUUID, timestamp) {\n var e = {\n level: getLevel(type, level),\n type: type,\n timestamp_ms: timestamp || _.now(),\n body: metadata,\n source: 'client'\n };\n if (rollbarUUID) {\n e.uuid = rollbarUUID;\n }\n\n try {\n if (_.isFunction(this.options.filterTelemetry) && this.options.filterTelemetry(e)) {\n return false;\n }\n } catch (exc) {\n this.options.filterTelemetry = null;\n }\n\n this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function(type, metadata, level, rollbarUUID) {\n return this.capture(type, metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.captureError = function(err, level, rollbarUUID, timestamp) {\n var metadata = {\n message: err.message || String(err)\n };\n if (err.stack) {\n metadata.stack = err.stack;\n }\n return this.capture('error', metadata, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureLog = function(message, level, rollbarUUID, timestamp) {\n return this.capture('log', {\n message: message\n }, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID, requestData) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\n if (requestData) {\n metadata.request = requestData;\n }\n var level = this.levelFromStatus(metadata.status_code);\n return this.capture('network', metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.levelFromStatus = function(statusCode) {\n if (statusCode >= 200 && statusCode < 400) {\n return 'info';\n }\n if (statusCode === 0 || statusCode >= 400) {\n return 'error';\n }\n return 'info';\n};\n\nTelemeter.prototype.captureDom = function(subtype, element, value, checked, rollbarUUID) {\n var metadata = {\n subtype: subtype,\n element: element\n };\n if (value !== undefined) {\n metadata.value = value;\n }\n if (checked !== undefined) {\n metadata.checked = checked;\n }\n return this.capture('dom', metadata, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureNavigation = function(from, to, rollbarUUID) {\n return this.capture('navigation', {from: from, to: to}, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureDomContentLoaded = function(ts) {\n return this.capture('navigation', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n */\n};\nTelemeter.prototype.captureLoad = function(ts) {\n return this.capture('navigation', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n */\n};\n\nTelemeter.prototype.captureConnectivityChange = function(type, rollbarUUID) {\n return this.captureNetwork({change: type}, 'connectivity', rollbarUUID);\n};\n\n// Only intended to be used internally by the notifier\nTelemeter.prototype._captureRollbarItem = function(item) {\n if (!this.options.includeItemsInTelemetry) {\n return;\n }\n if (item.err) {\n return this.captureError(item.err, item.level, item.uuid, item.timestamp);\n }\n if (item.message) {\n return this.captureLog(item.message, item.level, item.uuid, item.timestamp);\n }\n if (item.custom) {\n return this.capture('log', item.custom, item.level, item.uuid, item.timestamp);\n }\n};\n\nTelemeter.prototype.push = function(e) {\n this.queue.push(e);\n if (this.queue.length > this.maxQueueSize) {\n this.queue.shift();\n }\n};\n\nfunction getLevel(type, level) {\n if (level) {\n return level;\n }\n var defaultLevel = {\n error: 'error',\n manual: 'info'\n };\n return defaultLevel[type] || 'info';\n}\n\nmodule.exports = Telemeter;\n","'use strict';\n\nvar _ = require('../utility');\nvar scrub = require('../scrub');\nvar urlparser = require('./url');\nvar domUtil = require('./domUtility');\n\nvar defaults = {\n network: true,\n networkResponseHeaders: false,\n networkResponseBody: false,\n networkRequestHeaders: false,\n networkRequestBody: false,\n networkErrorOnHttp5xx: false,\n networkErrorOnHttp4xx: false,\n networkErrorOnHttp0: false,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true,\n contentSecurityPolicy: true,\n errorOnContentSecurityPolicy: false\n};\n\nfunction replace(obj, name, replacement, replacements, type) {\n var orig = obj[name];\n obj[name] = replacement(orig);\n if (replacements) {\n replacements[type].push([obj, name, orig]);\n }\n}\n\nfunction restore(replacements, type) {\n var b;\n while (replacements[type].length) {\n b = replacements[type].shift();\n b[0][b[1]] = b[2];\n }\n}\n\nfunction nameFromDescription(description) {\n if (!description || !description.attributes) { return null; }\n var attrs = description.attributes;\n for (var a = 0; a < attrs.length; ++a) {\n if (attrs[a].key === 'name') {\n return attrs[a].value;\n }\n }\n return null;\n}\n\nfunction defaultValueScrubber(scrubFields) {\n var patterns = [];\n for (var i = 0; i < scrubFields.length; ++i) {\n patterns.push(new RegExp(scrubFields[i], 'i'));\n }\n return function(description) {\n var name = nameFromDescription(description);\n if (!name) { return false; }\n for (var i = 0; i < patterns.length; ++i) {\n if (patterns[i].test(name)) {\n return true;\n }\n }\n return false;\n };\n}\n\nfunction Instrumenter(options, telemeter, rollbar, _window, _document) {\n this.options = options;\n var autoInstrument = options.autoInstrument;\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);\n this.telemeter = telemeter;\n this.rollbar = rollbar;\n this.diagnostic = rollbar.client.notifier.diagnostic;\n this._window = _window || {};\n this._document = _document || {};\n this.replacements = {\n network: [],\n log: [],\n navigation: [],\n connectivity: []\n };\n this.eventRemovers = {\n dom: [],\n connectivity: [],\n contentsecuritypolicy: []\n };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function(options) {\n this.options = _.merge(this.options, options);\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.merge(this.autoInstrument);\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n if (options.scrubTelemetryInputs !== undefined) {\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n }\n if (options.telemetryScrubber !== undefined) {\n this.telemetryScrubber = options.telemetryScrubber;\n }\n};\n\n// eslint-disable-next-line complexity\nInstrumenter.prototype.instrument = function(oldSettings) {\n if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {\n this.instrumentNetwork();\n } else if (!this.autoInstrument.network && oldSettings && oldSettings.network) {\n this.deinstrumentNetwork();\n }\n\n if (this.autoInstrument.log && !(oldSettings && oldSettings.log)) {\n this.instrumentConsole();\n } else if (!this.autoInstrument.log && oldSettings && oldSettings.log) {\n this.deinstrumentConsole();\n }\n\n if (this.autoInstrument.dom && !(oldSettings && oldSettings.dom)) {\n this.instrumentDom();\n } else if (!this.autoInstrument.dom && oldSettings && oldSettings.dom) {\n this.deinstrumentDom();\n }\n\n if (this.autoInstrument.navigation && !(oldSettings && oldSettings.navigation)) {\n this.instrumentNavigation();\n } else if (!this.autoInstrument.navigation && oldSettings && oldSettings.navigation) {\n this.deinstrumentNavigation();\n }\n\n if (this.autoInstrument.connectivity && !(oldSettings && oldSettings.connectivity)) {\n this.instrumentConnectivity();\n } else if (!this.autoInstrument.connectivity && oldSettings && oldSettings.connectivity) {\n this.deinstrumentConnectivity();\n }\n\n if (this.autoInstrument.contentSecurityPolicy && !(oldSettings && oldSettings.contentSecurityPolicy)) {\n this.instrumentContentSecurityPolicy();\n } else if (!this.autoInstrument.contentSecurityPolicy && oldSettings && oldSettings.contentSecurityPolicy) {\n this.deinstrumentContentSecurityPolicy();\n }\n};\n\nInstrumenter.prototype.deinstrumentNetwork = function() {\n restore(this.replacements, 'network');\n};\n\nInstrumenter.prototype.instrumentNetwork = function() {\n var self = this;\n\n function wrapProp(prop, xhr) {\n if (prop in xhr && _.isFunction(xhr[prop])) {\n replace(xhr, prop, function(orig) {\n return self.rollbar.wrap(orig);\n });\n }\n }\n\n if ('XMLHttpRequest' in this._window) {\n var xhrp = this._window.XMLHttpRequest.prototype;\n replace(xhrp, 'open', function(orig) {\n return function(method, url) {\n if (_.isType(url, 'string')) {\n if (this.__rollbar_xhr) {\n this.__rollbar_xhr.method = method;\n this.__rollbar_xhr.url = url;\n this.__rollbar_xhr.status_code = null;\n this.__rollbar_xhr.start_time_ms = _.now();\n this.__rollbar_xhr.end_time_ms = null;\n } else {\n this.__rollbar_xhr = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'setRequestHeader', function(orig) {\n return function(header, value) {\n // If xhr.open is async, __rollbar_xhr may not be initialized yet.\n if (!this.__rollbar_xhr) {\n this.__rollbar_xhr = {};\n }\n if (_.isType(header, 'string') && _.isType(value, 'string')) {\n if (self.autoInstrument.networkRequestHeaders) {\n if (!this.__rollbar_xhr.request_headers) {\n this.__rollbar_xhr.request_headers = {};\n }\n this.__rollbar_xhr.request_headers[header] = value;\n }\n // We want the content type even if request header telemetry is off.\n if (header.toLowerCase() === 'content-type') {\n this.__rollbar_xhr.request_content_type = value;\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'send', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(data) {\n /* eslint-enable no-unused-vars */\n var xhr = this;\n\n function onreadystatechangeHandler() {\n if (xhr.__rollbar_xhr) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n if (self.autoInstrument.networkRequestBody) {\n xhr.__rollbar_xhr.request = data;\n }\n xhr.__rollbar_event = self.captureNetwork(xhr.__rollbar_xhr, 'xhr', undefined);\n }\n if (xhr.readyState < 2) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n }\n if (xhr.readyState > 3) {\n xhr.__rollbar_xhr.end_time_ms = _.now();\n\n var headers = null;\n xhr.__rollbar_xhr.response_content_type = xhr.getResponseHeader('Content-Type');\n if (self.autoInstrument.networkResponseHeaders) {\n var headersConfig = self.autoInstrument.networkResponseHeaders;\n headers = {};\n try {\n var header, i;\n if (headersConfig === true) {\n var allHeaders = xhr.getAllResponseHeaders();\n if (allHeaders) {\n var arr = allHeaders.trim().split(/[\\r\\n]+/);\n var parts, value;\n for (i=0; i < arr.length; i++) {\n parts = arr[i].split(': ');\n header = parts.shift();\n value = parts.join(': ');\n headers[header] = value;\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n header = headersConfig[i];\n headers[header] = xhr.getResponseHeader(header);\n }\n }\n } catch (e) {\n /* we ignore the errors here that could come from different\n * browser issues with the xhr methods */\n }\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n try {\n body = xhr.responseText;\n } catch (e) {\n /* ignore errors from reading responseText */\n }\n }\n var response = null;\n if (body || headers) {\n response = {};\n if (body) {\n if (self.isJsonContentType(xhr.__rollbar_xhr.response_content_type)) {\n response.body = self.scrubJson(body);\n } else {\n response.body = body;\n }\n }\n if (headers) {\n response.headers = headers;\n }\n }\n if (response) {\n xhr.__rollbar_xhr.response = response;\n }\n try {\n var code = xhr.status;\n code = code === 1223 ? 204 : code;\n xhr.__rollbar_xhr.status_code = code;\n xhr.__rollbar_event.level = self.telemeter.levelFromStatus(code);\n self.errorOnHttpStatus(xhr.__rollbar_xhr);\n } catch (e) {\n /* ignore possible exception from xhr.status */\n }\n }\n }\n }\n\n wrapProp('onload', xhr);\n wrapProp('onerror', xhr);\n wrapProp('onprogress', xhr);\n\n if ('onreadystatechange' in xhr && _.isFunction(xhr.onreadystatechange)) {\n replace(xhr, 'onreadystatechange', function(orig) {\n return self.rollbar.wrap(orig, undefined, onreadystatechangeHandler);\n });\n } else {\n xhr.onreadystatechange = onreadystatechangeHandler;\n }\n if (xhr.__rollbar_xhr && self.trackHttpErrors()) {\n xhr.__rollbar_xhr.stack = (new Error()).stack;\n }\n return orig.apply(this, arguments);\n }\n }, this.replacements, 'network');\n }\n\n if ('fetch' in this._window) {\n replace(this._window, 'fetch', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(fn, t) {\n /* eslint-enable no-unused-vars */\n var args = new Array(arguments.length);\n for (var i=0, len=args.length; i < len; i++) {\n args[i] = arguments[i];\n }\n var input = args[0];\n var method = 'GET';\n var url;\n if (_.isType(input, 'string')) {\n url = input;\n } else if (input) {\n url = input.url;\n if (input.method) {\n method = input.method;\n }\n }\n if (args[1] && args[1].method) {\n method = args[1].method;\n }\n var metadata = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n if (args[1] && args[1].headers) {\n // Argument may be a Headers object, or plain object. Ensure here that\n // we are working with a Headers object with case-insensitive keys.\n var reqHeaders = new Headers(args[1].headers);\n\n metadata.request_content_type = reqHeaders.get('Content-Type');\n\n if (self.autoInstrument.networkRequestHeaders) {\n metadata.request_headers = self.fetchHeaders(reqHeaders, self.autoInstrument.networkRequestHeaders)\n }\n }\n\n if (self.autoInstrument.networkRequestBody) {\n if (args[1] && args[1].body) {\n metadata.request = args[1].body;\n } else if (args[0] && !_.isType(args[0], 'string') && args[0].body) {\n metadata.request = args[0].body;\n }\n }\n self.captureNetwork(metadata, 'fetch', undefined);\n if (self.trackHttpErrors()) {\n metadata.stack = (new Error()).stack;\n }\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n metadata.response_content_type = resp.headers.get('Content-Type');\n var headers = null;\n if (self.autoInstrument.networkResponseHeaders) {\n headers = self.fetchHeaders(resp.headers, self.autoInstrument.networkResponseHeaders);\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n if (typeof resp.text === 'function') { // Response.text() is not implemented on some platforms\n // The response must be cloned to prevent reading (and locking) the original stream.\n body = resp.clone().text(); //returns a Promise\n }\n }\n if (headers || body) {\n metadata.response = {};\n if (body) {\n // Test to ensure body is a Promise, which it should always be.\n if (typeof body.then === 'function') {\n body.then(function (text) {\n if (self.isJsonContentType(metadata.response_content_type)) {\n metadata.response.body = self.scrubJson(text);\n }\n });\n } else {\n metadata.response.body = body;\n }\n }\n if (headers) {\n metadata.response.headers = headers;\n }\n }\n self.errorOnHttpStatus(metadata);\n return resp;\n });\n };\n }, this.replacements, 'network');\n }\n};\n\nInstrumenter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID) {\n if (metadata.request && this.isJsonContentType(metadata.request_content_type)) {\n metadata.request = this.scrubJson(metadata.request);\n }\n return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);\n};\n\nInstrumenter.prototype.isJsonContentType = function(contentType) {\n return (contentType && _.isType(contentType, 'string') && contentType.toLowerCase().includes('json')) ? true : false;\n}\n\nInstrumenter.prototype.scrubJson = function(json) {\n return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));\n}\n\nInstrumenter.prototype.fetchHeaders = function(inHeaders, headersConfig) {\n var outHeaders = {};\n try {\n var i;\n if (headersConfig === true) {\n if (typeof inHeaders.entries === 'function') { // Headers.entries() is not implemented in IE\n var allHeaders = inHeaders.entries();\n var currentHeader = allHeaders.next();\n while (!currentHeader.done) {\n outHeaders[currentHeader.value[0]] = currentHeader.value[1];\n currentHeader = allHeaders.next();\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n var header = headersConfig[i];\n outHeaders[header] = inHeaders.get(header);\n }\n }\n } catch (e) {\n /* ignore probable IE errors */\n }\n return outHeaders;\n}\n\nInstrumenter.prototype.trackHttpErrors = function() {\n return this.autoInstrument.networkErrorOnHttp5xx ||\n this.autoInstrument.networkErrorOnHttp4xx ||\n this.autoInstrument.networkErrorOnHttp0;\n}\n\nInstrumenter.prototype.errorOnHttpStatus = function(metadata) {\n var status = metadata.status_code;\n\n if ((status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||\n (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||\n (status === 0 && this.autoInstrument.networkErrorOnHttp0)) {\n var error = new Error('HTTP request failed with Status ' + status);\n error.stack = metadata.stack;\n this.rollbar.error(error, { skipFrames: 1 });\n }\n}\n\nInstrumenter.prototype.deinstrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n var b;\n while (this.replacements['log'].length) {\n b = this.replacements['log'].shift();\n this._window.console[b[0]] = b[1];\n }\n};\n\nInstrumenter.prototype.instrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n\n var self = this;\n var c = this._window.console;\n\n function wrapConsole(method) {\n 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778\n\n var orig = c[method];\n var origConsole = c;\n var level = method === 'warn' ? 'warning' : method;\n c[method] = function() {\n var args = Array.prototype.slice.call(arguments);\n var message = _.formatArgsAsString(args);\n self.telemeter.captureLog(message, level);\n if (orig) {\n Function.prototype.apply.call(orig, origConsole, args);\n }\n };\n self.replacements['log'].push([method, orig]);\n }\n var methods = ['debug','info','warn','error','log'];\n try {\n for (var i=0, len=methods.length; i < len; i++) {\n wrapConsole(methods[i]);\n }\n } catch (e) {\n this.diagnostic.instrumentConsole = { error: e.message };\n }\n};\n\nInstrumenter.prototype.deinstrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n this.removeListeners('dom');\n};\n\nInstrumenter.prototype.instrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n var clickHandler = this.handleClick.bind(this);\n var blurHandler = this.handleBlur.bind(this);\n this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);\n this.addListener('dom', this._window, 'blur', 'onfocusout', blurHandler, true);\n};\n\nInstrumenter.prototype.handleClick = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n var hasTag = e && e.tagName;\n var anchorOrButton = domUtil.isDescribedElement(e, 'a') || domUtil.isDescribedElement(e, 'button');\n if (hasTag && (anchorOrButton || domUtil.isDescribedElement(e, 'input', ['button', 'submit']))) {\n this.captureDomEvent('click', e);\n } else if (domUtil.isDescribedElement(e, 'input', ['checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value, e.checked);\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleBlur = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n if (e && e.tagName) {\n if (domUtil.isDescribedElement(e, 'textarea')) {\n this.captureDomEvent('input', e, e.value);\n } else if (domUtil.isDescribedElement(e, 'select') && e.options && e.options.length) {\n this.handleSelectInputChanged(e);\n } else if (domUtil.isDescribedElement(e, 'input') && !domUtil.isDescribedElement(e, 'input', ['button', 'submit', 'hidden', 'checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value);\n }\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleSelectInputChanged = function(elem) {\n if (elem.multiple) {\n for (var i = 0; i < elem.options.length; i++) {\n if (elem.options[i].selected) {\n this.captureDomEvent('input', elem, elem.options[i].value);\n }\n }\n } else if (elem.selectedIndex >= 0 && elem.options[elem.selectedIndex]) {\n this.captureDomEvent('input', elem, elem.options[elem.selectedIndex].value);\n }\n};\n\nInstrumenter.prototype.captureDomEvent = function(subtype, element, value, isChecked) {\n if (value !== undefined) {\n if (this.scrubTelemetryInputs || (domUtil.getElementType(element) === 'password')) {\n value = '[scrubbed]';\n } else {\n var description = domUtil.describeElement(element);\n if (this.telemetryScrubber) {\n if (this.telemetryScrubber(description)) {\n value = '[scrubbed]';\n }\n } else if (this.defaultValueScrubber(description)) {\n value = '[scrubbed]';\n }\n }\n }\n var elementString = domUtil.elementArrayToString(domUtil.treeToArray(element));\n this.telemeter.captureDom(subtype, elementString, value, isChecked);\n};\n\nInstrumenter.prototype.deinstrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n restore(this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.instrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n var self = this;\n replace(this._window, 'onpopstate', function(orig) {\n return function() {\n var current = self._location.href;\n self.handleUrlChange(self._lastHref, current);\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n }, this.replacements, 'navigation');\n\n replace(this._window.history, 'pushState', function(orig) {\n return function() {\n var url = arguments.length > 2 ? arguments[2] : undefined;\n if (url) {\n self.handleUrlChange(self._lastHref, url + '');\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.handleUrlChange = function(from, to) {\n var parsedHref = urlparser.parse(this._location.href);\n var parsedTo = urlparser.parse(to);\n var parsedFrom = urlparser.parse(from);\n this._lastHref = to;\n if (parsedHref.protocol === parsedTo.protocol && parsedHref.host === parsedTo.host) {\n to = parsedTo.path + (parsedTo.hash || '');\n }\n if (parsedHref.protocol === parsedFrom.protocol && parsedHref.host === parsedFrom.host) {\n from = parsedFrom.path + (parsedFrom.hash || '');\n }\n this.telemeter.captureNavigation(from, to);\n};\n\nInstrumenter.prototype.deinstrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.removeListeners('connectivity');\n } else {\n restore(this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.instrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.addListener('connectivity', this._window, 'online', undefined, function() {\n this.telemeter.captureConnectivityChange('online');\n }.bind(this), true);\n this.addListener('connectivity', this._window, 'offline', undefined, function() {\n this.telemeter.captureConnectivityChange('offline');\n }.bind(this), true);\n } else {\n var self = this;\n replace(this._document.body, 'ononline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('online');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n replace(this._document.body, 'onoffline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('offline');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.handleCspEvent = function(cspEvent) {\n var message = 'Security Policy Violation: ' +\n 'blockedURI: ' + cspEvent.blockedURI + ', ' +\n 'violatedDirective: ' + cspEvent.violatedDirective + ', ' +\n 'effectiveDirective: ' + cspEvent.effectiveDirective + ', ';\n\n if (cspEvent.sourceFile) {\n message += 'location: ' + cspEvent.sourceFile + ', ' +\n 'line: ' + cspEvent.lineNumber + ', ' +\n 'col: ' + cspEvent.columnNumber + ', ';\n }\n\n message += 'originalPolicy: ' + cspEvent.originalPolicy;\n\n this.telemeter.captureLog(message, 'error');\n this.handleCspError(message);\n}\n\nInstrumenter.prototype.handleCspError = function(message) {\n if (this.autoInstrument.errorOnContentSecurityPolicy) {\n this.rollbar.error(message);\n }\n}\n\nInstrumenter.prototype.deinstrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._window)) { return; }\n\n this.removeListeners('contentsecuritypolicy');\n};\n\nInstrumenter.prototype.instrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._window)) { return; }\n\n var cspHandler = this.handleCspEvent.bind(this);\n this.addListener('contentsecuritypolicy', this._window, 'securitypolicyviolation', null, cspHandler, false);\n};\n\nInstrumenter.prototype.addListener = function(section, obj, type, altType, handler, capture) {\n if (obj.addEventListener) {\n obj.addEventListener(type, handler, capture);\n this.eventRemovers[section].push(function() {\n obj.removeEventListener(type, handler, capture);\n });\n } else if (altType) {\n obj.attachEvent(altType, handler);\n this.eventRemovers[section].push(function() {\n obj.detachEvent(altType, handler);\n });\n }\n};\n\nInstrumenter.prototype.removeListeners = function(section) {\n var r;\n while (this.eventRemovers[section].length) {\n r = this.eventRemovers[section].shift();\n r();\n }\n};\n\nmodule.exports = Instrumenter;\n","'use strict';\n\nfunction getElementType(e) {\n return (e.getAttribute('type') || '').toLowerCase();\n}\n\nfunction isDescribedElement(element, type, subtypes) {\n if (element.tagName.toLowerCase() !== type.toLowerCase()) {\n return false;\n }\n if (!subtypes) {\n return true;\n }\n element = getElementType(element);\n for (var i = 0; i < subtypes.length; i++) {\n if (subtypes[i] === element) {\n return true;\n }\n }\n return false;\n}\n\nfunction getElementFromEvent(evt, doc) {\n if (evt.target) {\n return evt.target;\n }\n if (doc && doc.elementFromPoint) {\n return doc.elementFromPoint(evt.clientX, evt.clientY);\n }\n return undefined;\n}\n\nfunction treeToArray(elem) {\n var MAX_HEIGHT = 5;\n var out = [];\n var nextDescription;\n for (var height = 0; elem && height < MAX_HEIGHT; height++) {\n nextDescription = describeElement(elem);\n if (nextDescription.tagName === 'html') {\n break;\n }\n out.unshift(nextDescription);\n elem = elem.parentNode;\n }\n return out;\n}\n\nfunction elementArrayToString(a) {\n var MAX_LENGTH = 80;\n var separator = ' > ', separatorLength = separator.length;\n var out = [], len = 0, nextStr, totalLength;\n\n for (var i = a.length - 1; i >= 0; i--) {\n nextStr = descriptionToString(a[i]);\n totalLength = len + (out.length * separatorLength) + nextStr.length;\n if (i < a.length - 1 && totalLength >= MAX_LENGTH + 3) {\n out.unshift('...');\n break;\n }\n out.unshift(nextStr);\n len += nextStr.length;\n }\n return out.join(separator);\n}\n\nfunction descriptionToString(desc) {\n if (!desc || !desc.tagName) {\n return '';\n }\n var out = [desc.tagName];\n if (desc.id) {\n out.push('#' + desc.id);\n }\n if (desc.classes) {\n out.push('.' + desc.classes.join('.'));\n }\n for (var i = 0; i < desc.attributes.length; i++) {\n out.push('[' + desc.attributes[i].key + '=\"' + desc.attributes[i].value + '\"]');\n }\n\n return out.join('');\n}\n\n/**\n * Input: a dom element\n * Output: null if tagName is falsey or input is falsey, else\n * {\n * tagName: String,\n * id: String | undefined,\n * classes: [String] | undefined,\n * attributes: [\n * {\n * key: OneOf(type, name, title, alt),\n * value: String\n * }\n * ]\n * }\n */\nfunction describeElement(elem) {\n if (!elem || !elem.tagName) {\n return null;\n }\n var out = {}, className, key, attr, i;\n out.tagName = elem.tagName.toLowerCase();\n if (elem.id) {\n out.id = elem.id;\n }\n className = elem.className;\n if (className && (typeof className === 'string')) {\n out.classes = className.split(/\\s+/);\n }\n var attributes = ['type', 'name', 'title', 'alt'];\n out.attributes = [];\n for (i = 0; i < attributes.length; i++) {\n key = attributes[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.attributes.push({key: key, value: attr});\n }\n }\n return out;\n}\n\nmodule.exports = {\n describeElement: describeElement,\n descriptionToString: descriptionToString,\n elementArrayToString: elementArrayToString,\n treeToArray: treeToArray,\n getElementFromEvent: getElementFromEvent,\n isDescribedElement: isDescribedElement,\n getElementType: getElementType\n};\n","'use strict';\n\nvar polyfillJSON = require('../../vendor/JSON-js/json3');\n\nmodule.exports = polyfillJSON;\n","// json3.js\n// 2017-02-21\n// Public Domain.\n// NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.\n// See http://www.JSON.org/js.html\n// This code should be minified before deployment.\n// See http://javascript.crockford.com/jsmin.html\n\n// USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO\n// NOT CONTROL.\n\n// This file creates a global JSON object containing two methods: stringify\n// and parse. This file provides the ES5 JSON capability to ES3 systems.\n// If a project might run on IE8 or earlier, then this file should be included.\n// This file does nothing on ES5 systems.\n\n// JSON.stringify(value, replacer, space)\n// value any JavaScript value, usually an object or array.\n// replacer an optional parameter that determines how object\n// values are stringified for objects. It can be a\n// function or an array of strings.\n// space an optional parameter that specifies the indentation\n// of nested structures. If it is omitted, the text will\n// be packed without extra whitespace. If it is a number,\n// it will specify the number of spaces to indent at each\n// level. If it is a string (such as \"\\t\" or \" \"),\n// it contains the characters used to indent at each level.\n// This method produces a JSON text from a JavaScript value.\n// When an object value is found, if the object contains a toJSON\n// method, its toJSON method will be called and the result will be\n// stringified. A toJSON method does not serialize: it returns the\n// value represented by the name/value pair that should be serialized,\n// or undefined if nothing should be serialized. The toJSON method\n// will be passed the key associated with the value, and this will be\n// bound to the value.\n\n// For example, this would serialize Dates as ISO strings.\n\n// Date.prototype.toJSON = function (key) {\n// function f(n) {\n// // Format integers to have at least two digits.\n// return (n < 10)\n// ? \"0\" + n\n// : n;\n// }\n// return this.getUTCFullYear() + \"-\" +\n// f(this.getUTCMonth() + 1) + \"-\" +\n// f(this.getUTCDate()) + \"T\" +\n// f(this.getUTCHours()) + \":\" +\n// f(this.getUTCMinutes()) + \":\" +\n// f(this.getUTCSeconds()) + \"Z\";\n// };\n\n// You can provide an optional replacer method. It will be passed the\n// key and value of each member, with this bound to the containing\n// object. The value that is returned from your method will be\n// serialized. If your method returns undefined, then the member will\n// be excluded from the serialization.\n\n// If the replacer parameter is an array of strings, then it will be\n// used to select the members to be serialized. It filters the results\n// such that only members with keys listed in the replacer array are\n// stringified.\n\n// Values that do not have JSON representations, such as undefined or\n// functions, will not be serialized. Such values in objects will be\n// dropped; in arrays they will be replaced with null. You can use\n// a replacer function to replace those with JSON values.\n\n// JSON.stringify(undefined) returns undefined.\n\n// The optional space parameter produces a stringification of the\n// value that is filled with line breaks and indentation to make it\n// easier to read.\n\n// If the space parameter is a non-empty string, then that string will\n// be used for indentation. If the space parameter is a number, then\n// the indentation will be that many spaces.\n\n// Example:\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}]);\n// // text is '[\"e\",{\"pluribus\":\"unum\"}]'\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}], null, \"\\t\");\n// // text is '[\\n\\t\"e\",\\n\\t{\\n\\t\\t\"pluribus\": \"unum\"\\n\\t}\\n]'\n\n// text = JSON.stringify([new Date()], function (key, value) {\n// return this[key] instanceof Date\n// ? \"Date(\" + this[key] + \")\"\n// : value;\n// });\n// // text is '[\"Date(---current time---)\"]'\n\n// JSON.parse(text, reviver)\n// This method parses a JSON text to produce an object or array.\n// It can throw a SyntaxError exception.\n// This has been modified to use JSON-js/json_parse_state.js as the\n// parser instead of the one built around eval found in JSON-js/json2.js\n\n// The optional reviver parameter is a function that can filter and\n// transform the results. It receives each of the keys and values,\n// and its return value is used instead of the original value.\n// If it returns what it received, then the structure is not modified.\n// If it returns undefined then the member is deleted.\n\n// Example:\n\n// // Parse the text. Values that look like ISO date strings will\n// // be converted to Date objects.\n\n// myData = JSON.parse(text, function (key, value) {\n// var a;\n// if (typeof value === \"string\") {\n// a =\n// /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2}(?:\\.\\d*)?)Z$/.exec(value);\n// if (a) {\n// return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],\n// +a[5], +a[6]));\n// }\n// }\n// return value;\n// });\n\n// myData = JSON.parse('[\"Date(09/09/2001)\"]', function (key, value) {\n// var d;\n// if (typeof value === \"string\" &&\n// value.slice(0, 5) === \"Date(\" &&\n// value.slice(-1) === \")\") {\n// d = new Date(value.slice(5, -1));\n// if (d) {\n// return d;\n// }\n// }\n// return value;\n// });\n\n// This is a reference implementation. You are free to copy, modify, or\n// redistribute.\n\n/*jslint\n for, this\n */\n\n/*property\n JSON, apply, call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,\n getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,\n lastIndex, length, parse, prototype, push, replace, slice, stringify,\n test, toJSON, toString, valueOf\n */\n\nvar setupCustomJSON = function(JSON) {\n\n var rx_one = /^[\\],:{}\\s]*$/;\n var rx_two = /\\\\(?:[\"\\\\\\/bfnrt]|u[0-9a-fA-F]{4})/g;\n var rx_three = /\"[^\"\\\\\\n\\r]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g;\n var rx_four = /(?:^|:|,)(?:\\s*\\[)+/g;\n var rx_escapable = /[\\\\\"\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n var rx_dangerous = /[\\u0000\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n\n function f(n) {\n // Format integers to have at least two digits.\n return n < 10\n ? \"0\" + n\n : n;\n }\n\n function this_value() {\n return this.valueOf();\n }\n\n if (typeof Date.prototype.toJSON !== \"function\") {\n\n Date.prototype.toJSON = function () {\n\n return isFinite(this.valueOf())\n ? this.getUTCFullYear() + \"-\" +\n f(this.getUTCMonth() + 1) + \"-\" +\n f(this.getUTCDate()) + \"T\" +\n f(this.getUTCHours()) + \":\" +\n f(this.getUTCMinutes()) + \":\" +\n f(this.getUTCSeconds()) + \"Z\"\n : null;\n };\n\n Boolean.prototype.toJSON = this_value;\n Number.prototype.toJSON = this_value;\n String.prototype.toJSON = this_value;\n }\n\n var gap;\n var indent;\n var meta;\n var rep;\n\n\n function quote(string) {\n\n // If the string contains no control characters, no quote characters, and no\n // backslash characters, then we can safely slap some quotes around it.\n // Otherwise we must also replace the offending characters with safe escape\n // sequences.\n\n rx_escapable.lastIndex = 0;\n return rx_escapable.test(string)\n ? \"\\\"\" + string.replace(rx_escapable, function (a) {\n var c = meta[a];\n return typeof c === \"string\"\n ? c\n : \"\\\\u\" + (\"0000\" + a.charCodeAt(0).toString(16)).slice(-4);\n }) + \"\\\"\"\n : \"\\\"\" + string + \"\\\"\";\n }\n\n\n function str(key, holder) {\n\n // Produce a string from holder[key].\n\n var i; // The loop counter.\n var k; // The member key.\n var v; // The member value.\n var length;\n var mind = gap;\n var partial;\n var value = holder[key];\n\n // If the value has a toJSON method, call it to obtain a replacement value.\n\n if (value && typeof value === \"object\" &&\n typeof value.toJSON === \"function\") {\n value = value.toJSON(key);\n }\n\n // If we were called with a replacer function, then call the replacer to\n // obtain a replacement value.\n\n if (typeof rep === \"function\") {\n value = rep.call(holder, key, value);\n }\n\n // What happens next depends on the value's type.\n\n switch (typeof value) {\n case \"string\":\n return quote(value);\n\n case \"number\":\n\n // JSON numbers must be finite. Encode non-finite numbers as null.\n\n return isFinite(value)\n ? String(value)\n : \"null\";\n\n case \"boolean\":\n case \"null\":\n\n // If the value is a boolean or null, convert it to a string. Note:\n // typeof null does not produce \"null\". The case is included here in\n // the remote chance that this gets fixed someday.\n\n return String(value);\n\n // If the type is \"object\", we might be dealing with an object or an array or\n // null.\n\n case \"object\":\n\n // Due to a specification blunder in ECMAScript, typeof null is \"object\",\n // so watch out for that case.\n\n if (!value) {\n return \"null\";\n }\n\n // Make an array to hold the partial results of stringifying this object value.\n\n gap += indent;\n partial = [];\n\n // Is the value an array?\n\n if (Object.prototype.toString.apply(value) === \"[object Array]\") {\n\n // The value is an array. Stringify every element. Use null as a placeholder\n // for non-JSON values.\n\n length = value.length;\n for (i = 0; i < length; i += 1) {\n partial[i] = str(i, value) || \"null\";\n }\n\n // Join all of the elements together, separated with commas, and wrap them in\n // brackets.\n\n v = partial.length === 0\n ? \"[]\"\n : gap\n ? \"[\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"]\"\n : \"[\" + partial.join(\",\") + \"]\";\n gap = mind;\n return v;\n }\n\n // If the replacer is an array, use it to select the members to be stringified.\n\n if (rep && typeof rep === \"object\") {\n length = rep.length;\n for (i = 0; i < length; i += 1) {\n if (typeof rep[i] === \"string\") {\n k = rep[i];\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n } else {\n\n // Otherwise, iterate through all of the keys in the object.\n\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(value, k)) {\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n }\n\n // Join all of the member texts together, separated with commas,\n // and wrap them in braces.\n\n v = partial.length === 0\n ? \"{}\"\n : gap\n ? \"{\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"}\"\n : \"{\" + partial.join(\",\") + \"}\";\n gap = mind;\n return v;\n }\n }\n\n // If the JSON object does not yet have a stringify method, give it one.\n\n if (typeof JSON.stringify !== \"function\") {\n meta = { // table of character substitutions\n \"\\b\": \"\\\\b\",\n \"\\t\": \"\\\\t\",\n \"\\n\": \"\\\\n\",\n \"\\f\": \"\\\\f\",\n \"\\r\": \"\\\\r\",\n \"\\\"\": \"\\\\\\\"\",\n \"\\\\\": \"\\\\\\\\\"\n };\n JSON.stringify = function (value, replacer, space) {\n\n // The stringify method takes a value and an optional replacer, and an optional\n // space parameter, and returns a JSON text. The replacer can be a function\n // that can replace values, or an array of strings that will select the keys.\n // A default replacer method can be provided. Use of the space parameter can\n // produce text that is more easily readable.\n\n var i;\n gap = \"\";\n indent = \"\";\n\n // If the space parameter is a number, make an indent string containing that\n // many spaces.\n\n if (typeof space === \"number\") {\n for (i = 0; i < space; i += 1) {\n indent += \" \";\n }\n\n // If the space parameter is a string, it will be used as the indent string.\n\n } else if (typeof space === \"string\") {\n indent = space;\n }\n\n // If there is a replacer, it must be a function or an array.\n // Otherwise, throw an error.\n\n rep = replacer;\n if (replacer && typeof replacer !== \"function\" &&\n (typeof replacer !== \"object\" ||\n typeof replacer.length !== \"number\")) {\n throw new Error(\"JSON.stringify\");\n }\n\n // Make a fake root object containing our value under the key of \"\".\n // Return the result of stringifying the value.\n\n return str(\"\", {\"\": value});\n };\n }\n\n\n // If the JSON object does not yet have a parse method, give it one.\n\n if (typeof JSON.parse !== \"function\") {\n JSON.parse = (function () {\n\n // This function creates a JSON parse function that uses a state machine rather\n // than the dangerous eval function to parse a JSON text.\n\n var state; // The state of the parser, one of\n // 'go' The starting state\n // 'ok' The final, accepting state\n // 'firstokey' Ready for the first key of the object or\n // the closing of an empty object\n // 'okey' Ready for the next key of the object\n // 'colon' Ready for the colon\n // 'ovalue' Ready for the value half of a key/value pair\n // 'ocomma' Ready for a comma or closing }\n // 'firstavalue' Ready for the first value of an array or\n // an empty array\n // 'avalue' Ready for the next value of an array\n // 'acomma' Ready for a comma or closing ]\n var stack; // The stack, for controlling nesting.\n var container; // The current container object or array\n var key; // The current key\n var value; // The current value\n var escapes = { // Escapement translation table\n \"\\\\\": \"\\\\\",\n \"\\\"\": \"\\\"\",\n \"/\": \"/\",\n \"t\": \"\\t\",\n \"n\": \"\\n\",\n \"r\": \"\\r\",\n \"f\": \"\\f\",\n \"b\": \"\\b\"\n };\n var string = { // The actions for string tokens\n go: function () {\n state = \"ok\";\n },\n firstokey: function () {\n key = value;\n state = \"colon\";\n },\n okey: function () {\n key = value;\n state = \"colon\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var number = { // The actions for number tokens\n go: function () {\n state = \"ok\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var action = {\n\n // The action table describes the behavior of the machine. It contains an\n // object for each token. Each object contains a method that is called when\n // a token is matched in a state. An object will lack a method for illegal\n // states.\n\n \"{\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = {};\n state = \"firstokey\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = {};\n state = \"firstokey\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n }\n },\n \"}\": {\n firstokey: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n ocomma: function () {\n var pop = stack.pop();\n container[key] = value;\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \"[\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = [];\n state = \"firstavalue\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = [];\n state = \"firstavalue\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n }\n },\n \"]\": {\n firstavalue: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n acomma: function () {\n var pop = stack.pop();\n container.push(value);\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \":\": {\n colon: function () {\n if (Object.hasOwnProperty.call(container, key)) {\n throw new SyntaxError(\"Duplicate key '\" + key + \"\\\"\");\n }\n state = \"ovalue\";\n }\n },\n \",\": {\n ocomma: function () {\n container[key] = value;\n state = \"okey\";\n },\n acomma: function () {\n container.push(value);\n state = \"avalue\";\n }\n },\n \"true\": {\n go: function () {\n value = true;\n state = \"ok\";\n },\n ovalue: function () {\n value = true;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = true;\n state = \"acomma\";\n },\n avalue: function () {\n value = true;\n state = \"acomma\";\n }\n },\n \"false\": {\n go: function () {\n value = false;\n state = \"ok\";\n },\n ovalue: function () {\n value = false;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = false;\n state = \"acomma\";\n },\n avalue: function () {\n value = false;\n state = \"acomma\";\n }\n },\n \"null\": {\n go: function () {\n value = null;\n state = \"ok\";\n },\n ovalue: function () {\n value = null;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = null;\n state = \"acomma\";\n },\n avalue: function () {\n value = null;\n state = \"acomma\";\n }\n }\n };\n\n function debackslashify(text) {\n\n // Remove and replace any backslash escapement.\n\n return text.replace(/\\\\(?:u(.{4})|([^u]))/g, function (ignore, b, c) {\n return b\n ? String.fromCharCode(parseInt(b, 16))\n : escapes[c];\n });\n }\n\n return function (source, reviver) {\n\n // A regular expression is used to extract tokens from the JSON text.\n // The extraction process is cautious.\n\n var result;\n var tx = /^[\\u0020\\t\\n\\r]*(?:([,:\\[\\]{}]|true|false|null)|(-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?)|\"((?:[^\\r\\n\\t\\\\\\\"]|\\\\(?:[\"\\\\\\/trnfb]|u[0-9a-fA-F]{4}))*)\")/;\n\n // Set the starting state.\n\n state = \"go\";\n\n // The stack records the container, key, and state for each object or array\n // that contains another object or array while processing nested structures.\n\n stack = [];\n\n // If any error occurs, we will catch it and ultimately throw a syntax error.\n\n try {\n\n // For each token...\n\n while (true) {\n result = tx.exec(source);\n if (!result) {\n break;\n }\n\n // result is the result array from matching the tokenizing regular expression.\n // result[0] contains everything that matched, including any initial whitespace.\n // result[1] contains any punctuation that was matched, or true, false, or null.\n // result[2] contains a matched number, still in string form.\n // result[3] contains a matched string, without quotes but with escapement.\n\n if (result[1]) {\n\n // Token: Execute the action for this state and token.\n\n action[result[1]][state]();\n\n } else if (result[2]) {\n\n // Number token: Convert the number string into a number value and execute\n // the action for this state and number.\n\n value = +result[2];\n number[state]();\n } else {\n\n // String token: Replace the escapement sequences and execute the action for\n // this state and string.\n\n value = debackslashify(result[3]);\n string[state]();\n }\n\n // Remove the token from the string. The loop will continue as long as there\n // are tokens. This is a slow process, but it allows the use of ^ matching,\n // which assures that no illegal tokens slip through.\n\n source = source.slice(result[0].length);\n }\n\n // If we find a state/token combination that is illegal, then the action will\n // cause an error. We handle the error by simply changing the state.\n\n } catch (e) {\n state = e;\n }\n\n // The parsing is finished. If we are not in the final \"ok\" state, or if the\n // remaining source contains anything except whitespace, then we did not have\n //a well-formed JSON text.\n\n if (state !== \"ok\" || (/[^\\u0020\\t\\n\\r]/.test(source))) {\n throw (state instanceof SyntaxError)\n ? state\n : new SyntaxError(\"JSON\");\n }\n\n // If there is a reviver function, we recursively walk the new structure,\n // passing each name/value pair to the reviver function for possible\n // transformation, starting with a temporary root object that holds the current\n // value in an empty key. If there is not a reviver function, we simply return\n // that value.\n\n return (typeof reviver === \"function\")\n ? (function walk(holder, key) {\n var k;\n var v;\n var val = holder[key];\n if (val && typeof val === \"object\") {\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(val, k)) {\n v = walk(val, k);\n if (v !== undefined) {\n val[k] = v;\n } else {\n delete val[k];\n }\n }\n }\n }\n return reviver.call(holder, key, val);\n }({\"\": value}, \"\"))\n : value;\n };\n }());\n }\n}\n\nmodule.exports = setupCustomJSON;\n","'use strict';\n\nfunction wrapGlobals(window, handler, shim) {\n if (!window) { return; }\n // Adapted from https://github.com/bugsnag/bugsnag-js\n var globals = 'EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload'.split(',');\n var i, global;\n for (i = 0; i < globals.length; ++i) {\n global = globals[i];\n\n if (window[global] && window[global].prototype) {\n _extendListenerPrototype(handler, window[global].prototype, shim);\n }\n }\n}\n\nfunction _extendListenerPrototype(handler, prototype, shim) {\n if (prototype.hasOwnProperty && prototype.hasOwnProperty('addEventListener')) {\n var oldAddEventListener = prototype.addEventListener;\n while (oldAddEventListener._rollbarOldAdd && oldAddEventListener.belongsToShim) {\n oldAddEventListener = oldAddEventListener._rollbarOldAdd;\n }\n var addFn = function(event, callback, bubble) {\n oldAddEventListener.call(this, event, handler.wrap(callback), bubble);\n };\n addFn._rollbarOldAdd = oldAddEventListener;\n addFn.belongsToShim = shim;\n prototype.addEventListener = addFn;\n\n var oldRemoveEventListener = prototype.removeEventListener;\n while (oldRemoveEventListener._rollbarOldRemove && oldRemoveEventListener.belongsToShim) {\n oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;\n }\n var removeFn = function(event, callback, bubble) {\n oldRemoveEventListener.call(this, event, callback && callback._rollbar_wrapped || callback, bubble);\n };\n removeFn._rollbarOldRemove = oldRemoveEventListener;\n removeFn.belongsToShim = shim;\n prototype.removeEventListener = removeFn;\n }\n}\n\nmodule.exports = wrapGlobals;\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction raw(payload, jsonBackup) {\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction selectFrames(frames, range) {\n var len = frames.length;\n if (len > range * 2) {\n return frames.slice(0, range).concat(frames.slice(len - range));\n }\n return frames;\n}\n\nfunction truncateFrames(payload, jsonBackup, range) {\n range = (typeof range === 'undefined') ? 30 : range;\n var body = payload.data.body;\n var frames;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n frames = chain[i].frames;\n frames = selectFrames(frames, range);\n chain[i].frames = frames;\n }\n } else if (body.trace) {\n frames = body.trace.frames;\n frames = selectFrames(frames, range);\n body.trace.frames = frames;\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction maybeTruncateValue(len, val) {\n if (!val) {\n return val;\n }\n if (val.length > len) {\n return val.slice(0, len - 3).concat('...');\n }\n return val;\n}\n\nfunction truncateStrings(len, payload, jsonBackup) {\n function truncator(k, v, seen) {\n switch (_.typeName(v)) {\n case 'string':\n return maybeTruncateValue(len, v);\n case 'object':\n case 'array':\n return traverse(v, truncator, seen);\n default:\n return v;\n }\n }\n payload = traverse(payload, truncator);\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction truncateTraceData(traceData) {\n if (traceData.exception) {\n delete traceData.exception.description;\n traceData.exception.message = maybeTruncateValue(255, traceData.exception.message);\n }\n traceData.frames = selectFrames(traceData.frames, 1);\n return traceData;\n}\n\nfunction minBody(payload, jsonBackup) {\n var body = payload.data.body;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n chain[i] = truncateTraceData(chain[i]);\n }\n } else if (body.trace) {\n body.trace = truncateTraceData(body.trace);\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction needsTruncation(payload, maxSize) {\n return _.maxByteSize(payload) > maxSize;\n}\n\nfunction truncate(payload, jsonBackup, maxSize) {\n maxSize = (typeof maxSize === 'undefined') ? (512 * 1024) : maxSize;\n var strategies = [\n raw,\n truncateFrames,\n truncateStrings.bind(null, 1024),\n truncateStrings.bind(null, 512),\n truncateStrings.bind(null, 256),\n minBody\n ];\n var strategy, results, result;\n\n while ((strategy = strategies.shift())) {\n results = strategy(payload, jsonBackup);\n payload = results[0];\n result = results[1];\n if (result.error || !needsTruncation(result.value, maxSize)) {\n return result;\n }\n }\n return result;\n}\n\nmodule.exports = {\n truncate: truncate,\n\n /* for testing */\n raw: raw,\n truncateFrames: truncateFrames,\n truncateStrings: truncateStrings,\n maybeTruncateValue: maybeTruncateValue\n};\n"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/rollbar.umd.min.js b/dist/rollbar.umd.min.js index ee5cad795..c639f635c 100644 --- a/dist/rollbar.umd.min.js +++ b/dist/rollbar.umd.min.js @@ -1,2 +1,2 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.rollbar=e():t.rollbar=e()}(this,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=6)}([function(t,e,r){"use strict";var n=r(12),o={};function i(t,e){return e===s(t)}function s(t){var e=typeof t;return"object"!==e?e:t?t instanceof Error?"error":{}.toString.call(t).match(/\s([a-zA-Z]+)/)[1].toLowerCase():"null"}function a(t){return i(t,"function")}function u(t){var e=Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?"),r=RegExp("^"+e+"$");return c(t)&&r.test(t)}function c(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function l(){var t=v();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var r=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?r:7&r|8).toString(16)}))}var p={strictMode:!1,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};function f(t,e){var r,n;try{r=o.stringify(t)}catch(o){if(e&&a(e))try{r=e(t)}catch(t){n=t}else n=o}return{error:n,value:r}}function h(t,e){return function(r,n){try{e(r,n)}catch(e){t.error(e)}}}var d=["log","network","dom","navigation","error","manual"],m=["critical","error","warning","info","debug"];function g(t,e){for(var r=0;ra)?(s=e.path,e.path=s.substring(0,a)+i+"&"+s.substring(a+1)):-1!==u?(s=e.path,e.path=s.substring(0,u)+i+s.substring(u)):e.path=e.path+i},createItem:function(t,e,r,o,i){for(var a,u,c,p,f,d,m=[],g=[],y=0,b=t.length;y0&&((c=n(c)).extraArgs=m);var k={message:a,err:u,custom:c,timestamp:v(),callback:p,notifier:r,diagnostic:{},uuid:l()};return function(t,e){e&&void 0!==e.level&&(t.level=e.level,delete e.level);e&&void 0!==e.skipFrames&&(t.skipFrames=e.skipFrames,delete e.skipFrames)}(k,c),o&&f&&(k.request=f),i&&(k.lambdaContext=i),k._originalArgs=t,k.diagnostic.original_arg_types=g,k},addErrorContext:function(t,e){var r=t.data.custom||{},o=!1;try{for(var i=0;i2){var o=n.slice(0,3),i=o[2].indexOf("/");-1!==i&&(o[2]=o[2].substring(0,i));r=o.concat("0000:0000:0000:0000:0000").join(":")}}else r=null}catch(t){r=null}else r=null;t.user_ip=r}},formatArgsAsString:function(t){var e,r,n,o=[];for(e=0,r=t.length;e500&&(n=n.substr(0,497)+"...");break;case"null":n="null";break;case"undefined":n="undefined";break;case"symbol":n=n.toString()}o.push(n)}return o.join(" ")},formatUrl:function(t,e){if(!(e=e||t.protocol)&&t.port&&(80===t.port?e="http:":443===t.port&&(e="https:")),e=e||"https:",!t.hostname)return null;var r=e+"//"+t.hostname;return t.port&&(r=r+":"+t.port),t.path&&(r+=t.path),r},get:function(t,e){if(t){var r=e.split("."),n=t;try{for(var o=0,i=r.length;o=1&&r>e}function s(t,e,r,n,o,i,s){var a=null;return r&&(r=new Error(r)),r||n||(a=function(t,e,r,n,o){var i,s=e.environment||e.payload&&e.payload.environment;i=o?"item per minute limit reached, ignoring errors until timeout":"maxItems has been hit, ignoring errors until reset.";var a={body:{message:{body:i,extra:{maxItems:r,itemsPerMinute:n}}},language:"javascript",environment:s,notifier:{version:e.notifier&&e.notifier.version||e.version}};"browser"===t?(a.platform="browser",a.framework="browser-js",a.notifier.name="rollbar-browser-js"):"server"===t?(a.framework=e.framework||"node-js",a.notifier.name=e.notifier.name):"react-native"===t&&(a.framework=e.framework||"react-native",a.notifier.name=e.notifier.name);return a}(t,e,o,i,s)),{error:r,shouldSend:n,payload:a}}o.globalSettings={startTime:n.now(),maxItems:void 0,itemsPerMinute:void 0},o.prototype.configureGlobal=function(t){void 0!==t.startTime&&(o.globalSettings.startTime=t.startTime),void 0!==t.maxItems&&(o.globalSettings.maxItems=t.maxItems),void 0!==t.itemsPerMinute&&(o.globalSettings.itemsPerMinute=t.itemsPerMinute)},o.prototype.shouldSend=function(t,e){var r=(e=e||n.now())-this.startTime;(r<0||r>=6e4)&&(this.startTime=e,this.perMinCounter=0);var a=o.globalSettings.maxItems,u=o.globalSettings.itemsPerMinute;if(i(t,a,this.counter))return s(this.platform,this.platformOptions,a+" max items reached",!1);if(i(t,u,this.perMinCounter))return s(this.platform,this.platformOptions,u+" items per minute reached",!1);this.counter++,this.perMinCounter++;var c=!i(t,a,this.counter),l=c;return c=c&&!i(t,u,this.perMinCounter),s(this.platform,this.platformOptions,null,c,a,u,l)},o.prototype.setPlatformOptions=function(t,e){this.platform=t,this.platformOptions=e},t.exports=o},function(t,e,r){"use strict";var n=Object.prototype.hasOwnProperty,o=Object.prototype.toString,i=function(t){if(!t||"[object Object]"!==o.call(t))return!1;var e,r=n.call(t,"constructor"),i=t.constructor&&t.constructor.prototype&&n.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!r&&!i)return!1;for(e in t);return void 0===e||n.call(t,e)};t.exports=function t(){var e,r,n,o,s,a={},u=null,c=arguments.length;for(e=0;ethis.options.maxRetries&&(o=!1))}o?this._retryApiRequest(e,r):r(t)},o.prototype._retryApiRequest=function(t,e){this.retryQueue.push({item:t,callback:e}),this.retryHandle||(this.retryHandle=setInterval(function(){for(;this.retryQueue.length;){var t=this.retryQueue.shift();this._makeApiRequest(t.item,t.callback)}}.bind(this),this.options.retryInterval))},o.prototype._dequeuePendingRequest=function(t){var e=this.pendingRequests.indexOf(t);-1!==e&&(this.pendingRequests.splice(e,1),this._maybeCallWait())},o.prototype._maybeLog=function(t,e){if(this.logger&&this.options.verbose){var r=e;if(r=(r=r||n.get(t,"body.trace.exception.message"))||n.get(t,"body.trace_chain.0.exception.message"))return void this.logger.error(r);(r=n.get(t,"body.message.body"))&&this.logger.log(r)}},o.prototype._maybeCallWait=function(){return!(!n.isFunction(this.waitCallback)||0!==this.pendingItems.length||0!==this.pendingRequests.length)&&(this.waitIntervalID&&(this.waitIntervalID=clearInterval(this.waitIntervalID)),this.waitCallback(),!0)},t.exports=o},function(t,e,r){"use strict";var n=r(0);function o(t,e){this.queue=t,this.options=e,this.transforms=[],this.diagnostic={}}o.prototype.configure=function(t){this.queue&&this.queue.configure(t);var e=this.options;return this.options=n.merge(e,t),this},o.prototype.addTransform=function(t){return n.isFunction(t)&&this.transforms.push(t),this},o.prototype.log=function(t,e){if(e&&n.isFunction(e)||(e=function(){}),!this.options.enabled)return e(new Error("Rollbar is not enabled"));this.queue.addPendingItem(t);var r=t.err;this._applyTransforms(t,function(n,o){if(n)return this.queue.removePendingItem(t),e(n,null);this.queue.addItem(o,e,r,t)}.bind(this))},o.prototype._applyTransforms=function(t,e){var r=-1,n=this.transforms.length,o=this.transforms,i=this.options,s=function(t,a){t?e(t,null):++r!==n?o[r](a,i,s):e(null,a)};s(null,t)},t.exports=o},function(t,e,r){"use strict";var n=r(0),o=r(16),i={hostname:"api.rollbar.com",path:"/api/1/item/",search:null,version:"1",protocol:"https:",port:443};function s(t,e,r,n,o){this.options=t,this.transport=e,this.url=r,this.truncation=n,this.jsonBackup=o,this.accessToken=t.accessToken,this.transportOptions=a(t,r)}function a(t,e){return o.getTransportFromOptions(t,i,e)}s.prototype.postItem=function(t,e){var r=o.transportOptions(this.transportOptions,"POST"),n=o.buildPayload(this.accessToken,t,this.jsonBackup);this.transport.post(this.accessToken,r,n,e)},s.prototype.buildJsonPayload=function(t,e){var r,i=o.buildPayload(this.accessToken,t,this.jsonBackup);return(r=this.truncation?this.truncation.truncate(i):n.stringify(i)).error?(e&&e(r.error),null):r.value},s.prototype.postJsonPayload=function(t,e){var r=o.transportOptions(this.transportOptions,"POST");this.transport.postJsonPayload(this.accessToken,r,t,e)},s.prototype.configure=function(t){var e=this.oldOptions;return this.options=n.merge(e,t),this.transportOptions=a(this.options,this.url),void 0!==this.options.accessToken&&(this.accessToken=this.options.accessToken),this},t.exports=s},function(t,e,r){"use strict";var n=r(0);t.exports={buildPayload:function(t,e,r){if(!n.isType(e.context,"string")){var o=n.stringify(e.context,r);o.error?e.context="Error: could not serialize 'context'":e.context=o.value||"",e.context.length>255&&(e.context=e.context.substr(0,255))}return{access_token:t,data:e}},getTransportFromOptions:function(t,e,r){var n=e.hostname,o=e.protocol,i=e.port,s=e.path,a=e.search,u=t.timeout,c=t.proxy;if(t.endpoint){var l=r.parse(t.endpoint);n=l.hostname,o=l.protocol,i=l.port,s=l.pathname,a=l.search}return{timeout:u,hostname:n,protocol:o,port:i,path:s,search:a,proxy:c}},transportOptions:function(t,e){var r=t.protocol||"https:",n=t.port||("http:"===r?80:"https:"===r?443:void 0),o=t.hostname,i=t.path,s=t.timeout;return t.search&&(i+=t.search),t.proxy&&(i=r+"//"+o+i,o=t.proxy.host||t.proxy.hostname,n=t.proxy.port,r=t.proxy.protocol||r),{timeout:s,protocol:r,hostname:o,path:i,port:n,method:e}},appendPathToPath:function(t,e){var r=/\/$/.test(t),n=/^\//.test(e);return r&&n?e=e.substring(1):r||n||(e="/"+e),t+e}}},function(t,e){!function(t){"use strict";t.console||(t.console={});for(var e,r,n=t.console,o=function(){},i=["memory"],s="assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(",");e=i.pop();)n[e]||(n[e]={});for(;r=s.pop();)n[r]||(n[r]=o)}("undefined"==typeof window?this:window)},function(t,e,r){"use strict";var n={ieVersion:function(){if("undefined"!=typeof document){for(var t=3,e=document.createElement("div"),r=e.getElementsByTagName("i");e.innerHTML="\x3c!--[if gt IE "+ ++t+"]>4?t:void 0}}};t.exports=n},function(t,e,r){"use strict";function n(t,e,r,n){t._rollbarWrappedError&&(n[4]||(n[4]=t._rollbarWrappedError),n[5]||(n[5]=t._rollbarWrappedError._rollbarContext),t._rollbarWrappedError=null);var o=e.handleUncaughtException.apply(e,n);r&&r.apply(t,n),"anonymous"===o&&(e.anonymousErrorsPending+=1)}t.exports={captureUncaughtExceptions:function(t,e,r){if(t){var o;if("function"==typeof e._rollbarOldOnError)o=e._rollbarOldOnError;else if(t.onerror){for(o=t.onerror;o._rollbarOldOnError;)o=o._rollbarOldOnError;e._rollbarOldOnError=o}e.handleAnonymousErrors();var i=function(){var r=Array.prototype.slice.call(arguments,0);n(t,e,o,r)};r&&(i._rollbarOldOnError=o),t.onerror=i}},captureUnhandledRejections:function(t,e,r){if(t){"function"==typeof t._rollbarURH&&t._rollbarURH.belongsToShim&&t.removeEventListener("unhandledrejection",t._rollbarURH);var n=function(t){var r,n,o;try{r=t.reason}catch(t){r=void 0}try{n=t.promise}catch(t){n="[unhandledrejection] error getting `promise` from event"}try{o=t.detail,!r&&o&&(r=o.reason,n=o.promise)}catch(t){}r||(r="[unhandledrejection] error getting `reason` from event"),e&&e.handleUnhandledRejection&&e.handleUnhandledRejection(r,n)};n.belongsToShim=r,t._rollbarURH=n,t.addEventListener("unhandledrejection",n)}}}},function(t,e,r){"use strict";var n=r(0),o=r(1);function i(t){this.truncation=t}function s(){var t="undefined"!=typeof window&&window||"undefined"!=typeof self&&self,e=t&&t.Zone&&t.Zone.current,r=Array.prototype.slice.call(arguments);if(e&&"angular"===e._name){var n=e._parent;n.run((function(){a.apply(void 0,r)}))}else a.apply(void 0,r)}function a(t,e,r,i,s,a,c){if("undefined"!=typeof RollbarProxy)return function(t,e){(new RollbarProxy).sendJsonPayload(t,(function(t){}),(function(t){e(new Error(t))}))}(i,s);var l;if(!(l=a?a():function(){var t,e,r=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],n=r.length;for(e=0;e=400&&t.status<600}(l)){if(403===l.status){var e=t.value&&t.value.message;o.error(e)}s(new Error(String(l.status)))}else{s(u("XHR response had no status code (likely connection failure)"))}}}catch(t){var r;r=t&&t.stack?t:new Error(t),s(r)}var i};l.open(r,e,!0),l.setRequestHeader&&(l.setRequestHeader("Content-Type","application/json"),l.setRequestHeader("X-Rollbar-Access-Token",t)),n.isFiniteNumber(c)&&(l.timeout=c),l.onreadystatechange=p,l.send(i)}catch(t){if("undefined"!=typeof XDomainRequest){if(!window||!window.location)return s(new Error("No window available during request, unknown environment"));"http:"===window.location.href.substring(0,5)&&"https"===e.substring(0,5)&&(e="http"+e.substring(5));var f=new XDomainRequest;f.onprogress=function(){},f.ontimeout=function(){s(u("Request timed out","ETIMEDOUT"))},f.onerror=function(){s(new Error("Error during request"))},f.onload=function(){var t=n.jsonParse(f.responseText);s(t.error,t.value)},f.open(r,e,!0),f.send(i)}else s(new Error("Cannot find a method to transport a request"))}}catch(t){s(t)}}function u(t,e){var r=new Error(t);return r.code=e||"ENOTFOUND",r}i.prototype.get=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){}),n.addParamsAndAccessTokenToPath(t,e,r);s(t,n.formatUrl(e),"GET",null,o,i,e.timeout)},i.prototype.post=function(t,e,r,o,i){if(o&&n.isFunction(o)||(o=function(){}),!r)return o(new Error("Cannot send empty request"));var a;if((a=this.truncation?this.truncation.truncate(r):n.stringify(r)).error)return o(a.error);var u=a.value;s(t,n.formatUrl(e),"POST",u,o,i,e.timeout)},i.prototype.postJsonPayload=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){});s(t,n.formatUrl(e),"POST",r,o,i,e.timeout)},t.exports=i},function(t,e,r){"use strict";var n=r(0),o=r(3),i=r(1);function s(t,e,r){var o=t.message,i=t.custom;o||(o="Item sent with null or missing arguments.");var s={body:o};i&&(s.extra=n.merge(i)),n.set(t,"data.body",{message:s}),r(null,t)}function a(t){var e=t.stackInfo.stack;return e&&0===e.length&&t._unhandledStackInfo&&t._unhandledStackInfo.stack&&(e=t._unhandledStackInfo.stack),e}function u(t,e,r){var i=t&&t.data.description,s=t&&t.custom,u=a(t),l=o.guessErrorClass(e.message),p={exception:{class:c(e,l[0],r),message:l[1]}};if(i&&(p.exception.description=i),u){var f,h,d,m,g,v,y,b;for(0===u.length&&(p.exception.stack=e.rawStack,p.exception.raw=String(e.rawException)),p.frames=[],y=0;y-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var r=e.replace(/^\s+/,"").replace(/\(eval code/g,"("),n=r.match(/ (\((.+):(\d+):(\d+)\)$)/),o=(r=n?r.replace(n[0],""):r).split(/\s+/).slice(1),i=this.extractLocation(n?n[1]:o.pop()),s=o.join(" ")||void 0,a=["eval",""].indexOf(i[0])>-1?void 0:i[0];return new t({functionName:s,fileName:a,lineNumber:i[1],columnNumber:i[2],source:e})}),this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter((function(t){return!t.match(n)}),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 t({functionName:e});var r=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(r),o=n&&n[1]?n[1]:void 0,i=this.extractLocation(e.replace(r,""));return new t({functionName:o,fileName:i[0],lineNumber:i[1],columnNumber:i[2],source:e})}),this)},parseOpera:function(t){return!t.stacktrace||t.message.indexOf("\n")>-1&&t.message.split("\n").length>t.stacktrace.split("\n").length?this.parseOpera9(t):t.stack?this.parseOpera11(t):this.parseOpera10(t)},parseOpera9:function(e){for(var r=/Line (\d+).*script (?:in )?(\S+)/i,n=e.message.split("\n"),o=[],i=2,s=n.length;i/,"$2").replace(/\([^)]*\)/g,"")||void 0;i.match(/\(([^)]*)\)/)&&(r=i.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var a=void 0===r||"[arguments not available]"===r?void 0:r.split(",");return new t({functionName:s,args:a,fileName:o[0],lineNumber:o[1],columnNumber:o[2],source:e})}),this)}}})?n.apply(e,o):n)||(t.exports=i)}()},function(t,e,r){var n,o,i;!function(r,s){"use strict";o=[],void 0===(i="function"==typeof(n=function(){function t(t){return t.charAt(0).toUpperCase()+t.substring(1)}function e(t){return function(){return this[t]}}var r=["isConstructor","isEval","isNative","isToplevel"],n=["columnNumber","lineNumber"],o=["fileName","functionName","source"],i=r.concat(n,o,["args"],["evalOrigin"]);function s(e){if(e)for(var r=0;ro&&(i=this.maxQueueSize-o),this.maxQueueSize=o,this.queue.splice(0,i)},o.prototype.copyEvents=function(){var t=Array.prototype.slice.call(this.queue,0);if(n.isFunction(this.options.filterTelemetry))try{for(var e=t.length;e--;)this.options.filterTelemetry(t[e])&&t.splice(e,1)}catch(t){this.options.filterTelemetry=null}return t},o.prototype.capture=function(t,e,r,o,s){var a={level:i(t,r),type:t,timestamp_ms:s||n.now(),body:e,source:"client"};o&&(a.uuid=o);try{if(n.isFunction(this.options.filterTelemetry)&&this.options.filterTelemetry(a))return!1}catch(t){this.options.filterTelemetry=null}return this.push(a),a},o.prototype.captureEvent=function(t,e,r,n){return this.capture(t,e,r,n)},o.prototype.captureError=function(t,e,r,n){var o={message:t.message||String(t)};return t.stack&&(o.stack=t.stack),this.capture("error",o,e,r,n)},o.prototype.captureLog=function(t,e,r,n){return this.capture("log",{message:t},e,r,n)},o.prototype.captureNetwork=function(t,e,r,n){e=e||"xhr",t.subtype=t.subtype||e,n&&(t.request=n);var o=this.levelFromStatus(t.status_code);return this.capture("network",t,o,r)},o.prototype.levelFromStatus=function(t){return t>=200&&t<400?"info":0===t||t>=400?"error":"info"},o.prototype.captureDom=function(t,e,r,n,o){var i={subtype:t,element:e};return void 0!==r&&(i.value=r),void 0!==n&&(i.checked=n),this.capture("dom",i,"info",o)},o.prototype.captureNavigation=function(t,e,r){return this.capture("navigation",{from:t,to:e},"info",r)},o.prototype.captureDomContentLoaded=function(t){return this.capture("navigation",{subtype:"DOMContentLoaded"},"info",void 0,t&&t.getTime())},o.prototype.captureLoad=function(t){return this.capture("navigation",{subtype:"load"},"info",void 0,t&&t.getTime())},o.prototype.captureConnectivityChange=function(t,e){return this.captureNetwork({change:t},"connectivity",e)},o.prototype._captureRollbarItem=function(t){if(this.options.includeItemsInTelemetry)return t.err?this.captureError(t.err,t.level,t.uuid,t.timestamp):t.message?this.captureLog(t.message,t.level,t.uuid,t.timestamp):t.custom?this.capture("log",t.custom,t.level,t.uuid,t.timestamp):void 0},o.prototype.push=function(t){this.queue.push(t),this.queue.length>this.maxQueueSize&&this.queue.shift()},t.exports=o},function(t,e,r){"use strict";var n=r(0),o=r(4),i=r(2),s=r(31),a={network:!0,networkResponseHeaders:!1,networkResponseBody:!1,networkRequestHeaders:!1,networkRequestBody:!1,networkErrorOnHttp5xx:!1,networkErrorOnHttp4xx:!1,networkErrorOnHttp0:!1,log:!0,dom:!0,navigation:!0,connectivity:!0,contentSecurityPolicy:!0,errorOnContentSecurityPolicy:!1};function u(t,e,r,n,o){var i=t[e];t[e]=r(i),n&&n[o].push([t,e,i])}function c(t,e){for(var r;t[e].length;)(r=t[e].shift())[0][r[1]]=r[2]}function l(t,e,r,o,i){this.options=t;var s=t.autoInstrument;!1===t.enabled||!1===s?this.autoInstrument={}:(n.isType(s,"object")||(s=a),this.autoInstrument=n.merge(a,s)),this.scrubTelemetryInputs=!!t.scrubTelemetryInputs,this.telemetryScrubber=t.telemetryScrubber,this.defaultValueScrubber=function(t){for(var e=[],r=0;r3)){i.__rollbar_xhr.end_time_ms=n.now();var e=null;if(i.__rollbar_xhr.response_content_type=i.getResponseHeader("Content-Type"),t.autoInstrument.networkResponseHeaders){var r=t.autoInstrument.networkResponseHeaders;e={};try{var s,a;if(!0===r){var u=i.getAllResponseHeaders();if(u){var c,l,p=u.trim().split(/[\r\n]+/);for(a=0;a=500&&this.autoInstrument.networkErrorOnHttp5xx||e>=400&&this.autoInstrument.networkErrorOnHttp4xx||0===e&&this.autoInstrument.networkErrorOnHttp0){var r=new Error("HTTP request failed with Status "+e);r.stack=t.stack,this.rollbar.error(r,{skipFrames:1})}},l.prototype.deinstrumentConsole=function(){if("console"in this._window&&this._window.console.log)for(var t;this.replacements.log.length;)t=this.replacements.log.shift(),this._window.console[t[0]]=t[1]},l.prototype.instrumentConsole=function(){if("console"in this._window&&this._window.console.log){var t=this,e=this._window.console,r=["debug","info","warn","error","log"];try{for(var o=0,i=r.length;o=0&&t.options[t.selectedIndex]&&this.captureDomEvent("input",t,t.options[t.selectedIndex].value)},l.prototype.captureDomEvent=function(t,e,r,n){if(void 0!==r)if(this.scrubTelemetryInputs||"password"===s.getElementType(e))r="[scrubbed]";else{var o=s.describeElement(e);this.telemetryScrubber?this.telemetryScrubber(o)&&(r="[scrubbed]"):this.defaultValueScrubber(o)&&(r="[scrubbed]")}var i=s.elementArrayToString(s.treeToArray(e));this.telemeter.captureDom(t,i,r,n)},l.prototype.deinstrumentNavigation=function(){var t=this._window.chrome;!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState&&c(this.replacements,"navigation")},l.prototype.instrumentNavigation=function(){var t=this._window.chrome;if(!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState){var e=this;u(this._window,"onpopstate",(function(t){return function(){var r=e._location.href;e.handleUrlChange(e._lastHref,r),t&&t.apply(this,arguments)}}),this.replacements,"navigation"),u(this._window.history,"pushState",(function(t){return function(){var r=arguments.length>2?arguments[2]:void 0;return r&&e.handleUrlChange(e._lastHref,r+""),t.apply(this,arguments)}}),this.replacements,"navigation")}},l.prototype.handleUrlChange=function(t,e){var r=i.parse(this._location.href),n=i.parse(e),o=i.parse(t);this._lastHref=e,r.protocol===n.protocol&&r.host===n.host&&(e=n.path+(n.hash||"")),r.protocol===o.protocol&&r.host===o.host&&(t=o.path+(o.hash||"")),this.telemeter.captureNavigation(t,e)},l.prototype.deinstrumentConnectivity=function(){("addEventListener"in this._window||"body"in this._document)&&(this._window.addEventListener?this.removeListeners("connectivity"):c(this.replacements,"connectivity"))},l.prototype.instrumentConnectivity=function(){if("addEventListener"in this._window||"body"in this._document)if(this._window.addEventListener)this.addListener("connectivity",this._window,"online",void 0,function(){this.telemeter.captureConnectivityChange("online")}.bind(this),!0),this.addListener("connectivity",this._window,"offline",void 0,function(){this.telemeter.captureConnectivityChange("offline")}.bind(this),!0);else{var t=this;u(this._document.body,"ononline",(function(e){return function(){t.telemeter.captureConnectivityChange("online"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity"),u(this._document.body,"onoffline",(function(e){return function(){t.telemeter.captureConnectivityChange("offline"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity")}},l.prototype.handleCspEvent=function(t){var e="Security Policy Violation: blockedURI: "+t.blockedURI+", violatedDirective: "+t.violatedDirective+", effectiveDirective: "+t.effectiveDirective+", ";t.sourceFile&&(e+="location: "+t.sourceFile+", line: "+t.lineNumber+", col: "+t.columnNumber+", "),e+="originalPolicy: "+t.originalPolicy,this.telemeter.captureLog(e,"error"),this.handleCspError(e)},l.prototype.handleCspError=function(t){this.autoInstrument.errorOnContentSecurityPolicy&&this.rollbar.error(t)},l.prototype.deinstrumentContentSecurityPolicy=function(){"addEventListener"in this._window&&this.removeListeners("contentsecuritypolicy")},l.prototype.instrumentContentSecurityPolicy=function(){if("addEventListener"in this._window){var t=this.handleCspEvent.bind(this);this.addListener("contentsecuritypolicy",this._window,"securitypolicyviolation",null,t,!1)}},l.prototype.addListener=function(t,e,r,n,o,i){e.addEventListener?(e.addEventListener(r,o,i),this.eventRemovers[t].push((function(){e.removeEventListener(r,o,i)}))):n&&(e.attachEvent(n,o),this.eventRemovers[t].push((function(){e.detachEvent(n,o)})))},l.prototype.removeListeners=function(t){for(;this.eventRemovers[t].length;)this.eventRemovers[t].shift()()},t.exports=l},function(t,e,r){"use strict";function n(t){return(t.getAttribute("type")||"").toLowerCase()}function o(t){if(!t||!t.tagName)return"";var e=[t.tagName];t.id&&e.push("#"+t.id),t.classes&&e.push("."+t.classes.join("."));for(var r=0;r=0;a--){if(e=o(t[a]),r=s+i.length*n+e.length,a=83){i.unshift("...");break}i.unshift(e),s+=e.length}return i.join(" > ")},treeToArray:function(t){for(var e,r=[],n=0;t&&n<5&&"html"!==(e=i(t)).tagName;n++)r.unshift(e),t=t.parentNode;return r},getElementFromEvent:function(t,e){return t.target?t.target:e&&e.elementFromPoint?e.elementFromPoint(t.clientX,t.clientY):void 0},isDescribedElement:function(t,e,r){if(t.tagName.toLowerCase()!==e.toLowerCase())return!1;if(!r)return!0;t=n(t);for(var o=0;o2*e?t.slice(0,e).concat(t.slice(r-e)):t}function a(t,e,r){r=void 0===r?30:r;var o,i=t.data.body;if(i.trace_chain)for(var a=i.trace_chain,u=0;ut?e.slice(0,t-3).concat("..."):e}function c(t,e,r){return[e=o(e,(function e(r,i,s){switch(n.typeName(i)){case"string":return u(t,i);case"object":case"array":return o(i,e,s);default:return i}})),n.stringify(e,r)]}function l(t){return t.exception&&(delete t.exception.description,t.exception.message=u(255,t.exception.message)),t.frames=s(t.frames,1),t}function p(t,e){var r=t.data.body;if(r.trace_chain)for(var o=r.trace_chain,i=0;ie}t.exports={truncate:function(t,e,r){r=void 0===r?524288:r;for(var n,o,s,u=[i,a,c.bind(null,1024),c.bind(null,512),c.bind(null,256),p];n=u.shift();)if(t=(o=n(t,e))[0],(s=o[1]).error||!f(s.value,r))return s;return s},raw:i,truncateFrames:a,truncateStrings:c,maybeTruncateValue:u}}])})); +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.rollbar=e():t.rollbar=e()}(this,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=6)}([function(t,e,r){"use strict";var n=r(12),o={};function i(t,e){return e===s(t)}function s(t){var e=typeof t;return"object"!==e?e:t?t instanceof Error?"error":{}.toString.call(t).match(/\s([a-zA-Z]+)/)[1].toLowerCase():"null"}function a(t){return i(t,"function")}function u(t){var e=Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?"),r=RegExp("^"+e+"$");return c(t)&&r.test(t)}function c(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function l(){var t=y();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var r=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?r:7&r|8).toString(16)}))}var p={strictMode:!1,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};function f(t,e){var r,n;try{r=o.stringify(t)}catch(o){if(e&&a(e))try{r=e(t)}catch(t){n=t}else n=o}return{error:n,value:r}}function h(t,e){return function(r,n){try{e(r,n)}catch(e){t.error(e)}}}function d(t){return function t(e,r){var n,o,a,u={};try{for(o in e)(n=e[o])&&(i(n,"object")||i(n,"array"))?r.includes(n)?u[o]="Removed circular reference: "+s(n):((a=r.slice()).push(n),u[o]=t(n,a)):u[o]=n}catch(t){u="Failed cloning custom data: "+t.message}return u}(t,[t])}var m=["log","network","dom","navigation","error","manual"],g=["critical","error","warning","info","debug"];function v(t,e){for(var r=0;ra)?(s=e.path,e.path=s.substring(0,a)+i+"&"+s.substring(a+1)):-1!==u?(s=e.path,e.path=s.substring(0,u)+i+s.substring(u)):e.path=e.path+i},createItem:function(t,e,r,n,o){for(var i,a,u,c,p,f,m=[],g=[],v=0,b=t.length;v0&&(u||(u=d({})),u.extraArgs=d(m));var k={message:i,err:a,custom:u,timestamp:y(),callback:c,notifier:r,diagnostic:{},uuid:l()};return function(t,e){e&&void 0!==e.level&&(t.level=e.level,delete e.level);e&&void 0!==e.skipFrames&&(t.skipFrames=e.skipFrames,delete e.skipFrames)}(k,u),n&&p&&(k.request=p),o&&(k.lambdaContext=o),k._originalArgs=t,k.diagnostic.original_arg_types=g,k},addErrorContext:function(t,e){var r=t.data.custom||{},o=!1;try{for(var i=0;i2){var o=n.slice(0,3),i=o[2].indexOf("/");-1!==i&&(o[2]=o[2].substring(0,i));r=o.concat("0000:0000:0000:0000:0000").join(":")}}else r=null}catch(t){r=null}else r=null;t.user_ip=r}},formatArgsAsString:function(t){var e,r,n,o=[];for(e=0,r=t.length;e500&&(n=n.substr(0,497)+"...");break;case"null":n="null";break;case"undefined":n="undefined";break;case"symbol":n=n.toString()}o.push(n)}return o.join(" ")},formatUrl:function(t,e){if(!(e=e||t.protocol)&&t.port&&(80===t.port?e="http:":443===t.port&&(e="https:")),e=e||"https:",!t.hostname)return null;var r=e+"//"+t.hostname;return t.port&&(r=r+":"+t.port),t.path&&(r+=t.path),r},get:function(t,e){if(t){var r=e.split("."),n=t;try{for(var o=0,i=r.length;o=1&&r>e}function s(t,e,r,n,o,i,s){var a=null;return r&&(r=new Error(r)),r||n||(a=function(t,e,r,n,o){var i,s=e.environment||e.payload&&e.payload.environment;i=o?"item per minute limit reached, ignoring errors until timeout":"maxItems has been hit, ignoring errors until reset.";var a={body:{message:{body:i,extra:{maxItems:r,itemsPerMinute:n}}},language:"javascript",environment:s,notifier:{version:e.notifier&&e.notifier.version||e.version}};"browser"===t?(a.platform="browser",a.framework="browser-js",a.notifier.name="rollbar-browser-js"):"server"===t?(a.framework=e.framework||"node-js",a.notifier.name=e.notifier.name):"react-native"===t&&(a.framework=e.framework||"react-native",a.notifier.name=e.notifier.name);return a}(t,e,o,i,s)),{error:r,shouldSend:n,payload:a}}o.globalSettings={startTime:n.now(),maxItems:void 0,itemsPerMinute:void 0},o.prototype.configureGlobal=function(t){void 0!==t.startTime&&(o.globalSettings.startTime=t.startTime),void 0!==t.maxItems&&(o.globalSettings.maxItems=t.maxItems),void 0!==t.itemsPerMinute&&(o.globalSettings.itemsPerMinute=t.itemsPerMinute)},o.prototype.shouldSend=function(t,e){var r=(e=e||n.now())-this.startTime;(r<0||r>=6e4)&&(this.startTime=e,this.perMinCounter=0);var a=o.globalSettings.maxItems,u=o.globalSettings.itemsPerMinute;if(i(t,a,this.counter))return s(this.platform,this.platformOptions,a+" max items reached",!1);if(i(t,u,this.perMinCounter))return s(this.platform,this.platformOptions,u+" items per minute reached",!1);this.counter++,this.perMinCounter++;var c=!i(t,a,this.counter),l=c;return c=c&&!i(t,u,this.perMinCounter),s(this.platform,this.platformOptions,null,c,a,u,l)},o.prototype.setPlatformOptions=function(t,e){this.platform=t,this.platformOptions=e},t.exports=o},function(t,e,r){"use strict";var n=Object.prototype.hasOwnProperty,o=Object.prototype.toString,i=function(t){if(!t||"[object Object]"!==o.call(t))return!1;var e,r=n.call(t,"constructor"),i=t.constructor&&t.constructor.prototype&&n.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!r&&!i)return!1;for(e in t);return void 0===e||n.call(t,e)};t.exports=function t(){var e,r,n,o,s,a={},u=null,c=arguments.length;for(e=0;ethis.options.maxRetries&&(o=!1))}o?this._retryApiRequest(e,r):r(t)},o.prototype._retryApiRequest=function(t,e){this.retryQueue.push({item:t,callback:e}),this.retryHandle||(this.retryHandle=setInterval(function(){for(;this.retryQueue.length;){var t=this.retryQueue.shift();this._makeApiRequest(t.item,t.callback)}}.bind(this),this.options.retryInterval))},o.prototype._dequeuePendingRequest=function(t){var e=this.pendingRequests.indexOf(t);-1!==e&&(this.pendingRequests.splice(e,1),this._maybeCallWait())},o.prototype._maybeLog=function(t,e){if(this.logger&&this.options.verbose){var r=e;if(r=(r=r||n.get(t,"body.trace.exception.message"))||n.get(t,"body.trace_chain.0.exception.message"))return void this.logger.error(r);(r=n.get(t,"body.message.body"))&&this.logger.log(r)}},o.prototype._maybeCallWait=function(){return!(!n.isFunction(this.waitCallback)||0!==this.pendingItems.length||0!==this.pendingRequests.length)&&(this.waitIntervalID&&(this.waitIntervalID=clearInterval(this.waitIntervalID)),this.waitCallback(),!0)},t.exports=o},function(t,e,r){"use strict";var n=r(0);function o(t,e){this.queue=t,this.options=e,this.transforms=[],this.diagnostic={}}o.prototype.configure=function(t){this.queue&&this.queue.configure(t);var e=this.options;return this.options=n.merge(e,t),this},o.prototype.addTransform=function(t){return n.isFunction(t)&&this.transforms.push(t),this},o.prototype.log=function(t,e){if(e&&n.isFunction(e)||(e=function(){}),!this.options.enabled)return e(new Error("Rollbar is not enabled"));this.queue.addPendingItem(t);var r=t.err;this._applyTransforms(t,function(n,o){if(n)return this.queue.removePendingItem(t),e(n,null);this.queue.addItem(o,e,r,t)}.bind(this))},o.prototype._applyTransforms=function(t,e){var r=-1,n=this.transforms.length,o=this.transforms,i=this.options,s=function(t,a){t?e(t,null):++r!==n?o[r](a,i,s):e(null,a)};s(null,t)},t.exports=o},function(t,e,r){"use strict";var n=r(0),o=r(16),i={hostname:"api.rollbar.com",path:"/api/1/item/",search:null,version:"1",protocol:"https:",port:443};function s(t,e,r,n,o){this.options=t,this.transport=e,this.url=r,this.truncation=n,this.jsonBackup=o,this.accessToken=t.accessToken,this.transportOptions=a(t,r)}function a(t,e){return o.getTransportFromOptions(t,i,e)}s.prototype.postItem=function(t,e){var r=o.transportOptions(this.transportOptions,"POST"),n=o.buildPayload(this.accessToken,t,this.jsonBackup);this.transport.post(this.accessToken,r,n,e)},s.prototype.buildJsonPayload=function(t,e){var r,i=o.buildPayload(this.accessToken,t,this.jsonBackup);return(r=this.truncation?this.truncation.truncate(i):n.stringify(i)).error?(e&&e(r.error),null):r.value},s.prototype.postJsonPayload=function(t,e){var r=o.transportOptions(this.transportOptions,"POST");this.transport.postJsonPayload(this.accessToken,r,t,e)},s.prototype.configure=function(t){var e=this.oldOptions;return this.options=n.merge(e,t),this.transportOptions=a(this.options,this.url),void 0!==this.options.accessToken&&(this.accessToken=this.options.accessToken),this},t.exports=s},function(t,e,r){"use strict";var n=r(0);t.exports={buildPayload:function(t,e,r){if(!n.isType(e.context,"string")){var o=n.stringify(e.context,r);o.error?e.context="Error: could not serialize 'context'":e.context=o.value||"",e.context.length>255&&(e.context=e.context.substr(0,255))}return{access_token:t,data:e}},getTransportFromOptions:function(t,e,r){var n=e.hostname,o=e.protocol,i=e.port,s=e.path,a=e.search,u=t.timeout,c=t.proxy;if(t.endpoint){var l=r.parse(t.endpoint);n=l.hostname,o=l.protocol,i=l.port,s=l.pathname,a=l.search}return{timeout:u,hostname:n,protocol:o,port:i,path:s,search:a,proxy:c}},transportOptions:function(t,e){var r=t.protocol||"https:",n=t.port||("http:"===r?80:"https:"===r?443:void 0),o=t.hostname,i=t.path,s=t.timeout;return t.search&&(i+=t.search),t.proxy&&(i=r+"//"+o+i,o=t.proxy.host||t.proxy.hostname,n=t.proxy.port,r=t.proxy.protocol||r),{timeout:s,protocol:r,hostname:o,path:i,port:n,method:e}},appendPathToPath:function(t,e){var r=/\/$/.test(t),n=/^\//.test(e);return r&&n?e=e.substring(1):r||n||(e="/"+e),t+e}}},function(t,e){!function(t){"use strict";t.console||(t.console={});for(var e,r,n=t.console,o=function(){},i=["memory"],s="assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(",");e=i.pop();)n[e]||(n[e]={});for(;r=s.pop();)n[r]||(n[r]=o)}("undefined"==typeof window?this:window)},function(t,e,r){"use strict";var n={ieVersion:function(){if("undefined"!=typeof document){for(var t=3,e=document.createElement("div"),r=e.getElementsByTagName("i");e.innerHTML="\x3c!--[if gt IE "+ ++t+"]>4?t:void 0}}};t.exports=n},function(t,e,r){"use strict";function n(t,e,r,n){t._rollbarWrappedError&&(n[4]||(n[4]=t._rollbarWrappedError),n[5]||(n[5]=t._rollbarWrappedError._rollbarContext),t._rollbarWrappedError=null);var o=e.handleUncaughtException.apply(e,n);r&&r.apply(t,n),"anonymous"===o&&(e.anonymousErrorsPending+=1)}t.exports={captureUncaughtExceptions:function(t,e,r){if(t){var o;if("function"==typeof e._rollbarOldOnError)o=e._rollbarOldOnError;else if(t.onerror){for(o=t.onerror;o._rollbarOldOnError;)o=o._rollbarOldOnError;e._rollbarOldOnError=o}e.handleAnonymousErrors();var i=function(){var r=Array.prototype.slice.call(arguments,0);n(t,e,o,r)};r&&(i._rollbarOldOnError=o),t.onerror=i}},captureUnhandledRejections:function(t,e,r){if(t){"function"==typeof t._rollbarURH&&t._rollbarURH.belongsToShim&&t.removeEventListener("unhandledrejection",t._rollbarURH);var n=function(t){var r,n,o;try{r=t.reason}catch(t){r=void 0}try{n=t.promise}catch(t){n="[unhandledrejection] error getting `promise` from event"}try{o=t.detail,!r&&o&&(r=o.reason,n=o.promise)}catch(t){}r||(r="[unhandledrejection] error getting `reason` from event"),e&&e.handleUnhandledRejection&&e.handleUnhandledRejection(r,n)};n.belongsToShim=r,t._rollbarURH=n,t.addEventListener("unhandledrejection",n)}}}},function(t,e,r){"use strict";var n=r(0),o=r(1);function i(t){this.truncation=t}function s(){var t="undefined"!=typeof window&&window||"undefined"!=typeof self&&self,e=t&&t.Zone&&t.Zone.current,r=Array.prototype.slice.call(arguments);if(e&&"angular"===e._name){var n=e._parent;n.run((function(){a.apply(void 0,r)}))}else a.apply(void 0,r)}function a(t,e,r,i,s,a,c){if("undefined"!=typeof RollbarProxy)return function(t,e){(new RollbarProxy).sendJsonPayload(t,(function(t){}),(function(t){e(new Error(t))}))}(i,s);var l;if(!(l=a?a():function(){var t,e,r=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],n=r.length;for(e=0;e=400&&t.status<600}(l)){if(403===l.status){var e=t.value&&t.value.message;o.error(e)}s(new Error(String(l.status)))}else{s(u("XHR response had no status code (likely connection failure)"))}}}catch(t){var r;r=t&&t.stack?t:new Error(t),s(r)}var i};l.open(r,e,!0),l.setRequestHeader&&(l.setRequestHeader("Content-Type","application/json"),l.setRequestHeader("X-Rollbar-Access-Token",t)),n.isFiniteNumber(c)&&(l.timeout=c),l.onreadystatechange=p,l.send(i)}catch(t){if("undefined"!=typeof XDomainRequest){if(!window||!window.location)return s(new Error("No window available during request, unknown environment"));"http:"===window.location.href.substring(0,5)&&"https"===e.substring(0,5)&&(e="http"+e.substring(5));var f=new XDomainRequest;f.onprogress=function(){},f.ontimeout=function(){s(u("Request timed out","ETIMEDOUT"))},f.onerror=function(){s(new Error("Error during request"))},f.onload=function(){var t=n.jsonParse(f.responseText);s(t.error,t.value)},f.open(r,e,!0),f.send(i)}else s(new Error("Cannot find a method to transport a request"))}}catch(t){s(t)}}function u(t,e){var r=new Error(t);return r.code=e||"ENOTFOUND",r}i.prototype.get=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){}),n.addParamsAndAccessTokenToPath(t,e,r);s(t,n.formatUrl(e),"GET",null,o,i,e.timeout)},i.prototype.post=function(t,e,r,o,i){if(o&&n.isFunction(o)||(o=function(){}),!r)return o(new Error("Cannot send empty request"));var a;if((a=this.truncation?this.truncation.truncate(r):n.stringify(r)).error)return o(a.error);var u=a.value;s(t,n.formatUrl(e),"POST",u,o,i,e.timeout)},i.prototype.postJsonPayload=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){});s(t,n.formatUrl(e),"POST",r,o,i,e.timeout)},t.exports=i},function(t,e,r){"use strict";var n=r(0),o=r(3),i=r(1);function s(t,e,r){var o=t.message,i=t.custom;o||(o="Item sent with null or missing arguments.");var s={body:o};i&&(s.extra=n.merge(i)),n.set(t,"data.body",{message:s}),r(null,t)}function a(t){var e=t.stackInfo.stack;return e&&0===e.length&&t._unhandledStackInfo&&t._unhandledStackInfo.stack&&(e=t._unhandledStackInfo.stack),e}function u(t,e,r){var i=t&&t.data.description,s=t&&t.custom,u=a(t),l=o.guessErrorClass(e.message),p={exception:{class:c(e,l[0],r),message:l[1]}};if(i&&(p.exception.description=i),u){var f,h,d,m,g,v,y,b;for(0===u.length&&(p.exception.stack=e.rawStack,p.exception.raw=String(e.rawException)),p.frames=[],y=0;y-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var r=e.replace(/^\s+/,"").replace(/\(eval code/g,"("),n=r.match(/ (\((.+):(\d+):(\d+)\)$)/),o=(r=n?r.replace(n[0],""):r).split(/\s+/).slice(1),i=this.extractLocation(n?n[1]:o.pop()),s=o.join(" ")||void 0,a=["eval",""].indexOf(i[0])>-1?void 0:i[0];return new t({functionName:s,fileName:a,lineNumber:i[1],columnNumber:i[2],source:e})}),this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter((function(t){return!t.match(n)}),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 t({functionName:e});var r=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(r),o=n&&n[1]?n[1]:void 0,i=this.extractLocation(e.replace(r,""));return new t({functionName:o,fileName:i[0],lineNumber:i[1],columnNumber:i[2],source:e})}),this)},parseOpera:function(t){return!t.stacktrace||t.message.indexOf("\n")>-1&&t.message.split("\n").length>t.stacktrace.split("\n").length?this.parseOpera9(t):t.stack?this.parseOpera11(t):this.parseOpera10(t)},parseOpera9:function(e){for(var r=/Line (\d+).*script (?:in )?(\S+)/i,n=e.message.split("\n"),o=[],i=2,s=n.length;i/,"$2").replace(/\([^)]*\)/g,"")||void 0;i.match(/\(([^)]*)\)/)&&(r=i.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var a=void 0===r||"[arguments not available]"===r?void 0:r.split(",");return new t({functionName:s,args:a,fileName:o[0],lineNumber:o[1],columnNumber:o[2],source:e})}),this)}}})?n.apply(e,o):n)||(t.exports=i)}()},function(t,e,r){var n,o,i;!function(r,s){"use strict";o=[],void 0===(i="function"==typeof(n=function(){function t(t){return t.charAt(0).toUpperCase()+t.substring(1)}function e(t){return function(){return this[t]}}var r=["isConstructor","isEval","isNative","isToplevel"],n=["columnNumber","lineNumber"],o=["fileName","functionName","source"],i=r.concat(n,o,["args"],["evalOrigin"]);function s(e){if(e)for(var r=0;ro&&(i=this.maxQueueSize-o),this.maxQueueSize=o,this.queue.splice(0,i)},o.prototype.copyEvents=function(){var t=Array.prototype.slice.call(this.queue,0);if(n.isFunction(this.options.filterTelemetry))try{for(var e=t.length;e--;)this.options.filterTelemetry(t[e])&&t.splice(e,1)}catch(t){this.options.filterTelemetry=null}return t},o.prototype.capture=function(t,e,r,o,s){var a={level:i(t,r),type:t,timestamp_ms:s||n.now(),body:e,source:"client"};o&&(a.uuid=o);try{if(n.isFunction(this.options.filterTelemetry)&&this.options.filterTelemetry(a))return!1}catch(t){this.options.filterTelemetry=null}return this.push(a),a},o.prototype.captureEvent=function(t,e,r,n){return this.capture(t,e,r,n)},o.prototype.captureError=function(t,e,r,n){var o={message:t.message||String(t)};return t.stack&&(o.stack=t.stack),this.capture("error",o,e,r,n)},o.prototype.captureLog=function(t,e,r,n){return this.capture("log",{message:t},e,r,n)},o.prototype.captureNetwork=function(t,e,r,n){e=e||"xhr",t.subtype=t.subtype||e,n&&(t.request=n);var o=this.levelFromStatus(t.status_code);return this.capture("network",t,o,r)},o.prototype.levelFromStatus=function(t){return t>=200&&t<400?"info":0===t||t>=400?"error":"info"},o.prototype.captureDom=function(t,e,r,n,o){var i={subtype:t,element:e};return void 0!==r&&(i.value=r),void 0!==n&&(i.checked=n),this.capture("dom",i,"info",o)},o.prototype.captureNavigation=function(t,e,r){return this.capture("navigation",{from:t,to:e},"info",r)},o.prototype.captureDomContentLoaded=function(t){return this.capture("navigation",{subtype:"DOMContentLoaded"},"info",void 0,t&&t.getTime())},o.prototype.captureLoad=function(t){return this.capture("navigation",{subtype:"load"},"info",void 0,t&&t.getTime())},o.prototype.captureConnectivityChange=function(t,e){return this.captureNetwork({change:t},"connectivity",e)},o.prototype._captureRollbarItem=function(t){if(this.options.includeItemsInTelemetry)return t.err?this.captureError(t.err,t.level,t.uuid,t.timestamp):t.message?this.captureLog(t.message,t.level,t.uuid,t.timestamp):t.custom?this.capture("log",t.custom,t.level,t.uuid,t.timestamp):void 0},o.prototype.push=function(t){this.queue.push(t),this.queue.length>this.maxQueueSize&&this.queue.shift()},t.exports=o},function(t,e,r){"use strict";var n=r(0),o=r(4),i=r(2),s=r(31),a={network:!0,networkResponseHeaders:!1,networkResponseBody:!1,networkRequestHeaders:!1,networkRequestBody:!1,networkErrorOnHttp5xx:!1,networkErrorOnHttp4xx:!1,networkErrorOnHttp0:!1,log:!0,dom:!0,navigation:!0,connectivity:!0,contentSecurityPolicy:!0,errorOnContentSecurityPolicy:!1};function u(t,e,r,n,o){var i=t[e];t[e]=r(i),n&&n[o].push([t,e,i])}function c(t,e){for(var r;t[e].length;)(r=t[e].shift())[0][r[1]]=r[2]}function l(t,e,r,o,i){this.options=t;var s=t.autoInstrument;!1===t.enabled||!1===s?this.autoInstrument={}:(n.isType(s,"object")||(s=a),this.autoInstrument=n.merge(a,s)),this.scrubTelemetryInputs=!!t.scrubTelemetryInputs,this.telemetryScrubber=t.telemetryScrubber,this.defaultValueScrubber=function(t){for(var e=[],r=0;r3)){i.__rollbar_xhr.end_time_ms=n.now();var e=null;if(i.__rollbar_xhr.response_content_type=i.getResponseHeader("Content-Type"),t.autoInstrument.networkResponseHeaders){var r=t.autoInstrument.networkResponseHeaders;e={};try{var s,a;if(!0===r){var u=i.getAllResponseHeaders();if(u){var c,l,p=u.trim().split(/[\r\n]+/);for(a=0;a=500&&this.autoInstrument.networkErrorOnHttp5xx||e>=400&&this.autoInstrument.networkErrorOnHttp4xx||0===e&&this.autoInstrument.networkErrorOnHttp0){var r=new Error("HTTP request failed with Status "+e);r.stack=t.stack,this.rollbar.error(r,{skipFrames:1})}},l.prototype.deinstrumentConsole=function(){if("console"in this._window&&this._window.console.log)for(var t;this.replacements.log.length;)t=this.replacements.log.shift(),this._window.console[t[0]]=t[1]},l.prototype.instrumentConsole=function(){if("console"in this._window&&this._window.console.log){var t=this,e=this._window.console,r=["debug","info","warn","error","log"];try{for(var o=0,i=r.length;o=0&&t.options[t.selectedIndex]&&this.captureDomEvent("input",t,t.options[t.selectedIndex].value)},l.prototype.captureDomEvent=function(t,e,r,n){if(void 0!==r)if(this.scrubTelemetryInputs||"password"===s.getElementType(e))r="[scrubbed]";else{var o=s.describeElement(e);this.telemetryScrubber?this.telemetryScrubber(o)&&(r="[scrubbed]"):this.defaultValueScrubber(o)&&(r="[scrubbed]")}var i=s.elementArrayToString(s.treeToArray(e));this.telemeter.captureDom(t,i,r,n)},l.prototype.deinstrumentNavigation=function(){var t=this._window.chrome;!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState&&c(this.replacements,"navigation")},l.prototype.instrumentNavigation=function(){var t=this._window.chrome;if(!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState){var e=this;u(this._window,"onpopstate",(function(t){return function(){var r=e._location.href;e.handleUrlChange(e._lastHref,r),t&&t.apply(this,arguments)}}),this.replacements,"navigation"),u(this._window.history,"pushState",(function(t){return function(){var r=arguments.length>2?arguments[2]:void 0;return r&&e.handleUrlChange(e._lastHref,r+""),t.apply(this,arguments)}}),this.replacements,"navigation")}},l.prototype.handleUrlChange=function(t,e){var r=i.parse(this._location.href),n=i.parse(e),o=i.parse(t);this._lastHref=e,r.protocol===n.protocol&&r.host===n.host&&(e=n.path+(n.hash||"")),r.protocol===o.protocol&&r.host===o.host&&(t=o.path+(o.hash||"")),this.telemeter.captureNavigation(t,e)},l.prototype.deinstrumentConnectivity=function(){("addEventListener"in this._window||"body"in this._document)&&(this._window.addEventListener?this.removeListeners("connectivity"):c(this.replacements,"connectivity"))},l.prototype.instrumentConnectivity=function(){if("addEventListener"in this._window||"body"in this._document)if(this._window.addEventListener)this.addListener("connectivity",this._window,"online",void 0,function(){this.telemeter.captureConnectivityChange("online")}.bind(this),!0),this.addListener("connectivity",this._window,"offline",void 0,function(){this.telemeter.captureConnectivityChange("offline")}.bind(this),!0);else{var t=this;u(this._document.body,"ononline",(function(e){return function(){t.telemeter.captureConnectivityChange("online"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity"),u(this._document.body,"onoffline",(function(e){return function(){t.telemeter.captureConnectivityChange("offline"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity")}},l.prototype.handleCspEvent=function(t){var e="Security Policy Violation: blockedURI: "+t.blockedURI+", violatedDirective: "+t.violatedDirective+", effectiveDirective: "+t.effectiveDirective+", ";t.sourceFile&&(e+="location: "+t.sourceFile+", line: "+t.lineNumber+", col: "+t.columnNumber+", "),e+="originalPolicy: "+t.originalPolicy,this.telemeter.captureLog(e,"error"),this.handleCspError(e)},l.prototype.handleCspError=function(t){this.autoInstrument.errorOnContentSecurityPolicy&&this.rollbar.error(t)},l.prototype.deinstrumentContentSecurityPolicy=function(){"addEventListener"in this._window&&this.removeListeners("contentsecuritypolicy")},l.prototype.instrumentContentSecurityPolicy=function(){if("addEventListener"in this._window){var t=this.handleCspEvent.bind(this);this.addListener("contentsecuritypolicy",this._window,"securitypolicyviolation",null,t,!1)}},l.prototype.addListener=function(t,e,r,n,o,i){e.addEventListener?(e.addEventListener(r,o,i),this.eventRemovers[t].push((function(){e.removeEventListener(r,o,i)}))):n&&(e.attachEvent(n,o),this.eventRemovers[t].push((function(){e.detachEvent(n,o)})))},l.prototype.removeListeners=function(t){for(;this.eventRemovers[t].length;)this.eventRemovers[t].shift()()},t.exports=l},function(t,e,r){"use strict";function n(t){return(t.getAttribute("type")||"").toLowerCase()}function o(t){if(!t||!t.tagName)return"";var e=[t.tagName];t.id&&e.push("#"+t.id),t.classes&&e.push("."+t.classes.join("."));for(var r=0;r=0;a--){if(e=o(t[a]),r=s+i.length*n+e.length,a=83){i.unshift("...");break}i.unshift(e),s+=e.length}return i.join(" > ")},treeToArray:function(t){for(var e,r=[],n=0;t&&n<5&&"html"!==(e=i(t)).tagName;n++)r.unshift(e),t=t.parentNode;return r},getElementFromEvent:function(t,e){return t.target?t.target:e&&e.elementFromPoint?e.elementFromPoint(t.clientX,t.clientY):void 0},isDescribedElement:function(t,e,r){if(t.tagName.toLowerCase()!==e.toLowerCase())return!1;if(!r)return!0;t=n(t);for(var o=0;o2*e?t.slice(0,e).concat(t.slice(r-e)):t}function a(t,e,r){r=void 0===r?30:r;var o,i=t.data.body;if(i.trace_chain)for(var a=i.trace_chain,u=0;ut?e.slice(0,t-3).concat("..."):e}function c(t,e,r){return[e=o(e,(function e(r,i,s){switch(n.typeName(i)){case"string":return u(t,i);case"object":case"array":return o(i,e,s);default:return i}})),n.stringify(e,r)]}function l(t){return t.exception&&(delete t.exception.description,t.exception.message=u(255,t.exception.message)),t.frames=s(t.frames,1),t}function p(t,e){var r=t.data.body;if(r.trace_chain)for(var o=r.trace_chain,i=0;ie}t.exports={truncate:function(t,e,r){r=void 0===r?524288:r;for(var n,o,s,u=[i,a,c.bind(null,1024),c.bind(null,512),c.bind(null,256),p];n=u.shift();)if(t=(o=n(t,e))[0],(s=o[1]).error||!f(s.value,r))return s;return s},raw:i,truncateFrames:a,truncateStrings:c,maybeTruncateValue:u}}])})); //# sourceMappingURL=rollbar.umd.min.js.map \ No newline at end of file diff --git a/dist/rollbar.umd.min.js.map b/dist/rollbar.umd.min.js.map index a2425be88..db8aa7032 100644 --- a/dist/rollbar.umd.min.js.map +++ b/dist/rollbar.umd.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://rollbar/webpack/universalModuleDefinition","webpack://rollbar/webpack/bootstrap","webpack://rollbar/./src/utility.js","webpack://rollbar/./src/browser/logger.js","webpack://rollbar/./src/browser/url.js","webpack://rollbar/./src/errorParser.js","webpack://rollbar/./src/scrub.js","webpack://rollbar/./src/utility/traverse.js","webpack://rollbar/./src/browser/bundles/rollbar.js","webpack://rollbar/./src/browser/rollbar.js","webpack://rollbar/./src/browser/core.js","webpack://rollbar/./src/rollbar.js","webpack://rollbar/./src/rateLimiter.js","webpack://rollbar/./src/merge.js","webpack://rollbar/./src/queue.js","webpack://rollbar/./src/notifier.js","webpack://rollbar/./src/api.js","webpack://rollbar/./src/apiUtility.js","webpack://rollbar/./node_modules/console-polyfill/index.js","webpack://rollbar/./src/browser/detection.js","webpack://rollbar/./src/browser/globalSetup.js","webpack://rollbar/./src/browser/transport.js","webpack://rollbar/./src/browser/transforms.js","webpack://rollbar/./node_modules/error-stack-parser/error-stack-parser.js","webpack://rollbar/./node_modules/error-stack-parser/node_modules/stackframe/stackframe.js","webpack://rollbar/./src/transforms.js","webpack://rollbar/./src/browser/predicates.js","webpack://rollbar/./src/predicates.js","webpack://rollbar/./src/defaults.js","webpack://rollbar/./src/browser/defaults/scrubFields.js","webpack://rollbar/./src/telemetry.js","webpack://rollbar/./src/browser/telemetry.js","webpack://rollbar/./src/browser/domUtility.js","webpack://rollbar/./src/utility/polyfillJSON.js","webpack://rollbar/./vendor/JSON-js/json3.js","webpack://rollbar/./src/browser/wrapGlobals.js","webpack://rollbar/./src/truncation.js"],"names":["root","factory","exports","module","define","amd","this","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","merge","RollbarJSON","isType","x","typeName","Error","toString","match","toLowerCase","isFunction","f","isNativeFunction","funcMatchString","Function","replace","reIsNative","RegExp","isObject","test","type","uuid4","now","Math","random","floor","parseUriOptions","strictMode","q","parser","strict","loose","stringify","obj","backup","error","jsonError","backupError","wrapCallback","logger","err","resp","e","TELEMETRY_TYPES","TELEMETRY_LEVELS","arrayIncludes","arr","val","k","length","Date","addParamsAndAccessTokenToPath","accessToken","options","params","access_token","paramsArray","push","join","query","sort","path","qs","indexOf","h","substring","createItem","args","notifier","requestKeys","lambdaContext","message","custom","callback","request","arg","extraArgs","argTypes","typ","DOMException","j","len","undefined","item","timestamp","diagnostic","uuid","level","skipFrames","setCustomItemKeys","_originalArgs","original_arg_types","addErrorContext","errors","data","contextAdded","rollbarContext","error_context","createTelemetryEvent","metadata","filterIp","requestData","captureIp","newIp","parts","split","pop","beginning","slice","slashIdx","concat","formatArgsAsString","result","substr","formatUrl","u","protocol","port","hostname","keys","handleOptions","current","input","payload","hostWhiteList","hostSafeList","log","hostBlackList","hostBlockList","updateDeprecatedOptions","overwriteScrubFields","scrubFields","isError","isFiniteNumber","Number","isFinite","isIterable","isString","String","isPromise","then","jsonParse","parse","LEVELS","debug","info","warning","critical","makeUnhandledStackInfo","url","lineno","colno","backupMessage","errorParser","location","line","column","func","guessFunctionName","context","gatherContext","href","document","useragent","window","navigator","userAgent","redact","sanitizeUrl","baseUrlParts","str","exec","uri","$0","$1","$2","parseUri","anchor","source","set","temp","replacement","setupJSON","polyfillJSON","JSON","maxByteSize","string","count","code","charCodeAt","detection","_","Array","arguments","unshift","ieVersion","console","apply","last","auth","host","hash","pathname","search","parseInt","pathParts","ErrorStackParser","ERR_CLASS_REGEXP","Frame","stackFrame","_stackFrame","fileName","lineNumber","functionName","columnNumber","Stack","exception","skip","stack","parserStack","getStack","_mostSpecificErrorName","rawStack","rawException","constructorName","constructor","guessErrorClass","errMsg","errClassMatch","errClass","nested","traceChain","traverse","scrubPath","scrubPaths","paramRes","pat","ret","_getScrubFieldRegexs","queryRes","_getScrubQueryParamRegexs","redactQueryParam","dummy0","paramPart","scrubber","v","seen","tmpV","valScrubber","paramScrubber","seenIndex","isObj","isArray","mapped","same","rollbar","_rollbarConfig","alias","globalAlias","shimRunning","shimId","_rollbarStartTime","getTime","Rollbar","_rollbarDidLoad","self","telemeter","instrumenter","wrapGlobals","scrub","truncation","setComponents","Client","API","globals","Transport","urllib","transforms","sharedTransforms","predicates","sharedPredicates","client","defaultOptions","_configuredOptions","Telemeter","components","Instrumenter","transport","api","gWindow","_gWindow","gDocument","isChrome","chrome","runtime","anonymousErrorsPending","addTransform","handleDomException","handleItemWithError","ensureItemHasSomethingToSay","addBaseInfo","addRequestInfo","addClientInfo","addPluginInfo","addBody","addMessageWithError","addTelemetryData","addConfigToPayload","addScrubber","userTransform","addConfiguredOptions","addDiagnosticKeys","itemToPayload","addTransformsToNotifier","queue","addPredicate","checkLevel","checkIgnore","userCheckIgnore","urlIsNotBlockListed","urlIsSafeListed","messageIsIgnored","setupUnhandledCapture","instrument","_instance","handleUninitialized","maybeCallback","_getFirstFunction","init","global","configure","payloadData","oldOptions","lastError","_createItem","warn","buildJsonPayload","sendJsonPayload","jsonPayload","unhandledExceptionsInitialized","captureUncaught","handleUncaughtExceptions","captureUncaughtExceptions","wrapGlobalEventHandlers","unhandledRejectionsInitialized","captureUnhandledRejections","handleUnhandledRejections","handleUncaughtException","inspectAnonymousErrors","stackInfo","_unhandledStackInfo","uncaughtErrorLevel","_isUncaught","handleAnonymousErrors","prepareStackTrace","_stack","_isAnonymous","handleUnhandledRejection","reason","promise","reasonResult","_rollbarContext","wrap","_before","ctxFn","_isWrap","_rollbar_wrapped","exc","_rollbarWrappedError","_wrappedSource","prop","captureEvent","event","captureDomContentLoaded","ts","captureLoad","loadFull","defaults","version","logLevel","reportLevel","endpoint","verbose","enabled","transmit","sendConfig","includeItemsInTelemetry","ignoreDuplicateErrors","RateLimiter","Queue","Notifier","platform","rateLimiter","configureGlobal","setPlatformOptions","tracer","validateTracer","setStackTraceLimit","lastErrorHash","stackTraceLimit","scope","active","maxItems","itemsPerMinute","_defaultLogLevel","_log","wait","postJsonPayload","defaultLevel","_sameAsLastError","_addTracingInfo","_captureRollbarItem","telemetryEvents","copyEvents","itemHash","generateItemHash","span","spanContext","toSpanId","toTraceId","validateSpan","setTag","opentracingSpanId","opentracingTraceId","opentracing_span_id","opentracing_trace_id","startTime","counter","perMinCounter","platformOptions","checkRate","limit","ignoreRateLimit","shouldSendValue","shouldSend","globalRateLimit","limitPerMin","perMinute","msg","environment","body","extra","language","framework","rateLimitPayload","globalSettings","elapsedTime","globalRateLimitPerMin","hasOwn","toStr","isPlainObject","hasOwnConstructor","hasIsPrototypeOf","src","copy","clone","pendingItems","pendingRequests","retryQueue","retryHandle","waitCallback","waitIntervalID","predicate","addPendingItem","removePendingItem","idx","splice","addItem","originalError","originalItem","predicateResult","_applyPredicates","stop","_maybeLog","_makeApiRequest","_dequeuePendingRequest","_maybeCallWait","clearInterval","setInterval","rateLimitResponse","postItem","_maybeRetry","RETRIABLE_ERRORS","shouldRetry","retryInterval","maxRetries","retries","_retryApiRequest","retryObject","shift","transform","_applyTransforms","transformIndex","transformsLength","cb","helpers","Api","jsonBackup","transportOptions","_getTransport","getTransportFromOptions","buildPayload","post","stringifyResult","truncate","contextResult","timeout","proxy","opts","method","appendPathToPath","base","baseTrailingSlash","pathBeginningSlash","con","dummy","properties","methods","Detection","div","createElement","all","getElementsByTagName","innerHTML","undef","_rollbarWindowOnError","old","handler","shim","oldOnError","_rollbarOldOnError","onerror","fn","_rollbarURH","belongsToShim","removeEventListener","rejectionHandler","evt","detail","addEventListener","_makeZoneRequest","currentZone","Zone","_name","rootZone","_parent","run","_makeRequest","requestFactory","RollbarProxy","json","_msg","_proxyRequest","xmlhttp","factories","XMLHttpRequest","ActiveXObject","numFactories","_createXMLHTTPObject","onreadystatechange","readyState","parseResponse","responseText","status","_isNormalFailure","_newRetriableError","ex","open","setRequestHeader","send","e1","XDomainRequest","xdomainrequest","onprogress","ontimeout","onload","e2","writeData","addBodyMessage","stackFromItem","buildTrace","description","guess","trace","errorClass","frame","pre","contextLength","mid","raw","frames","filename","sendFrameUrl","endsWith","reverse","_savedStackTrace","chain","server","remoteString","query_string","user_ip","nav","scr","screen","runtime_ms","round","javascript","browser","cookie_enabled","cookieEnabled","width","height","cur","plugins","navPlugins","traces","traceChainLength","trace_chain","addBodyTraceChain","className","addBodyTrace","scrubFn","StackFrame","FIREFOX_SAFARI_STACK_REGEXP","CHROME_IE_STACK_REGEXP","SAFARI_NATIVE_CODE_REGEXP","stacktrace","parseOpera","parseV8OrIE","parseFFOrSafari","extractLocation","urlLike","filter","map","sanitizedLine","tokens","locationParts","functionNameRegex","matches","parseOpera9","parseOpera11","parseOpera10","lineRE","lines","argsRaw","functionCall","_capitalize","charAt","toUpperCase","_getter","booleanProps","numericProps","stringProps","props","getArgs","setArgs","TypeError","getEvalOrigin","evalOrigin","setEvalOrigin","getFileName","getLineNumber","getColumnNumber","getFunctionName","getIsEval","fromString","argsStartIndex","argsEndIndex","lastIndexOf","locationString","Boolean","isNaN","parseFloat","addFunctionOption","payloadOptions","tracePath","newExtra","newItem","response","promisedItem","configuredOptions","configured_options","is_anonymous","is_uncaught","raw_error","constructor_name","failed","settings","matchFrames","list","block","listLength","frameLength","urlIsOnAList","safeOrBlock","tracesLength","listName","levelVal","isUncaught","onSendCallback","ignoredMessages","rIgnoredMessage","messages","messagesFromItem","itemsPerMin","maxTelemetryEvents","maxQueueSize","max","min","getLevel","manual","newMaxEvents","deleteCount","events","filterTelemetry","capture","rollbarUUID","timestamp_ms","captureError","captureLog","captureNetwork","subtype","levelFromStatus","status_code","statusCode","captureDom","element","checked","captureNavigation","from","to","captureConnectivityChange","change","urlparser","domUtil","network","networkResponseHeaders","networkResponseBody","networkRequestHeaders","networkRequestBody","networkErrorOnHttp5xx","networkErrorOnHttp4xx","networkErrorOnHttp0","dom","navigation","connectivity","contentSecurityPolicy","errorOnContentSecurityPolicy","replacements","orig","restore","b","_window","_document","autoInstrument","scrubTelemetryInputs","telemetryScrubber","defaultValueScrubber","patterns","attributes","attrs","a","nameFromDescription","eventRemovers","contentsecuritypolicy","_location","_lastHref","oldSettings","deinstrumentNetwork","instrumentNetwork","deinstrumentConsole","instrumentConsole","deinstrumentDom","instrumentDom","deinstrumentNavigation","instrumentNavigation","deinstrumentConnectivity","instrumentConnectivity","deinstrumentContentSecurityPolicy","instrumentContentSecurityPolicy","wrapProp","xhr","xhrp","__rollbar_xhr","start_time_ms","end_time_ms","header","request_headers","request_content_type","onreadystatechangeHandler","__rollbar_event","headers","response_content_type","getResponseHeader","headersConfig","allHeaders","getAllResponseHeaders","trim","isJsonContentType","scrubJson","errorOnHttpStatus","trackHttpErrors","reqHeaders","Headers","fetchHeaders","text","contentType","includes","inHeaders","outHeaders","entries","currentHeader","next","done","wrapConsole","origConsole","removeListeners","clickHandler","handleClick","blurHandler","handleBlur","addListener","getElementFromEvent","hasTag","tagName","anchorOrButton","isDescribedElement","captureDomEvent","handleSelectInputChanged","elem","multiple","selected","selectedIndex","isChecked","getElementType","describeElement","elementString","elementArrayToString","treeToArray","app","history","pushState","handleUrlChange","parsedHref","parsedTo","parsedFrom","handleCspEvent","cspEvent","blockedURI","violatedDirective","effectiveDirective","sourceFile","originalPolicy","handleCspError","cspHandler","section","altType","attachEvent","detachEvent","getAttribute","descriptionToString","desc","out","id","classes","attr","nextStr","totalLength","separatorLength","MAX_LENGTH","nextDescription","parentNode","doc","target","elementFromPoint","clientX","clientY","subtypes","gap","indent","meta","rep","state","container","escapes","number","action","rx_escapable","this_value","valueOf","quote","lastIndex","toJSON","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","\"","replacer","space","holder","partial","mind","go","firstokey","okey","ovalue","firstavalue","avalue","ocomma","acomma","colon","SyntaxError","reviver","tx","ignore","fromCharCode","walk","_extendListenerPrototype","oldAddEventListener","_rollbarOldAdd","addFn","bubble","oldRemoveEventListener","_rollbarOldRemove","removeFn","selectFrames","range","truncateFrames","maybeTruncateValue","truncateStrings","truncator","truncateTraceData","traceData","minBody","needsTruncation","maxSize","strategy","results","strategies"],"mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAiB,QAAID,IAErBD,EAAc,QAAIC,IARpB,CASGK,MAAM,WACT,O,YCTE,IAAIC,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUP,QAGnC,IAAIC,EAASI,EAAiBE,GAAY,CACzCC,EAAGD,EACHE,GAAG,EACHT,QAAS,IAUV,OANAU,EAAQH,GAAUI,KAAKV,EAAOD,QAASC,EAAQA,EAAOD,QAASM,GAG/DL,EAAOQ,GAAI,EAGJR,EAAOD,QA0Df,OArDAM,EAAoBM,EAAIF,EAGxBJ,EAAoBO,EAAIR,EAGxBC,EAAoBQ,EAAI,SAASd,EAASe,EAAMC,GAC3CV,EAAoBW,EAAEjB,EAASe,IAClCG,OAAOC,eAAenB,EAASe,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEV,EAAoBgB,EAAI,SAAStB,GACX,oBAAXuB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAenB,EAASuB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAenB,EAAS,aAAc,CAAEyB,OAAO,KAQvDnB,EAAoBoB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQnB,EAAoBmB,IAC/B,EAAP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AAUD,EAAShzB,EAASsX,IACV,IAClBjY,EAAS4zB,EAAQ,IACNz4B,QAAUs4B,EAAgBzzB,EAAO9H,MAAOw7B,GACjD,OAAO1zB,EAGX,OAAOA,GAOP6d,IAAKA,EACLqV,eAAgBA,EAChBE,gBAAiBA,EACjBD,mBAAoBA","file":"rollbar.umd.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"rollbar\"] = factory();\n\telse\n\t\troot[\"rollbar\"] = factory();\n})(this, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n","'use strict';\n\nvar merge = require('./merge');\n\nvar RollbarJSON = {};\nfunction setupJSON(polyfillJSON) {\n if (isFunction(RollbarJSON.stringify) && isFunction(RollbarJSON.parse)) {\n return;\n }\n\n if (isDefined(JSON)) {\n // If polyfill is provided, prefer it over existing non-native shims.\n if(polyfillJSON) {\n if (isNativeFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isNativeFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n } else { // else accept any interface that is present.\n if (isFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n }\n }\n if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {\n polyfillJSON && polyfillJSON(RollbarJSON);\n }\n}\n\n/*\n * isType - Given a Javascript value and a string, returns true if the type of the value matches the\n * given string.\n *\n * @param x - any value\n * @param t - a lowercase string containing one of the following type names:\n * - undefined\n * - null\n * - error\n * - number\n * - boolean\n * - string\n * - symbol\n * - function\n * - object\n * - array\n * @returns true if x is of type t, otherwise false\n */\nfunction isType(x, t) {\n return t === typeName(x);\n}\n\n/*\n * typeName - Given a Javascript value, returns the type of the object as a string\n */\nfunction typeName(x) {\n var name = typeof x;\n if (name !== 'object') {\n return name;\n }\n if (!x) {\n return 'null';\n }\n if (x instanceof Error) {\n return 'error';\n }\n return ({}).toString.call(x).match(/\\s([a-zA-Z]+)/)[1].toLowerCase();\n}\n\n/* isFunction - a convenience function for checking if a value is a function\n *\n * @param f - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isFunction(f) {\n return isType(f, 'function');\n}\n\n/* isNativeFunction - a convenience function for checking if a value is a native JS function\n *\n * @param f - any value\n * @returns true if f is a native JS function, otherwise false\n */\nfunction isNativeFunction(f) {\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n var funcMatchString = Function.prototype.toString.call(Object.prototype.hasOwnProperty)\n .replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?');\n var reIsNative = RegExp('^' + funcMatchString + '$');\n return isObject(f) && reIsNative.test(f);\n}\n\n/* isObject - Checks if the argument is an object\n *\n * @param value - any value\n * @returns true is value is an object function is an object)\n*/\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/* isString - Checks if the argument is a string\n *\n * @param value - any value\n * @returns true if value is a string\n*/\nfunction isString(value) {\n return typeof value === 'string' || value instanceof String\n}\n\n/**\n * isFiniteNumber - determines whether the passed value is a finite number\n *\n * @param {*} n - any value\n * @returns true if value is a finite number\n */\n function isFiniteNumber(n) {\n return Number.isFinite(n);\n}\n\n/*\n * isDefined - a convenience function for checking if a value is not equal to undefined\n *\n * @param u - any value\n * @returns true if u is anything other than undefined\n */\nfunction isDefined(u) {\n return !isType(u, 'undefined');\n}\n\n/*\n * isIterable - convenience function for checking if a value can be iterated, essentially\n * whether it is an object or an array.\n *\n * @param i - any value\n * @returns true if i is an object or an array as determined by `typeName`\n */\nfunction isIterable(i) {\n var type = typeName(i);\n return (type === 'object' || type === 'array');\n}\n\n/*\n * isError - convenience function for checking if a value is of an error type\n *\n * @param e - any value\n * @returns true if e is an error\n */\nfunction isError(e) {\n // Detect both Error and Firefox Exception type\n return isType(e, 'error') || isType(e, 'exception');\n}\n\n/* isPromise - a convenience function for checking if a value is a promise\n *\n * @param p - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isPromise(p) {\n return isObject(p) && isType(p.then, 'function');\n}\n\nfunction redact() {\n return '********';\n}\n\n// from http://stackoverflow.com/a/8809472/1138191\nfunction uuid4() {\n var d = now();\n var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n var r = (d + Math.random() * 16) % 16 | 0;\n d = Math.floor(d / 16);\n return (c === 'x' ? r : (r & 0x7 | 0x8)).toString(16);\n });\n return uuid;\n}\n\nvar LEVELS = {\n debug: 0,\n info: 1,\n warning: 2,\n error: 3,\n critical: 4\n};\n\nfunction sanitizeUrl(url) {\n var baseUrlParts = parseUri(url);\n if (!baseUrlParts) {\n return '(unknown)';\n }\n\n // remove a trailing # if there is no anchor\n if (baseUrlParts.anchor === '') {\n baseUrlParts.source = baseUrlParts.source.replace('#', '');\n }\n\n url = baseUrlParts.source.replace('?' + baseUrlParts.query, '');\n return url;\n}\n\nvar parseUriOptions = {\n strictMode: false,\n key: [\n 'source',\n 'protocol',\n 'authority',\n 'userInfo',\n 'user',\n 'password',\n 'host',\n 'port',\n 'relative',\n 'path',\n 'directory',\n 'file',\n 'query',\n 'anchor'\n ],\n q: {\n name: 'queryKey',\n parser: /(?:^|&)([^&=]*)=?([^&]*)/g\n },\n parser: {\n strict: /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n loose: /^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/\n }\n};\n\nfunction parseUri(str) {\n if (!isType(str, 'string')) {\n return undefined;\n }\n\n var o = parseUriOptions;\n var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);\n var uri = {};\n\n for (var i = 0, l = o.key.length; i < l; ++i) {\n uri[o.key[i]] = m[i] || '';\n }\n\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) {\n uri[o.q.name][$1] = $2;\n }\n });\n\n return uri;\n}\n\nfunction addParamsAndAccessTokenToPath(accessToken, options, params) {\n params = params || {};\n params.access_token = accessToken;\n var paramsArray = [];\n var k;\n for (k in params) {\n if (Object.prototype.hasOwnProperty.call(params, k)) {\n paramsArray.push([k, params[k]].join('='));\n }\n }\n var query = '?' + paramsArray.sort().join('&');\n\n options = options || {};\n options.path = options.path || '';\n var qs = options.path.indexOf('?');\n var h = options.path.indexOf('#');\n var p;\n if (qs !== -1 && (h === -1 || h > qs)) {\n p = options.path;\n options.path = p.substring(0,qs) + query + '&' + p.substring(qs+1);\n } else {\n if (h !== -1) {\n p = options.path;\n options.path = p.substring(0,h) + query + p.substring(h);\n } else {\n options.path = options.path + query;\n }\n }\n}\n\nfunction formatUrl(u, protocol) {\n protocol = protocol || u.protocol;\n if (!protocol && u.port) {\n if (u.port === 80) {\n protocol = 'http:';\n } else if (u.port === 443) {\n protocol = 'https:';\n }\n }\n protocol = protocol || 'https:';\n\n if (!u.hostname) {\n return null;\n }\n var result = protocol + '//' + u.hostname;\n if (u.port) {\n result = result + ':' + u.port;\n }\n if (u.path) {\n result = result + u.path;\n }\n return result;\n}\n\nfunction stringify(obj, backup) {\n var value, error;\n try {\n value = RollbarJSON.stringify(obj);\n } catch (jsonError) {\n if (backup && isFunction(backup)) {\n try {\n value = backup(obj);\n } catch (backupError) {\n error = backupError;\n }\n } else {\n error = jsonError;\n }\n }\n return {error: error, value: value};\n}\n\nfunction maxByteSize(string) {\n // The transport will use utf-8, so assume utf-8 encoding.\n //\n // This minimal implementation will accurately count bytes for all UCS-2 and\n // single code point UTF-16. If presented with multi code point UTF-16,\n // which should be rare, it will safely overcount, not undercount.\n //\n // While robust utf-8 encoders exist, this is far smaller and far more performant.\n // For quickly counting payload size for truncation, smaller is better.\n\n var count = 0;\n var length = string.length;\n\n for (var i = 0; i < length; i++) {\n var code = string.charCodeAt(i);\n if (code < 128) { // up to 7 bits\n count = count + 1;\n } else if (code < 2048) { // up to 11 bits\n count = count + 2;\n } else if (code < 65536) { // up to 16 bits\n count = count + 3;\n }\n }\n\n return count;\n}\n\nfunction jsonParse(s) {\n var value, error;\n try {\n value = RollbarJSON.parse(s);\n } catch (e) {\n error = e;\n }\n return {error: error, value: value};\n}\n\nfunction makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n mode,\n backupMessage,\n errorParser\n) {\n var location = {\n url: url || '',\n line: lineno,\n column: colno\n };\n location.func = errorParser.guessFunctionName(location.url, location.line);\n location.context = errorParser.gatherContext(location.url, location.line);\n var href = typeof document !== 'undefined' && document && document.location && document.location.href;\n var useragent = typeof window !== 'undefined' && window && window.navigator && window.navigator.userAgent;\n return {\n 'mode': mode,\n 'message': error ? String(error) : (message || backupMessage),\n 'url': href,\n 'stack': [location],\n 'useragent': useragent\n };\n}\n\nfunction wrapCallback(logger, f) {\n return function(err, resp) {\n try {\n f(err, resp);\n } catch (e) {\n logger.error(e);\n }\n };\n}\n\nfunction createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\n var diagnostic = {};\n var argTypes = [];\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n argTypes.push(typ);\n switch (typ) {\n case 'undefined':\n break;\n case 'string':\n message ? extraArgs.push(arg) : message = arg;\n break;\n case 'function':\n callback = wrapCallback(logger, arg);\n break;\n case 'date':\n extraArgs.push(arg);\n break;\n case 'error':\n case 'domexception':\n case 'exception': // Firefox Exception type\n err ? extraArgs.push(arg) : err = arg;\n break;\n case 'object':\n case 'array':\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n if (requestKeys && typ === 'object' && !request) {\n for (var j = 0, len = requestKeys.length; j < len; ++j) {\n if (arg[requestKeys[j]] !== undefined) {\n request = arg;\n break;\n }\n }\n if (request) {\n break;\n }\n }\n custom ? extraArgs.push(arg) : custom = arg;\n break;\n default:\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n extraArgs.push(arg);\n }\n }\n\n if (extraArgs.length > 0) {\n // if custom is an array this turns it into an object with integer keys\n custom = merge(custom);\n custom.extraArgs = extraArgs;\n }\n\n var item = {\n message: message,\n err: err,\n custom: custom,\n timestamp: now(),\n callback: callback,\n notifier: notifier,\n diagnostic: diagnostic,\n uuid: uuid4()\n };\n\n setCustomItemKeys(item, custom);\n\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n item.diagnostic.original_arg_types = argTypes;\n return item;\n}\n\nfunction setCustomItemKeys(item, custom) {\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (custom && custom.skipFrames !== undefined) {\n item.skipFrames = custom.skipFrames;\n delete custom.skipFrames;\n }\n}\n\nfunction addErrorContext(item, errors) {\n var custom = item.data.custom || {};\n var contextAdded = false;\n\n try {\n for (var i = 0; i < errors.length; ++i) {\n if (errors[i].hasOwnProperty('rollbarContext')) {\n custom = merge(custom, errors[i].rollbarContext);\n contextAdded = true;\n }\n }\n\n // Avoid adding an empty object to the data.\n if (contextAdded) {\n item.data.custom = custom;\n }\n } catch (e) {\n item.diagnostic.error_context = 'Failed: ' + e.message;\n }\n}\n\nvar TELEMETRY_TYPES = ['log', 'network', 'dom', 'navigation', 'error', 'manual'];\nvar TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];\n\nfunction arrayIncludes(arr, val) {\n for (var k = 0; k < arr.length; ++k) {\n if (arr[k] === val) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction createTelemetryEvent(args) {\n var type, metadata, level;\n var arg;\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n switch (typ) {\n case 'string':\n if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {\n type = arg;\n } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {\n level = arg;\n }\n break;\n case 'object':\n metadata = arg;\n break;\n default:\n break;\n }\n }\n var event = {\n type: type || 'manual',\n metadata: metadata || {},\n level: level\n };\n\n return event;\n}\n\n/*\n * get - given an obj/array and a keypath, return the value at that keypath or\n * undefined if not possible.\n *\n * @param obj - an object or array\n * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'\n * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`\n */\nfunction get(obj, path) {\n if (!obj) {\n return undefined;\n }\n var keys = path.split('.');\n var result = obj;\n try {\n for (var i = 0, len = keys.length; i < len; ++i) {\n result = result[keys[i]];\n }\n } catch (e) {\n result = undefined;\n }\n return result;\n}\n\nfunction set(obj, path, value) {\n if (!obj) {\n return;\n }\n var keys = path.split('.');\n var len = keys.length;\n if (len < 1) {\n return;\n }\n if (len === 1) {\n obj[keys[0]] = value;\n return;\n }\n try {\n var temp = obj[keys[0]] || {};\n var replacement = temp;\n for (var i = 1; i < len - 1; ++i) {\n temp[keys[i]] = temp[keys[i]] || {};\n temp = temp[keys[i]];\n }\n temp[keys[len-1]] = value;\n obj[keys[0]] = replacement;\n } catch (e) {\n return;\n }\n}\n\nfunction formatArgsAsString(args) {\n var i, len, arg;\n var result = [];\n for (i = 0, len = args.length; i < len; ++i) {\n arg = args[i];\n switch (typeName(arg)) {\n case 'object':\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500) {\n arg = arg.substr(0, 497) + '...';\n }\n break;\n case 'null':\n arg = 'null';\n break;\n case 'undefined':\n arg = 'undefined';\n break;\n case 'symbol':\n arg = arg.toString();\n break;\n }\n result.push(arg);\n }\n return result.join(' ');\n}\n\nfunction now() {\n if (Date.now) {\n return +Date.now();\n }\n return +new Date();\n}\n\nfunction filterIp(requestData, captureIp) {\n if (!requestData || !requestData['user_ip'] || captureIp === true) {\n return;\n }\n var newIp = requestData['user_ip'];\n if (!captureIp) {\n newIp = null;\n } else {\n try {\n var parts;\n if (newIp.indexOf('.') !== -1) {\n parts = newIp.split('.');\n parts.pop();\n parts.push('0');\n newIp = parts.join('.');\n } else if (newIp.indexOf(':') !== -1) {\n parts = newIp.split(':');\n if (parts.length > 2) {\n var beginning = parts.slice(0, 3);\n var slashIdx = beginning[2].indexOf('/');\n if (slashIdx !== -1) {\n beginning[2] = beginning[2].substring(0, slashIdx);\n }\n var terminal = '0000:0000:0000:0000:0000';\n newIp = beginning.concat(terminal).join(':');\n }\n } else {\n newIp = null;\n }\n } catch (e) {\n newIp = null;\n }\n }\n requestData['user_ip'] = newIp;\n}\n\nfunction handleOptions(current, input, payload, logger) {\n var result = merge(current, input, payload);\n result = updateDeprecatedOptions(result, logger);\n if (!input || input.overwriteScrubFields) {\n return result;\n }\n if (input.scrubFields) {\n result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);\n }\n return result;\n}\n\nfunction updateDeprecatedOptions(options, logger) {\n if(options.hostWhiteList && !options.hostSafeList) {\n options.hostSafeList = options.hostWhiteList;\n options.hostWhiteList = undefined;\n logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');\n }\n if(options.hostBlackList && !options.hostBlockList) {\n options.hostBlockList = options.hostBlackList;\n options.hostBlackList = undefined;\n logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');\n }\n return options;\n}\n\nmodule.exports = {\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n createItem: createItem,\n addErrorContext: addErrorContext,\n createTelemetryEvent: createTelemetryEvent,\n filterIp: filterIp,\n formatArgsAsString: formatArgsAsString,\n formatUrl: formatUrl,\n get: get,\n handleOptions: handleOptions,\n isError: isError,\n isFiniteNumber: isFiniteNumber,\n isFunction: isFunction,\n isIterable: isIterable,\n isNativeFunction: isNativeFunction,\n isObject: isObject,\n isString: isString,\n isType: isType,\n isPromise: isPromise,\n jsonParse: jsonParse,\n LEVELS: LEVELS,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n merge: merge,\n now: now,\n redact: redact,\n RollbarJSON: RollbarJSON,\n sanitizeUrl: sanitizeUrl,\n set: set,\n setupJSON: setupJSON,\n stringify: stringify,\n maxByteSize: maxByteSize,\n typeName: typeName,\n uuid4: uuid4\n};\n","'use strict';\n\n/* eslint-disable no-console */\nrequire('console-polyfill');\nvar detection = require('./detection');\nvar _ = require('../utility');\n\nfunction error() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.error(_.formatArgsAsString(args));\n } else {\n console.error.apply(console, args);\n }\n}\n\nfunction info() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.info(_.formatArgsAsString(args));\n } else {\n console.info.apply(console, args);\n }\n}\n\nfunction log() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.log(_.formatArgsAsString(args));\n } else {\n console.log.apply(console, args);\n }\n}\n\n/* eslint-enable no-console */\n\nmodule.exports = {\n error: error,\n info: info,\n log: log\n};\n","'use strict';\n\n// See https://nodejs.org/docs/latest/api/url.html\nfunction parse(url) {\n var result = {\n protocol: null, auth: null, host: null, path: null,\n hash: null, href: url, hostname: null, port: null,\n pathname: null, search: null, query: null\n };\n\n var i, last;\n i = url.indexOf('//');\n if (i !== -1) {\n result.protocol = url.substring(0,i);\n last = i+2;\n } else {\n last = 0;\n }\n \n i = url.indexOf('@', last);\n if (i !== -1) {\n result.auth = url.substring(last, i);\n last = i+1;\n }\n\n i = url.indexOf('/', last);\n if (i === -1) {\n i = url.indexOf('?', last);\n if (i === -1) {\n i = url.indexOf('#', last);\n if (i === -1) {\n result.host = url.substring(last);\n } else {\n result.host = url.substring(last, i);\n result.hash = url.substring(i);\n }\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n return result;\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n\n i = url.indexOf('#', last);\n if (i === -1) {\n result.path = url.substring(last);\n } else {\n result.path = url.substring(last, i);\n result.hash = url.substring(i);\n }\n\n if (result.path) {\n var pathParts = result.path.split('?');\n result.pathname = pathParts[0];\n result.query = pathParts[1];\n result.search = result.query ? '?' + result.query : null;\n }\n return result;\n}\n\nmodule.exports = {\n parse: parse\n};\n","'use strict';\n\nvar ErrorStackParser = require('error-stack-parser');\n\nvar UNKNOWN_FUNCTION = '?';\nvar ERR_CLASS_REGEXP = new RegExp('^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ');\n\nfunction guessFunctionName() {\n return UNKNOWN_FUNCTION;\n}\n\n\nfunction gatherContext() {\n return null;\n}\n\n\nfunction Frame(stackFrame) {\n var data = {};\n\n data._stackFrame = stackFrame;\n\n data.url = stackFrame.fileName;\n data.line = stackFrame.lineNumber;\n data.func = stackFrame.functionName;\n data.column = stackFrame.columnNumber;\n data.args = stackFrame.args;\n\n data.context = gatherContext();\n\n return data;\n}\n\n\nfunction Stack(exception, skip) {\n function getStack() {\n var parserStack = [];\n\n skip = skip || 0;\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch(e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = skip; i < parserStack.length; i++) {\n stack.push(new Frame(parserStack[i]));\n }\n\n return stack;\n }\n\n return {\n stack: getStack(),\n message: exception.message,\n name: _mostSpecificErrorName(exception),\n rawStack: exception.stack,\n rawException: exception\n };\n}\n\n\nfunction parse(e, skip) {\n var err = e;\n\n if (err.nested) {\n var traceChain = [];\n while (err) {\n traceChain.push(new Stack(err, skip));\n err = err.nested;\n\n skip = 0; // Only apply skip value to primary error\n }\n\n // Return primary error with full trace chain attached.\n traceChain[0].traceChain = traceChain;\n return traceChain[0];\n } else {\n return new Stack(err, skip);\n }\n}\n\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg || !errMsg.match) {\n return ['Unknown error. There was no error message to display.', ''];\n }\n var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);\n var errClass = '(unknown)';\n\n if (errClassMatch) {\n errClass = errClassMatch[errClassMatch.length - 1];\n errMsg = errMsg.replace((errClassMatch[errClassMatch.length - 2] || '') + errClass + ':', '');\n errMsg = errMsg.replace(/(^[\\s]+|[\\s]+$)/g, '');\n }\n return [errClass, errMsg];\n}\n\n// * Prefers any value over an empty string\n// * Prefers any value over 'Error' where possible\n// * Prefers name over constructor.name when both are more specific than 'Error'\nfunction _mostSpecificErrorName(error) {\n var name = error.name && error.name.length && error.name;\n var constructorName = error.constructor.name && error.constructor.name.length && error.constructor.name;\n\n if (!name || !constructorName) {\n return name || constructorName;\n }\n\n if (name === 'Error') {\n return constructorName;\n }\n return name;\n}\n\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame\n};\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction scrub(data, scrubFields, scrubPaths) {\n scrubFields = scrubFields || [];\n\n if (scrubPaths) {\n for (var i = 0; i < scrubPaths.length; ++i) {\n scrubPath(data, scrubPaths[i]);\n }\n }\n\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart) {\n return paramPart + _.redact();\n }\n\n function paramScrubber(v) {\n var i;\n if (_.isType(v, 'string')) {\n for (i = 0; i < queryRes.length; ++i) {\n v = v.replace(queryRes[i], redactQueryParam);\n }\n }\n return v;\n }\n\n function valScrubber(k, v) {\n var i;\n for (i = 0; i < paramRes.length; ++i) {\n if (paramRes[i].test(k)) {\n v = _.redact();\n break;\n }\n }\n return v;\n }\n\n function scrubber(k, v, seen) {\n var tmpV = valScrubber(k, v);\n if (tmpV === v) {\n if (_.isType(v, 'object') || _.isType(v, 'array')) {\n return traverse(v, scrubber, seen);\n }\n return paramScrubber(tmpV);\n } else {\n return tmpV;\n }\n }\n\n return traverse(data, scrubber);\n}\n\nfunction scrubPath(obj, path) {\n var keys = path.split('.');\n var last = keys.length - 1;\n try {\n for (var i = 0; i <= last; ++i) {\n if (i < last) {\n obj = obj[keys[i]];\n } else {\n obj[keys[i]] = _.redact();\n }\n }\n } catch (e) {\n // Missing key is OK;\n }\n}\n\nfunction _getScrubFieldRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '^\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?$';\n ret.push(new RegExp(pat, 'i'));\n }\n return ret;\n}\n\n\nfunction _getScrubQueryParamRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?';\n ret.push(new RegExp('(' + pat + '=)([^&\\\\n]+)', 'igm'));\n }\n return ret;\n}\n\nmodule.exports = scrub;\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction traverse(obj, func, seen) {\n var k, v, i;\n var isObj = _.isType(obj, 'object');\n var isArray = _.isType(obj, 'array');\n var keys = [];\n var seenIndex;\n\n // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.\n seen = seen || { obj: [], mapped: []};\n\n if (isObj) {\n seenIndex = seen.obj.indexOf(obj);\n\n if (isObj && seenIndex !== -1) {\n // Prefer the mapped object if there is one.\n return seen.mapped[seenIndex] || seen.obj[seenIndex];\n }\n\n seen.obj.push(obj);\n seenIndex = seen.obj.length - 1;\n }\n\n if (isObj) {\n for (k in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, k)) {\n keys.push(k);\n }\n }\n } else if (isArray) {\n for (i = 0; i < obj.length; ++i) {\n keys.push(i);\n }\n }\n\n var result = isObj ? {} : [];\n var same = true;\n for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n result[k] = func(k, v, seen);\n same = same && result[k] === obj[k];\n }\n\n if (isObj && !same) {\n seen.mapped[seenIndex] = result;\n }\n\n return !same ? result : obj;\n}\n\nmodule.exports = traverse;\n","'use strict';\n\nvar rollbar = require('../rollbar');\n\nvar options = (typeof window !== 'undefined') && window._rollbarConfig;\nvar alias = options && options.globalAlias || 'Rollbar';\nvar shimRunning = (typeof window !== 'undefined') && window[alias] && typeof window[alias].shimId === 'function' && window[alias].shimId() !== undefined;\n\nif ((typeof window !== 'undefined') && !window._rollbarStartTime) {\n window._rollbarStartTime = (new Date()).getTime();\n}\n\nif (!shimRunning && options) {\n var Rollbar = new rollbar(options);\n window[alias] = Rollbar;\n} else if (typeof window !== 'undefined') {\n window.rollbar = rollbar;\n window._rollbarDidLoad = true;\n} else if (typeof self !== 'undefined') {\n self.rollbar = rollbar;\n self._rollbarDidLoad = true;\n}\n\nmodule.exports = rollbar;\n","'use strict';\n\nvar Rollbar = require('./core');\nvar telemeter = require('../telemetry');\nvar instrumenter = require('./telemetry');\nvar polyfillJSON = require('../utility/polyfillJSON');\nvar wrapGlobals = require('./wrapGlobals');\nvar scrub = require('../scrub');\nvar truncation = require('../truncation');\n\nRollbar.setComponents({\n telemeter: telemeter,\n instrumenter: instrumenter,\n polyfillJSON: polyfillJSON,\n wrapGlobals: wrapGlobals,\n scrub: scrub,\n truncation: truncation\n});\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar Client = require('../rollbar');\nvar _ = require('../utility');\nvar API = require('../api');\nvar logger = require('./logger');\nvar globals = require('./globalSetup');\n\nvar Transport = require('./transport');\nvar urllib = require('./url');\n\nvar transforms = require('./transforms');\nvar sharedTransforms = require('../transforms');\nvar predicates = require('./predicates');\nvar sharedPredicates = require('../predicates');\nvar errorParser = require('../errorParser');\n\nfunction Rollbar(options, client) {\n this.options = _.handleOptions(defaultOptions, options, null, logger);\n this.options._configuredOptions = options;\n var Telemeter = this.components.telemeter;\n var Instrumenter = this.components.instrumenter;\n var polyfillJSON = this.components.polyfillJSON;\n this.wrapGlobals = this.components.wrapGlobals;\n this.scrub = this.components.scrub;\n var truncation = this.components.truncation;\n\n var transport = new Transport(truncation);\n var api = new API(this.options, transport, urllib, truncation);\n if (Telemeter) {\n this.telemeter = new Telemeter(this.options);\n }\n this.client = client || new Client(this.options, api, logger, this.telemeter, 'browser');\n var gWindow = _gWindow();\n var gDocument = (typeof document != 'undefined') && document;\n this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers\n this.anonymousErrorsPending = 0;\n addTransformsToNotifier(this.client.notifier, this, gWindow);\n addPredicatesToQueue(this.client.queue);\n this.setupUnhandledCapture();\n if (Instrumenter) {\n this.instrumenter = new Instrumenter(this.options, this.client.telemeter, this, gWindow, gDocument);\n this.instrumenter.instrument();\n }\n _.setupJSON(polyfillJSON);\n}\n\nvar _instance = null;\nRollbar.init = function(options, client) {\n if (_instance) {\n return _instance.global(options).configure(options);\n }\n _instance = new Rollbar(options, client);\n return _instance;\n};\n\nRollbar.prototype.components = {};\n\nRollbar.setComponents = function(components) {\n Rollbar.prototype.components = components;\n}\n\nfunction handleUninitialized(maybeCallback) {\n var message = 'Rollbar is not initialized';\n logger.error(message);\n if (maybeCallback) {\n maybeCallback(new Error(message));\n }\n}\n\nRollbar.prototype.global = function(options) {\n this.client.global(options);\n return this;\n};\nRollbar.global = function(options) {\n if (_instance) {\n return _instance.global(options);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.configure = function(options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = {payload: payloadData};\n }\n this.options = _.handleOptions(oldOptions, options, payload, logger);\n this.options._configuredOptions = _.handleOptions(oldOptions._configuredOptions, options, payload);\n this.client.configure(this.options, payloadData);\n this.instrumenter && this.instrumenter.configure(this.options);\n this.setupUnhandledCapture();\n return this;\n};\nRollbar.configure = function(options, payloadData) {\n if (_instance) {\n return _instance.configure(options, payloadData);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.lastError = function() {\n return this.client.lastError;\n};\nRollbar.lastError = function() {\n if (_instance) {\n return _instance.lastError();\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.log = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.log(item);\n return {uuid: uuid};\n};\nRollbar.log = function() {\n if (_instance) {\n return _instance.log.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.debug = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.debug(item);\n return {uuid: uuid};\n};\nRollbar.debug = function() {\n if (_instance) {\n return _instance.debug.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.info = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.info(item);\n return {uuid: uuid};\n};\nRollbar.info = function() {\n if (_instance) {\n return _instance.info.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warn = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warn(item);\n return {uuid: uuid};\n};\nRollbar.warn = function() {\n if (_instance) {\n return _instance.warn.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warning = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warning(item);\n return {uuid: uuid};\n};\nRollbar.warning = function() {\n if (_instance) {\n return _instance.warning.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.error = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.error(item);\n return {uuid: uuid};\n};\nRollbar.error = function() {\n if (_instance) {\n return _instance.error.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.critical = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.critical(item);\n return {uuid: uuid};\n};\nRollbar.critical = function() {\n if (_instance) {\n return _instance.critical.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.buildJsonPayload = function(item) {\n return this.client.buildJsonPayload(item);\n};\nRollbar.buildJsonPayload = function() {\n if (_instance) {\n return _instance.buildJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.sendJsonPayload = function(jsonPayload) {\n return this.client.sendJsonPayload(jsonPayload);\n};\nRollbar.sendJsonPayload = function() {\n if (_instance) {\n return _instance.sendJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.setupUnhandledCapture = function() {\n var gWindow = _gWindow();\n\n if (!this.unhandledExceptionsInitialized) {\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(gWindow, this);\n if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {\n this.wrapGlobals(gWindow, this);\n }\n this.unhandledExceptionsInitialized = true;\n }\n }\n if (!this.unhandledRejectionsInitialized) {\n if (this.options.captureUnhandledRejections || this.options.handleUnhandledRejections) {\n globals.captureUnhandledRejections(gWindow, this);\n this.unhandledRejectionsInitialized = true;\n }\n }\n};\n\nRollbar.prototype.handleUncaughtException = function(message, url, lineno, colno, error, context) {\n if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {\n return;\n }\n\n // Chrome will always send 5+ arguments and error will be valid or null, not undefined.\n // If error is undefined, we have a different caller.\n // Chrome also sends errors from web workers with null error, but does not invoke\n // prepareStackTrace() for these. Test for empty url to skip them.\n if (this.options.inspectAnonymousErrors && this.isChrome && error === null && url === '') {\n return 'anonymous';\n }\n\n var item;\n var stackInfo = _.makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n 'onerror',\n 'uncaught exception',\n errorParser\n );\n if (_.isError(error)) {\n item = this._createItem([message, error, context]);\n item._unhandledStackInfo = stackInfo;\n } else if (_.isError(url)) {\n item = this._createItem([message, url, context]);\n item._unhandledStackInfo = stackInfo;\n } else {\n item = this._createItem([message, context]);\n item.stackInfo = stackInfo;\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n this.client.log(item);\n};\n\n/**\n * Chrome only. Other browsers will ignore.\n *\n * Use Error.prepareStackTrace to extract information about errors that\n * do not have a valid error object in onerror().\n *\n * In tested version of Chrome, onerror is called first but has no way\n * to communicate with prepareStackTrace. Use a counter to let this\n * handler know which errors to send to Rollbar.\n *\n * In config options, set inspectAnonymousErrors to enable.\n */\nRollbar.prototype.handleAnonymousErrors = function() {\n if (!this.options.inspectAnonymousErrors || !this.isChrome) {\n return;\n }\n\n var r = this;\n function prepareStackTrace(error, _stack) { // eslint-disable-line no-unused-vars\n if (r.options.inspectAnonymousErrors) {\n if (r.anonymousErrorsPending) {\n // This is the only known way to detect that onerror saw an anonymous error.\n // It depends on onerror reliably being called before Error.prepareStackTrace,\n // which so far holds true on tested versions of Chrome. If versions of Chrome\n // are tested that behave differently, this logic will need to be updated\n // accordingly.\n r.anonymousErrorsPending -= 1;\n\n if (!error) {\n // Not likely to get here, but calling handleUncaughtException from here\n // without an error object would throw off the anonymousErrorsPending counter,\n // so return now.\n return;\n }\n\n // Allow this to be tracked later.\n error._isAnonymous = true;\n\n // url, lineno, colno shouldn't be needed for these errors.\n // If that changes, update this accordingly, using the unused\n // _stack param as needed (rather than parse error.toString()).\n r.handleUncaughtException(error.message, null, null, null, error);\n }\n }\n\n // Workaround to ensure stack is preserved for normal errors.\n return error.stack;\n }\n\n // https://v8.dev/docs/stack-trace-api\n try {\n Error.prepareStackTrace = prepareStackTrace;\n } catch (e) {\n this.options.inspectAnonymousErrors = false;\n this.error('anonymous error handler failed', e);\n }\n}\n\nRollbar.prototype.handleUnhandledRejection = function(reason, promise) {\n if (!this.options.captureUnhandledRejections && !this.options.handleUnhandledRejections) {\n return;\n }\n\n var message = 'unhandled rejection was null or undefined!';\n if (reason) {\n if (reason.message) {\n message = reason.message;\n } else {\n var reasonResult = _.stringify(reason);\n if (reasonResult.value) {\n message = reasonResult.value;\n }\n }\n }\n var context = (reason && reason._rollbarContext) || (promise && promise._rollbarContext);\n\n var item;\n if (_.isError(reason)) {\n item = this._createItem([message, reason, context]);\n } else {\n item = this._createItem([message, reason, context]);\n item.stackInfo = _.makeUnhandledStackInfo(\n message,\n '',\n 0,\n 0,\n null,\n 'unhandledrejection',\n '',\n errorParser\n );\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n item._originalArgs = item._originalArgs || [];\n item._originalArgs.push(promise);\n this.client.log(item);\n};\n\nRollbar.prototype.wrap = function(f, context, _before) {\n try {\n var ctxFn;\n if(_.isFunction(context)) {\n ctxFn = context;\n } else {\n ctxFn = function() { return context || {}; };\n }\n\n if (!_.isFunction(f)) {\n return f;\n }\n\n if (f._isWrap) {\n return f;\n }\n\n if (!f._rollbar_wrapped) {\n f._rollbar_wrapped = function () {\n if (_before && _.isFunction(_before)) {\n _before.apply(this, arguments);\n }\n try {\n return f.apply(this, arguments);\n } catch(exc) {\n var e = exc;\n if (e && window._rollbarWrappedError !== e) {\n if (_.isType(e, 'string')) {\n e = new String(e);\n }\n e._rollbarContext = ctxFn() || {};\n e._rollbarContext._wrappedSource = f.toString();\n\n window._rollbarWrappedError = e;\n }\n throw e;\n }\n };\n\n f._rollbar_wrapped._isWrap = true;\n\n if (f.hasOwnProperty) {\n for (var prop in f) {\n if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {\n f._rollbar_wrapped[prop] = f[prop];\n }\n }\n }\n }\n\n return f._rollbar_wrapped;\n } catch (e) {\n // Return the original function if the wrap fails.\n return f;\n }\n};\nRollbar.wrap = function(f, context) {\n if (_instance) {\n return _instance.wrap(f, context);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.captureEvent = function() {\n var event = _.createTelemetryEvent(arguments);\n return this.client.captureEvent(event.type, event.metadata, event.level);\n};\nRollbar.captureEvent = function() {\n if (_instance) {\n return _instance.captureEvent.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\n// The following two methods are used internally and are not meant for public use\nRollbar.prototype.captureDomContentLoaded = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureLoad(ts);\n};\n\n/* Internal */\n\nfunction addTransformsToNotifier(notifier, rollbar, gWindow) {\n notifier\n .addTransform(transforms.handleDomException)\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(gWindow))\n .addTransform(transforms.addClientInfo(gWindow))\n .addTransform(transforms.addPluginInfo(gWindow))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(sharedTransforms.addConfigToPayload)\n .addTransform(transforms.addScrubber(rollbar.scrub))\n .addTransform(sharedTransforms.userTransform(logger))\n .addTransform(sharedTransforms.addConfiguredOptions)\n .addTransform(sharedTransforms.addDiagnosticKeys)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(sharedPredicates.checkLevel)\n .addPredicate(predicates.checkIgnore)\n .addPredicate(sharedPredicates.userCheckIgnore(logger))\n .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))\n .addPredicate(sharedPredicates.urlIsSafeListed(logger))\n .addPredicate(sharedPredicates.messageIsIgnored(logger));\n}\n\nRollbar.prototype.loadFull = function() {\n logger.info('Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.');\n};\n\nRollbar.prototype._createItem = function(args) {\n return _.createItem(args, logger, this);\n};\n\nfunction _getFirstFunction(args) {\n for (var i = 0, len = args.length; i < len; ++i) {\n if (_.isFunction(args[i])) {\n return args[i];\n }\n }\n return undefined;\n}\n\nfunction _gWindow() {\n return ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n}\n\nvar defaults = require('../defaults');\nvar scrubFields = require('./defaults/scrubFields');\n\nvar defaultOptions = {\n version: defaults.version,\n scrubFields: scrubFields.scrubFields,\n logLevel: defaults.logLevel,\n reportLevel: defaults.reportLevel,\n uncaughtErrorLevel: defaults.uncaughtErrorLevel,\n endpoint: defaults.endpoint,\n verbose: false,\n enabled: true,\n transmit: true,\n sendConfig: false,\n includeItemsInTelemetry: true,\n captureIp: true,\n inspectAnonymousErrors: true,\n ignoreDuplicateErrors: true,\n wrapGlobalEventHandlers: false\n};\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar _ = require('./utility');\n\n/*\n * Rollbar - the interface to Rollbar\n *\n * @param options\n * @param api\n * @param logger\n */\nfunction Rollbar(options, api, logger, telemeter, platform) {\n this.options = _.merge(options);\n this.logger = logger;\n Rollbar.rateLimiter.configureGlobal(this.options);\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.api = api;\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n\n // This must happen before the Notifier is created\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = telemeter;\n setStackTraceLimit(options);\n this.lastError = null;\n this.lastErrorHash = 'none';\n}\n\nvar defaultOptions = {\n maxItems: 0,\n itemsPerMinute: 60\n};\n\nRollbar.rateLimiter = new RateLimiter(defaultOptions);\n\nRollbar.prototype.global = function (options) {\n Rollbar.rateLimiter.configureGlobal(options);\n return this;\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n\n this.options = _.merge(oldOptions, options, payload);\n\n // This must happen before the Notifier is configured\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier && this.notifier.configure(this.options);\n this.telemeter && this.telemeter.configure(this.options);\n setStackTraceLimit(options);\n this.global(this.options);\n\n if (validateTracer(options.tracer)) {\n this.tracer = options.tracer\n }\n\n return this;\n};\n\nRollbar.prototype.log = function (item) {\n var level = this._defaultLogLevel();\n return this._log(level, item);\n};\n\nRollbar.prototype.debug = function (item) {\n this._log('debug', item);\n};\n\nRollbar.prototype.info = function (item) {\n this._log('info', item);\n};\n\nRollbar.prototype.warn = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.warning = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.error = function (item) {\n this._log('error', item);\n};\n\nRollbar.prototype.critical = function (item) {\n this._log('critical', item);\n};\n\nRollbar.prototype.wait = function (callback) {\n this.queue.wait(callback);\n};\n\nRollbar.prototype.captureEvent = function (type, metadata, level) {\n return this.telemeter && this.telemeter.captureEvent(type, metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function (ts) {\n return this.telemeter && this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (ts) {\n return this.telemeter && this.telemeter.captureLoad(ts);\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.api.buildJsonPayload(item);\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n this.api.postJsonPayload(jsonPayload);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function (defaultLevel, item) {\n var callback;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {\n if (callback) {\n var error = new Error('ignored identical item');\n error.item = item;\n callback(error);\n }\n return;\n }\n try {\n this._addTracingInfo(item);\n item.level = item.level || defaultLevel;\n this.telemeter && this.telemeter._captureRollbarItem(item);\n item.telemetryEvents = (this.telemeter && this.telemeter.copyEvents()) || [];\n this.notifier.log(item, callback);\n } catch (e) {\n if (callback) {\n callback(e);\n }\n this.logger.error(e);\n }\n};\n\nRollbar.prototype._defaultLogLevel = function () {\n return this.options.logLevel || 'debug';\n};\n\nRollbar.prototype._sameAsLastError = function (item) {\n if (!item._isUncaught) {\n return false;\n }\n var itemHash = generateItemHash(item);\n if (this.lastErrorHash === itemHash) {\n return true;\n }\n this.lastError = item.err;\n this.lastErrorHash = itemHash;\n return false;\n};\n\nRollbar.prototype._addTracingInfo = function (item) {\n // Tracer validation occurs in the constructor\n // or in the Rollbar.prototype.configure methods\n if (this.tracer) {\n // add rollbar occurrence uuid to span\n var span = this.tracer.scope().active();\n\n if (validateSpan(span)) {\n span.setTag('rollbar.error_uuid', item.uuid);\n span.setTag('rollbar.has_error', true);\n span.setTag('error', true);\n span.setTag('rollbar.item_url', `https://rollbar.com/item/uuid/?uuid=${item.uuid}`);\n span.setTag('rollbar.occurrence_url', `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`);\n\n // add span ID & trace ID to occurrence\n var opentracingSpanId = span.context().toSpanId();\n var opentracingTraceId = span.context().toTraceId();\n\n if (item.custom) {\n item.custom.opentracing_span_id = opentracingSpanId;\n item.custom.opentracing_trace_id = opentracingTraceId;\n } else {\n item.custom = {\n opentracing_span_id: opentracingSpanId,\n opentracing_trace_id: opentracingTraceId\n };\n }\n }\n }\n}\n\nfunction generateItemHash(item) {\n var message = item.message || '';\n var stack = (item.err || {}).stack || String(item.err);\n return message + '::' + stack;\n}\n\n// Node.js, Chrome, Safari, and some other browsers support this property\n// which globally sets the number of stack frames returned in an Error object.\n// If a browser can't use it, no harm done.\nfunction setStackTraceLimit(options) {\n if (options.stackTraceLimit) {\n Error.stackTraceLimit = options.stackTraceLimit;\n }\n}\n\n/**\n * Validate the Tracer object provided to the Client\n * is valid for our Opentracing use case.\n * @param {opentracer.Tracer} tracer\n */\nfunction validateTracer(tracer) {\n if (!tracer) {\n return false;\n }\n\n if (!tracer.scope || typeof tracer.scope !== 'function') {\n return false;\n }\n\n var scope = tracer.scope();\n\n if (!scope || !scope.active || typeof scope.active !== 'function') {\n return false;\n }\n\n return true;\n}\n\n/**\n * Validate the Span object provided\n * @param {opentracer.Span} span\n */\nfunction validateSpan(span) {\n if (!span || !span.context || typeof span.context !== 'function') {\n return false;\n }\n\n var spanContext = span.context();\n\n if (!spanContext\n || !spanContext.toSpanId\n || !spanContext.toTraceId\n || typeof spanContext.toSpanId !== 'function'\n || typeof spanContext.toTraceId !== 'function') {\n return false\n }\n\n return true;\n}\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar\n *\n * @param options - the same options that are accepted by configureGlobal offered as a convenience\n */\nfunction RateLimiter(options) {\n this.startTime = _.now();\n this.counter = 0;\n this.perMinCounter = 0;\n this.platform = null;\n this.platformOptions = {};\n this.configureGlobal(options);\n}\n\nRateLimiter.globalSettings = {\n startTime: _.now(),\n maxItems: undefined,\n itemsPerMinute: undefined\n};\n\n/*\n * configureGlobal - set the global rate limiter options\n *\n * @param options - Only the following values are recognized:\n * startTime: a timestamp of the form returned by (new Date()).getTime()\n * maxItems: the maximum items\n * itemsPerMinute: the max number of items to send in a given minute\n */\nRateLimiter.prototype.configureGlobal = function(options) {\n if (options.startTime !== undefined) {\n RateLimiter.globalSettings.startTime = options.startTime;\n }\n if (options.maxItems !== undefined) {\n RateLimiter.globalSettings.maxItems = options.maxItems;\n }\n if (options.itemsPerMinute !== undefined) {\n RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;\n }\n};\n\n/*\n * shouldSend - determine if we should send a given item based on rate limit settings\n *\n * @param item - the item we are about to send\n * @returns An object with the following structure:\n * error: (Error|null)\n * shouldSend: bool\n * payload: (Object|null)\n * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and\n * exactly one of error or payload will be non-null. If error is non-null, the returned Error will\n * describe the situation, but it means that we were already over a rate limit (either globally or\n * per minute) when this item was checked. If error is null, and therefore payload is non-null, it\n * means this item put us over the global rate limit and the payload should be sent to Rollbar in\n * place of the passed in item.\n */\nRateLimiter.prototype.shouldSend = function(item, now) {\n now = now || _.now();\n var elapsedTime = now - this.startTime;\n if (elapsedTime < 0 || elapsedTime >= 60000) {\n this.startTime = now;\n this.perMinCounter = 0;\n }\n\n var globalRateLimit = RateLimiter.globalSettings.maxItems;\n var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;\n\n if (checkRate(item, globalRateLimit, this.counter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimit + ' max items reached', false);\n } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimitPerMin + ' items per minute reached', false);\n }\n this.counter++;\n this.perMinCounter++;\n\n var shouldSend = !checkRate(item, globalRateLimit, this.counter);\n var perMinute = shouldSend;\n shouldSend = shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);\n return shouldSendValue(this.platform, this.platformOptions, null, shouldSend, globalRateLimit, globalRateLimitPerMin, perMinute);\n};\n\nRateLimiter.prototype.setPlatformOptions = function(platform, options) {\n this.platform = platform;\n this.platformOptions = options;\n};\n\n/* Helpers */\n\nfunction checkRate(item, limit, counter) {\n return !item.ignoreRateLimit && limit >= 1 && counter > limit;\n}\n\nfunction shouldSendValue(platform, options, error, shouldSend, globalRateLimit, limitPerMin, perMinute) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute);\n }\n return {error: error, shouldSend: shouldSend, payload: payload};\n}\n\nfunction rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute) {\n var environment = options.environment || (options.payload && options.payload.environment);\n var msg;\n if (perMinute) {\n msg = 'item per minute limit reached, ignoring errors until timeout';\n } else {\n msg = 'maxItems has been hit, ignoring errors until reset.';\n }\n var item = {\n body: {\n message: {\n body: msg,\n extra: {\n maxItems: globalRateLimit,\n itemsPerMinute: limitPerMin\n }\n }\n },\n language: 'javascript',\n environment: environment,\n notifier: {\n version: (options.notifier && options.notifier.version) || options.version\n }\n };\n if (platform === 'browser') {\n item.platform = 'browser';\n item.framework = 'browser-js';\n item.notifier.name = 'rollbar-browser-js';\n } else if (platform === 'server') {\n item.framework = options.framework || 'node-js';\n item.notifier.name = options.notifier.name;\n } else if (platform === 'react-native') {\n item.framework = options.framework || 'react-native';\n item.notifier.name = options.notifier.name;\n }\n return item;\n}\n\nmodule.exports = RateLimiter;\n","'use strict';\n\n'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isPlainObject = function isPlainObject(obj) {\n\tif (!obj || toStr.call(obj) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tvar hasOwnConstructor = hasOwn.call(obj, 'constructor');\n\tvar hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n\t// Not own constructor property must be Object\n\tif (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n\t\treturn false;\n\t}\n\n\t// Own properties are enumerated firstly, so to speed up,\n\t// if last one is own, then all properties are own.\n\tvar key;\n\tfor (key in obj) {/**/}\n\n\treturn typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\nfunction merge() {\n var i, src, copy, clone, name,\n result = {},\n current = null,\n length = arguments.length;\n\n for (i=0; i < length; i++) {\n current = arguments[i];\n if (current == null) {\n continue;\n }\n\n for (name in current) {\n src = result[name];\n copy = current[name];\n if (result !== copy) {\n if (copy && isPlainObject(copy)) {\n clone = src && isPlainObject(src) ? src : {};\n result[name] = merge(clone, copy);\n } else if (typeof copy !== 'undefined') {\n result[name] = copy;\n }\n }\n }\n }\n return result;\n}\n\nmodule.exports = merge;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Queue - an object which handles which handles a queue of items to be sent to Rollbar.\n * This object handles rate limiting via a passed in rate limiter, retries based on connection\n * errors, and filtering of items based on a set of configurable predicates. The communication to\n * the backend is performed via a given API object.\n *\n * @param rateLimiter - An object which conforms to the interface\n * rateLimiter.shouldSend(item) -> bool\n * @param api - An object which conforms to the interface\n * api.postItem(payload, function(err, response))\n * @param logger - An object used to log verbose messages if desired\n * @param options - see Queue.prototype.configure\n */\nfunction Queue(rateLimiter, api, logger, options) {\n this.rateLimiter = rateLimiter;\n this.api = api;\n this.logger = logger;\n this.options = options;\n this.predicates = [];\n this.pendingItems = [];\n this.pendingRequests = [];\n this.retryQueue = [];\n this.retryHandle = null;\n this.waitCallback = null;\n this.waitIntervalID = null;\n}\n\n/*\n * configure - updates the options this queue uses\n *\n * @param options\n */\nQueue.prototype.configure = function(options) {\n this.api && this.api.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addPredicate - adds a predicate to the end of the list of predicates for this queue\n *\n * @param predicate - function(item, options) -> (bool|{err: Error})\n * Returning true means that this predicate passes and the item is okay to go on the queue\n * Returning false means do not add the item to the queue, but it is not an error\n * Returning {err: Error} means do not add the item to the queue, and the given error explains why\n * Returning {err: undefined} is equivalent to returning true but don't do that\n */\nQueue.prototype.addPredicate = function(predicate) {\n if (_.isFunction(predicate)) {\n this.predicates.push(predicate);\n }\n return this;\n};\n\nQueue.prototype.addPendingItem = function(item) {\n this.pendingItems.push(item);\n};\n\nQueue.prototype.removePendingItem = function(item) {\n var idx = this.pendingItems.indexOf(item);\n if (idx !== -1) {\n this.pendingItems.splice(idx, 1);\n }\n};\n\n/*\n * addItem - Send an item to the Rollbar API if all of the predicates are satisfied\n *\n * @param item - The payload to send to the backend\n * @param callback - function(error, repsonse) which will be called with the response from the API\n * in the case of a success, otherwise response will be null and error will have a value. If both\n * error and response are null then the item was stopped by a predicate which did not consider this\n * to be an error condition, but nonetheless did not send the item to the API.\n * @param originalError - The original error before any transformations that is to be logged if any\n */\nQueue.prototype.addItem = function(item, callback, originalError, originalItem) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() { return; };\n }\n var predicateResult = this._applyPredicates(item);\n if (predicateResult.stop) {\n this.removePendingItem(originalItem);\n callback(predicateResult.err);\n return;\n }\n this._maybeLog(item, originalError);\n this.removePendingItem(originalItem);\n if (!this.options.transmit) {\n callback(new Error('Transmit disabled'));\n return;\n }\n this.pendingRequests.push(item);\n try {\n this._makeApiRequest(item, function(err, resp) {\n this._dequeuePendingRequest(item);\n callback(err, resp);\n }.bind(this));\n } catch (e) {\n this._dequeuePendingRequest(item);\n callback(e);\n }\n};\n\n/*\n * wait - Stop any further errors from being added to the queue, and get called back when all items\n * currently processing have finished sending to the backend.\n *\n * @param callback - function() called when all pending items have been sent\n */\nQueue.prototype.wait = function(callback) {\n if (!_.isFunction(callback)) {\n return;\n }\n this.waitCallback = callback;\n if (this._maybeCallWait()) {\n return;\n }\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitIntervalID = setInterval(function() {\n this._maybeCallWait();\n }.bind(this), 500);\n};\n\n/* _applyPredicates - Sequentially applies the predicates that have been added to the queue to the\n * given item with the currently configured options.\n *\n * @param item - An item in the queue\n * @returns {stop: bool, err: (Error|null)} - stop being true means do not add item to the queue,\n * the error value should be passed up to a callbak if we are stopping.\n */\nQueue.prototype._applyPredicates = function(item) {\n var p = null;\n for (var i = 0, len = this.predicates.length; i < len; i++) {\n p = this.predicates[i](item, this.options);\n if (!p || p.err !== undefined) {\n return {stop: true, err: p.err};\n }\n }\n return {stop: false, err: null};\n};\n\n/*\n * _makeApiRequest - Send an item to Rollbar, callback when done, if there is an error make an\n * effort to retry if we are configured to do so.\n *\n * @param item - an item ready to send to the backend\n * @param callback - function(err, response)\n */\nQueue.prototype._makeApiRequest = function(item, callback) {\n var rateLimitResponse = this.rateLimiter.shouldSend(item);\n if (rateLimitResponse.shouldSend) {\n this.api.postItem(item, function(err, resp) {\n if (err) {\n this._maybeRetry(err, item, callback);\n } else {\n callback(err, resp);\n }\n }.bind(this));\n } else if (rateLimitResponse.error) {\n callback(rateLimitResponse.error);\n } else {\n this.api.postItem(rateLimitResponse.payload, callback);\n }\n};\n\n// These are errors basically mean there is no internet connection\nvar RETRIABLE_ERRORS = ['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED', 'EHOSTUNREACH', 'EPIPE', 'EAI_AGAIN'];\n\n/*\n * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback\n * with the error.\n *\n * @param err - an error returned by the API transport\n * @param item - the item that was trying to be sent when this error occured\n * @param callback - function(err, response)\n */\nQueue.prototype._maybeRetry = function(err, item, callback) {\n var shouldRetry = false;\n if (this.options.retryInterval) {\n for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {\n if (err.code === RETRIABLE_ERRORS[i]) {\n shouldRetry = true;\n break;\n }\n }\n if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {\n item.retries = item.retries ? item.retries + 1 : 1;\n if (item.retries > this.options.maxRetries) {\n shouldRetry = false;\n }\n }\n }\n if (shouldRetry) {\n this._retryApiRequest(item, callback);\n } else {\n callback(err);\n }\n};\n\n/*\n * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process\n * that queue based on the retryInterval in the options for this queue.\n *\n * @param item - an item that failed to send due to an error we deem retriable\n * @param callback - function(err, response)\n */\nQueue.prototype._retryApiRequest = function(item, callback) {\n this.retryQueue.push({item: item, callback: callback});\n\n if (!this.retryHandle) {\n this.retryHandle = setInterval(function() {\n while (this.retryQueue.length) {\n var retryObject = this.retryQueue.shift();\n this._makeApiRequest(retryObject.item, retryObject.callback);\n }\n }.bind(this), this.options.retryInterval);\n }\n};\n\n/*\n * _dequeuePendingRequest - Removes the item from the pending request queue, this queue is used to\n * enable to functionality of providing a callback that clients can pass to `wait` to be notified\n * when the pending request queue has been emptied. This must be called when the API finishes\n * processing this item. If a `wait` callback is configured, it is called by this function.\n *\n * @param item - the item previously added to the pending request queue\n */\nQueue.prototype._dequeuePendingRequest = function(item) {\n var idx = this.pendingRequests.indexOf(item);\n if (idx !== -1) {\n this.pendingRequests.splice(idx, 1);\n this._maybeCallWait();\n }\n};\n\nQueue.prototype._maybeLog = function(data, originalError) {\n if (this.logger && this.options.verbose) {\n var message = originalError;\n message = message || _.get(data, 'body.trace.exception.message');\n message = message || _.get(data, 'body.trace_chain.0.exception.message');\n if (message) {\n this.logger.error(message);\n return;\n }\n message = _.get(data, 'body.message.body');\n if (message) {\n this.logger.log(message);\n }\n }\n};\n\nQueue.prototype._maybeCallWait = function() {\n if (_.isFunction(this.waitCallback) && this.pendingItems.length === 0 && this.pendingRequests.length === 0) {\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitCallback();\n return true;\n }\n return false;\n};\n\nmodule.exports = Queue;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Notifier - the internal object responsible for delegating between the client exposed API, the\n * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the\n * queue which handles the communcation with the Rollbar API servers.\n *\n * @param queue - an object that conforms to the interface: addItem(item, callback)\n * @param options - an object representing the options to be set for this notifier, this should have\n * any defaults already set by the caller\n */\nfunction Notifier(queue, options) {\n this.queue = queue;\n this.options = options;\n this.transforms = [];\n this.diagnostic = {};\n}\n\n/*\n * configure - updates the options for this notifier with the passed in object\n *\n * @param options - an object which gets merged with the current options set on this notifier\n * @returns this\n */\nNotifier.prototype.configure = function(options) {\n this.queue && this.queue.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addTransform - adds a transform onto the end of the queue of transforms for this notifier\n *\n * @param transform - a function which takes three arguments:\n * * item: An Object representing the data to eventually be sent to Rollbar\n * * options: The current value of the options for this notifier\n * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this\n * callback with a null value for error if it wants the processing chain to continue, otherwise\n * with an error to terminate the processing. The item should be the updated item after this\n * transform is finished modifying it.\n */\nNotifier.prototype.addTransform = function(transform) {\n if (_.isFunction(transform)) {\n this.transforms.push(transform);\n }\n return this;\n};\n\n/*\n * log - the internal log function which applies the configured transforms and then pushes onto the\n * queue to be sent to the backend.\n *\n * @param item - An object with the following structure:\n * message [String] - An optional string to be sent to rollbar\n * error [Error] - An optional error\n *\n * @param callback - A function of type function(err, resp) which will be called with exactly one\n * null argument and one non-null argument. The callback will be called once, either during the\n * transform stage if an error occurs inside a transform, or in response to the communication with\n * the backend. The second argument will be the response from the backend in case of success.\n */\nNotifier.prototype.log = function(item, callback) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!this.options.enabled) {\n return callback(new Error('Rollbar is not enabled'));\n }\n\n this.queue.addPendingItem(item);\n var originalError = item.err;\n this._applyTransforms(item, function(err, i) {\n if (err) {\n this.queue.removePendingItem(item);\n return callback(err, null);\n }\n this.queue.addItem(i, callback, originalError, item);\n }.bind(this));\n};\n\n/* Internal */\n\n/*\n * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See\n * `addTransform` for more information.\n *\n * @param item - An item to be transformed\n * @param callback - A function of type function(err, item) which will be called with a non-null\n * error and a null item in the case of a transform failure, or a null error and non-null item after\n * all transforms have been applied.\n */\nNotifier.prototype._applyTransforms = function(item, callback) {\n var transformIndex = -1;\n var transformsLength = this.transforms.length;\n var transforms = this.transforms;\n var options = this.options;\n\n var cb = function(err, i) {\n if (err) {\n callback(err, null);\n return;\n }\n\n transformIndex++;\n\n if (transformIndex === transformsLength) {\n callback(null, i);\n return;\n }\n\n transforms[transformIndex](i, options, cb);\n };\n\n cb(null, item);\n};\n\nmodule.exports = Notifier;\n","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1/item/',\n search: null,\n version: '1',\n protocol: 'https:',\n port: 443\n};\n\n/**\n * Api is an object that encapsulates methods of communicating with\n * the Rollbar API. It is a standard interface with some parts implemented\n * differently for server or browser contexts. It is an object that should\n * be instantiated when used so it can contain non-global options that may\n * be different for another instance of RollbarApi.\n *\n * @param options {\n * accessToken: the accessToken to use for posting items to rollbar\n * endpoint: an alternative endpoint to send errors to\n * must be a valid, fully qualified URL.\n * The default is: https://api.rollbar.com/api/1/item\n * proxy: if you wish to proxy requests provide an object\n * with the following keys:\n * host or hostname (required): foo.example.com\n * port (optional): 123\n * protocol (optional): https\n * }\n */\nfunction Api(options, transport, urllib, truncation, jsonBackup) {\n this.options = options;\n this.transport = transport;\n this.url = urllib;\n this.truncation = truncation;\n this.jsonBackup = jsonBackup;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, urllib);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function(data, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n this.transport.post(this.accessToken, transportOptions, payload, callback);\n};\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.buildJsonPayload = function(data, callback) {\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n\n if (stringifyResult.error) {\n if (callback) {\n callback(stringifyResult.error);\n }\n return null;\n }\n\n return stringifyResult.value;\n};\n\n/**\n *\n * @param jsonPayload\n * @param callback\n */\nApi.prototype.postJsonPayload = function(jsonPayload, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n this.transport.postJsonPayload(this.accessToken, transportOptions, jsonPayload, callback);\n};\n\nApi.prototype.configure = function(options) {\n var oldOptions = this.oldOptions;\n this.options = _.merge(oldOptions, options);\n this.transportOptions = _getTransport(this.options, this.url);\n if (this.options.accessToken !== undefined) {\n this.accessToken = this.options.accessToken;\n }\n return this;\n};\n\nfunction _getTransport(options, url) {\n return helpers.getTransportFromOptions(options, defaultOptions, url);\n}\n\nmodule.exports = Api;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (!_.isType(data.context, 'string')) {\n var contextResult = _.stringify(data.context, jsonBackup);\n if (contextResult.error) {\n data.context = 'Error: could not serialize \\'context\\'';\n } else {\n data.context = contextResult.value || '';\n }\n if (data.context.length > 255) {\n data.context = data.context.substr(0, 255);\n }\n }\n return {\n access_token: accessToken,\n data: data\n };\n}\n\nfunction getTransportFromOptions(options, defaults, url) {\n var hostname = defaults.hostname;\n var protocol = defaults.protocol;\n var port = defaults.port;\n var path = defaults.path;\n var search = defaults.search;\n var timeout = options.timeout;\n\n var proxy = options.proxy;\n if (options.endpoint) {\n var opts = url.parse(options.endpoint);\n hostname = opts.hostname;\n protocol = opts.protocol;\n port = opts.port;\n path = opts.pathname;\n search = opts.search;\n }\n return {\n timeout: timeout,\n hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy\n };\n}\n\nfunction transportOptions(transport, method) {\n var protocol = transport.protocol || 'https:';\n var port = transport.port || (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);\n var hostname = transport.hostname;\n var path = transport.path;\n var timeout = transport.timeout;\n if (transport.search) {\n path = path + transport.search;\n }\n if (transport.proxy) {\n path = protocol + '//' + hostname + path;\n hostname = transport.proxy.host || transport.proxy.hostname;\n port = transport.proxy.port;\n protocol = transport.proxy.protocol || protocol;\n }\n return {\n timeout: timeout,\n protocol: protocol,\n hostname: hostname,\n path: path,\n port: port,\n method: method\n };\n}\n\nfunction appendPathToPath(base, path) {\n var baseTrailingSlash = /\\/$/.test(base);\n var pathBeginningSlash = /^\\//.test(path);\n\n if (baseTrailingSlash && pathBeginningSlash) {\n path = path.substring(1);\n } else if (!baseTrailingSlash && !pathBeginningSlash) {\n path = '/' + path;\n }\n\n return base + path;\n}\n\nmodule.exports = {\n buildPayload: buildPayload,\n getTransportFromOptions: getTransportFromOptions,\n transportOptions: transportOptions,\n appendPathToPath: appendPathToPath\n};\n","// Console-polyfill. MIT license.\n// https://github.com/paulmillr/console-polyfill\n// Make it safe to do console.log() always.\n(function(global) {\n 'use strict';\n if (!global.console) {\n global.console = {};\n }\n var con = global.console;\n var prop, method;\n var dummy = function() {};\n var properties = ['memory'];\n var methods = ('assert,clear,count,debug,dir,dirxml,error,exception,group,' +\n 'groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,' +\n 'show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn').split(',');\n while (prop = properties.pop()) if (!con[prop]) con[prop] = {};\n while (method = methods.pop()) if (!con[method]) con[method] = dummy;\n // Using `this` for web workers & supports Browserify / Webpack.\n})(typeof window === 'undefined' ? this : window);\n","'use strict';\n\n// This detection.js module is used to encapsulate any ugly browser/feature\n// detection we may need to do.\n\n// Figure out which version of IE we're using, if any.\n// This is gleaned from http://stackoverflow.com/questions/5574842/best-way-to-check-for-ie-less-than-9-in-javascript-without-library\n// Will return an integer on IE (i.e. 8)\n// Will return undefined otherwise\nfunction getIEVersion() {\n\tvar undef;\n\tif (typeof document === 'undefined') {\n\t\treturn undef;\n\t}\n\n var v = 3,\n div = document.createElement('div'),\n all = div.getElementsByTagName('i');\n\n while (\n div.innerHTML = '',\n all[0]\n );\n\n return v > 4 ? v : undef;\n}\n\nvar Detection = {\n ieVersion: getIEVersion\n};\n\nmodule.exports = Detection;\n","'use strict';\n\nfunction captureUncaughtExceptions(window, handler, shim) {\n if (!window) { return; }\n var oldOnError;\n\n if (typeof handler._rollbarOldOnError === 'function') {\n oldOnError = handler._rollbarOldOnError;\n } else if (window.onerror) {\n oldOnError = window.onerror;\n while (oldOnError._rollbarOldOnError) {\n oldOnError = oldOnError._rollbarOldOnError;\n }\n handler._rollbarOldOnError = oldOnError;\n }\n\n handler.handleAnonymousErrors();\n\n var fn = function() {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n if (shim) {\n fn._rollbarOldOnError = oldOnError;\n }\n window.onerror = fn;\n}\n\nfunction _rollbarWindowOnError(window, r, old, args) {\n if (window._rollbarWrappedError) {\n if (!args[4]) {\n args[4] = window._rollbarWrappedError;\n }\n if (!args[5]) {\n args[5] = window._rollbarWrappedError._rollbarContext;\n }\n window._rollbarWrappedError = null;\n }\n\n var ret = r.handleUncaughtException.apply(r, args);\n\n if (old) {\n old.apply(window, args);\n }\n\n // Let other chained onerror handlers above run before setting this.\n // If an error is thrown and caught within a chained onerror handler,\n // Error.prepareStackTrace() will see that one before the one we want.\n if (ret === 'anonymous') {\n r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()\n }\n}\n\nfunction captureUnhandledRejections(window, handler, shim) {\n if (!window) { return; }\n\n if (typeof window._rollbarURH === 'function' && window._rollbarURH.belongsToShim) {\n window.removeEventListener('unhandledrejection', window._rollbarURH);\n }\n\n var rejectionHandler = function (evt) {\n var reason, promise, detail;\n try {\n reason = evt.reason;\n } catch (e) {\n reason = undefined;\n }\n try {\n promise = evt.promise;\n } catch (e) {\n promise = '[unhandledrejection] error getting `promise` from event';\n }\n try {\n detail = evt.detail;\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\n }\n } catch (e) {\n // Ignore\n }\n if (!reason) {\n reason = '[unhandledrejection] error getting `reason` from event';\n }\n\n if (handler && handler.handleUnhandledRejection) {\n handler.handleUnhandledRejection(reason, promise);\n }\n };\n rejectionHandler.belongsToShim = shim;\n window._rollbarURH = rejectionHandler;\n window.addEventListener('unhandledrejection', rejectionHandler);\n}\n\n\nmodule.exports = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections\n};\n","'use strict';\n\n/*global XDomainRequest*/\n\nvar _ = require('../utility');\nvar logger = require('./logger');\n\n/*\n * accessToken may be embedded in payload but that should not\n * be assumed\n *\n * options: {\n * hostname\n * protocol\n * path\n * port\n * method\n * }\n *\n * params is an object containing key/value pairs. These\n * will be appended to the path as 'key=value&key=value'\n *\n * payload is an unserialized object\n */\nfunction Transport(truncation) {\n this.truncation = truncation;\n}\n\nTransport.prototype.get = function(accessToken, options, params, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n _.addParamsAndAccessTokenToPath(accessToken, options, params);\n\n var method = 'GET';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, null, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.post = function(accessToken, options, payload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!payload) {\n return callback(new Error('Cannot send empty request'));\n }\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n if (stringifyResult.error) {\n return callback(stringifyResult.error);\n }\n\n var writeData = stringifyResult.value;\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, writeData, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.postJsonPayload = function (accessToken, options, jsonPayload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, jsonPayload, callback, requestFactory, options.timeout);\n}\n\n\n// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope\n// so Angular change detection isn't triggered on each API call.\n// This is the equivalent of runOutsideAngular().\n//\nfunction _makeZoneRequest() {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;\n var args = Array.prototype.slice.call(arguments);\n\n if (currentZone && currentZone._name === 'angular') {\n var rootZone = currentZone._parent;\n rootZone.run(function () {\n _makeRequest.apply(undefined, args);\n });\n } else {\n _makeRequest.apply(undefined, args);\n }\n}\n\n/* global RollbarProxy */\nfunction _proxyRequest(json, callback) {\n var rollbarProxy = new RollbarProxy();\n rollbarProxy.sendJsonPayload(\n json,\n function(_msg) { /* do nothing */ }, // eslint-disable-line no-unused-vars\n function(err) {\n callback(new Error(err));\n }\n );\n}\n\nfunction _makeRequest(accessToken, url, method, data, callback, requestFactory, timeout) {\n if (typeof RollbarProxy !== 'undefined') {\n return _proxyRequest(data, callback);\n }\n\n var request;\n if (requestFactory) {\n request = requestFactory();\n } else {\n request = _createXMLHTTPObject();\n }\n if (!request) {\n // Give up, no way to send requests\n return callback(new Error('No way to send a request'));\n }\n try {\n try {\n var onreadystatechange = function() {\n try {\n if (onreadystatechange && request.readyState === 4) {\n onreadystatechange = undefined;\n\n var parseResponse = _.jsonParse(request.responseText);\n if (_isSuccess(request)) {\n callback(parseResponse.error, parseResponse.value);\n return;\n } else if (_isNormalFailure(request)) {\n if (request.status === 403) {\n // likely caused by using a server access token\n var message = parseResponse.value && parseResponse.value.message;\n logger.error(message);\n }\n // return valid http status codes\n callback(new Error(String(request.status)));\n } else {\n // IE will return a status 12000+ on some sort of connection failure,\n // so we return a blank error\n // http://msdn.microsoft.com/en-us/library/aa383770%28VS.85%29.aspx\n var msg = 'XHR response had no status code (likely connection failure)';\n callback(_newRetriableError(msg));\n }\n }\n } catch (ex) {\n //jquery source mentions firefox may error out while accessing the\n //request members if there is a network error\n //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111\n var exc;\n if (ex && ex.stack) {\n exc = ex;\n } else {\n exc = new Error(ex);\n }\n callback(exc);\n }\n };\n\n request.open(method, url, true);\n if (request.setRequestHeader) {\n request.setRequestHeader('Content-Type', 'application/json');\n request.setRequestHeader('X-Rollbar-Access-Token', accessToken);\n }\n\n if(_.isFiniteNumber(timeout)) {\n request.timeout = timeout;\n }\n\n request.onreadystatechange = onreadystatechange;\n request.send(data);\n } catch (e1) {\n // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest\n if (typeof XDomainRequest !== 'undefined') {\n\n // Assume we are in a really old browser which has a bunch of limitations:\n // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx\n\n // Extreme paranoia: if we have XDomainRequest then we have a window, but just in case\n if (!window || !window.location) {\n return callback(new Error('No window available during request, unknown environment'));\n }\n\n // If the current page is http, try and send over http\n if (window.location.href.substring(0, 5) === 'http:' && url.substring(0, 5) === 'https') {\n url = 'http' + url.substring(5);\n }\n\n var xdomainrequest = new XDomainRequest();\n xdomainrequest.onprogress = function() {};\n xdomainrequest.ontimeout = function() {\n var msg = 'Request timed out';\n var code = 'ETIMEDOUT';\n callback(_newRetriableError(msg, code));\n };\n xdomainrequest.onerror = function() {\n callback(new Error('Error during request'));\n };\n xdomainrequest.onload = function() {\n var parseResponse = _.jsonParse(xdomainrequest.responseText);\n callback(parseResponse.error, parseResponse.value);\n };\n xdomainrequest.open(method, url, true);\n xdomainrequest.send(data);\n } else {\n callback(new Error('Cannot find a method to transport a request'));\n }\n }\n } catch (e2) {\n callback(e2);\n }\n}\n\nfunction _createXMLHTTPObject() {\n /* global ActiveXObject:false */\n\n var factories = [\n function () {\n return new XMLHttpRequest();\n },\n function () {\n return new ActiveXObject('Msxml2.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Msxml3.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Microsoft.XMLHTTP');\n }\n ];\n var xmlhttp;\n var i;\n var numFactories = factories.length;\n for (i = 0; i < numFactories; i++) {\n /* eslint-disable no-empty */\n try {\n xmlhttp = factories[i]();\n break;\n } catch (e) {\n // pass\n }\n /* eslint-enable no-empty */\n }\n return xmlhttp;\n}\n\nfunction _isSuccess(r) {\n return r && r.status && r.status === 200;\n}\n\nfunction _isNormalFailure(r) {\n return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;\n}\n\nfunction _newRetriableError(message, code) {\n var err = new Error(message);\n err.code = code || 'ENOTFOUND';\n return err;\n}\n\nmodule.exports = Transport;\n","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('../errorParser');\nvar logger = require('./logger');\n\nfunction handleDomException(item, options, callback) {\n if(item.err && errorParser.Stack(item.err).name === 'DOMException') {\n var originalError = new Error();\n originalError.name = item.err.name;\n originalError.message = item.err.message;\n originalError.stack = item.err.stack;\n originalError.nested = item.err;\n item.err = originalError;\n }\n callback(null, item);\n}\n\nfunction handleItemWithError(item, options, callback) {\n item.data = item.data || {};\n if (item.err) {\n try {\n item.stackInfo = item.err._savedStackTrace || errorParser.parse(item.err, item.skipFrames);\n\n if (options.addErrorContext) {\n addErrorContext(item);\n }\n } catch (e) {\n logger.error('Error while parsing the error object.', e);\n try {\n item.message = item.err.message || item.err.description || item.message || String(item.err);\n } catch (e2) {\n item.message = String(item.err) || String(e2);\n }\n delete item.err;\n }\n }\n callback(null, item);\n}\n\nfunction addErrorContext(item) {\n var chain = [];\n var err = item.err;\n\n chain.push(err);\n\n while (err.nested) {\n err = err.nested;\n chain.push(err);\n }\n\n _.addErrorContext(item, chain);\n}\n\nfunction ensureItemHasSomethingToSay(item, options, callback) {\n if (!item.message && !item.stackInfo && !item.custom) {\n callback(new Error('No message, stack info, or custom data'), null);\n }\n callback(null, item);\n}\n\nfunction addBaseInfo(item, options, callback) {\n var environment = (options.payload && options.payload.environment) || options.environment;\n item.data = _.merge(item.data, {\n environment: environment,\n level: item.level,\n endpoint: options.endpoint,\n platform: 'browser',\n framework: 'browser-js',\n language: 'javascript',\n server: {},\n uuid: item.uuid,\n notifier: {\n name: 'rollbar-browser-js',\n version: options.version\n },\n custom: item.custom\n });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.location) {\n return callback(null, item);\n }\n var remoteString = '$remote_ip';\n if (!options.captureIp) {\n remoteString = null;\n } else if (options.captureIp !== true) {\n remoteString += '_anonymize';\n }\n _.set(item, 'data.request', {\n url: window.location.href,\n query_string: window.location.search,\n user_ip: remoteString\n });\n callback(null, item);\n };\n}\n\nfunction addClientInfo(window) {\n return function(item, options, callback) {\n if (!window) {\n return callback(null, item);\n }\n var nav = window.navigator || {};\n var scr = window.screen || {};\n _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: nav.userAgent,\n language: nav.language,\n cookie_enabled: nav.cookieEnabled,\n screen: {\n width: scr.width,\n height: scr.height\n }\n }\n });\n callback(null, item);\n };\n}\n\nfunction addPluginInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.navigator) {\n return callback(null, item);\n }\n var plugins = [];\n var navPlugins = window.navigator.plugins || [];\n var cur;\n for (var i=0, l=navPlugins.length; i < l; ++i) {\n cur = navPlugins[i];\n plugins.push({name: cur.name, description: cur.description});\n }\n _.set(item, 'data.client.javascript.plugins', plugins);\n callback(null, item);\n };\n}\n\nfunction addBody(item, options, callback) {\n if (item.stackInfo) {\n if (item.stackInfo.traceChain) {\n addBodyTraceChain(item, options, callback);\n } else {\n addBodyTrace(item, options, callback);\n }\n } else {\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction addBodyMessage(item, options, callback) {\n var message = item.message;\n var custom = item.custom;\n\n if (!message) {\n message = 'Item sent with null or missing arguments.';\n }\n var result = {\n body: message\n };\n\n if (custom) {\n result.extra = _.merge(custom);\n }\n\n _.set(item, 'data.body', {message: result});\n callback(null, item);\n}\n\nfunction stackFromItem(item) {\n // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = item.stackInfo.stack;\n if (stack && stack.length === 0 && item._unhandledStackInfo && item._unhandledStackInfo.stack) {\n stack = item._unhandledStackInfo.stack;\n }\n return stack;\n}\n\nfunction addBodyTraceChain(item, options, callback) {\n var traceChain = item.stackInfo.traceChain;\n var traces = [];\n\n var traceChainLength = traceChain.length;\n for (var i = 0; i < traceChainLength; i++) {\n var trace = buildTrace(item, traceChain[i], options);\n traces.push(trace);\n }\n\n _.set(item, 'data.body', {trace_chain: traces});\n callback(null, item);\n}\n\nfunction addBodyTrace(item, options, callback) {\n var stack = stackFromItem(item);\n\n if (stack) {\n var trace = buildTrace(item, item.stackInfo, options);\n _.set(item, 'data.body', {trace: trace});\n callback(null, item);\n } else {\n var stackInfo = item.stackInfo;\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction buildTrace(item, stackInfo, options) {\n var description = item && item.data.description;\n var custom = item && item.custom;\n var stack = stackFromItem(item);\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n var trace = {\n exception: {\n 'class': className,\n message: message\n }\n };\n\n if (description) {\n trace.exception.description = description;\n }\n\n if (stack) {\n if (stack.length === 0) {\n trace.exception.stack = stackInfo.rawStack;\n trace.exception.raw = String(stackInfo.rawException);\n }\n var stackFrame;\n var frame;\n var code;\n var pre;\n var post;\n var contextLength;\n var i, mid;\n\n trace.frames = [];\n for (i = 0; i < stack.length; ++i) {\n stackFrame = stack[i];\n frame = {\n filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',\n lineno: stackFrame.line || null,\n method: (!stackFrame.func || stackFrame.func === '?') ? '[anonymous]' : stackFrame.func,\n colno: stackFrame.column\n };\n if (options.sendFrameUrl) {\n frame.url = stackFrame.url;\n }\n if (frame.method && frame.method.endsWith && frame.method.endsWith('_rollbar_wrapped')) {\n continue;\n }\n\n code = pre = post = null;\n contextLength = stackFrame.context ? stackFrame.context.length : 0;\n if (contextLength) {\n mid = Math.floor(contextLength / 2);\n pre = stackFrame.context.slice(0, mid);\n code = stackFrame.context[mid];\n post = stackFrame.context.slice(mid);\n }\n\n if (code) {\n frame.code = code;\n }\n\n if (pre || post) {\n frame.context = {};\n if (pre && pre.length) {\n frame.context.pre = pre;\n }\n if (post && post.length) {\n frame.context.post = post;\n }\n }\n\n if (stackFrame.args) {\n frame.args = stackFrame.args;\n }\n\n trace.frames.push(frame);\n }\n\n // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last\n trace.frames.reverse();\n\n if (custom) {\n trace.extra = _.merge(custom);\n }\n }\n\n return trace;\n}\n\nfunction errorClass(stackInfo, guess, options) {\n if (stackInfo.name) {\n return stackInfo.name;\n } else if (options.guessErrorClass) {\n return guess;\n } else {\n return '(unknown)';\n }\n}\n\nfunction addScrubber(scrubFn) {\n return function (item, options, callback) {\n if (scrubFn) {\n var scrubFields = options.scrubFields || [];\n var scrubPaths = options.scrubPaths || [];\n item.data = scrubFn(item.data, scrubFields, scrubPaths);\n }\n callback(null, item);\n }\n}\n\nmodule.exports = {\n handleDomException: handleDomException,\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n addScrubber: addScrubber\n};\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('error-stack-parser', ['stackframe'], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory(require('stackframe'));\n } else {\n root.ErrorStackParser = factory(root.StackFrame);\n }\n}(this, function ErrorStackParser(StackFrame) {\n 'use strict';\n\n var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\\S+:\\d+/;\n var CHROME_IE_STACK_REGEXP = /^\\s*at .*(\\S+:\\d+|\\(native\\))/m;\n var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\\[native code])?$/;\n\n return {\n /**\n * Given an Error object, extract the most information from it.\n *\n * @param {Error} error object\n * @return {Array} of StackFrames\n */\n parse: function ErrorStackParser$$parse(error) {\n if (typeof error.stacktrace !== 'undefined' || typeof error['opera#sourceloc'] !== 'undefined') {\n return this.parseOpera(error);\n } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {\n return this.parseV8OrIE(error);\n } else if (error.stack) {\n return this.parseFFOrSafari(error);\n } else {\n throw new Error('Cannot parse given Error object');\n }\n },\n\n // Separate line and column numbers from a string of the form: (URI:Line:Column)\n extractLocation: function ErrorStackParser$$extractLocation(urlLike) {\n // Fail-fast but return locations like \"(native)\"\n if (urlLike.indexOf(':') === -1) {\n return [urlLike];\n }\n\n var regExp = /(.+?)(?::(\\d+))?(?::(\\d+))?$/;\n var parts = regExp.exec(urlLike.replace(/[()]/g, ''));\n return [parts[1], parts[2] || undefined, parts[3] || undefined];\n },\n\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(CHROME_IE_STACK_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n if (line.indexOf('(eval ') > -1) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n line = line.replace(/eval code/g, 'eval').replace(/(\\(eval at [^()]*)|(\\),.*$)/g, '');\n }\n var sanitizedLine = line.replace(/^\\s+/, '').replace(/\\(eval code/g, '(');\n\n // capture and preseve the parenthesized location \"(/foo/my bar.js:12:87)\" in\n // case it has spaces in it, as the string is split on \\s+ later on\n var location = sanitizedLine.match(/ (\\((.+):(\\d+):(\\d+)\\)$)/);\n\n // remove the parenthesized location from the line, if it was matched\n sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;\n\n var tokens = sanitizedLine.split(/\\s+/).slice(1);\n // if a location was matched, pass it to extractLocation() otherwise pop the last token\n var locationParts = this.extractLocation(location ? location[1] : tokens.pop());\n var functionName = tokens.join(' ') || undefined;\n var fileName = ['eval', ''].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];\n\n return new StackFrame({\n functionName: functionName,\n fileName: fileName,\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n },\n\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n if (line.indexOf(' > eval') > -1) {\n line = line.replace(/ line (\\d+)(?: > eval line \\d+)* > eval:\\d+:\\d+/g, ':$1');\n }\n\n if (line.indexOf('@') === -1 && line.indexOf(':') === -1) {\n // Safari eval frames only have function names and nothing else\n return new StackFrame({\n functionName: line\n });\n } else {\n var functionNameRegex = /((.*\".+\"[^@]*)?[^@]*)(?:@)/;\n var matches = line.match(functionNameRegex);\n var functionName = matches && matches[1] ? matches[1] : undefined;\n var locationParts = this.extractLocation(line.replace(functionNameRegex, ''));\n\n return new StackFrame({\n functionName: functionName,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }\n }, this);\n },\n\n parseOpera: function ErrorStackParser$$parseOpera(e) {\n if (!e.stacktrace || (e.message.indexOf('\\n') > -1 &&\n e.message.split('\\n').length > e.stacktrace.split('\\n').length)) {\n return this.parseOpera9(e);\n } else if (!e.stack) {\n return this.parseOpera10(e);\n } else {\n return this.parseOpera11(e);\n }\n },\n\n parseOpera9: function ErrorStackParser$$parseOpera9(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)/i;\n var lines = e.message.split('\\n');\n var result = [];\n\n for (var i = 2, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(new StackFrame({\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n }));\n }\n }\n\n return result;\n },\n\n parseOpera10: function ErrorStackParser$$parseOpera10(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)(?:: In function (\\S+))?$/i;\n var lines = e.stacktrace.split('\\n');\n var result = [];\n\n for (var i = 0, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(\n new StackFrame({\n functionName: match[3] || undefined,\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n })\n );\n }\n }\n\n return result;\n },\n\n // Opera 10.65+ Error.stack very similar to FF/Safari\n parseOpera11: function ErrorStackParser$$parseOpera11(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);\n }, this);\n\n return filtered.map(function(line) {\n var tokens = line.split('@');\n var locationParts = this.extractLocation(tokens.pop());\n var functionCall = (tokens.shift() || '');\n var functionName = functionCall\n .replace(//, '$2')\n .replace(/\\([^)]*\\)/g, '') || undefined;\n var argsRaw;\n if (functionCall.match(/\\(([^)]*)\\)/)) {\n argsRaw = functionCall.replace(/^[^(]+\\(([^)]*)\\)$/, '$1');\n }\n var args = (argsRaw === undefined || argsRaw === '[arguments not available]') ?\n undefined : argsRaw.split(',');\n\n return new StackFrame({\n functionName: functionName,\n args: args,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n }\n };\n}));\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('stackframe', [], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.StackFrame = factory();\n }\n}(this, function() {\n 'use strict';\n function _isNumber(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n }\n\n function _capitalize(str) {\n return str.charAt(0).toUpperCase() + str.substring(1);\n }\n\n function _getter(p) {\n return function() {\n return this[p];\n };\n }\n\n var booleanProps = ['isConstructor', 'isEval', 'isNative', 'isToplevel'];\n var numericProps = ['columnNumber', 'lineNumber'];\n var stringProps = ['fileName', 'functionName', 'source'];\n var arrayProps = ['args'];\n var objectProps = ['evalOrigin'];\n\n var props = booleanProps.concat(numericProps, stringProps, arrayProps, objectProps);\n\n function StackFrame(obj) {\n if (!obj) return;\n for (var i = 0; i < props.length; i++) {\n if (obj[props[i]] !== undefined) {\n this['set' + _capitalize(props[i])](obj[props[i]]);\n }\n }\n }\n\n StackFrame.prototype = {\n getArgs: function() {\n return this.args;\n },\n setArgs: function(v) {\n if (Object.prototype.toString.call(v) !== '[object Array]') {\n throw new TypeError('Args must be an Array');\n }\n this.args = v;\n },\n\n getEvalOrigin: function() {\n return this.evalOrigin;\n },\n setEvalOrigin: function(v) {\n if (v instanceof StackFrame) {\n this.evalOrigin = v;\n } else if (v instanceof Object) {\n this.evalOrigin = new StackFrame(v);\n } else {\n throw new TypeError('Eval Origin must be an Object or StackFrame');\n }\n },\n\n toString: function() {\n var fileName = this.getFileName() || '';\n var lineNumber = this.getLineNumber() || '';\n var columnNumber = this.getColumnNumber() || '';\n var functionName = this.getFunctionName() || '';\n if (this.getIsEval()) {\n if (fileName) {\n return '[eval] (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return '[eval]:' + lineNumber + ':' + columnNumber;\n }\n if (functionName) {\n return functionName + ' (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return fileName + ':' + lineNumber + ':' + columnNumber;\n }\n };\n\n StackFrame.fromString = function StackFrame$$fromString(str) {\n var argsStartIndex = str.indexOf('(');\n var argsEndIndex = str.lastIndexOf(')');\n\n var functionName = str.substring(0, argsStartIndex);\n var args = str.substring(argsStartIndex + 1, argsEndIndex).split(',');\n var locationString = str.substring(argsEndIndex + 1);\n\n if (locationString.indexOf('@') === 0) {\n var parts = /@(.+?)(?::(\\d+))?(?::(\\d+))?$/.exec(locationString, '');\n var fileName = parts[1];\n var lineNumber = parts[2];\n var columnNumber = parts[3];\n }\n\n return new StackFrame({\n functionName: functionName,\n args: args || undefined,\n fileName: fileName,\n lineNumber: lineNumber || undefined,\n columnNumber: columnNumber || undefined\n });\n };\n\n for (var i = 0; i < booleanProps.length; i++) {\n StackFrame.prototype['get' + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);\n StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function(p) {\n return function(v) {\n this[p] = Boolean(v);\n };\n })(booleanProps[i]);\n }\n\n for (var j = 0; j < numericProps.length; j++) {\n StackFrame.prototype['get' + _capitalize(numericProps[j])] = _getter(numericProps[j]);\n StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function(p) {\n return function(v) {\n if (!_isNumber(v)) {\n throw new TypeError(p + ' must be a Number');\n }\n this[p] = Number(v);\n };\n })(numericProps[j]);\n }\n\n for (var k = 0; k < stringProps.length; k++) {\n StackFrame.prototype['get' + _capitalize(stringProps[k])] = _getter(stringProps[k]);\n StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function(p) {\n return function(v) {\n this[p] = String(v);\n };\n })(stringProps[k]);\n }\n\n return StackFrame;\n}));\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction itemToPayload(item, options, callback) {\n var payloadOptions = options.payload || {};\n if (payloadOptions.body) {\n delete payloadOptions.body;\n }\n\n var data = _.merge(item.data, payloadOptions);\n if (item._isUncaught) {\n data._isUncaught = true;\n }\n if (item._originalArgs) {\n data._originalArgs = item._originalArgs;\n }\n callback(null, data);\n}\n\nfunction addTelemetryData(item, options, callback) {\n if (item.telemetryEvents) {\n _.set(item, 'data.body.telemetry', item.telemetryEvents);\n }\n callback(null, item);\n}\n\nfunction addMessageWithError(item, options, callback) {\n if (!item.message) {\n callback(null, item);\n return;\n }\n var tracePath = 'data.body.trace_chain.0';\n var trace = _.get(item, tracePath);\n if (!trace) {\n tracePath = 'data.body.trace';\n trace = _.get(item, tracePath);\n }\n if (trace) {\n if (!(trace.exception && trace.exception.description)) {\n _.set(item, tracePath+'.exception.description', item.message);\n callback(null, item);\n return;\n }\n var extra = _.get(item, tracePath+'.extra') || {};\n var newExtra = _.merge(extra, {message: item.message});\n _.set(item, tracePath+'.extra', newExtra);\n }\n callback(null, item);\n}\n\nfunction userTransform(logger) {\n return function(item, options, callback) {\n var newItem = _.merge(item);\n var response = null;\n try {\n if (_.isFunction(options.transform)) {\n response = options.transform(newItem.data, item);\n }\n } catch (e) {\n options.transform = null;\n logger.error('Error while calling custom transform() function. Removing custom transform().', e);\n callback(null, item);\n return;\n }\n if(_.isPromise(response)) {\n response.then(function (promisedItem) {\n if(promisedItem) {\n newItem.data = promisedItem;\n }\n callback(null, newItem);\n }, function (error) {\n callback(error, item);\n });\n } else {\n callback(null, newItem);\n }\n }\n}\n\nfunction addConfigToPayload(item, options, callback) {\n if (!options.sendConfig) {\n return callback(null, item);\n }\n var configKey = '_rollbarConfig';\n var custom = _.get(item, 'data.custom') || {};\n custom[configKey] = options;\n item.data.custom = custom;\n callback(null, item);\n}\n\nfunction addFunctionOption(options, name) {\n if(_.isFunction(options[name])) {\n options[name] = options[name].toString();\n }\n}\n\nfunction addConfiguredOptions(item, options, callback) {\n var configuredOptions = options._configuredOptions;\n\n // These must be stringified or they'll get dropped during serialization.\n addFunctionOption(configuredOptions, 'transform');\n addFunctionOption(configuredOptions, 'checkIgnore');\n addFunctionOption(configuredOptions, 'onSendCallback');\n\n delete configuredOptions.accessToken;\n item.data.notifier.configured_options = configuredOptions;\n callback(null, item);\n}\n\nfunction addDiagnosticKeys(item, options, callback) {\n var diagnostic = _.merge(item.notifier.client.notifier.diagnostic, item.diagnostic);\n\n if (_.get(item, 'err._isAnonymous')) {\n diagnostic.is_anonymous = true;\n }\n\n if (item._isUncaught) {\n diagnostic.is_uncaught = item._isUncaught;\n }\n\n if (item.err) {\n try {\n diagnostic.raw_error = {\n message: item.err.message,\n name: item.err.name,\n constructor_name: item.err.constructor && item.err.constructor.name,\n filename: item.err.fileName,\n line: item.err.lineNumber,\n column: item.err.columnNumber,\n stack: item.err.stack\n };\n } catch (e) {\n diagnostic.raw_error = { failed: String(e) };\n }\n }\n\n item.data.notifier.diagnostic = _.merge(item.data.notifier.diagnostic, diagnostic);\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError,\n userTransform: userTransform,\n addConfigToPayload: addConfigToPayload,\n addConfiguredOptions: addConfiguredOptions,\n addDiagnosticKeys: addDiagnosticKeys\n};\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction checkIgnore(item, settings) {\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore\n};\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction checkLevel(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = settings.reportLevel;\n var reportLevelVal = _.LEVELS[reportLevel] || 0;\n\n if (levelVal < reportLevelVal) {\n return false;\n }\n return true;\n}\n\nfunction userCheckIgnore(logger) {\n return function(item, settings) {\n var isUncaught = !!item._isUncaught;\n delete item._isUncaught;\n var args = item._originalArgs;\n delete item._originalArgs;\n try {\n if (_.isFunction(settings.onSendCallback)) {\n settings.onSendCallback(isUncaught, args, item);\n }\n } catch (e) {\n settings.onSendCallback = null;\n logger.error('Error while calling onSendCallback, removing', e);\n }\n try {\n if (_.isFunction(settings.checkIgnore) && settings.checkIgnore(isUncaught, args, item)) {\n return false;\n }\n } catch (e) {\n settings.checkIgnore = null;\n logger.error('Error while calling custom checkIgnore(), removing', e);\n }\n return true;\n }\n}\n\nfunction urlIsNotBlockListed(logger) {\n return function(item, settings) {\n return !urlIsOnAList(item, settings, 'blocklist', logger);\n }\n}\n\nfunction urlIsSafeListed(logger) {\n return function(item, settings) {\n return urlIsOnAList(item, settings, 'safelist', logger);\n }\n}\n\nfunction matchFrames(trace, list, block) {\n if (!trace) { return !block }\n\n var frames = trace.frames;\n\n if (!frames || frames.length === 0) { return !block; }\n\n var frame, filename, url, urlRegex;\n var listLength = list.length;\n var frameLength = frames.length;\n for (var i = 0; i < frameLength; i++) {\n frame = frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) { return !block; }\n\n for (var j = 0; j < listLength; j++) {\n url = list[j];\n urlRegex = new RegExp(url);\n\n if (urlRegex.test(filename)) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction urlIsOnAList(item, settings, safeOrBlock, logger) {\n // safelist is the default\n var block = false;\n if (safeOrBlock === 'blocklist') {\n block = true;\n }\n\n var list, traces;\n try {\n list = block ? settings.hostBlockList : settings.hostSafeList;\n traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];\n\n // These two checks are important to come first as they are defaults\n // in case the list is missing or the trace is missing or not well-formed\n if (!list || list.length === 0) {\n return !block;\n }\n if (traces.length === 0 || !traces[0]) {\n return !block;\n }\n\n var tracesLength = traces.length;\n for (var i = 0; i < tracesLength; i++) {\n if(matchFrames(traces[i], list, block)) {\n return true;\n }\n }\n } catch (e)\n /* istanbul ignore next */\n {\n if (block) {\n settings.hostBlockList = null;\n } else {\n settings.hostSafeList = null;\n }\n var listName = block ? 'hostBlockList' : 'hostSafeList';\n logger.error('Error while reading your configuration\\'s ' + listName + ' option. Removing custom ' + listName + '.', e);\n return !block;\n }\n return false;\n}\n\nfunction messageIsIgnored(logger) {\n return function(item, settings) {\n var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n messages = messagesFromItem(item);\n\n if (messages.length === 0){\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n\n for (j = 0; j < messages.length; j++) {\n messageIsIgnored = rIgnoredMessage.test(messages[j]);\n\n if (messageIsIgnored) {\n return false;\n }\n }\n }\n } catch(e)\n /* istanbul ignore next */\n {\n settings.ignoredMessages = null;\n logger.error('Error while reading your configuration\\'s ignoredMessages option. Removing custom ignoredMessages.');\n }\n\n return true;\n }\n}\n\nfunction messagesFromItem(item) {\n var body = item.body;\n var messages = [];\n\n // The payload schema only allows one of trace_chain, message, or trace.\n // However, existing test cases are based on having both trace and message present.\n // So here we preserve the ability to collect strings from any combination of these keys.\n if (body.trace_chain) {\n var traceChain = body.trace_chain;\n for (var i = 0; i < traceChain.length; i++) {\n var trace = traceChain[i];\n messages.push(_.get(trace, 'exception.message'));\n }\n }\n if (body.trace) {\n messages.push(_.get(body, 'trace.exception.message'));\n }\n if (body.message) {\n messages.push(_.get(body, 'message.body'));\n }\n return messages;\n}\n\nmodule.exports = {\n checkLevel: checkLevel,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlockListed: urlIsNotBlockListed,\n urlIsSafeListed: urlIsSafeListed,\n messageIsIgnored: messageIsIgnored\n};\n","'use strict';\n\nmodule.exports = {\n version: '2.24.0',\n endpoint: 'api.rollbar.com/api/1/item/',\n logLevel: 'debug',\n reportLevel: 'debug',\n uncaughtErrorLevel: 'error',\n maxItems: 0,\n itemsPerMin: 60\n}\n","'use strict';\n\nmodule.exports = {\n scrubFields: [\n 'pw',\n 'pass',\n 'passwd',\n 'password',\n 'secret',\n 'confirm_password',\n 'confirmPassword',\n 'password_confirmation',\n 'passwordConfirmation',\n 'access_token',\n 'accessToken',\n 'X-Rollbar-Access-Token',\n 'secret_key',\n 'secretKey',\n 'secretToken',\n 'cc-number',\n 'card number',\n 'cardnumber',\n 'cardnum',\n 'ccnum',\n 'ccnumber',\n 'cc num',\n 'creditcardnumber',\n 'credit card number',\n 'newcreditcardnumber',\n 'new credit card',\n 'creditcardno',\n 'credit card no',\n 'card#',\n 'card #',\n 'cc-csc',\n 'cvc',\n 'cvc2',\n 'cvv2',\n 'ccv2',\n 'security code',\n 'card verification',\n 'name on credit card',\n 'name on card',\n 'nameoncard',\n 'cardholder',\n 'card holder',\n 'name des karteninhabers',\n 'ccname',\n 'card type',\n 'cardtype',\n 'cc type',\n 'cctype',\n 'payment type',\n 'expiration date',\n 'expirationdate',\n 'expdate',\n 'cc-exp',\n 'ccmonth',\n 'ccyear'\n ]\n}\n","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.merge(options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n}\n\nTelemeter.prototype.configure = function(options) {\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n var deleteCount = 0;\n if (this.maxQueueSize > newMaxEvents) {\n deleteCount = this.maxQueueSize - newMaxEvents;\n }\n this.maxQueueSize = newMaxEvents;\n this.queue.splice(0, deleteCount);\n};\n\nTelemeter.prototype.copyEvents = function() {\n var events = Array.prototype.slice.call(this.queue, 0);\n if (_.isFunction(this.options.filterTelemetry)) {\n try {\n var i = events.length;\n while (i--) {\n if (this.options.filterTelemetry(events[i])) {\n events.splice(i, 1);\n }\n }\n } catch (e) {\n this.options.filterTelemetry = null;\n }\n }\n return events;\n};\n\nTelemeter.prototype.capture = function(type, metadata, level, rollbarUUID, timestamp) {\n var e = {\n level: getLevel(type, level),\n type: type,\n timestamp_ms: timestamp || _.now(),\n body: metadata,\n source: 'client'\n };\n if (rollbarUUID) {\n e.uuid = rollbarUUID;\n }\n\n try {\n if (_.isFunction(this.options.filterTelemetry) && this.options.filterTelemetry(e)) {\n return false;\n }\n } catch (exc) {\n this.options.filterTelemetry = null;\n }\n\n this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function(type, metadata, level, rollbarUUID) {\n return this.capture(type, metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.captureError = function(err, level, rollbarUUID, timestamp) {\n var metadata = {\n message: err.message || String(err)\n };\n if (err.stack) {\n metadata.stack = err.stack;\n }\n return this.capture('error', metadata, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureLog = function(message, level, rollbarUUID, timestamp) {\n return this.capture('log', {\n message: message\n }, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID, requestData) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\n if (requestData) {\n metadata.request = requestData;\n }\n var level = this.levelFromStatus(metadata.status_code);\n return this.capture('network', metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.levelFromStatus = function(statusCode) {\n if (statusCode >= 200 && statusCode < 400) {\n return 'info';\n }\n if (statusCode === 0 || statusCode >= 400) {\n return 'error';\n }\n return 'info';\n};\n\nTelemeter.prototype.captureDom = function(subtype, element, value, checked, rollbarUUID) {\n var metadata = {\n subtype: subtype,\n element: element\n };\n if (value !== undefined) {\n metadata.value = value;\n }\n if (checked !== undefined) {\n metadata.checked = checked;\n }\n return this.capture('dom', metadata, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureNavigation = function(from, to, rollbarUUID) {\n return this.capture('navigation', {from: from, to: to}, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureDomContentLoaded = function(ts) {\n return this.capture('navigation', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n */\n};\nTelemeter.prototype.captureLoad = function(ts) {\n return this.capture('navigation', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n */\n};\n\nTelemeter.prototype.captureConnectivityChange = function(type, rollbarUUID) {\n return this.captureNetwork({change: type}, 'connectivity', rollbarUUID);\n};\n\n// Only intended to be used internally by the notifier\nTelemeter.prototype._captureRollbarItem = function(item) {\n if (!this.options.includeItemsInTelemetry) {\n return;\n }\n if (item.err) {\n return this.captureError(item.err, item.level, item.uuid, item.timestamp);\n }\n if (item.message) {\n return this.captureLog(item.message, item.level, item.uuid, item.timestamp);\n }\n if (item.custom) {\n return this.capture('log', item.custom, item.level, item.uuid, item.timestamp);\n }\n};\n\nTelemeter.prototype.push = function(e) {\n this.queue.push(e);\n if (this.queue.length > this.maxQueueSize) {\n this.queue.shift();\n }\n};\n\nfunction getLevel(type, level) {\n if (level) {\n return level;\n }\n var defaultLevel = {\n error: 'error',\n manual: 'info'\n };\n return defaultLevel[type] || 'info';\n}\n\nmodule.exports = Telemeter;\n","'use strict';\n\nvar _ = require('../utility');\nvar scrub = require('../scrub');\nvar urlparser = require('./url');\nvar domUtil = require('./domUtility');\n\nvar defaults = {\n network: true,\n networkResponseHeaders: false,\n networkResponseBody: false,\n networkRequestHeaders: false,\n networkRequestBody: false,\n networkErrorOnHttp5xx: false,\n networkErrorOnHttp4xx: false,\n networkErrorOnHttp0: false,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true,\n contentSecurityPolicy: true,\n errorOnContentSecurityPolicy: false\n};\n\nfunction replace(obj, name, replacement, replacements, type) {\n var orig = obj[name];\n obj[name] = replacement(orig);\n if (replacements) {\n replacements[type].push([obj, name, orig]);\n }\n}\n\nfunction restore(replacements, type) {\n var b;\n while (replacements[type].length) {\n b = replacements[type].shift();\n b[0][b[1]] = b[2];\n }\n}\n\nfunction nameFromDescription(description) {\n if (!description || !description.attributes) { return null; }\n var attrs = description.attributes;\n for (var a = 0; a < attrs.length; ++a) {\n if (attrs[a].key === 'name') {\n return attrs[a].value;\n }\n }\n return null;\n}\n\nfunction defaultValueScrubber(scrubFields) {\n var patterns = [];\n for (var i = 0; i < scrubFields.length; ++i) {\n patterns.push(new RegExp(scrubFields[i], 'i'));\n }\n return function(description) {\n var name = nameFromDescription(description);\n if (!name) { return false; }\n for (var i = 0; i < patterns.length; ++i) {\n if (patterns[i].test(name)) {\n return true;\n }\n }\n return false;\n };\n}\n\nfunction Instrumenter(options, telemeter, rollbar, _window, _document) {\n this.options = options;\n var autoInstrument = options.autoInstrument;\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);\n this.telemeter = telemeter;\n this.rollbar = rollbar;\n this.diagnostic = rollbar.client.notifier.diagnostic;\n this._window = _window || {};\n this._document = _document || {};\n this.replacements = {\n network: [],\n log: [],\n navigation: [],\n connectivity: []\n };\n this.eventRemovers = {\n dom: [],\n connectivity: [],\n contentsecuritypolicy: []\n };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function(options) {\n this.options = _.merge(this.options, options);\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.merge(this.autoInstrument);\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n if (options.scrubTelemetryInputs !== undefined) {\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n }\n if (options.telemetryScrubber !== undefined) {\n this.telemetryScrubber = options.telemetryScrubber;\n }\n};\n\n// eslint-disable-next-line complexity\nInstrumenter.prototype.instrument = function(oldSettings) {\n if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {\n this.instrumentNetwork();\n } else if (!this.autoInstrument.network && oldSettings && oldSettings.network) {\n this.deinstrumentNetwork();\n }\n\n if (this.autoInstrument.log && !(oldSettings && oldSettings.log)) {\n this.instrumentConsole();\n } else if (!this.autoInstrument.log && oldSettings && oldSettings.log) {\n this.deinstrumentConsole();\n }\n\n if (this.autoInstrument.dom && !(oldSettings && oldSettings.dom)) {\n this.instrumentDom();\n } else if (!this.autoInstrument.dom && oldSettings && oldSettings.dom) {\n this.deinstrumentDom();\n }\n\n if (this.autoInstrument.navigation && !(oldSettings && oldSettings.navigation)) {\n this.instrumentNavigation();\n } else if (!this.autoInstrument.navigation && oldSettings && oldSettings.navigation) {\n this.deinstrumentNavigation();\n }\n\n if (this.autoInstrument.connectivity && !(oldSettings && oldSettings.connectivity)) {\n this.instrumentConnectivity();\n } else if (!this.autoInstrument.connectivity && oldSettings && oldSettings.connectivity) {\n this.deinstrumentConnectivity();\n }\n\n if (this.autoInstrument.contentSecurityPolicy && !(oldSettings && oldSettings.contentSecurityPolicy)) {\n this.instrumentContentSecurityPolicy();\n } else if (!this.autoInstrument.contentSecurityPolicy && oldSettings && oldSettings.contentSecurityPolicy) {\n this.deinstrumentContentSecurityPolicy();\n }\n};\n\nInstrumenter.prototype.deinstrumentNetwork = function() {\n restore(this.replacements, 'network');\n};\n\nInstrumenter.prototype.instrumentNetwork = function() {\n var self = this;\n\n function wrapProp(prop, xhr) {\n if (prop in xhr && _.isFunction(xhr[prop])) {\n replace(xhr, prop, function(orig) {\n return self.rollbar.wrap(orig);\n });\n }\n }\n\n if ('XMLHttpRequest' in this._window) {\n var xhrp = this._window.XMLHttpRequest.prototype;\n replace(xhrp, 'open', function(orig) {\n return function(method, url) {\n if (_.isType(url, 'string')) {\n if (this.__rollbar_xhr) {\n this.__rollbar_xhr.method = method;\n this.__rollbar_xhr.url = url;\n this.__rollbar_xhr.status_code = null;\n this.__rollbar_xhr.start_time_ms = _.now();\n this.__rollbar_xhr.end_time_ms = null;\n } else {\n this.__rollbar_xhr = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'setRequestHeader', function(orig) {\n return function(header, value) {\n // If xhr.open is async, __rollbar_xhr may not be initialized yet.\n if (!this.__rollbar_xhr) {\n this.__rollbar_xhr = {};\n }\n if (_.isType(header, 'string') && _.isType(value, 'string')) {\n if (self.autoInstrument.networkRequestHeaders) {\n if (!this.__rollbar_xhr.request_headers) {\n this.__rollbar_xhr.request_headers = {};\n }\n this.__rollbar_xhr.request_headers[header] = value;\n }\n // We want the content type even if request header telemetry is off.\n if (header.toLowerCase() === 'content-type') {\n this.__rollbar_xhr.request_content_type = value;\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'send', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(data) {\n /* eslint-enable no-unused-vars */\n var xhr = this;\n\n function onreadystatechangeHandler() {\n if (xhr.__rollbar_xhr) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n if (self.autoInstrument.networkRequestBody) {\n xhr.__rollbar_xhr.request = data;\n }\n xhr.__rollbar_event = self.captureNetwork(xhr.__rollbar_xhr, 'xhr', undefined);\n }\n if (xhr.readyState < 2) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n }\n if (xhr.readyState > 3) {\n xhr.__rollbar_xhr.end_time_ms = _.now();\n\n var headers = null;\n xhr.__rollbar_xhr.response_content_type = xhr.getResponseHeader('Content-Type');\n if (self.autoInstrument.networkResponseHeaders) {\n var headersConfig = self.autoInstrument.networkResponseHeaders;\n headers = {};\n try {\n var header, i;\n if (headersConfig === true) {\n var allHeaders = xhr.getAllResponseHeaders();\n if (allHeaders) {\n var arr = allHeaders.trim().split(/[\\r\\n]+/);\n var parts, value;\n for (i=0; i < arr.length; i++) {\n parts = arr[i].split(': ');\n header = parts.shift();\n value = parts.join(': ');\n headers[header] = value;\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n header = headersConfig[i];\n headers[header] = xhr.getResponseHeader(header);\n }\n }\n } catch (e) {\n /* we ignore the errors here that could come from different\n * browser issues with the xhr methods */\n }\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n try {\n body = xhr.responseText;\n } catch (e) {\n /* ignore errors from reading responseText */\n }\n }\n var response = null;\n if (body || headers) {\n response = {};\n if (body) {\n if (self.isJsonContentType(xhr.__rollbar_xhr.response_content_type)) {\n response.body = self.scrubJson(body);\n } else {\n response.body = body;\n }\n }\n if (headers) {\n response.headers = headers;\n }\n }\n if (response) {\n xhr.__rollbar_xhr.response = response;\n }\n try {\n var code = xhr.status;\n code = code === 1223 ? 204 : code;\n xhr.__rollbar_xhr.status_code = code;\n xhr.__rollbar_event.level = self.telemeter.levelFromStatus(code);\n self.errorOnHttpStatus(xhr.__rollbar_xhr);\n } catch (e) {\n /* ignore possible exception from xhr.status */\n }\n }\n }\n }\n\n wrapProp('onload', xhr);\n wrapProp('onerror', xhr);\n wrapProp('onprogress', xhr);\n\n if ('onreadystatechange' in xhr && _.isFunction(xhr.onreadystatechange)) {\n replace(xhr, 'onreadystatechange', function(orig) {\n return self.rollbar.wrap(orig, undefined, onreadystatechangeHandler);\n });\n } else {\n xhr.onreadystatechange = onreadystatechangeHandler;\n }\n if (xhr.__rollbar_xhr && self.trackHttpErrors()) {\n xhr.__rollbar_xhr.stack = (new Error()).stack;\n }\n return orig.apply(this, arguments);\n }\n }, this.replacements, 'network');\n }\n\n if ('fetch' in this._window) {\n replace(this._window, 'fetch', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(fn, t) {\n /* eslint-enable no-unused-vars */\n var args = new Array(arguments.length);\n for (var i=0, len=args.length; i < len; i++) {\n args[i] = arguments[i];\n }\n var input = args[0];\n var method = 'GET';\n var url;\n if (_.isType(input, 'string')) {\n url = input;\n } else if (input) {\n url = input.url;\n if (input.method) {\n method = input.method;\n }\n }\n if (args[1] && args[1].method) {\n method = args[1].method;\n }\n var metadata = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n if (args[1] && args[1].headers) {\n // Argument may be a Headers object, or plain object. Ensure here that\n // we are working with a Headers object with case-insensitive keys.\n var reqHeaders = new Headers(args[1].headers);\n\n metadata.request_content_type = reqHeaders.get('Content-Type');\n\n if (self.autoInstrument.networkRequestHeaders) {\n metadata.request_headers = self.fetchHeaders(reqHeaders, self.autoInstrument.networkRequestHeaders)\n }\n }\n\n if (self.autoInstrument.networkRequestBody) {\n if (args[1] && args[1].body) {\n metadata.request = args[1].body;\n } else if (args[0] && !_.isType(args[0], 'string') && args[0].body) {\n metadata.request = args[0].body;\n }\n }\n self.captureNetwork(metadata, 'fetch', undefined);\n if (self.trackHttpErrors()) {\n metadata.stack = (new Error()).stack;\n }\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n metadata.response_content_type = resp.headers.get('Content-Type');\n var headers = null;\n if (self.autoInstrument.networkResponseHeaders) {\n headers = self.fetchHeaders(resp.headers, self.autoInstrument.networkResponseHeaders);\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n if (typeof resp.text === 'function') { // Response.text() is not implemented on some platforms\n // The response must be cloned to prevent reading (and locking) the original stream.\n body = resp.clone().text(); //returns a Promise\n }\n }\n if (headers || body) {\n metadata.response = {};\n if (body) {\n // Test to ensure body is a Promise, which it should always be.\n if (typeof body.then === 'function') {\n body.then(function (text) {\n if (self.isJsonContentType(metadata.response_content_type)) {\n metadata.response.body = self.scrubJson(text);\n }\n });\n } else {\n metadata.response.body = body;\n }\n }\n if (headers) {\n metadata.response.headers = headers;\n }\n }\n self.errorOnHttpStatus(metadata);\n return resp;\n });\n };\n }, this.replacements, 'network');\n }\n};\n\nInstrumenter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID) {\n if (metadata.request && this.isJsonContentType(metadata.request_content_type)) {\n metadata.request = this.scrubJson(metadata.request);\n }\n return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);\n};\n\nInstrumenter.prototype.isJsonContentType = function(contentType) {\n return (contentType && _.isType(contentType, 'string') && contentType.toLowerCase().includes('json')) ? true : false;\n}\n\nInstrumenter.prototype.scrubJson = function(json) {\n return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));\n}\n\nInstrumenter.prototype.fetchHeaders = function(inHeaders, headersConfig) {\n var outHeaders = {};\n try {\n var i;\n if (headersConfig === true) {\n if (typeof inHeaders.entries === 'function') { // Headers.entries() is not implemented in IE\n var allHeaders = inHeaders.entries();\n var currentHeader = allHeaders.next();\n while (!currentHeader.done) {\n outHeaders[currentHeader.value[0]] = currentHeader.value[1];\n currentHeader = allHeaders.next();\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n var header = headersConfig[i];\n outHeaders[header] = inHeaders.get(header);\n }\n }\n } catch (e) {\n /* ignore probable IE errors */\n }\n return outHeaders;\n}\n\nInstrumenter.prototype.trackHttpErrors = function() {\n return this.autoInstrument.networkErrorOnHttp5xx ||\n this.autoInstrument.networkErrorOnHttp4xx ||\n this.autoInstrument.networkErrorOnHttp0;\n}\n\nInstrumenter.prototype.errorOnHttpStatus = function(metadata) {\n var status = metadata.status_code;\n\n if ((status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||\n (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||\n (status === 0 && this.autoInstrument.networkErrorOnHttp0)) {\n var error = new Error('HTTP request failed with Status ' + status);\n error.stack = metadata.stack;\n this.rollbar.error(error, { skipFrames: 1 });\n }\n}\n\nInstrumenter.prototype.deinstrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n var b;\n while (this.replacements['log'].length) {\n b = this.replacements['log'].shift();\n this._window.console[b[0]] = b[1];\n }\n};\n\nInstrumenter.prototype.instrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n\n var self = this;\n var c = this._window.console;\n\n function wrapConsole(method) {\n 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778\n\n var orig = c[method];\n var origConsole = c;\n var level = method === 'warn' ? 'warning' : method;\n c[method] = function() {\n var args = Array.prototype.slice.call(arguments);\n var message = _.formatArgsAsString(args);\n self.telemeter.captureLog(message, level);\n if (orig) {\n Function.prototype.apply.call(orig, origConsole, args);\n }\n };\n self.replacements['log'].push([method, orig]);\n }\n var methods = ['debug','info','warn','error','log'];\n try {\n for (var i=0, len=methods.length; i < len; i++) {\n wrapConsole(methods[i]);\n }\n } catch (e) {\n this.diagnostic.instrumentConsole = { error: e.message };\n }\n};\n\nInstrumenter.prototype.deinstrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n this.removeListeners('dom');\n};\n\nInstrumenter.prototype.instrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n var clickHandler = this.handleClick.bind(this);\n var blurHandler = this.handleBlur.bind(this);\n this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);\n this.addListener('dom', this._window, 'blur', 'onfocusout', blurHandler, true);\n};\n\nInstrumenter.prototype.handleClick = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n var hasTag = e && e.tagName;\n var anchorOrButton = domUtil.isDescribedElement(e, 'a') || domUtil.isDescribedElement(e, 'button');\n if (hasTag && (anchorOrButton || domUtil.isDescribedElement(e, 'input', ['button', 'submit']))) {\n this.captureDomEvent('click', e);\n } else if (domUtil.isDescribedElement(e, 'input', ['checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value, e.checked);\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleBlur = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n if (e && e.tagName) {\n if (domUtil.isDescribedElement(e, 'textarea')) {\n this.captureDomEvent('input', e, e.value);\n } else if (domUtil.isDescribedElement(e, 'select') && e.options && e.options.length) {\n this.handleSelectInputChanged(e);\n } else if (domUtil.isDescribedElement(e, 'input') && !domUtil.isDescribedElement(e, 'input', ['button', 'submit', 'hidden', 'checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value);\n }\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleSelectInputChanged = function(elem) {\n if (elem.multiple) {\n for (var i = 0; i < elem.options.length; i++) {\n if (elem.options[i].selected) {\n this.captureDomEvent('input', elem, elem.options[i].value);\n }\n }\n } else if (elem.selectedIndex >= 0 && elem.options[elem.selectedIndex]) {\n this.captureDomEvent('input', elem, elem.options[elem.selectedIndex].value);\n }\n};\n\nInstrumenter.prototype.captureDomEvent = function(subtype, element, value, isChecked) {\n if (value !== undefined) {\n if (this.scrubTelemetryInputs || (domUtil.getElementType(element) === 'password')) {\n value = '[scrubbed]';\n } else {\n var description = domUtil.describeElement(element);\n if (this.telemetryScrubber) {\n if (this.telemetryScrubber(description)) {\n value = '[scrubbed]';\n }\n } else if (this.defaultValueScrubber(description)) {\n value = '[scrubbed]';\n }\n }\n }\n var elementString = domUtil.elementArrayToString(domUtil.treeToArray(element));\n this.telemeter.captureDom(subtype, elementString, value, isChecked);\n};\n\nInstrumenter.prototype.deinstrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n restore(this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.instrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n var self = this;\n replace(this._window, 'onpopstate', function(orig) {\n return function() {\n var current = self._location.href;\n self.handleUrlChange(self._lastHref, current);\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n }, this.replacements, 'navigation');\n\n replace(this._window.history, 'pushState', function(orig) {\n return function() {\n var url = arguments.length > 2 ? arguments[2] : undefined;\n if (url) {\n self.handleUrlChange(self._lastHref, url + '');\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.handleUrlChange = function(from, to) {\n var parsedHref = urlparser.parse(this._location.href);\n var parsedTo = urlparser.parse(to);\n var parsedFrom = urlparser.parse(from);\n this._lastHref = to;\n if (parsedHref.protocol === parsedTo.protocol && parsedHref.host === parsedTo.host) {\n to = parsedTo.path + (parsedTo.hash || '');\n }\n if (parsedHref.protocol === parsedFrom.protocol && parsedHref.host === parsedFrom.host) {\n from = parsedFrom.path + (parsedFrom.hash || '');\n }\n this.telemeter.captureNavigation(from, to);\n};\n\nInstrumenter.prototype.deinstrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.removeListeners('connectivity');\n } else {\n restore(this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.instrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.addListener('connectivity', this._window, 'online', undefined, function() {\n this.telemeter.captureConnectivityChange('online');\n }.bind(this), true);\n this.addListener('connectivity', this._window, 'offline', undefined, function() {\n this.telemeter.captureConnectivityChange('offline');\n }.bind(this), true);\n } else {\n var self = this;\n replace(this._document.body, 'ononline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('online');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n replace(this._document.body, 'onoffline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('offline');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.handleCspEvent = function(cspEvent) {\n var message = 'Security Policy Violation: ' +\n 'blockedURI: ' + cspEvent.blockedURI + ', ' +\n 'violatedDirective: ' + cspEvent.violatedDirective + ', ' +\n 'effectiveDirective: ' + cspEvent.effectiveDirective + ', ';\n\n if (cspEvent.sourceFile) {\n message += 'location: ' + cspEvent.sourceFile + ', ' +\n 'line: ' + cspEvent.lineNumber + ', ' +\n 'col: ' + cspEvent.columnNumber + ', ';\n }\n\n message += 'originalPolicy: ' + cspEvent.originalPolicy;\n\n this.telemeter.captureLog(message, 'error');\n this.handleCspError(message);\n}\n\nInstrumenter.prototype.handleCspError = function(message) {\n if (this.autoInstrument.errorOnContentSecurityPolicy) {\n this.rollbar.error(message);\n }\n}\n\nInstrumenter.prototype.deinstrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._window)) { return; }\n\n this.removeListeners('contentsecuritypolicy');\n};\n\nInstrumenter.prototype.instrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._window)) { return; }\n\n var cspHandler = this.handleCspEvent.bind(this);\n this.addListener('contentsecuritypolicy', this._window, 'securitypolicyviolation', null, cspHandler, false);\n};\n\nInstrumenter.prototype.addListener = function(section, obj, type, altType, handler, capture) {\n if (obj.addEventListener) {\n obj.addEventListener(type, handler, capture);\n this.eventRemovers[section].push(function() {\n obj.removeEventListener(type, handler, capture);\n });\n } else if (altType) {\n obj.attachEvent(altType, handler);\n this.eventRemovers[section].push(function() {\n obj.detachEvent(altType, handler);\n });\n }\n};\n\nInstrumenter.prototype.removeListeners = function(section) {\n var r;\n while (this.eventRemovers[section].length) {\n r = this.eventRemovers[section].shift();\n r();\n }\n};\n\nmodule.exports = Instrumenter;\n","'use strict';\n\nfunction getElementType(e) {\n return (e.getAttribute('type') || '').toLowerCase();\n}\n\nfunction isDescribedElement(element, type, subtypes) {\n if (element.tagName.toLowerCase() !== type.toLowerCase()) {\n return false;\n }\n if (!subtypes) {\n return true;\n }\n element = getElementType(element);\n for (var i = 0; i < subtypes.length; i++) {\n if (subtypes[i] === element) {\n return true;\n }\n }\n return false;\n}\n\nfunction getElementFromEvent(evt, doc) {\n if (evt.target) {\n return evt.target;\n }\n if (doc && doc.elementFromPoint) {\n return doc.elementFromPoint(evt.clientX, evt.clientY);\n }\n return undefined;\n}\n\nfunction treeToArray(elem) {\n var MAX_HEIGHT = 5;\n var out = [];\n var nextDescription;\n for (var height = 0; elem && height < MAX_HEIGHT; height++) {\n nextDescription = describeElement(elem);\n if (nextDescription.tagName === 'html') {\n break;\n }\n out.unshift(nextDescription);\n elem = elem.parentNode;\n }\n return out;\n}\n\nfunction elementArrayToString(a) {\n var MAX_LENGTH = 80;\n var separator = ' > ', separatorLength = separator.length;\n var out = [], len = 0, nextStr, totalLength;\n\n for (var i = a.length - 1; i >= 0; i--) {\n nextStr = descriptionToString(a[i]);\n totalLength = len + (out.length * separatorLength) + nextStr.length;\n if (i < a.length - 1 && totalLength >= MAX_LENGTH + 3) {\n out.unshift('...');\n break;\n }\n out.unshift(nextStr);\n len += nextStr.length;\n }\n return out.join(separator);\n}\n\nfunction descriptionToString(desc) {\n if (!desc || !desc.tagName) {\n return '';\n }\n var out = [desc.tagName];\n if (desc.id) {\n out.push('#' + desc.id);\n }\n if (desc.classes) {\n out.push('.' + desc.classes.join('.'));\n }\n for (var i = 0; i < desc.attributes.length; i++) {\n out.push('[' + desc.attributes[i].key + '=\"' + desc.attributes[i].value + '\"]');\n }\n\n return out.join('');\n}\n\n/**\n * Input: a dom element\n * Output: null if tagName is falsey or input is falsey, else\n * {\n * tagName: String,\n * id: String | undefined,\n * classes: [String] | undefined,\n * attributes: [\n * {\n * key: OneOf(type, name, title, alt),\n * value: String\n * }\n * ]\n * }\n */\nfunction describeElement(elem) {\n if (!elem || !elem.tagName) {\n return null;\n }\n var out = {}, className, key, attr, i;\n out.tagName = elem.tagName.toLowerCase();\n if (elem.id) {\n out.id = elem.id;\n }\n className = elem.className;\n if (className && (typeof className === 'string')) {\n out.classes = className.split(/\\s+/);\n }\n var attributes = ['type', 'name', 'title', 'alt'];\n out.attributes = [];\n for (i = 0; i < attributes.length; i++) {\n key = attributes[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.attributes.push({key: key, value: attr});\n }\n }\n return out;\n}\n\nmodule.exports = {\n describeElement: describeElement,\n descriptionToString: descriptionToString,\n elementArrayToString: elementArrayToString,\n treeToArray: treeToArray,\n getElementFromEvent: getElementFromEvent,\n isDescribedElement: isDescribedElement,\n getElementType: getElementType\n};\n","'use strict';\n\nvar polyfillJSON = require('../../vendor/JSON-js/json3');\n\nmodule.exports = polyfillJSON;\n","// json3.js\n// 2017-02-21\n// Public Domain.\n// NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.\n// See http://www.JSON.org/js.html\n// This code should be minified before deployment.\n// See http://javascript.crockford.com/jsmin.html\n\n// USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO\n// NOT CONTROL.\n\n// This file creates a global JSON object containing two methods: stringify\n// and parse. This file provides the ES5 JSON capability to ES3 systems.\n// If a project might run on IE8 or earlier, then this file should be included.\n// This file does nothing on ES5 systems.\n\n// JSON.stringify(value, replacer, space)\n// value any JavaScript value, usually an object or array.\n// replacer an optional parameter that determines how object\n// values are stringified for objects. It can be a\n// function or an array of strings.\n// space an optional parameter that specifies the indentation\n// of nested structures. If it is omitted, the text will\n// be packed without extra whitespace. If it is a number,\n// it will specify the number of spaces to indent at each\n// level. If it is a string (such as \"\\t\" or \" \"),\n// it contains the characters used to indent at each level.\n// This method produces a JSON text from a JavaScript value.\n// When an object value is found, if the object contains a toJSON\n// method, its toJSON method will be called and the result will be\n// stringified. A toJSON method does not serialize: it returns the\n// value represented by the name/value pair that should be serialized,\n// or undefined if nothing should be serialized. The toJSON method\n// will be passed the key associated with the value, and this will be\n// bound to the value.\n\n// For example, this would serialize Dates as ISO strings.\n\n// Date.prototype.toJSON = function (key) {\n// function f(n) {\n// // Format integers to have at least two digits.\n// return (n < 10)\n// ? \"0\" + n\n// : n;\n// }\n// return this.getUTCFullYear() + \"-\" +\n// f(this.getUTCMonth() + 1) + \"-\" +\n// f(this.getUTCDate()) + \"T\" +\n// f(this.getUTCHours()) + \":\" +\n// f(this.getUTCMinutes()) + \":\" +\n// f(this.getUTCSeconds()) + \"Z\";\n// };\n\n// You can provide an optional replacer method. It will be passed the\n// key and value of each member, with this bound to the containing\n// object. The value that is returned from your method will be\n// serialized. If your method returns undefined, then the member will\n// be excluded from the serialization.\n\n// If the replacer parameter is an array of strings, then it will be\n// used to select the members to be serialized. It filters the results\n// such that only members with keys listed in the replacer array are\n// stringified.\n\n// Values that do not have JSON representations, such as undefined or\n// functions, will not be serialized. Such values in objects will be\n// dropped; in arrays they will be replaced with null. You can use\n// a replacer function to replace those with JSON values.\n\n// JSON.stringify(undefined) returns undefined.\n\n// The optional space parameter produces a stringification of the\n// value that is filled with line breaks and indentation to make it\n// easier to read.\n\n// If the space parameter is a non-empty string, then that string will\n// be used for indentation. If the space parameter is a number, then\n// the indentation will be that many spaces.\n\n// Example:\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}]);\n// // text is '[\"e\",{\"pluribus\":\"unum\"}]'\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}], null, \"\\t\");\n// // text is '[\\n\\t\"e\",\\n\\t{\\n\\t\\t\"pluribus\": \"unum\"\\n\\t}\\n]'\n\n// text = JSON.stringify([new Date()], function (key, value) {\n// return this[key] instanceof Date\n// ? \"Date(\" + this[key] + \")\"\n// : value;\n// });\n// // text is '[\"Date(---current time---)\"]'\n\n// JSON.parse(text, reviver)\n// This method parses a JSON text to produce an object or array.\n// It can throw a SyntaxError exception.\n// This has been modified to use JSON-js/json_parse_state.js as the\n// parser instead of the one built around eval found in JSON-js/json2.js\n\n// The optional reviver parameter is a function that can filter and\n// transform the results. It receives each of the keys and values,\n// and its return value is used instead of the original value.\n// If it returns what it received, then the structure is not modified.\n// If it returns undefined then the member is deleted.\n\n// Example:\n\n// // Parse the text. Values that look like ISO date strings will\n// // be converted to Date objects.\n\n// myData = JSON.parse(text, function (key, value) {\n// var a;\n// if (typeof value === \"string\") {\n// a =\n// /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2}(?:\\.\\d*)?)Z$/.exec(value);\n// if (a) {\n// return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],\n// +a[5], +a[6]));\n// }\n// }\n// return value;\n// });\n\n// myData = JSON.parse('[\"Date(09/09/2001)\"]', function (key, value) {\n// var d;\n// if (typeof value === \"string\" &&\n// value.slice(0, 5) === \"Date(\" &&\n// value.slice(-1) === \")\") {\n// d = new Date(value.slice(5, -1));\n// if (d) {\n// return d;\n// }\n// }\n// return value;\n// });\n\n// This is a reference implementation. You are free to copy, modify, or\n// redistribute.\n\n/*jslint\n for, this\n */\n\n/*property\n JSON, apply, call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,\n getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,\n lastIndex, length, parse, prototype, push, replace, slice, stringify,\n test, toJSON, toString, valueOf\n */\n\nvar setupCustomJSON = function(JSON) {\n\n var rx_one = /^[\\],:{}\\s]*$/;\n var rx_two = /\\\\(?:[\"\\\\\\/bfnrt]|u[0-9a-fA-F]{4})/g;\n var rx_three = /\"[^\"\\\\\\n\\r]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g;\n var rx_four = /(?:^|:|,)(?:\\s*\\[)+/g;\n var rx_escapable = /[\\\\\"\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n var rx_dangerous = /[\\u0000\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n\n function f(n) {\n // Format integers to have at least two digits.\n return n < 10\n ? \"0\" + n\n : n;\n }\n\n function this_value() {\n return this.valueOf();\n }\n\n if (typeof Date.prototype.toJSON !== \"function\") {\n\n Date.prototype.toJSON = function () {\n\n return isFinite(this.valueOf())\n ? this.getUTCFullYear() + \"-\" +\n f(this.getUTCMonth() + 1) + \"-\" +\n f(this.getUTCDate()) + \"T\" +\n f(this.getUTCHours()) + \":\" +\n f(this.getUTCMinutes()) + \":\" +\n f(this.getUTCSeconds()) + \"Z\"\n : null;\n };\n\n Boolean.prototype.toJSON = this_value;\n Number.prototype.toJSON = this_value;\n String.prototype.toJSON = this_value;\n }\n\n var gap;\n var indent;\n var meta;\n var rep;\n\n\n function quote(string) {\n\n // If the string contains no control characters, no quote characters, and no\n // backslash characters, then we can safely slap some quotes around it.\n // Otherwise we must also replace the offending characters with safe escape\n // sequences.\n\n rx_escapable.lastIndex = 0;\n return rx_escapable.test(string)\n ? \"\\\"\" + string.replace(rx_escapable, function (a) {\n var c = meta[a];\n return typeof c === \"string\"\n ? c\n : \"\\\\u\" + (\"0000\" + a.charCodeAt(0).toString(16)).slice(-4);\n }) + \"\\\"\"\n : \"\\\"\" + string + \"\\\"\";\n }\n\n\n function str(key, holder) {\n\n // Produce a string from holder[key].\n\n var i; // The loop counter.\n var k; // The member key.\n var v; // The member value.\n var length;\n var mind = gap;\n var partial;\n var value = holder[key];\n\n // If the value has a toJSON method, call it to obtain a replacement value.\n\n if (value && typeof value === \"object\" &&\n typeof value.toJSON === \"function\") {\n value = value.toJSON(key);\n }\n\n // If we were called with a replacer function, then call the replacer to\n // obtain a replacement value.\n\n if (typeof rep === \"function\") {\n value = rep.call(holder, key, value);\n }\n\n // What happens next depends on the value's type.\n\n switch (typeof value) {\n case \"string\":\n return quote(value);\n\n case \"number\":\n\n // JSON numbers must be finite. Encode non-finite numbers as null.\n\n return isFinite(value)\n ? String(value)\n : \"null\";\n\n case \"boolean\":\n case \"null\":\n\n // If the value is a boolean or null, convert it to a string. Note:\n // typeof null does not produce \"null\". The case is included here in\n // the remote chance that this gets fixed someday.\n\n return String(value);\n\n // If the type is \"object\", we might be dealing with an object or an array or\n // null.\n\n case \"object\":\n\n // Due to a specification blunder in ECMAScript, typeof null is \"object\",\n // so watch out for that case.\n\n if (!value) {\n return \"null\";\n }\n\n // Make an array to hold the partial results of stringifying this object value.\n\n gap += indent;\n partial = [];\n\n // Is the value an array?\n\n if (Object.prototype.toString.apply(value) === \"[object Array]\") {\n\n // The value is an array. Stringify every element. Use null as a placeholder\n // for non-JSON values.\n\n length = value.length;\n for (i = 0; i < length; i += 1) {\n partial[i] = str(i, value) || \"null\";\n }\n\n // Join all of the elements together, separated with commas, and wrap them in\n // brackets.\n\n v = partial.length === 0\n ? \"[]\"\n : gap\n ? \"[\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"]\"\n : \"[\" + partial.join(\",\") + \"]\";\n gap = mind;\n return v;\n }\n\n // If the replacer is an array, use it to select the members to be stringified.\n\n if (rep && typeof rep === \"object\") {\n length = rep.length;\n for (i = 0; i < length; i += 1) {\n if (typeof rep[i] === \"string\") {\n k = rep[i];\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n } else {\n\n // Otherwise, iterate through all of the keys in the object.\n\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(value, k)) {\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n }\n\n // Join all of the member texts together, separated with commas,\n // and wrap them in braces.\n\n v = partial.length === 0\n ? \"{}\"\n : gap\n ? \"{\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"}\"\n : \"{\" + partial.join(\",\") + \"}\";\n gap = mind;\n return v;\n }\n }\n\n // If the JSON object does not yet have a stringify method, give it one.\n\n if (typeof JSON.stringify !== \"function\") {\n meta = { // table of character substitutions\n \"\\b\": \"\\\\b\",\n \"\\t\": \"\\\\t\",\n \"\\n\": \"\\\\n\",\n \"\\f\": \"\\\\f\",\n \"\\r\": \"\\\\r\",\n \"\\\"\": \"\\\\\\\"\",\n \"\\\\\": \"\\\\\\\\\"\n };\n JSON.stringify = function (value, replacer, space) {\n\n // The stringify method takes a value and an optional replacer, and an optional\n // space parameter, and returns a JSON text. The replacer can be a function\n // that can replace values, or an array of strings that will select the keys.\n // A default replacer method can be provided. Use of the space parameter can\n // produce text that is more easily readable.\n\n var i;\n gap = \"\";\n indent = \"\";\n\n // If the space parameter is a number, make an indent string containing that\n // many spaces.\n\n if (typeof space === \"number\") {\n for (i = 0; i < space; i += 1) {\n indent += \" \";\n }\n\n // If the space parameter is a string, it will be used as the indent string.\n\n } else if (typeof space === \"string\") {\n indent = space;\n }\n\n // If there is a replacer, it must be a function or an array.\n // Otherwise, throw an error.\n\n rep = replacer;\n if (replacer && typeof replacer !== \"function\" &&\n (typeof replacer !== \"object\" ||\n typeof replacer.length !== \"number\")) {\n throw new Error(\"JSON.stringify\");\n }\n\n // Make a fake root object containing our value under the key of \"\".\n // Return the result of stringifying the value.\n\n return str(\"\", {\"\": value});\n };\n }\n\n\n // If the JSON object does not yet have a parse method, give it one.\n\n if (typeof JSON.parse !== \"function\") {\n JSON.parse = (function () {\n\n // This function creates a JSON parse function that uses a state machine rather\n // than the dangerous eval function to parse a JSON text.\n\n var state; // The state of the parser, one of\n // 'go' The starting state\n // 'ok' The final, accepting state\n // 'firstokey' Ready for the first key of the object or\n // the closing of an empty object\n // 'okey' Ready for the next key of the object\n // 'colon' Ready for the colon\n // 'ovalue' Ready for the value half of a key/value pair\n // 'ocomma' Ready for a comma or closing }\n // 'firstavalue' Ready for the first value of an array or\n // an empty array\n // 'avalue' Ready for the next value of an array\n // 'acomma' Ready for a comma or closing ]\n var stack; // The stack, for controlling nesting.\n var container; // The current container object or array\n var key; // The current key\n var value; // The current value\n var escapes = { // Escapement translation table\n \"\\\\\": \"\\\\\",\n \"\\\"\": \"\\\"\",\n \"/\": \"/\",\n \"t\": \"\\t\",\n \"n\": \"\\n\",\n \"r\": \"\\r\",\n \"f\": \"\\f\",\n \"b\": \"\\b\"\n };\n var string = { // The actions for string tokens\n go: function () {\n state = \"ok\";\n },\n firstokey: function () {\n key = value;\n state = \"colon\";\n },\n okey: function () {\n key = value;\n state = \"colon\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var number = { // The actions for number tokens\n go: function () {\n state = \"ok\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var action = {\n\n // The action table describes the behavior of the machine. It contains an\n // object for each token. Each object contains a method that is called when\n // a token is matched in a state. An object will lack a method for illegal\n // states.\n\n \"{\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = {};\n state = \"firstokey\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = {};\n state = \"firstokey\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n }\n },\n \"}\": {\n firstokey: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n ocomma: function () {\n var pop = stack.pop();\n container[key] = value;\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \"[\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = [];\n state = \"firstavalue\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = [];\n state = \"firstavalue\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n }\n },\n \"]\": {\n firstavalue: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n acomma: function () {\n var pop = stack.pop();\n container.push(value);\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \":\": {\n colon: function () {\n if (Object.hasOwnProperty.call(container, key)) {\n throw new SyntaxError(\"Duplicate key '\" + key + \"\\\"\");\n }\n state = \"ovalue\";\n }\n },\n \",\": {\n ocomma: function () {\n container[key] = value;\n state = \"okey\";\n },\n acomma: function () {\n container.push(value);\n state = \"avalue\";\n }\n },\n \"true\": {\n go: function () {\n value = true;\n state = \"ok\";\n },\n ovalue: function () {\n value = true;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = true;\n state = \"acomma\";\n },\n avalue: function () {\n value = true;\n state = \"acomma\";\n }\n },\n \"false\": {\n go: function () {\n value = false;\n state = \"ok\";\n },\n ovalue: function () {\n value = false;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = false;\n state = \"acomma\";\n },\n avalue: function () {\n value = false;\n state = \"acomma\";\n }\n },\n \"null\": {\n go: function () {\n value = null;\n state = \"ok\";\n },\n ovalue: function () {\n value = null;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = null;\n state = \"acomma\";\n },\n avalue: function () {\n value = null;\n state = \"acomma\";\n }\n }\n };\n\n function debackslashify(text) {\n\n // Remove and replace any backslash escapement.\n\n return text.replace(/\\\\(?:u(.{4})|([^u]))/g, function (ignore, b, c) {\n return b\n ? String.fromCharCode(parseInt(b, 16))\n : escapes[c];\n });\n }\n\n return function (source, reviver) {\n\n // A regular expression is used to extract tokens from the JSON text.\n // The extraction process is cautious.\n\n var result;\n var tx = /^[\\u0020\\t\\n\\r]*(?:([,:\\[\\]{}]|true|false|null)|(-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?)|\"((?:[^\\r\\n\\t\\\\\\\"]|\\\\(?:[\"\\\\\\/trnfb]|u[0-9a-fA-F]{4}))*)\")/;\n\n // Set the starting state.\n\n state = \"go\";\n\n // The stack records the container, key, and state for each object or array\n // that contains another object or array while processing nested structures.\n\n stack = [];\n\n // If any error occurs, we will catch it and ultimately throw a syntax error.\n\n try {\n\n // For each token...\n\n while (true) {\n result = tx.exec(source);\n if (!result) {\n break;\n }\n\n // result is the result array from matching the tokenizing regular expression.\n // result[0] contains everything that matched, including any initial whitespace.\n // result[1] contains any punctuation that was matched, or true, false, or null.\n // result[2] contains a matched number, still in string form.\n // result[3] contains a matched string, without quotes but with escapement.\n\n if (result[1]) {\n\n // Token: Execute the action for this state and token.\n\n action[result[1]][state]();\n\n } else if (result[2]) {\n\n // Number token: Convert the number string into a number value and execute\n // the action for this state and number.\n\n value = +result[2];\n number[state]();\n } else {\n\n // String token: Replace the escapement sequences and execute the action for\n // this state and string.\n\n value = debackslashify(result[3]);\n string[state]();\n }\n\n // Remove the token from the string. The loop will continue as long as there\n // are tokens. This is a slow process, but it allows the use of ^ matching,\n // which assures that no illegal tokens slip through.\n\n source = source.slice(result[0].length);\n }\n\n // If we find a state/token combination that is illegal, then the action will\n // cause an error. We handle the error by simply changing the state.\n\n } catch (e) {\n state = e;\n }\n\n // The parsing is finished. If we are not in the final \"ok\" state, or if the\n // remaining source contains anything except whitespace, then we did not have\n //a well-formed JSON text.\n\n if (state !== \"ok\" || (/[^\\u0020\\t\\n\\r]/.test(source))) {\n throw (state instanceof SyntaxError)\n ? state\n : new SyntaxError(\"JSON\");\n }\n\n // If there is a reviver function, we recursively walk the new structure,\n // passing each name/value pair to the reviver function for possible\n // transformation, starting with a temporary root object that holds the current\n // value in an empty key. If there is not a reviver function, we simply return\n // that value.\n\n return (typeof reviver === \"function\")\n ? (function walk(holder, key) {\n var k;\n var v;\n var val = holder[key];\n if (val && typeof val === \"object\") {\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(val, k)) {\n v = walk(val, k);\n if (v !== undefined) {\n val[k] = v;\n } else {\n delete val[k];\n }\n }\n }\n }\n return reviver.call(holder, key, val);\n }({\"\": value}, \"\"))\n : value;\n };\n }());\n }\n}\n\nmodule.exports = setupCustomJSON;\n","'use strict';\n\nfunction wrapGlobals(window, handler, shim) {\n if (!window) { return; }\n // Adapted from https://github.com/bugsnag/bugsnag-js\n var globals = 'EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload'.split(',');\n var i, global;\n for (i = 0; i < globals.length; ++i) {\n global = globals[i];\n\n if (window[global] && window[global].prototype) {\n _extendListenerPrototype(handler, window[global].prototype, shim);\n }\n }\n}\n\nfunction _extendListenerPrototype(handler, prototype, shim) {\n if (prototype.hasOwnProperty && prototype.hasOwnProperty('addEventListener')) {\n var oldAddEventListener = prototype.addEventListener;\n while (oldAddEventListener._rollbarOldAdd && oldAddEventListener.belongsToShim) {\n oldAddEventListener = oldAddEventListener._rollbarOldAdd;\n }\n var addFn = function(event, callback, bubble) {\n oldAddEventListener.call(this, event, handler.wrap(callback), bubble);\n };\n addFn._rollbarOldAdd = oldAddEventListener;\n addFn.belongsToShim = shim;\n prototype.addEventListener = addFn;\n\n var oldRemoveEventListener = prototype.removeEventListener;\n while (oldRemoveEventListener._rollbarOldRemove && oldRemoveEventListener.belongsToShim) {\n oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;\n }\n var removeFn = function(event, callback, bubble) {\n oldRemoveEventListener.call(this, event, callback && callback._rollbar_wrapped || callback, bubble);\n };\n removeFn._rollbarOldRemove = oldRemoveEventListener;\n removeFn.belongsToShim = shim;\n prototype.removeEventListener = removeFn;\n }\n}\n\nmodule.exports = wrapGlobals;\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction raw(payload, jsonBackup) {\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction selectFrames(frames, range) {\n var len = frames.length;\n if (len > range * 2) {\n return frames.slice(0, range).concat(frames.slice(len - range));\n }\n return frames;\n}\n\nfunction truncateFrames(payload, jsonBackup, range) {\n range = (typeof range === 'undefined') ? 30 : range;\n var body = payload.data.body;\n var frames;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n frames = chain[i].frames;\n frames = selectFrames(frames, range);\n chain[i].frames = frames;\n }\n } else if (body.trace) {\n frames = body.trace.frames;\n frames = selectFrames(frames, range);\n body.trace.frames = frames;\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction maybeTruncateValue(len, val) {\n if (!val) {\n return val;\n }\n if (val.length > len) {\n return val.slice(0, len - 3).concat('...');\n }\n return val;\n}\n\nfunction truncateStrings(len, payload, jsonBackup) {\n function truncator(k, v, seen) {\n switch (_.typeName(v)) {\n case 'string':\n return maybeTruncateValue(len, v);\n case 'object':\n case 'array':\n return traverse(v, truncator, seen);\n default:\n return v;\n }\n }\n payload = traverse(payload, truncator);\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction truncateTraceData(traceData) {\n if (traceData.exception) {\n delete traceData.exception.description;\n traceData.exception.message = maybeTruncateValue(255, traceData.exception.message);\n }\n traceData.frames = selectFrames(traceData.frames, 1);\n return traceData;\n}\n\nfunction minBody(payload, jsonBackup) {\n var body = payload.data.body;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n chain[i] = truncateTraceData(chain[i]);\n }\n } else if (body.trace) {\n body.trace = truncateTraceData(body.trace);\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction needsTruncation(payload, maxSize) {\n return _.maxByteSize(payload) > maxSize;\n}\n\nfunction truncate(payload, jsonBackup, maxSize) {\n maxSize = (typeof maxSize === 'undefined') ? (512 * 1024) : maxSize;\n var strategies = [\n raw,\n truncateFrames,\n truncateStrings.bind(null, 1024),\n truncateStrings.bind(null, 512),\n truncateStrings.bind(null, 256),\n minBody\n ];\n var strategy, results, result;\n\n while ((strategy = strategies.shift())) {\n results = strategy(payload, jsonBackup);\n payload = results[0];\n result = results[1];\n if (result.error || !needsTruncation(result.value, maxSize)) {\n return result;\n }\n }\n return result;\n}\n\nmodule.exports = {\n truncate: truncate,\n\n /* for testing */\n raw: raw,\n truncateFrames: truncateFrames,\n truncateStrings: truncateStrings,\n maybeTruncateValue: maybeTruncateValue\n};\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://rollbar/webpack/universalModuleDefinition","webpack://rollbar/webpack/bootstrap","webpack://rollbar/./src/utility.js","webpack://rollbar/./src/browser/logger.js","webpack://rollbar/./src/browser/url.js","webpack://rollbar/./src/errorParser.js","webpack://rollbar/./src/scrub.js","webpack://rollbar/./src/utility/traverse.js","webpack://rollbar/./src/browser/bundles/rollbar.js","webpack://rollbar/./src/browser/rollbar.js","webpack://rollbar/./src/browser/core.js","webpack://rollbar/./src/rollbar.js","webpack://rollbar/./src/rateLimiter.js","webpack://rollbar/./src/merge.js","webpack://rollbar/./src/queue.js","webpack://rollbar/./src/notifier.js","webpack://rollbar/./src/api.js","webpack://rollbar/./src/apiUtility.js","webpack://rollbar/./node_modules/console-polyfill/index.js","webpack://rollbar/./src/browser/detection.js","webpack://rollbar/./src/browser/globalSetup.js","webpack://rollbar/./src/browser/transport.js","webpack://rollbar/./src/browser/transforms.js","webpack://rollbar/./node_modules/error-stack-parser/error-stack-parser.js","webpack://rollbar/./node_modules/error-stack-parser/node_modules/stackframe/stackframe.js","webpack://rollbar/./src/transforms.js","webpack://rollbar/./src/browser/predicates.js","webpack://rollbar/./src/predicates.js","webpack://rollbar/./src/defaults.js","webpack://rollbar/./src/browser/defaults/scrubFields.js","webpack://rollbar/./src/telemetry.js","webpack://rollbar/./src/browser/telemetry.js","webpack://rollbar/./src/browser/domUtility.js","webpack://rollbar/./src/utility/polyfillJSON.js","webpack://rollbar/./vendor/JSON-js/json3.js","webpack://rollbar/./src/browser/wrapGlobals.js","webpack://rollbar/./src/truncation.js"],"names":["root","factory","exports","module","define","amd","this","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","merge","RollbarJSON","isType","x","typeName","Error","toString","match","toLowerCase","isFunction","f","isNativeFunction","funcMatchString","Function","replace","reIsNative","RegExp","isObject","test","type","uuid4","now","Math","random","floor","parseUriOptions","strictMode","q","parser","strict","loose","stringify","obj","backup","error","jsonError","backupError","wrapCallback","logger","err","resp","e","nonCircularClone","clone","seen","newSeen","result","includes","slice","push","message","TELEMETRY_TYPES","TELEMETRY_LEVELS","arrayIncludes","arr","val","k","length","Date","addParamsAndAccessTokenToPath","accessToken","options","params","access_token","paramsArray","join","query","sort","path","qs","indexOf","h","substring","createItem","args","notifier","requestKeys","lambdaContext","custom","callback","request","arg","extraArgs","argTypes","typ","DOMException","j","len","undefined","item","timestamp","diagnostic","uuid","level","skipFrames","setCustomItemKeys","_originalArgs","original_arg_types","addErrorContext","errors","data","contextAdded","rollbarContext","error_context","createTelemetryEvent","metadata","filterIp","requestData","captureIp","newIp","parts","split","pop","beginning","slashIdx","concat","formatArgsAsString","substr","formatUrl","u","protocol","port","hostname","keys","handleOptions","current","input","payload","hostWhiteList","hostSafeList","log","hostBlackList","hostBlockList","updateDeprecatedOptions","overwriteScrubFields","scrubFields","isError","isFiniteNumber","Number","isFinite","isIterable","isString","String","isPromise","then","jsonParse","parse","LEVELS","debug","info","warning","critical","makeUnhandledStackInfo","url","lineno","colno","backupMessage","errorParser","location","line","column","func","guessFunctionName","context","gatherContext","href","document","useragent","window","navigator","userAgent","redact","sanitizeUrl","baseUrlParts","str","exec","uri","$0","$1","$2","parseUri","anchor","source","set","temp","replacement","setupJSON","polyfillJSON","JSON","maxByteSize","string","count","code","charCodeAt","detection","_","Array","arguments","unshift","ieVersion","console","apply","last","auth","host","hash","pathname","search","parseInt","pathParts","ErrorStackParser","ERR_CLASS_REGEXP","Frame","stackFrame","_stackFrame","fileName","lineNumber","functionName","columnNumber","Stack","exception","skip","stack","parserStack","getStack","_mostSpecificErrorName","rawStack","rawException","constructorName","constructor","guessErrorClass","errMsg","errClassMatch","errClass","nested","traceChain","traverse","scrubPath","scrubPaths","paramRes","pat","ret","_getScrubFieldRegexs","queryRes","_getScrubQueryParamRegexs","redactQueryParam","dummy0","paramPart","scrubber","v","tmpV","valScrubber","paramScrubber","seenIndex","isObj","isArray","mapped","same","rollbar","_rollbarConfig","alias","globalAlias","shimRunning","shimId","_rollbarStartTime","getTime","Rollbar","_rollbarDidLoad","self","telemeter","instrumenter","wrapGlobals","scrub","truncation","setComponents","Client","API","globals","Transport","urllib","transforms","sharedTransforms","predicates","sharedPredicates","client","defaultOptions","_configuredOptions","Telemeter","components","Instrumenter","transport","api","gWindow","_gWindow","gDocument","isChrome","chrome","runtime","anonymousErrorsPending","addTransform","handleDomException","handleItemWithError","ensureItemHasSomethingToSay","addBaseInfo","addRequestInfo","addClientInfo","addPluginInfo","addBody","addMessageWithError","addTelemetryData","addConfigToPayload","addScrubber","userTransform","addConfiguredOptions","addDiagnosticKeys","itemToPayload","addTransformsToNotifier","queue","addPredicate","checkLevel","checkIgnore","userCheckIgnore","urlIsNotBlockListed","urlIsSafeListed","messageIsIgnored","setupUnhandledCapture","instrument","_instance","handleUninitialized","maybeCallback","_getFirstFunction","init","global","configure","payloadData","oldOptions","lastError","_createItem","warn","buildJsonPayload","sendJsonPayload","jsonPayload","unhandledExceptionsInitialized","captureUncaught","handleUncaughtExceptions","captureUncaughtExceptions","wrapGlobalEventHandlers","unhandledRejectionsInitialized","captureUnhandledRejections","handleUnhandledRejections","handleUncaughtException","inspectAnonymousErrors","stackInfo","_unhandledStackInfo","uncaughtErrorLevel","_isUncaught","handleAnonymousErrors","prepareStackTrace","_stack","_isAnonymous","handleUnhandledRejection","reason","promise","reasonResult","_rollbarContext","wrap","_before","ctxFn","_isWrap","_rollbar_wrapped","exc","_rollbarWrappedError","_wrappedSource","prop","captureEvent","event","captureDomContentLoaded","ts","captureLoad","loadFull","defaults","version","logLevel","reportLevel","endpoint","verbose","enabled","transmit","sendConfig","includeItemsInTelemetry","ignoreDuplicateErrors","RateLimiter","Queue","Notifier","platform","rateLimiter","configureGlobal","setPlatformOptions","tracer","validateTracer","setStackTraceLimit","lastErrorHash","stackTraceLimit","scope","active","maxItems","itemsPerMinute","_defaultLogLevel","_log","wait","postJsonPayload","defaultLevel","_sameAsLastError","_addTracingInfo","_captureRollbarItem","telemetryEvents","copyEvents","itemHash","generateItemHash","span","spanContext","toSpanId","toTraceId","validateSpan","setTag","opentracingSpanId","opentracingTraceId","opentracing_span_id","opentracing_trace_id","startTime","counter","perMinCounter","platformOptions","checkRate","limit","ignoreRateLimit","shouldSendValue","shouldSend","globalRateLimit","limitPerMin","perMinute","msg","environment","body","extra","language","framework","rateLimitPayload","globalSettings","elapsedTime","globalRateLimitPerMin","hasOwn","toStr","isPlainObject","hasOwnConstructor","hasIsPrototypeOf","src","copy","pendingItems","pendingRequests","retryQueue","retryHandle","waitCallback","waitIntervalID","predicate","addPendingItem","removePendingItem","idx","splice","addItem","originalError","originalItem","predicateResult","_applyPredicates","stop","_maybeLog","_makeApiRequest","_dequeuePendingRequest","_maybeCallWait","clearInterval","setInterval","rateLimitResponse","postItem","_maybeRetry","RETRIABLE_ERRORS","shouldRetry","retryInterval","maxRetries","retries","_retryApiRequest","retryObject","shift","transform","_applyTransforms","transformIndex","transformsLength","cb","helpers","Api","jsonBackup","transportOptions","_getTransport","getTransportFromOptions","buildPayload","post","stringifyResult","truncate","contextResult","timeout","proxy","opts","method","appendPathToPath","base","baseTrailingSlash","pathBeginningSlash","con","dummy","properties","methods","Detection","div","createElement","all","getElementsByTagName","innerHTML","undef","_rollbarWindowOnError","old","handler","shim","oldOnError","_rollbarOldOnError","onerror","fn","_rollbarURH","belongsToShim","removeEventListener","rejectionHandler","evt","detail","addEventListener","_makeZoneRequest","currentZone","Zone","_name","rootZone","_parent","run","_makeRequest","requestFactory","RollbarProxy","json","_msg","_proxyRequest","xmlhttp","factories","XMLHttpRequest","ActiveXObject","numFactories","_createXMLHTTPObject","onreadystatechange","readyState","parseResponse","responseText","status","_isNormalFailure","_newRetriableError","ex","open","setRequestHeader","send","e1","XDomainRequest","xdomainrequest","onprogress","ontimeout","onload","e2","writeData","addBodyMessage","stackFromItem","buildTrace","description","guess","trace","errorClass","frame","pre","contextLength","mid","raw","frames","filename","sendFrameUrl","endsWith","reverse","_savedStackTrace","chain","server","remoteString","query_string","user_ip","nav","scr","screen","runtime_ms","round","javascript","browser","cookie_enabled","cookieEnabled","width","height","cur","plugins","navPlugins","traces","traceChainLength","trace_chain","addBodyTraceChain","className","addBodyTrace","scrubFn","StackFrame","FIREFOX_SAFARI_STACK_REGEXP","CHROME_IE_STACK_REGEXP","SAFARI_NATIVE_CODE_REGEXP","stacktrace","parseOpera","parseV8OrIE","parseFFOrSafari","extractLocation","urlLike","filter","map","sanitizedLine","tokens","locationParts","functionNameRegex","matches","parseOpera9","parseOpera11","parseOpera10","lineRE","lines","argsRaw","functionCall","_capitalize","charAt","toUpperCase","_getter","booleanProps","numericProps","stringProps","props","getArgs","setArgs","TypeError","getEvalOrigin","evalOrigin","setEvalOrigin","getFileName","getLineNumber","getColumnNumber","getFunctionName","getIsEval","fromString","argsStartIndex","argsEndIndex","lastIndexOf","locationString","Boolean","isNaN","parseFloat","addFunctionOption","payloadOptions","tracePath","newExtra","newItem","response","promisedItem","configuredOptions","configured_options","is_anonymous","is_uncaught","raw_error","constructor_name","failed","settings","matchFrames","list","block","listLength","frameLength","urlIsOnAList","safeOrBlock","tracesLength","listName","levelVal","isUncaught","onSendCallback","ignoredMessages","rIgnoredMessage","messages","messagesFromItem","itemsPerMin","maxTelemetryEvents","maxQueueSize","max","min","getLevel","manual","newMaxEvents","deleteCount","events","filterTelemetry","capture","rollbarUUID","timestamp_ms","captureError","captureLog","captureNetwork","subtype","levelFromStatus","status_code","statusCode","captureDom","element","checked","captureNavigation","from","to","captureConnectivityChange","change","urlparser","domUtil","network","networkResponseHeaders","networkResponseBody","networkRequestHeaders","networkRequestBody","networkErrorOnHttp5xx","networkErrorOnHttp4xx","networkErrorOnHttp0","dom","navigation","connectivity","contentSecurityPolicy","errorOnContentSecurityPolicy","replacements","orig","restore","b","_window","_document","autoInstrument","scrubTelemetryInputs","telemetryScrubber","defaultValueScrubber","patterns","attributes","attrs","a","nameFromDescription","eventRemovers","contentsecuritypolicy","_location","_lastHref","oldSettings","deinstrumentNetwork","instrumentNetwork","deinstrumentConsole","instrumentConsole","deinstrumentDom","instrumentDom","deinstrumentNavigation","instrumentNavigation","deinstrumentConnectivity","instrumentConnectivity","deinstrumentContentSecurityPolicy","instrumentContentSecurityPolicy","wrapProp","xhr","xhrp","__rollbar_xhr","start_time_ms","end_time_ms","header","request_headers","request_content_type","onreadystatechangeHandler","__rollbar_event","headers","response_content_type","getResponseHeader","headersConfig","allHeaders","getAllResponseHeaders","trim","isJsonContentType","scrubJson","errorOnHttpStatus","trackHttpErrors","reqHeaders","Headers","fetchHeaders","text","contentType","inHeaders","outHeaders","entries","currentHeader","next","done","wrapConsole","origConsole","removeListeners","clickHandler","handleClick","blurHandler","handleBlur","addListener","getElementFromEvent","hasTag","tagName","anchorOrButton","isDescribedElement","captureDomEvent","handleSelectInputChanged","elem","multiple","selected","selectedIndex","isChecked","getElementType","describeElement","elementString","elementArrayToString","treeToArray","app","history","pushState","handleUrlChange","parsedHref","parsedTo","parsedFrom","handleCspEvent","cspEvent","blockedURI","violatedDirective","effectiveDirective","sourceFile","originalPolicy","handleCspError","cspHandler","section","altType","attachEvent","detachEvent","getAttribute","descriptionToString","desc","out","id","classes","attr","nextStr","totalLength","separatorLength","MAX_LENGTH","nextDescription","parentNode","doc","target","elementFromPoint","clientX","clientY","subtypes","gap","indent","meta","rep","state","container","escapes","number","action","rx_escapable","this_value","valueOf","quote","lastIndex","toJSON","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","\"","replacer","space","holder","partial","mind","go","firstokey","okey","ovalue","firstavalue","avalue","ocomma","acomma","colon","SyntaxError","reviver","tx","ignore","fromCharCode","walk","_extendListenerPrototype","oldAddEventListener","_rollbarOldAdd","addFn","bubble","oldRemoveEventListener","_rollbarOldRemove","removeFn","selectFrames","range","truncateFrames","maybeTruncateValue","truncateStrings","truncator","truncateTraceData","traceData","minBody","needsTruncation","maxSize","strategy","results","strategies"],"mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAiB,QAAID,IAErBD,EAAc,QAAIC,IARpB,CASGK,MAAM,WACT,O,YCTE,IAAIC,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUP,QAGnC,IAAIC,EAASI,EAAiBE,GAAY,CACzCC,EAAGD,EACHE,GAAG,EACHT,QAAS,IAUV,OANAU,EAAQH,GAAUI,KAAKV,EAAOD,QAASC,EAAQA,EAAOD,QAASM,GAG/DL,EAAOQ,GAAI,EAGJR,EAAOD,QA0Df,OArDAM,EAAoBM,EAAIF,EAGxBJ,EAAoBO,EAAIR,EAGxBC,EAAoBQ,EAAI,SAASd,EAASe,EAAMC,GAC3CV,EAAoBW,EAAEjB,EAASe,IAClCG,OAAOC,eAAenB,EAASe,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEV,EAAoBgB,EAAI,SAAStB,GACX,oBAAXuB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAenB,EAASuB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAenB,EAAS,aAAc,CAAEyB,OAAO,KAQvDnB,EAAoBoB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQnB,EAAoBmB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,iBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,EAChF,IAAII,EAAKX,OAAOY,OAAO,MAGvB,GAFAxB,EAAoBgB,EAAEO,GACtBX,OAAOC,eAAeU,EAAI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iB,IAAKA,EACLoV,eAAgBA,EAChBE,gBAAiBA,EACjBD,mBAAoBA","file":"rollbar.umd.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"rollbar\"] = factory();\n\telse\n\t\troot[\"rollbar\"] = factory();\n})(this, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n","'use strict';\n\nvar merge = require('./merge');\n\nvar RollbarJSON = {};\nfunction setupJSON(polyfillJSON) {\n if (isFunction(RollbarJSON.stringify) && isFunction(RollbarJSON.parse)) {\n return;\n }\n\n if (isDefined(JSON)) {\n // If polyfill is provided, prefer it over existing non-native shims.\n if(polyfillJSON) {\n if (isNativeFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isNativeFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n } else { // else accept any interface that is present.\n if (isFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n }\n }\n if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {\n polyfillJSON && polyfillJSON(RollbarJSON);\n }\n}\n\n/*\n * isType - Given a Javascript value and a string, returns true if the type of the value matches the\n * given string.\n *\n * @param x - any value\n * @param t - a lowercase string containing one of the following type names:\n * - undefined\n * - null\n * - error\n * - number\n * - boolean\n * - string\n * - symbol\n * - function\n * - object\n * - array\n * @returns true if x is of type t, otherwise false\n */\nfunction isType(x, t) {\n return t === typeName(x);\n}\n\n/*\n * typeName - Given a Javascript value, returns the type of the object as a string\n */\nfunction typeName(x) {\n var name = typeof x;\n if (name !== 'object') {\n return name;\n }\n if (!x) {\n return 'null';\n }\n if (x instanceof Error) {\n return 'error';\n }\n return ({}).toString.call(x).match(/\\s([a-zA-Z]+)/)[1].toLowerCase();\n}\n\n/* isFunction - a convenience function for checking if a value is a function\n *\n * @param f - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isFunction(f) {\n return isType(f, 'function');\n}\n\n/* isNativeFunction - a convenience function for checking if a value is a native JS function\n *\n * @param f - any value\n * @returns true if f is a native JS function, otherwise false\n */\nfunction isNativeFunction(f) {\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n var funcMatchString = Function.prototype.toString.call(Object.prototype.hasOwnProperty)\n .replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?');\n var reIsNative = RegExp('^' + funcMatchString + '$');\n return isObject(f) && reIsNative.test(f);\n}\n\n/* isObject - Checks if the argument is an object\n *\n * @param value - any value\n * @returns true is value is an object function is an object)\n*/\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/* isString - Checks if the argument is a string\n *\n * @param value - any value\n * @returns true if value is a string\n*/\nfunction isString(value) {\n return typeof value === 'string' || value instanceof String\n}\n\n/**\n * isFiniteNumber - determines whether the passed value is a finite number\n *\n * @param {*} n - any value\n * @returns true if value is a finite number\n */\n function isFiniteNumber(n) {\n return Number.isFinite(n);\n}\n\n/*\n * isDefined - a convenience function for checking if a value is not equal to undefined\n *\n * @param u - any value\n * @returns true if u is anything other than undefined\n */\nfunction isDefined(u) {\n return !isType(u, 'undefined');\n}\n\n/*\n * isIterable - convenience function for checking if a value can be iterated, essentially\n * whether it is an object or an array.\n *\n * @param i - any value\n * @returns true if i is an object or an array as determined by `typeName`\n */\nfunction isIterable(i) {\n var type = typeName(i);\n return (type === 'object' || type === 'array');\n}\n\n/*\n * isError - convenience function for checking if a value is of an error type\n *\n * @param e - any value\n * @returns true if e is an error\n */\nfunction isError(e) {\n // Detect both Error and Firefox Exception type\n return isType(e, 'error') || isType(e, 'exception');\n}\n\n/* isPromise - a convenience function for checking if a value is a promise\n *\n * @param p - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isPromise(p) {\n return isObject(p) && isType(p.then, 'function');\n}\n\nfunction redact() {\n return '********';\n}\n\n// from http://stackoverflow.com/a/8809472/1138191\nfunction uuid4() {\n var d = now();\n var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n var r = (d + Math.random() * 16) % 16 | 0;\n d = Math.floor(d / 16);\n return (c === 'x' ? r : (r & 0x7 | 0x8)).toString(16);\n });\n return uuid;\n}\n\nvar LEVELS = {\n debug: 0,\n info: 1,\n warning: 2,\n error: 3,\n critical: 4\n};\n\nfunction sanitizeUrl(url) {\n var baseUrlParts = parseUri(url);\n if (!baseUrlParts) {\n return '(unknown)';\n }\n\n // remove a trailing # if there is no anchor\n if (baseUrlParts.anchor === '') {\n baseUrlParts.source = baseUrlParts.source.replace('#', '');\n }\n\n url = baseUrlParts.source.replace('?' + baseUrlParts.query, '');\n return url;\n}\n\nvar parseUriOptions = {\n strictMode: false,\n key: [\n 'source',\n 'protocol',\n 'authority',\n 'userInfo',\n 'user',\n 'password',\n 'host',\n 'port',\n 'relative',\n 'path',\n 'directory',\n 'file',\n 'query',\n 'anchor'\n ],\n q: {\n name: 'queryKey',\n parser: /(?:^|&)([^&=]*)=?([^&]*)/g\n },\n parser: {\n strict: /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n loose: /^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/\n }\n};\n\nfunction parseUri(str) {\n if (!isType(str, 'string')) {\n return undefined;\n }\n\n var o = parseUriOptions;\n var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);\n var uri = {};\n\n for (var i = 0, l = o.key.length; i < l; ++i) {\n uri[o.key[i]] = m[i] || '';\n }\n\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) {\n uri[o.q.name][$1] = $2;\n }\n });\n\n return uri;\n}\n\nfunction addParamsAndAccessTokenToPath(accessToken, options, params) {\n params = params || {};\n params.access_token = accessToken;\n var paramsArray = [];\n var k;\n for (k in params) {\n if (Object.prototype.hasOwnProperty.call(params, k)) {\n paramsArray.push([k, params[k]].join('='));\n }\n }\n var query = '?' + paramsArray.sort().join('&');\n\n options = options || {};\n options.path = options.path || '';\n var qs = options.path.indexOf('?');\n var h = options.path.indexOf('#');\n var p;\n if (qs !== -1 && (h === -1 || h > qs)) {\n p = options.path;\n options.path = p.substring(0,qs) + query + '&' + p.substring(qs+1);\n } else {\n if (h !== -1) {\n p = options.path;\n options.path = p.substring(0,h) + query + p.substring(h);\n } else {\n options.path = options.path + query;\n }\n }\n}\n\nfunction formatUrl(u, protocol) {\n protocol = protocol || u.protocol;\n if (!protocol && u.port) {\n if (u.port === 80) {\n protocol = 'http:';\n } else if (u.port === 443) {\n protocol = 'https:';\n }\n }\n protocol = protocol || 'https:';\n\n if (!u.hostname) {\n return null;\n }\n var result = protocol + '//' + u.hostname;\n if (u.port) {\n result = result + ':' + u.port;\n }\n if (u.path) {\n result = result + u.path;\n }\n return result;\n}\n\nfunction stringify(obj, backup) {\n var value, error;\n try {\n value = RollbarJSON.stringify(obj);\n } catch (jsonError) {\n if (backup && isFunction(backup)) {\n try {\n value = backup(obj);\n } catch (backupError) {\n error = backupError;\n }\n } else {\n error = jsonError;\n }\n }\n return {error: error, value: value};\n}\n\nfunction maxByteSize(string) {\n // The transport will use utf-8, so assume utf-8 encoding.\n //\n // This minimal implementation will accurately count bytes for all UCS-2 and\n // single code point UTF-16. If presented with multi code point UTF-16,\n // which should be rare, it will safely overcount, not undercount.\n //\n // While robust utf-8 encoders exist, this is far smaller and far more performant.\n // For quickly counting payload size for truncation, smaller is better.\n\n var count = 0;\n var length = string.length;\n\n for (var i = 0; i < length; i++) {\n var code = string.charCodeAt(i);\n if (code < 128) { // up to 7 bits\n count = count + 1;\n } else if (code < 2048) { // up to 11 bits\n count = count + 2;\n } else if (code < 65536) { // up to 16 bits\n count = count + 3;\n }\n }\n\n return count;\n}\n\nfunction jsonParse(s) {\n var value, error;\n try {\n value = RollbarJSON.parse(s);\n } catch (e) {\n error = e;\n }\n return {error: error, value: value};\n}\n\nfunction makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n mode,\n backupMessage,\n errorParser\n) {\n var location = {\n url: url || '',\n line: lineno,\n column: colno\n };\n location.func = errorParser.guessFunctionName(location.url, location.line);\n location.context = errorParser.gatherContext(location.url, location.line);\n var href = typeof document !== 'undefined' && document && document.location && document.location.href;\n var useragent = typeof window !== 'undefined' && window && window.navigator && window.navigator.userAgent;\n return {\n 'mode': mode,\n 'message': error ? String(error) : (message || backupMessage),\n 'url': href,\n 'stack': [location],\n 'useragent': useragent\n };\n}\n\nfunction wrapCallback(logger, f) {\n return function(err, resp) {\n try {\n f(err, resp);\n } catch (e) {\n logger.error(e);\n }\n };\n}\n\nfunction nonCircularClone(obj) {\n var seen = [obj];\n\n function clone(obj, seen) {\n var value, name, newSeen, result = {};\n\n try {\n for (name in obj) {\n value = obj[name];\n\n if (value && (isType(value, 'object') || isType(value, 'array'))) {\n if (seen.includes(value)) {\n result[name] = 'Removed circular reference: ' + typeName(value);\n } else {\n newSeen = seen.slice();\n newSeen.push(value);\n result[name] = clone(value, newSeen);\n }\n continue;\n }\n\n result[name] = value;\n }\n } catch (e) {\n result = 'Failed cloning custom data: ' + e.message;\n }\n return result;\n }\n return clone(obj, seen);\n}\n\nfunction createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\n var diagnostic = {};\n var argTypes = [];\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n argTypes.push(typ);\n switch (typ) {\n case 'undefined':\n break;\n case 'string':\n message ? extraArgs.push(arg) : message = arg;\n break;\n case 'function':\n callback = wrapCallback(logger, arg);\n break;\n case 'date':\n extraArgs.push(arg);\n break;\n case 'error':\n case 'domexception':\n case 'exception': // Firefox Exception type\n err ? extraArgs.push(arg) : err = arg;\n break;\n case 'object':\n case 'array':\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n if (requestKeys && typ === 'object' && !request) {\n for (var j = 0, len = requestKeys.length; j < len; ++j) {\n if (arg[requestKeys[j]] !== undefined) {\n request = arg;\n break;\n }\n }\n if (request) {\n break;\n }\n }\n custom ? extraArgs.push(arg) : custom = arg;\n break;\n default:\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n extraArgs.push(arg);\n }\n }\n\n // if custom is an array this turns it into an object with integer keys\n if (custom) custom = nonCircularClone(custom);\n\n if (extraArgs.length > 0) {\n if (!custom) custom = nonCircularClone({});\n custom.extraArgs = nonCircularClone(extraArgs);\n }\n\n var item = {\n message: message,\n err: err,\n custom: custom,\n timestamp: now(),\n callback: callback,\n notifier: notifier,\n diagnostic: diagnostic,\n uuid: uuid4()\n };\n\n setCustomItemKeys(item, custom);\n\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n item.diagnostic.original_arg_types = argTypes;\n return item;\n}\n\nfunction setCustomItemKeys(item, custom) {\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (custom && custom.skipFrames !== undefined) {\n item.skipFrames = custom.skipFrames;\n delete custom.skipFrames;\n }\n}\n\nfunction addErrorContext(item, errors) {\n var custom = item.data.custom || {};\n var contextAdded = false;\n\n try {\n for (var i = 0; i < errors.length; ++i) {\n if (errors[i].hasOwnProperty('rollbarContext')) {\n custom = merge(custom, nonCircularClone(errors[i].rollbarContext));\n contextAdded = true;\n }\n }\n\n // Avoid adding an empty object to the data.\n if (contextAdded) {\n item.data.custom = custom;\n }\n } catch (e) {\n item.diagnostic.error_context = 'Failed: ' + e.message;\n }\n}\n\nvar TELEMETRY_TYPES = ['log', 'network', 'dom', 'navigation', 'error', 'manual'];\nvar TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];\n\nfunction arrayIncludes(arr, val) {\n for (var k = 0; k < arr.length; ++k) {\n if (arr[k] === val) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction createTelemetryEvent(args) {\n var type, metadata, level;\n var arg;\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n switch (typ) {\n case 'string':\n if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {\n type = arg;\n } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {\n level = arg;\n }\n break;\n case 'object':\n metadata = arg;\n break;\n default:\n break;\n }\n }\n var event = {\n type: type || 'manual',\n metadata: metadata || {},\n level: level\n };\n\n return event;\n}\n\n/*\n * get - given an obj/array and a keypath, return the value at that keypath or\n * undefined if not possible.\n *\n * @param obj - an object or array\n * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'\n * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`\n */\nfunction get(obj, path) {\n if (!obj) {\n return undefined;\n }\n var keys = path.split('.');\n var result = obj;\n try {\n for (var i = 0, len = keys.length; i < len; ++i) {\n result = result[keys[i]];\n }\n } catch (e) {\n result = undefined;\n }\n return result;\n}\n\nfunction set(obj, path, value) {\n if (!obj) {\n return;\n }\n var keys = path.split('.');\n var len = keys.length;\n if (len < 1) {\n return;\n }\n if (len === 1) {\n obj[keys[0]] = value;\n return;\n }\n try {\n var temp = obj[keys[0]] || {};\n var replacement = temp;\n for (var i = 1; i < len - 1; ++i) {\n temp[keys[i]] = temp[keys[i]] || {};\n temp = temp[keys[i]];\n }\n temp[keys[len-1]] = value;\n obj[keys[0]] = replacement;\n } catch (e) {\n return;\n }\n}\n\nfunction formatArgsAsString(args) {\n var i, len, arg;\n var result = [];\n for (i = 0, len = args.length; i < len; ++i) {\n arg = args[i];\n switch (typeName(arg)) {\n case 'object':\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500) {\n arg = arg.substr(0, 497) + '...';\n }\n break;\n case 'null':\n arg = 'null';\n break;\n case 'undefined':\n arg = 'undefined';\n break;\n case 'symbol':\n arg = arg.toString();\n break;\n }\n result.push(arg);\n }\n return result.join(' ');\n}\n\nfunction now() {\n if (Date.now) {\n return +Date.now();\n }\n return +new Date();\n}\n\nfunction filterIp(requestData, captureIp) {\n if (!requestData || !requestData['user_ip'] || captureIp === true) {\n return;\n }\n var newIp = requestData['user_ip'];\n if (!captureIp) {\n newIp = null;\n } else {\n try {\n var parts;\n if (newIp.indexOf('.') !== -1) {\n parts = newIp.split('.');\n parts.pop();\n parts.push('0');\n newIp = parts.join('.');\n } else if (newIp.indexOf(':') !== -1) {\n parts = newIp.split(':');\n if (parts.length > 2) {\n var beginning = parts.slice(0, 3);\n var slashIdx = beginning[2].indexOf('/');\n if (slashIdx !== -1) {\n beginning[2] = beginning[2].substring(0, slashIdx);\n }\n var terminal = '0000:0000:0000:0000:0000';\n newIp = beginning.concat(terminal).join(':');\n }\n } else {\n newIp = null;\n }\n } catch (e) {\n newIp = null;\n }\n }\n requestData['user_ip'] = newIp;\n}\n\nfunction handleOptions(current, input, payload, logger) {\n var result = merge(current, input, payload);\n result = updateDeprecatedOptions(result, logger);\n if (!input || input.overwriteScrubFields) {\n return result;\n }\n if (input.scrubFields) {\n result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);\n }\n return result;\n}\n\nfunction updateDeprecatedOptions(options, logger) {\n if(options.hostWhiteList && !options.hostSafeList) {\n options.hostSafeList = options.hostWhiteList;\n options.hostWhiteList = undefined;\n logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');\n }\n if(options.hostBlackList && !options.hostBlockList) {\n options.hostBlockList = options.hostBlackList;\n options.hostBlackList = undefined;\n logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');\n }\n return options;\n}\n\nmodule.exports = {\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n createItem: createItem,\n addErrorContext: addErrorContext,\n createTelemetryEvent: createTelemetryEvent,\n filterIp: filterIp,\n formatArgsAsString: formatArgsAsString,\n formatUrl: formatUrl,\n get: get,\n handleOptions: handleOptions,\n isError: isError,\n isFiniteNumber: isFiniteNumber,\n isFunction: isFunction,\n isIterable: isIterable,\n isNativeFunction: isNativeFunction,\n isObject: isObject,\n isString: isString,\n isType: isType,\n isPromise: isPromise,\n jsonParse: jsonParse,\n LEVELS: LEVELS,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n merge: merge,\n now: now,\n redact: redact,\n RollbarJSON: RollbarJSON,\n sanitizeUrl: sanitizeUrl,\n set: set,\n setupJSON: setupJSON,\n stringify: stringify,\n maxByteSize: maxByteSize,\n typeName: typeName,\n uuid4: uuid4\n};\n","'use strict';\n\n/* eslint-disable no-console */\nrequire('console-polyfill');\nvar detection = require('./detection');\nvar _ = require('../utility');\n\nfunction error() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.error(_.formatArgsAsString(args));\n } else {\n console.error.apply(console, args);\n }\n}\n\nfunction info() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.info(_.formatArgsAsString(args));\n } else {\n console.info.apply(console, args);\n }\n}\n\nfunction log() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.log(_.formatArgsAsString(args));\n } else {\n console.log.apply(console, args);\n }\n}\n\n/* eslint-enable no-console */\n\nmodule.exports = {\n error: error,\n info: info,\n log: log\n};\n","'use strict';\n\n// See https://nodejs.org/docs/latest/api/url.html\nfunction parse(url) {\n var result = {\n protocol: null, auth: null, host: null, path: null,\n hash: null, href: url, hostname: null, port: null,\n pathname: null, search: null, query: null\n };\n\n var i, last;\n i = url.indexOf('//');\n if (i !== -1) {\n result.protocol = url.substring(0,i);\n last = i+2;\n } else {\n last = 0;\n }\n \n i = url.indexOf('@', last);\n if (i !== -1) {\n result.auth = url.substring(last, i);\n last = i+1;\n }\n\n i = url.indexOf('/', last);\n if (i === -1) {\n i = url.indexOf('?', last);\n if (i === -1) {\n i = url.indexOf('#', last);\n if (i === -1) {\n result.host = url.substring(last);\n } else {\n result.host = url.substring(last, i);\n result.hash = url.substring(i);\n }\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n return result;\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n\n i = url.indexOf('#', last);\n if (i === -1) {\n result.path = url.substring(last);\n } else {\n result.path = url.substring(last, i);\n result.hash = url.substring(i);\n }\n\n if (result.path) {\n var pathParts = result.path.split('?');\n result.pathname = pathParts[0];\n result.query = pathParts[1];\n result.search = result.query ? '?' + result.query : null;\n }\n return result;\n}\n\nmodule.exports = {\n parse: parse\n};\n","'use strict';\n\nvar ErrorStackParser = require('error-stack-parser');\n\nvar UNKNOWN_FUNCTION = '?';\nvar ERR_CLASS_REGEXP = new RegExp('^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ');\n\nfunction guessFunctionName() {\n return UNKNOWN_FUNCTION;\n}\n\n\nfunction gatherContext() {\n return null;\n}\n\n\nfunction Frame(stackFrame) {\n var data = {};\n\n data._stackFrame = stackFrame;\n\n data.url = stackFrame.fileName;\n data.line = stackFrame.lineNumber;\n data.func = stackFrame.functionName;\n data.column = stackFrame.columnNumber;\n data.args = stackFrame.args;\n\n data.context = gatherContext();\n\n return data;\n}\n\n\nfunction Stack(exception, skip) {\n function getStack() {\n var parserStack = [];\n\n skip = skip || 0;\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch(e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = skip; i < parserStack.length; i++) {\n stack.push(new Frame(parserStack[i]));\n }\n\n return stack;\n }\n\n return {\n stack: getStack(),\n message: exception.message,\n name: _mostSpecificErrorName(exception),\n rawStack: exception.stack,\n rawException: exception\n };\n}\n\n\nfunction parse(e, skip) {\n var err = e;\n\n if (err.nested) {\n var traceChain = [];\n while (err) {\n traceChain.push(new Stack(err, skip));\n err = err.nested;\n\n skip = 0; // Only apply skip value to primary error\n }\n\n // Return primary error with full trace chain attached.\n traceChain[0].traceChain = traceChain;\n return traceChain[0];\n } else {\n return new Stack(err, skip);\n }\n}\n\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg || !errMsg.match) {\n return ['Unknown error. There was no error message to display.', ''];\n }\n var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);\n var errClass = '(unknown)';\n\n if (errClassMatch) {\n errClass = errClassMatch[errClassMatch.length - 1];\n errMsg = errMsg.replace((errClassMatch[errClassMatch.length - 2] || '') + errClass + ':', '');\n errMsg = errMsg.replace(/(^[\\s]+|[\\s]+$)/g, '');\n }\n return [errClass, errMsg];\n}\n\n// * Prefers any value over an empty string\n// * Prefers any value over 'Error' where possible\n// * Prefers name over constructor.name when both are more specific than 'Error'\nfunction _mostSpecificErrorName(error) {\n var name = error.name && error.name.length && error.name;\n var constructorName = error.constructor.name && error.constructor.name.length && error.constructor.name;\n\n if (!name || !constructorName) {\n return name || constructorName;\n }\n\n if (name === 'Error') {\n return constructorName;\n }\n return name;\n}\n\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame\n};\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction scrub(data, scrubFields, scrubPaths) {\n scrubFields = scrubFields || [];\n\n if (scrubPaths) {\n for (var i = 0; i < scrubPaths.length; ++i) {\n scrubPath(data, scrubPaths[i]);\n }\n }\n\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart) {\n return paramPart + _.redact();\n }\n\n function paramScrubber(v) {\n var i;\n if (_.isType(v, 'string')) {\n for (i = 0; i < queryRes.length; ++i) {\n v = v.replace(queryRes[i], redactQueryParam);\n }\n }\n return v;\n }\n\n function valScrubber(k, v) {\n var i;\n for (i = 0; i < paramRes.length; ++i) {\n if (paramRes[i].test(k)) {\n v = _.redact();\n break;\n }\n }\n return v;\n }\n\n function scrubber(k, v, seen) {\n var tmpV = valScrubber(k, v);\n if (tmpV === v) {\n if (_.isType(v, 'object') || _.isType(v, 'array')) {\n return traverse(v, scrubber, seen);\n }\n return paramScrubber(tmpV);\n } else {\n return tmpV;\n }\n }\n\n return traverse(data, scrubber);\n}\n\nfunction scrubPath(obj, path) {\n var keys = path.split('.');\n var last = keys.length - 1;\n try {\n for (var i = 0; i <= last; ++i) {\n if (i < last) {\n obj = obj[keys[i]];\n } else {\n obj[keys[i]] = _.redact();\n }\n }\n } catch (e) {\n // Missing key is OK;\n }\n}\n\nfunction _getScrubFieldRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '^\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?$';\n ret.push(new RegExp(pat, 'i'));\n }\n return ret;\n}\n\n\nfunction _getScrubQueryParamRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?';\n ret.push(new RegExp('(' + pat + '=)([^&\\\\n]+)', 'igm'));\n }\n return ret;\n}\n\nmodule.exports = scrub;\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction traverse(obj, func, seen) {\n var k, v, i;\n var isObj = _.isType(obj, 'object');\n var isArray = _.isType(obj, 'array');\n var keys = [];\n var seenIndex;\n\n // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.\n seen = seen || { obj: [], mapped: []};\n\n if (isObj) {\n seenIndex = seen.obj.indexOf(obj);\n\n if (isObj && seenIndex !== -1) {\n // Prefer the mapped object if there is one.\n return seen.mapped[seenIndex] || seen.obj[seenIndex];\n }\n\n seen.obj.push(obj);\n seenIndex = seen.obj.length - 1;\n }\n\n if (isObj) {\n for (k in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, k)) {\n keys.push(k);\n }\n }\n } else if (isArray) {\n for (i = 0; i < obj.length; ++i) {\n keys.push(i);\n }\n }\n\n var result = isObj ? {} : [];\n var same = true;\n for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n result[k] = func(k, v, seen);\n same = same && result[k] === obj[k];\n }\n\n if (isObj && !same) {\n seen.mapped[seenIndex] = result;\n }\n\n return !same ? result : obj;\n}\n\nmodule.exports = traverse;\n","'use strict';\n\nvar rollbar = require('../rollbar');\n\nvar options = (typeof window !== 'undefined') && window._rollbarConfig;\nvar alias = options && options.globalAlias || 'Rollbar';\nvar shimRunning = (typeof window !== 'undefined') && window[alias] && typeof window[alias].shimId === 'function' && window[alias].shimId() !== undefined;\n\nif ((typeof window !== 'undefined') && !window._rollbarStartTime) {\n window._rollbarStartTime = (new Date()).getTime();\n}\n\nif (!shimRunning && options) {\n var Rollbar = new rollbar(options);\n window[alias] = Rollbar;\n} else if (typeof window !== 'undefined') {\n window.rollbar = rollbar;\n window._rollbarDidLoad = true;\n} else if (typeof self !== 'undefined') {\n self.rollbar = rollbar;\n self._rollbarDidLoad = true;\n}\n\nmodule.exports = rollbar;\n","'use strict';\n\nvar Rollbar = require('./core');\nvar telemeter = require('../telemetry');\nvar instrumenter = require('./telemetry');\nvar polyfillJSON = require('../utility/polyfillJSON');\nvar wrapGlobals = require('./wrapGlobals');\nvar scrub = require('../scrub');\nvar truncation = require('../truncation');\n\nRollbar.setComponents({\n telemeter: telemeter,\n instrumenter: instrumenter,\n polyfillJSON: polyfillJSON,\n wrapGlobals: wrapGlobals,\n scrub: scrub,\n truncation: truncation\n});\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar Client = require('../rollbar');\nvar _ = require('../utility');\nvar API = require('../api');\nvar logger = require('./logger');\nvar globals = require('./globalSetup');\n\nvar Transport = require('./transport');\nvar urllib = require('./url');\n\nvar transforms = require('./transforms');\nvar sharedTransforms = require('../transforms');\nvar predicates = require('./predicates');\nvar sharedPredicates = require('../predicates');\nvar errorParser = require('../errorParser');\n\nfunction Rollbar(options, client) {\n this.options = _.handleOptions(defaultOptions, options, null, logger);\n this.options._configuredOptions = options;\n var Telemeter = this.components.telemeter;\n var Instrumenter = this.components.instrumenter;\n var polyfillJSON = this.components.polyfillJSON;\n this.wrapGlobals = this.components.wrapGlobals;\n this.scrub = this.components.scrub;\n var truncation = this.components.truncation;\n\n var transport = new Transport(truncation);\n var api = new API(this.options, transport, urllib, truncation);\n if (Telemeter) {\n this.telemeter = new Telemeter(this.options);\n }\n this.client = client || new Client(this.options, api, logger, this.telemeter, 'browser');\n var gWindow = _gWindow();\n var gDocument = (typeof document != 'undefined') && document;\n this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers\n this.anonymousErrorsPending = 0;\n addTransformsToNotifier(this.client.notifier, this, gWindow);\n addPredicatesToQueue(this.client.queue);\n this.setupUnhandledCapture();\n if (Instrumenter) {\n this.instrumenter = new Instrumenter(this.options, this.client.telemeter, this, gWindow, gDocument);\n this.instrumenter.instrument();\n }\n _.setupJSON(polyfillJSON);\n}\n\nvar _instance = null;\nRollbar.init = function(options, client) {\n if (_instance) {\n return _instance.global(options).configure(options);\n }\n _instance = new Rollbar(options, client);\n return _instance;\n};\n\nRollbar.prototype.components = {};\n\nRollbar.setComponents = function(components) {\n Rollbar.prototype.components = components;\n}\n\nfunction handleUninitialized(maybeCallback) {\n var message = 'Rollbar is not initialized';\n logger.error(message);\n if (maybeCallback) {\n maybeCallback(new Error(message));\n }\n}\n\nRollbar.prototype.global = function(options) {\n this.client.global(options);\n return this;\n};\nRollbar.global = function(options) {\n if (_instance) {\n return _instance.global(options);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.configure = function(options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = {payload: payloadData};\n }\n this.options = _.handleOptions(oldOptions, options, payload, logger);\n this.options._configuredOptions = _.handleOptions(oldOptions._configuredOptions, options, payload);\n this.client.configure(this.options, payloadData);\n this.instrumenter && this.instrumenter.configure(this.options);\n this.setupUnhandledCapture();\n return this;\n};\nRollbar.configure = function(options, payloadData) {\n if (_instance) {\n return _instance.configure(options, payloadData);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.lastError = function() {\n return this.client.lastError;\n};\nRollbar.lastError = function() {\n if (_instance) {\n return _instance.lastError();\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.log = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.log(item);\n return {uuid: uuid};\n};\nRollbar.log = function() {\n if (_instance) {\n return _instance.log.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.debug = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.debug(item);\n return {uuid: uuid};\n};\nRollbar.debug = function() {\n if (_instance) {\n return _instance.debug.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.info = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.info(item);\n return {uuid: uuid};\n};\nRollbar.info = function() {\n if (_instance) {\n return _instance.info.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warn = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warn(item);\n return {uuid: uuid};\n};\nRollbar.warn = function() {\n if (_instance) {\n return _instance.warn.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warning = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warning(item);\n return {uuid: uuid};\n};\nRollbar.warning = function() {\n if (_instance) {\n return _instance.warning.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.error = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.error(item);\n return {uuid: uuid};\n};\nRollbar.error = function() {\n if (_instance) {\n return _instance.error.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.critical = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.critical(item);\n return {uuid: uuid};\n};\nRollbar.critical = function() {\n if (_instance) {\n return _instance.critical.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.buildJsonPayload = function(item) {\n return this.client.buildJsonPayload(item);\n};\nRollbar.buildJsonPayload = function() {\n if (_instance) {\n return _instance.buildJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.sendJsonPayload = function(jsonPayload) {\n return this.client.sendJsonPayload(jsonPayload);\n};\nRollbar.sendJsonPayload = function() {\n if (_instance) {\n return _instance.sendJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.setupUnhandledCapture = function() {\n var gWindow = _gWindow();\n\n if (!this.unhandledExceptionsInitialized) {\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(gWindow, this);\n if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {\n this.wrapGlobals(gWindow, this);\n }\n this.unhandledExceptionsInitialized = true;\n }\n }\n if (!this.unhandledRejectionsInitialized) {\n if (this.options.captureUnhandledRejections || this.options.handleUnhandledRejections) {\n globals.captureUnhandledRejections(gWindow, this);\n this.unhandledRejectionsInitialized = true;\n }\n }\n};\n\nRollbar.prototype.handleUncaughtException = function(message, url, lineno, colno, error, context) {\n if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {\n return;\n }\n\n // Chrome will always send 5+ arguments and error will be valid or null, not undefined.\n // If error is undefined, we have a different caller.\n // Chrome also sends errors from web workers with null error, but does not invoke\n // prepareStackTrace() for these. Test for empty url to skip them.\n if (this.options.inspectAnonymousErrors && this.isChrome && error === null && url === '') {\n return 'anonymous';\n }\n\n var item;\n var stackInfo = _.makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n 'onerror',\n 'uncaught exception',\n errorParser\n );\n if (_.isError(error)) {\n item = this._createItem([message, error, context]);\n item._unhandledStackInfo = stackInfo;\n } else if (_.isError(url)) {\n item = this._createItem([message, url, context]);\n item._unhandledStackInfo = stackInfo;\n } else {\n item = this._createItem([message, context]);\n item.stackInfo = stackInfo;\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n this.client.log(item);\n};\n\n/**\n * Chrome only. Other browsers will ignore.\n *\n * Use Error.prepareStackTrace to extract information about errors that\n * do not have a valid error object in onerror().\n *\n * In tested version of Chrome, onerror is called first but has no way\n * to communicate with prepareStackTrace. Use a counter to let this\n * handler know which errors to send to Rollbar.\n *\n * In config options, set inspectAnonymousErrors to enable.\n */\nRollbar.prototype.handleAnonymousErrors = function() {\n if (!this.options.inspectAnonymousErrors || !this.isChrome) {\n return;\n }\n\n var r = this;\n function prepareStackTrace(error, _stack) { // eslint-disable-line no-unused-vars\n if (r.options.inspectAnonymousErrors) {\n if (r.anonymousErrorsPending) {\n // This is the only known way to detect that onerror saw an anonymous error.\n // It depends on onerror reliably being called before Error.prepareStackTrace,\n // which so far holds true on tested versions of Chrome. If versions of Chrome\n // are tested that behave differently, this logic will need to be updated\n // accordingly.\n r.anonymousErrorsPending -= 1;\n\n if (!error) {\n // Not likely to get here, but calling handleUncaughtException from here\n // without an error object would throw off the anonymousErrorsPending counter,\n // so return now.\n return;\n }\n\n // Allow this to be tracked later.\n error._isAnonymous = true;\n\n // url, lineno, colno shouldn't be needed for these errors.\n // If that changes, update this accordingly, using the unused\n // _stack param as needed (rather than parse error.toString()).\n r.handleUncaughtException(error.message, null, null, null, error);\n }\n }\n\n // Workaround to ensure stack is preserved for normal errors.\n return error.stack;\n }\n\n // https://v8.dev/docs/stack-trace-api\n try {\n Error.prepareStackTrace = prepareStackTrace;\n } catch (e) {\n this.options.inspectAnonymousErrors = false;\n this.error('anonymous error handler failed', e);\n }\n}\n\nRollbar.prototype.handleUnhandledRejection = function(reason, promise) {\n if (!this.options.captureUnhandledRejections && !this.options.handleUnhandledRejections) {\n return;\n }\n\n var message = 'unhandled rejection was null or undefined!';\n if (reason) {\n if (reason.message) {\n message = reason.message;\n } else {\n var reasonResult = _.stringify(reason);\n if (reasonResult.value) {\n message = reasonResult.value;\n }\n }\n }\n var context = (reason && reason._rollbarContext) || (promise && promise._rollbarContext);\n\n var item;\n if (_.isError(reason)) {\n item = this._createItem([message, reason, context]);\n } else {\n item = this._createItem([message, reason, context]);\n item.stackInfo = _.makeUnhandledStackInfo(\n message,\n '',\n 0,\n 0,\n null,\n 'unhandledrejection',\n '',\n errorParser\n );\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n item._originalArgs = item._originalArgs || [];\n item._originalArgs.push(promise);\n this.client.log(item);\n};\n\nRollbar.prototype.wrap = function(f, context, _before) {\n try {\n var ctxFn;\n if(_.isFunction(context)) {\n ctxFn = context;\n } else {\n ctxFn = function() { return context || {}; };\n }\n\n if (!_.isFunction(f)) {\n return f;\n }\n\n if (f._isWrap) {\n return f;\n }\n\n if (!f._rollbar_wrapped) {\n f._rollbar_wrapped = function () {\n if (_before && _.isFunction(_before)) {\n _before.apply(this, arguments);\n }\n try {\n return f.apply(this, arguments);\n } catch(exc) {\n var e = exc;\n if (e && window._rollbarWrappedError !== e) {\n if (_.isType(e, 'string')) {\n e = new String(e);\n }\n e._rollbarContext = ctxFn() || {};\n e._rollbarContext._wrappedSource = f.toString();\n\n window._rollbarWrappedError = e;\n }\n throw e;\n }\n };\n\n f._rollbar_wrapped._isWrap = true;\n\n if (f.hasOwnProperty) {\n for (var prop in f) {\n if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {\n f._rollbar_wrapped[prop] = f[prop];\n }\n }\n }\n }\n\n return f._rollbar_wrapped;\n } catch (e) {\n // Return the original function if the wrap fails.\n return f;\n }\n};\nRollbar.wrap = function(f, context) {\n if (_instance) {\n return _instance.wrap(f, context);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.captureEvent = function() {\n var event = _.createTelemetryEvent(arguments);\n return this.client.captureEvent(event.type, event.metadata, event.level);\n};\nRollbar.captureEvent = function() {\n if (_instance) {\n return _instance.captureEvent.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\n// The following two methods are used internally and are not meant for public use\nRollbar.prototype.captureDomContentLoaded = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureLoad(ts);\n};\n\n/* Internal */\n\nfunction addTransformsToNotifier(notifier, rollbar, gWindow) {\n notifier\n .addTransform(transforms.handleDomException)\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(gWindow))\n .addTransform(transforms.addClientInfo(gWindow))\n .addTransform(transforms.addPluginInfo(gWindow))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(sharedTransforms.addConfigToPayload)\n .addTransform(transforms.addScrubber(rollbar.scrub))\n .addTransform(sharedTransforms.userTransform(logger))\n .addTransform(sharedTransforms.addConfiguredOptions)\n .addTransform(sharedTransforms.addDiagnosticKeys)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(sharedPredicates.checkLevel)\n .addPredicate(predicates.checkIgnore)\n .addPredicate(sharedPredicates.userCheckIgnore(logger))\n .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))\n .addPredicate(sharedPredicates.urlIsSafeListed(logger))\n .addPredicate(sharedPredicates.messageIsIgnored(logger));\n}\n\nRollbar.prototype.loadFull = function() {\n logger.info('Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.');\n};\n\nRollbar.prototype._createItem = function(args) {\n return _.createItem(args, logger, this);\n};\n\nfunction _getFirstFunction(args) {\n for (var i = 0, len = args.length; i < len; ++i) {\n if (_.isFunction(args[i])) {\n return args[i];\n }\n }\n return undefined;\n}\n\nfunction _gWindow() {\n return ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n}\n\nvar defaults = require('../defaults');\nvar scrubFields = require('./defaults/scrubFields');\n\nvar defaultOptions = {\n version: defaults.version,\n scrubFields: scrubFields.scrubFields,\n logLevel: defaults.logLevel,\n reportLevel: defaults.reportLevel,\n uncaughtErrorLevel: defaults.uncaughtErrorLevel,\n endpoint: defaults.endpoint,\n verbose: false,\n enabled: true,\n transmit: true,\n sendConfig: false,\n includeItemsInTelemetry: true,\n captureIp: true,\n inspectAnonymousErrors: true,\n ignoreDuplicateErrors: true,\n wrapGlobalEventHandlers: false\n};\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar _ = require('./utility');\n\n/*\n * Rollbar - the interface to Rollbar\n *\n * @param options\n * @param api\n * @param logger\n */\nfunction Rollbar(options, api, logger, telemeter, platform) {\n this.options = _.merge(options);\n this.logger = logger;\n Rollbar.rateLimiter.configureGlobal(this.options);\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.api = api;\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n\n // This must happen before the Notifier is created\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = telemeter;\n setStackTraceLimit(options);\n this.lastError = null;\n this.lastErrorHash = 'none';\n}\n\nvar defaultOptions = {\n maxItems: 0,\n itemsPerMinute: 60\n};\n\nRollbar.rateLimiter = new RateLimiter(defaultOptions);\n\nRollbar.prototype.global = function (options) {\n Rollbar.rateLimiter.configureGlobal(options);\n return this;\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n\n this.options = _.merge(oldOptions, options, payload);\n\n // This must happen before the Notifier is configured\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier && this.notifier.configure(this.options);\n this.telemeter && this.telemeter.configure(this.options);\n setStackTraceLimit(options);\n this.global(this.options);\n\n if (validateTracer(options.tracer)) {\n this.tracer = options.tracer\n }\n\n return this;\n};\n\nRollbar.prototype.log = function (item) {\n var level = this._defaultLogLevel();\n return this._log(level, item);\n};\n\nRollbar.prototype.debug = function (item) {\n this._log('debug', item);\n};\n\nRollbar.prototype.info = function (item) {\n this._log('info', item);\n};\n\nRollbar.prototype.warn = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.warning = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.error = function (item) {\n this._log('error', item);\n};\n\nRollbar.prototype.critical = function (item) {\n this._log('critical', item);\n};\n\nRollbar.prototype.wait = function (callback) {\n this.queue.wait(callback);\n};\n\nRollbar.prototype.captureEvent = function (type, metadata, level) {\n return this.telemeter && this.telemeter.captureEvent(type, metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function (ts) {\n return this.telemeter && this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (ts) {\n return this.telemeter && this.telemeter.captureLoad(ts);\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.api.buildJsonPayload(item);\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n this.api.postJsonPayload(jsonPayload);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function (defaultLevel, item) {\n var callback;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {\n if (callback) {\n var error = new Error('ignored identical item');\n error.item = item;\n callback(error);\n }\n return;\n }\n try {\n this._addTracingInfo(item);\n item.level = item.level || defaultLevel;\n this.telemeter && this.telemeter._captureRollbarItem(item);\n item.telemetryEvents = (this.telemeter && this.telemeter.copyEvents()) || [];\n this.notifier.log(item, callback);\n } catch (e) {\n if (callback) {\n callback(e);\n }\n this.logger.error(e);\n }\n};\n\nRollbar.prototype._defaultLogLevel = function () {\n return this.options.logLevel || 'debug';\n};\n\nRollbar.prototype._sameAsLastError = function (item) {\n if (!item._isUncaught) {\n return false;\n }\n var itemHash = generateItemHash(item);\n if (this.lastErrorHash === itemHash) {\n return true;\n }\n this.lastError = item.err;\n this.lastErrorHash = itemHash;\n return false;\n};\n\nRollbar.prototype._addTracingInfo = function (item) {\n // Tracer validation occurs in the constructor\n // or in the Rollbar.prototype.configure methods\n if (this.tracer) {\n // add rollbar occurrence uuid to span\n var span = this.tracer.scope().active();\n\n if (validateSpan(span)) {\n span.setTag('rollbar.error_uuid', item.uuid);\n span.setTag('rollbar.has_error', true);\n span.setTag('error', true);\n span.setTag('rollbar.item_url', `https://rollbar.com/item/uuid/?uuid=${item.uuid}`);\n span.setTag('rollbar.occurrence_url', `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`);\n\n // add span ID & trace ID to occurrence\n var opentracingSpanId = span.context().toSpanId();\n var opentracingTraceId = span.context().toTraceId();\n\n if (item.custom) {\n item.custom.opentracing_span_id = opentracingSpanId;\n item.custom.opentracing_trace_id = opentracingTraceId;\n } else {\n item.custom = {\n opentracing_span_id: opentracingSpanId,\n opentracing_trace_id: opentracingTraceId\n };\n }\n }\n }\n}\n\nfunction generateItemHash(item) {\n var message = item.message || '';\n var stack = (item.err || {}).stack || String(item.err);\n return message + '::' + stack;\n}\n\n// Node.js, Chrome, Safari, and some other browsers support this property\n// which globally sets the number of stack frames returned in an Error object.\n// If a browser can't use it, no harm done.\nfunction setStackTraceLimit(options) {\n if (options.stackTraceLimit) {\n Error.stackTraceLimit = options.stackTraceLimit;\n }\n}\n\n/**\n * Validate the Tracer object provided to the Client\n * is valid for our Opentracing use case.\n * @param {opentracer.Tracer} tracer\n */\nfunction validateTracer(tracer) {\n if (!tracer) {\n return false;\n }\n\n if (!tracer.scope || typeof tracer.scope !== 'function') {\n return false;\n }\n\n var scope = tracer.scope();\n\n if (!scope || !scope.active || typeof scope.active !== 'function') {\n return false;\n }\n\n return true;\n}\n\n/**\n * Validate the Span object provided\n * @param {opentracer.Span} span\n */\nfunction validateSpan(span) {\n if (!span || !span.context || typeof span.context !== 'function') {\n return false;\n }\n\n var spanContext = span.context();\n\n if (!spanContext\n || !spanContext.toSpanId\n || !spanContext.toTraceId\n || typeof spanContext.toSpanId !== 'function'\n || typeof spanContext.toTraceId !== 'function') {\n return false\n }\n\n return true;\n}\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar\n *\n * @param options - the same options that are accepted by configureGlobal offered as a convenience\n */\nfunction RateLimiter(options) {\n this.startTime = _.now();\n this.counter = 0;\n this.perMinCounter = 0;\n this.platform = null;\n this.platformOptions = {};\n this.configureGlobal(options);\n}\n\nRateLimiter.globalSettings = {\n startTime: _.now(),\n maxItems: undefined,\n itemsPerMinute: undefined\n};\n\n/*\n * configureGlobal - set the global rate limiter options\n *\n * @param options - Only the following values are recognized:\n * startTime: a timestamp of the form returned by (new Date()).getTime()\n * maxItems: the maximum items\n * itemsPerMinute: the max number of items to send in a given minute\n */\nRateLimiter.prototype.configureGlobal = function(options) {\n if (options.startTime !== undefined) {\n RateLimiter.globalSettings.startTime = options.startTime;\n }\n if (options.maxItems !== undefined) {\n RateLimiter.globalSettings.maxItems = options.maxItems;\n }\n if (options.itemsPerMinute !== undefined) {\n RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;\n }\n};\n\n/*\n * shouldSend - determine if we should send a given item based on rate limit settings\n *\n * @param item - the item we are about to send\n * @returns An object with the following structure:\n * error: (Error|null)\n * shouldSend: bool\n * payload: (Object|null)\n * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and\n * exactly one of error or payload will be non-null. If error is non-null, the returned Error will\n * describe the situation, but it means that we were already over a rate limit (either globally or\n * per minute) when this item was checked. If error is null, and therefore payload is non-null, it\n * means this item put us over the global rate limit and the payload should be sent to Rollbar in\n * place of the passed in item.\n */\nRateLimiter.prototype.shouldSend = function(item, now) {\n now = now || _.now();\n var elapsedTime = now - this.startTime;\n if (elapsedTime < 0 || elapsedTime >= 60000) {\n this.startTime = now;\n this.perMinCounter = 0;\n }\n\n var globalRateLimit = RateLimiter.globalSettings.maxItems;\n var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;\n\n if (checkRate(item, globalRateLimit, this.counter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimit + ' max items reached', false);\n } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimitPerMin + ' items per minute reached', false);\n }\n this.counter++;\n this.perMinCounter++;\n\n var shouldSend = !checkRate(item, globalRateLimit, this.counter);\n var perMinute = shouldSend;\n shouldSend = shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);\n return shouldSendValue(this.platform, this.platformOptions, null, shouldSend, globalRateLimit, globalRateLimitPerMin, perMinute);\n};\n\nRateLimiter.prototype.setPlatformOptions = function(platform, options) {\n this.platform = platform;\n this.platformOptions = options;\n};\n\n/* Helpers */\n\nfunction checkRate(item, limit, counter) {\n return !item.ignoreRateLimit && limit >= 1 && counter > limit;\n}\n\nfunction shouldSendValue(platform, options, error, shouldSend, globalRateLimit, limitPerMin, perMinute) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute);\n }\n return {error: error, shouldSend: shouldSend, payload: payload};\n}\n\nfunction rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute) {\n var environment = options.environment || (options.payload && options.payload.environment);\n var msg;\n if (perMinute) {\n msg = 'item per minute limit reached, ignoring errors until timeout';\n } else {\n msg = 'maxItems has been hit, ignoring errors until reset.';\n }\n var item = {\n body: {\n message: {\n body: msg,\n extra: {\n maxItems: globalRateLimit,\n itemsPerMinute: limitPerMin\n }\n }\n },\n language: 'javascript',\n environment: environment,\n notifier: {\n version: (options.notifier && options.notifier.version) || options.version\n }\n };\n if (platform === 'browser') {\n item.platform = 'browser';\n item.framework = 'browser-js';\n item.notifier.name = 'rollbar-browser-js';\n } else if (platform === 'server') {\n item.framework = options.framework || 'node-js';\n item.notifier.name = options.notifier.name;\n } else if (platform === 'react-native') {\n item.framework = options.framework || 'react-native';\n item.notifier.name = options.notifier.name;\n }\n return item;\n}\n\nmodule.exports = RateLimiter;\n","'use strict';\n\n'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isPlainObject = function isPlainObject(obj) {\n\tif (!obj || toStr.call(obj) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tvar hasOwnConstructor = hasOwn.call(obj, 'constructor');\n\tvar hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n\t// Not own constructor property must be Object\n\tif (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n\t\treturn false;\n\t}\n\n\t// Own properties are enumerated firstly, so to speed up,\n\t// if last one is own, then all properties are own.\n\tvar key;\n\tfor (key in obj) {/**/}\n\n\treturn typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\nfunction merge() {\n var i, src, copy, clone, name,\n result = {},\n current = null,\n length = arguments.length;\n\n for (i=0; i < length; i++) {\n current = arguments[i];\n if (current == null) {\n continue;\n }\n\n for (name in current) {\n src = result[name];\n copy = current[name];\n if (result !== copy) {\n if (copy && isPlainObject(copy)) {\n clone = src && isPlainObject(src) ? src : {};\n result[name] = merge(clone, copy);\n } else if (typeof copy !== 'undefined') {\n result[name] = copy;\n }\n }\n }\n }\n return result;\n}\n\nmodule.exports = merge;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Queue - an object which handles which handles a queue of items to be sent to Rollbar.\n * This object handles rate limiting via a passed in rate limiter, retries based on connection\n * errors, and filtering of items based on a set of configurable predicates. The communication to\n * the backend is performed via a given API object.\n *\n * @param rateLimiter - An object which conforms to the interface\n * rateLimiter.shouldSend(item) -> bool\n * @param api - An object which conforms to the interface\n * api.postItem(payload, function(err, response))\n * @param logger - An object used to log verbose messages if desired\n * @param options - see Queue.prototype.configure\n */\nfunction Queue(rateLimiter, api, logger, options) {\n this.rateLimiter = rateLimiter;\n this.api = api;\n this.logger = logger;\n this.options = options;\n this.predicates = [];\n this.pendingItems = [];\n this.pendingRequests = [];\n this.retryQueue = [];\n this.retryHandle = null;\n this.waitCallback = null;\n this.waitIntervalID = null;\n}\n\n/*\n * configure - updates the options this queue uses\n *\n * @param options\n */\nQueue.prototype.configure = function(options) {\n this.api && this.api.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addPredicate - adds a predicate to the end of the list of predicates for this queue\n *\n * @param predicate - function(item, options) -> (bool|{err: Error})\n * Returning true means that this predicate passes and the item is okay to go on the queue\n * Returning false means do not add the item to the queue, but it is not an error\n * Returning {err: Error} means do not add the item to the queue, and the given error explains why\n * Returning {err: undefined} is equivalent to returning true but don't do that\n */\nQueue.prototype.addPredicate = function(predicate) {\n if (_.isFunction(predicate)) {\n this.predicates.push(predicate);\n }\n return this;\n};\n\nQueue.prototype.addPendingItem = function(item) {\n this.pendingItems.push(item);\n};\n\nQueue.prototype.removePendingItem = function(item) {\n var idx = this.pendingItems.indexOf(item);\n if (idx !== -1) {\n this.pendingItems.splice(idx, 1);\n }\n};\n\n/*\n * addItem - Send an item to the Rollbar API if all of the predicates are satisfied\n *\n * @param item - The payload to send to the backend\n * @param callback - function(error, repsonse) which will be called with the response from the API\n * in the case of a success, otherwise response will be null and error will have a value. If both\n * error and response are null then the item was stopped by a predicate which did not consider this\n * to be an error condition, but nonetheless did not send the item to the API.\n * @param originalError - The original error before any transformations that is to be logged if any\n */\nQueue.prototype.addItem = function(item, callback, originalError, originalItem) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() { return; };\n }\n var predicateResult = this._applyPredicates(item);\n if (predicateResult.stop) {\n this.removePendingItem(originalItem);\n callback(predicateResult.err);\n return;\n }\n this._maybeLog(item, originalError);\n this.removePendingItem(originalItem);\n if (!this.options.transmit) {\n callback(new Error('Transmit disabled'));\n return;\n }\n this.pendingRequests.push(item);\n try {\n this._makeApiRequest(item, function(err, resp) {\n this._dequeuePendingRequest(item);\n callback(err, resp);\n }.bind(this));\n } catch (e) {\n this._dequeuePendingRequest(item);\n callback(e);\n }\n};\n\n/*\n * wait - Stop any further errors from being added to the queue, and get called back when all items\n * currently processing have finished sending to the backend.\n *\n * @param callback - function() called when all pending items have been sent\n */\nQueue.prototype.wait = function(callback) {\n if (!_.isFunction(callback)) {\n return;\n }\n this.waitCallback = callback;\n if (this._maybeCallWait()) {\n return;\n }\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitIntervalID = setInterval(function() {\n this._maybeCallWait();\n }.bind(this), 500);\n};\n\n/* _applyPredicates - Sequentially applies the predicates that have been added to the queue to the\n * given item with the currently configured options.\n *\n * @param item - An item in the queue\n * @returns {stop: bool, err: (Error|null)} - stop being true means do not add item to the queue,\n * the error value should be passed up to a callbak if we are stopping.\n */\nQueue.prototype._applyPredicates = function(item) {\n var p = null;\n for (var i = 0, len = this.predicates.length; i < len; i++) {\n p = this.predicates[i](item, this.options);\n if (!p || p.err !== undefined) {\n return {stop: true, err: p.err};\n }\n }\n return {stop: false, err: null};\n};\n\n/*\n * _makeApiRequest - Send an item to Rollbar, callback when done, if there is an error make an\n * effort to retry if we are configured to do so.\n *\n * @param item - an item ready to send to the backend\n * @param callback - function(err, response)\n */\nQueue.prototype._makeApiRequest = function(item, callback) {\n var rateLimitResponse = this.rateLimiter.shouldSend(item);\n if (rateLimitResponse.shouldSend) {\n this.api.postItem(item, function(err, resp) {\n if (err) {\n this._maybeRetry(err, item, callback);\n } else {\n callback(err, resp);\n }\n }.bind(this));\n } else if (rateLimitResponse.error) {\n callback(rateLimitResponse.error);\n } else {\n this.api.postItem(rateLimitResponse.payload, callback);\n }\n};\n\n// These are errors basically mean there is no internet connection\nvar RETRIABLE_ERRORS = ['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED', 'EHOSTUNREACH', 'EPIPE', 'EAI_AGAIN'];\n\n/*\n * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback\n * with the error.\n *\n * @param err - an error returned by the API transport\n * @param item - the item that was trying to be sent when this error occured\n * @param callback - function(err, response)\n */\nQueue.prototype._maybeRetry = function(err, item, callback) {\n var shouldRetry = false;\n if (this.options.retryInterval) {\n for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {\n if (err.code === RETRIABLE_ERRORS[i]) {\n shouldRetry = true;\n break;\n }\n }\n if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {\n item.retries = item.retries ? item.retries + 1 : 1;\n if (item.retries > this.options.maxRetries) {\n shouldRetry = false;\n }\n }\n }\n if (shouldRetry) {\n this._retryApiRequest(item, callback);\n } else {\n callback(err);\n }\n};\n\n/*\n * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process\n * that queue based on the retryInterval in the options for this queue.\n *\n * @param item - an item that failed to send due to an error we deem retriable\n * @param callback - function(err, response)\n */\nQueue.prototype._retryApiRequest = function(item, callback) {\n this.retryQueue.push({item: item, callback: callback});\n\n if (!this.retryHandle) {\n this.retryHandle = setInterval(function() {\n while (this.retryQueue.length) {\n var retryObject = this.retryQueue.shift();\n this._makeApiRequest(retryObject.item, retryObject.callback);\n }\n }.bind(this), this.options.retryInterval);\n }\n};\n\n/*\n * _dequeuePendingRequest - Removes the item from the pending request queue, this queue is used to\n * enable to functionality of providing a callback that clients can pass to `wait` to be notified\n * when the pending request queue has been emptied. This must be called when the API finishes\n * processing this item. If a `wait` callback is configured, it is called by this function.\n *\n * @param item - the item previously added to the pending request queue\n */\nQueue.prototype._dequeuePendingRequest = function(item) {\n var idx = this.pendingRequests.indexOf(item);\n if (idx !== -1) {\n this.pendingRequests.splice(idx, 1);\n this._maybeCallWait();\n }\n};\n\nQueue.prototype._maybeLog = function(data, originalError) {\n if (this.logger && this.options.verbose) {\n var message = originalError;\n message = message || _.get(data, 'body.trace.exception.message');\n message = message || _.get(data, 'body.trace_chain.0.exception.message');\n if (message) {\n this.logger.error(message);\n return;\n }\n message = _.get(data, 'body.message.body');\n if (message) {\n this.logger.log(message);\n }\n }\n};\n\nQueue.prototype._maybeCallWait = function() {\n if (_.isFunction(this.waitCallback) && this.pendingItems.length === 0 && this.pendingRequests.length === 0) {\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitCallback();\n return true;\n }\n return false;\n};\n\nmodule.exports = Queue;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Notifier - the internal object responsible for delegating between the client exposed API, the\n * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the\n * queue which handles the communcation with the Rollbar API servers.\n *\n * @param queue - an object that conforms to the interface: addItem(item, callback)\n * @param options - an object representing the options to be set for this notifier, this should have\n * any defaults already set by the caller\n */\nfunction Notifier(queue, options) {\n this.queue = queue;\n this.options = options;\n this.transforms = [];\n this.diagnostic = {};\n}\n\n/*\n * configure - updates the options for this notifier with the passed in object\n *\n * @param options - an object which gets merged with the current options set on this notifier\n * @returns this\n */\nNotifier.prototype.configure = function(options) {\n this.queue && this.queue.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addTransform - adds a transform onto the end of the queue of transforms for this notifier\n *\n * @param transform - a function which takes three arguments:\n * * item: An Object representing the data to eventually be sent to Rollbar\n * * options: The current value of the options for this notifier\n * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this\n * callback with a null value for error if it wants the processing chain to continue, otherwise\n * with an error to terminate the processing. The item should be the updated item after this\n * transform is finished modifying it.\n */\nNotifier.prototype.addTransform = function(transform) {\n if (_.isFunction(transform)) {\n this.transforms.push(transform);\n }\n return this;\n};\n\n/*\n * log - the internal log function which applies the configured transforms and then pushes onto the\n * queue to be sent to the backend.\n *\n * @param item - An object with the following structure:\n * message [String] - An optional string to be sent to rollbar\n * error [Error] - An optional error\n *\n * @param callback - A function of type function(err, resp) which will be called with exactly one\n * null argument and one non-null argument. The callback will be called once, either during the\n * transform stage if an error occurs inside a transform, or in response to the communication with\n * the backend. The second argument will be the response from the backend in case of success.\n */\nNotifier.prototype.log = function(item, callback) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!this.options.enabled) {\n return callback(new Error('Rollbar is not enabled'));\n }\n\n this.queue.addPendingItem(item);\n var originalError = item.err;\n this._applyTransforms(item, function(err, i) {\n if (err) {\n this.queue.removePendingItem(item);\n return callback(err, null);\n }\n this.queue.addItem(i, callback, originalError, item);\n }.bind(this));\n};\n\n/* Internal */\n\n/*\n * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See\n * `addTransform` for more information.\n *\n * @param item - An item to be transformed\n * @param callback - A function of type function(err, item) which will be called with a non-null\n * error and a null item in the case of a transform failure, or a null error and non-null item after\n * all transforms have been applied.\n */\nNotifier.prototype._applyTransforms = function(item, callback) {\n var transformIndex = -1;\n var transformsLength = this.transforms.length;\n var transforms = this.transforms;\n var options = this.options;\n\n var cb = function(err, i) {\n if (err) {\n callback(err, null);\n return;\n }\n\n transformIndex++;\n\n if (transformIndex === transformsLength) {\n callback(null, i);\n return;\n }\n\n transforms[transformIndex](i, options, cb);\n };\n\n cb(null, item);\n};\n\nmodule.exports = Notifier;\n","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1/item/',\n search: null,\n version: '1',\n protocol: 'https:',\n port: 443\n};\n\n/**\n * Api is an object that encapsulates methods of communicating with\n * the Rollbar API. It is a standard interface with some parts implemented\n * differently for server or browser contexts. It is an object that should\n * be instantiated when used so it can contain non-global options that may\n * be different for another instance of RollbarApi.\n *\n * @param options {\n * accessToken: the accessToken to use for posting items to rollbar\n * endpoint: an alternative endpoint to send errors to\n * must be a valid, fully qualified URL.\n * The default is: https://api.rollbar.com/api/1/item\n * proxy: if you wish to proxy requests provide an object\n * with the following keys:\n * host or hostname (required): foo.example.com\n * port (optional): 123\n * protocol (optional): https\n * }\n */\nfunction Api(options, transport, urllib, truncation, jsonBackup) {\n this.options = options;\n this.transport = transport;\n this.url = urllib;\n this.truncation = truncation;\n this.jsonBackup = jsonBackup;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, urllib);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function(data, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n this.transport.post(this.accessToken, transportOptions, payload, callback);\n};\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.buildJsonPayload = function(data, callback) {\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n\n if (stringifyResult.error) {\n if (callback) {\n callback(stringifyResult.error);\n }\n return null;\n }\n\n return stringifyResult.value;\n};\n\n/**\n *\n * @param jsonPayload\n * @param callback\n */\nApi.prototype.postJsonPayload = function(jsonPayload, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n this.transport.postJsonPayload(this.accessToken, transportOptions, jsonPayload, callback);\n};\n\nApi.prototype.configure = function(options) {\n var oldOptions = this.oldOptions;\n this.options = _.merge(oldOptions, options);\n this.transportOptions = _getTransport(this.options, this.url);\n if (this.options.accessToken !== undefined) {\n this.accessToken = this.options.accessToken;\n }\n return this;\n};\n\nfunction _getTransport(options, url) {\n return helpers.getTransportFromOptions(options, defaultOptions, url);\n}\n\nmodule.exports = Api;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (!_.isType(data.context, 'string')) {\n var contextResult = _.stringify(data.context, jsonBackup);\n if (contextResult.error) {\n data.context = 'Error: could not serialize \\'context\\'';\n } else {\n data.context = contextResult.value || '';\n }\n if (data.context.length > 255) {\n data.context = data.context.substr(0, 255);\n }\n }\n return {\n access_token: accessToken,\n data: data\n };\n}\n\nfunction getTransportFromOptions(options, defaults, url) {\n var hostname = defaults.hostname;\n var protocol = defaults.protocol;\n var port = defaults.port;\n var path = defaults.path;\n var search = defaults.search;\n var timeout = options.timeout;\n\n var proxy = options.proxy;\n if (options.endpoint) {\n var opts = url.parse(options.endpoint);\n hostname = opts.hostname;\n protocol = opts.protocol;\n port = opts.port;\n path = opts.pathname;\n search = opts.search;\n }\n return {\n timeout: timeout,\n hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy\n };\n}\n\nfunction transportOptions(transport, method) {\n var protocol = transport.protocol || 'https:';\n var port = transport.port || (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);\n var hostname = transport.hostname;\n var path = transport.path;\n var timeout = transport.timeout;\n if (transport.search) {\n path = path + transport.search;\n }\n if (transport.proxy) {\n path = protocol + '//' + hostname + path;\n hostname = transport.proxy.host || transport.proxy.hostname;\n port = transport.proxy.port;\n protocol = transport.proxy.protocol || protocol;\n }\n return {\n timeout: timeout,\n protocol: protocol,\n hostname: hostname,\n path: path,\n port: port,\n method: method\n };\n}\n\nfunction appendPathToPath(base, path) {\n var baseTrailingSlash = /\\/$/.test(base);\n var pathBeginningSlash = /^\\//.test(path);\n\n if (baseTrailingSlash && pathBeginningSlash) {\n path = path.substring(1);\n } else if (!baseTrailingSlash && !pathBeginningSlash) {\n path = '/' + path;\n }\n\n return base + path;\n}\n\nmodule.exports = {\n buildPayload: buildPayload,\n getTransportFromOptions: getTransportFromOptions,\n transportOptions: transportOptions,\n appendPathToPath: appendPathToPath\n};\n","// Console-polyfill. MIT license.\n// https://github.com/paulmillr/console-polyfill\n// Make it safe to do console.log() always.\n(function(global) {\n 'use strict';\n if (!global.console) {\n global.console = {};\n }\n var con = global.console;\n var prop, method;\n var dummy = function() {};\n var properties = ['memory'];\n var methods = ('assert,clear,count,debug,dir,dirxml,error,exception,group,' +\n 'groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,' +\n 'show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn').split(',');\n while (prop = properties.pop()) if (!con[prop]) con[prop] = {};\n while (method = methods.pop()) if (!con[method]) con[method] = dummy;\n // Using `this` for web workers & supports Browserify / Webpack.\n})(typeof window === 'undefined' ? this : window);\n","'use strict';\n\n// This detection.js module is used to encapsulate any ugly browser/feature\n// detection we may need to do.\n\n// Figure out which version of IE we're using, if any.\n// This is gleaned from http://stackoverflow.com/questions/5574842/best-way-to-check-for-ie-less-than-9-in-javascript-without-library\n// Will return an integer on IE (i.e. 8)\n// Will return undefined otherwise\nfunction getIEVersion() {\n\tvar undef;\n\tif (typeof document === 'undefined') {\n\t\treturn undef;\n\t}\n\n var v = 3,\n div = document.createElement('div'),\n all = div.getElementsByTagName('i');\n\n while (\n div.innerHTML = '',\n all[0]\n );\n\n return v > 4 ? v : undef;\n}\n\nvar Detection = {\n ieVersion: getIEVersion\n};\n\nmodule.exports = Detection;\n","'use strict';\n\nfunction captureUncaughtExceptions(window, handler, shim) {\n if (!window) { return; }\n var oldOnError;\n\n if (typeof handler._rollbarOldOnError === 'function') {\n oldOnError = handler._rollbarOldOnError;\n } else if (window.onerror) {\n oldOnError = window.onerror;\n while (oldOnError._rollbarOldOnError) {\n oldOnError = oldOnError._rollbarOldOnError;\n }\n handler._rollbarOldOnError = oldOnError;\n }\n\n handler.handleAnonymousErrors();\n\n var fn = function() {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n if (shim) {\n fn._rollbarOldOnError = oldOnError;\n }\n window.onerror = fn;\n}\n\nfunction _rollbarWindowOnError(window, r, old, args) {\n if (window._rollbarWrappedError) {\n if (!args[4]) {\n args[4] = window._rollbarWrappedError;\n }\n if (!args[5]) {\n args[5] = window._rollbarWrappedError._rollbarContext;\n }\n window._rollbarWrappedError = null;\n }\n\n var ret = r.handleUncaughtException.apply(r, args);\n\n if (old) {\n old.apply(window, args);\n }\n\n // Let other chained onerror handlers above run before setting this.\n // If an error is thrown and caught within a chained onerror handler,\n // Error.prepareStackTrace() will see that one before the one we want.\n if (ret === 'anonymous') {\n r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()\n }\n}\n\nfunction captureUnhandledRejections(window, handler, shim) {\n if (!window) { return; }\n\n if (typeof window._rollbarURH === 'function' && window._rollbarURH.belongsToShim) {\n window.removeEventListener('unhandledrejection', window._rollbarURH);\n }\n\n var rejectionHandler = function (evt) {\n var reason, promise, detail;\n try {\n reason = evt.reason;\n } catch (e) {\n reason = undefined;\n }\n try {\n promise = evt.promise;\n } catch (e) {\n promise = '[unhandledrejection] error getting `promise` from event';\n }\n try {\n detail = evt.detail;\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\n }\n } catch (e) {\n // Ignore\n }\n if (!reason) {\n reason = '[unhandledrejection] error getting `reason` from event';\n }\n\n if (handler && handler.handleUnhandledRejection) {\n handler.handleUnhandledRejection(reason, promise);\n }\n };\n rejectionHandler.belongsToShim = shim;\n window._rollbarURH = rejectionHandler;\n window.addEventListener('unhandledrejection', rejectionHandler);\n}\n\n\nmodule.exports = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections\n};\n","'use strict';\n\n/*global XDomainRequest*/\n\nvar _ = require('../utility');\nvar logger = require('./logger');\n\n/*\n * accessToken may be embedded in payload but that should not\n * be assumed\n *\n * options: {\n * hostname\n * protocol\n * path\n * port\n * method\n * }\n *\n * params is an object containing key/value pairs. These\n * will be appended to the path as 'key=value&key=value'\n *\n * payload is an unserialized object\n */\nfunction Transport(truncation) {\n this.truncation = truncation;\n}\n\nTransport.prototype.get = function(accessToken, options, params, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n _.addParamsAndAccessTokenToPath(accessToken, options, params);\n\n var method = 'GET';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, null, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.post = function(accessToken, options, payload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!payload) {\n return callback(new Error('Cannot send empty request'));\n }\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n if (stringifyResult.error) {\n return callback(stringifyResult.error);\n }\n\n var writeData = stringifyResult.value;\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, writeData, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.postJsonPayload = function (accessToken, options, jsonPayload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, jsonPayload, callback, requestFactory, options.timeout);\n}\n\n\n// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope\n// so Angular change detection isn't triggered on each API call.\n// This is the equivalent of runOutsideAngular().\n//\nfunction _makeZoneRequest() {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;\n var args = Array.prototype.slice.call(arguments);\n\n if (currentZone && currentZone._name === 'angular') {\n var rootZone = currentZone._parent;\n rootZone.run(function () {\n _makeRequest.apply(undefined, args);\n });\n } else {\n _makeRequest.apply(undefined, args);\n }\n}\n\n/* global RollbarProxy */\nfunction _proxyRequest(json, callback) {\n var rollbarProxy = new RollbarProxy();\n rollbarProxy.sendJsonPayload(\n json,\n function(_msg) { /* do nothing */ }, // eslint-disable-line no-unused-vars\n function(err) {\n callback(new Error(err));\n }\n );\n}\n\nfunction _makeRequest(accessToken, url, method, data, callback, requestFactory, timeout) {\n if (typeof RollbarProxy !== 'undefined') {\n return _proxyRequest(data, callback);\n }\n\n var request;\n if (requestFactory) {\n request = requestFactory();\n } else {\n request = _createXMLHTTPObject();\n }\n if (!request) {\n // Give up, no way to send requests\n return callback(new Error('No way to send a request'));\n }\n try {\n try {\n var onreadystatechange = function() {\n try {\n if (onreadystatechange && request.readyState === 4) {\n onreadystatechange = undefined;\n\n var parseResponse = _.jsonParse(request.responseText);\n if (_isSuccess(request)) {\n callback(parseResponse.error, parseResponse.value);\n return;\n } else if (_isNormalFailure(request)) {\n if (request.status === 403) {\n // likely caused by using a server access token\n var message = parseResponse.value && parseResponse.value.message;\n logger.error(message);\n }\n // return valid http status codes\n callback(new Error(String(request.status)));\n } else {\n // IE will return a status 12000+ on some sort of connection failure,\n // so we return a blank error\n // http://msdn.microsoft.com/en-us/library/aa383770%28VS.85%29.aspx\n var msg = 'XHR response had no status code (likely connection failure)';\n callback(_newRetriableError(msg));\n }\n }\n } catch (ex) {\n //jquery source mentions firefox may error out while accessing the\n //request members if there is a network error\n //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111\n var exc;\n if (ex && ex.stack) {\n exc = ex;\n } else {\n exc = new Error(ex);\n }\n callback(exc);\n }\n };\n\n request.open(method, url, true);\n if (request.setRequestHeader) {\n request.setRequestHeader('Content-Type', 'application/json');\n request.setRequestHeader('X-Rollbar-Access-Token', accessToken);\n }\n\n if(_.isFiniteNumber(timeout)) {\n request.timeout = timeout;\n }\n\n request.onreadystatechange = onreadystatechange;\n request.send(data);\n } catch (e1) {\n // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest\n if (typeof XDomainRequest !== 'undefined') {\n\n // Assume we are in a really old browser which has a bunch of limitations:\n // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx\n\n // Extreme paranoia: if we have XDomainRequest then we have a window, but just in case\n if (!window || !window.location) {\n return callback(new Error('No window available during request, unknown environment'));\n }\n\n // If the current page is http, try and send over http\n if (window.location.href.substring(0, 5) === 'http:' && url.substring(0, 5) === 'https') {\n url = 'http' + url.substring(5);\n }\n\n var xdomainrequest = new XDomainRequest();\n xdomainrequest.onprogress = function() {};\n xdomainrequest.ontimeout = function() {\n var msg = 'Request timed out';\n var code = 'ETIMEDOUT';\n callback(_newRetriableError(msg, code));\n };\n xdomainrequest.onerror = function() {\n callback(new Error('Error during request'));\n };\n xdomainrequest.onload = function() {\n var parseResponse = _.jsonParse(xdomainrequest.responseText);\n callback(parseResponse.error, parseResponse.value);\n };\n xdomainrequest.open(method, url, true);\n xdomainrequest.send(data);\n } else {\n callback(new Error('Cannot find a method to transport a request'));\n }\n }\n } catch (e2) {\n callback(e2);\n }\n}\n\nfunction _createXMLHTTPObject() {\n /* global ActiveXObject:false */\n\n var factories = [\n function () {\n return new XMLHttpRequest();\n },\n function () {\n return new ActiveXObject('Msxml2.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Msxml3.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Microsoft.XMLHTTP');\n }\n ];\n var xmlhttp;\n var i;\n var numFactories = factories.length;\n for (i = 0; i < numFactories; i++) {\n /* eslint-disable no-empty */\n try {\n xmlhttp = factories[i]();\n break;\n } catch (e) {\n // pass\n }\n /* eslint-enable no-empty */\n }\n return xmlhttp;\n}\n\nfunction _isSuccess(r) {\n return r && r.status && r.status === 200;\n}\n\nfunction _isNormalFailure(r) {\n return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;\n}\n\nfunction _newRetriableError(message, code) {\n var err = new Error(message);\n err.code = code || 'ENOTFOUND';\n return err;\n}\n\nmodule.exports = Transport;\n","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('../errorParser');\nvar logger = require('./logger');\n\nfunction handleDomException(item, options, callback) {\n if(item.err && errorParser.Stack(item.err).name === 'DOMException') {\n var originalError = new Error();\n originalError.name = item.err.name;\n originalError.message = item.err.message;\n originalError.stack = item.err.stack;\n originalError.nested = item.err;\n item.err = originalError;\n }\n callback(null, item);\n}\n\nfunction handleItemWithError(item, options, callback) {\n item.data = item.data || {};\n if (item.err) {\n try {\n item.stackInfo = item.err._savedStackTrace || errorParser.parse(item.err, item.skipFrames);\n\n if (options.addErrorContext) {\n addErrorContext(item);\n }\n } catch (e) {\n logger.error('Error while parsing the error object.', e);\n try {\n item.message = item.err.message || item.err.description || item.message || String(item.err);\n } catch (e2) {\n item.message = String(item.err) || String(e2);\n }\n delete item.err;\n }\n }\n callback(null, item);\n}\n\nfunction addErrorContext(item) {\n var chain = [];\n var err = item.err;\n\n chain.push(err);\n\n while (err.nested) {\n err = err.nested;\n chain.push(err);\n }\n\n _.addErrorContext(item, chain);\n}\n\nfunction ensureItemHasSomethingToSay(item, options, callback) {\n if (!item.message && !item.stackInfo && !item.custom) {\n callback(new Error('No message, stack info, or custom data'), null);\n }\n callback(null, item);\n}\n\nfunction addBaseInfo(item, options, callback) {\n var environment = (options.payload && options.payload.environment) || options.environment;\n item.data = _.merge(item.data, {\n environment: environment,\n level: item.level,\n endpoint: options.endpoint,\n platform: 'browser',\n framework: 'browser-js',\n language: 'javascript',\n server: {},\n uuid: item.uuid,\n notifier: {\n name: 'rollbar-browser-js',\n version: options.version\n },\n custom: item.custom\n });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.location) {\n return callback(null, item);\n }\n var remoteString = '$remote_ip';\n if (!options.captureIp) {\n remoteString = null;\n } else if (options.captureIp !== true) {\n remoteString += '_anonymize';\n }\n _.set(item, 'data.request', {\n url: window.location.href,\n query_string: window.location.search,\n user_ip: remoteString\n });\n callback(null, item);\n };\n}\n\nfunction addClientInfo(window) {\n return function(item, options, callback) {\n if (!window) {\n return callback(null, item);\n }\n var nav = window.navigator || {};\n var scr = window.screen || {};\n _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: nav.userAgent,\n language: nav.language,\n cookie_enabled: nav.cookieEnabled,\n screen: {\n width: scr.width,\n height: scr.height\n }\n }\n });\n callback(null, item);\n };\n}\n\nfunction addPluginInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.navigator) {\n return callback(null, item);\n }\n var plugins = [];\n var navPlugins = window.navigator.plugins || [];\n var cur;\n for (var i=0, l=navPlugins.length; i < l; ++i) {\n cur = navPlugins[i];\n plugins.push({name: cur.name, description: cur.description});\n }\n _.set(item, 'data.client.javascript.plugins', plugins);\n callback(null, item);\n };\n}\n\nfunction addBody(item, options, callback) {\n if (item.stackInfo) {\n if (item.stackInfo.traceChain) {\n addBodyTraceChain(item, options, callback);\n } else {\n addBodyTrace(item, options, callback);\n }\n } else {\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction addBodyMessage(item, options, callback) {\n var message = item.message;\n var custom = item.custom;\n\n if (!message) {\n message = 'Item sent with null or missing arguments.';\n }\n var result = {\n body: message\n };\n\n if (custom) {\n result.extra = _.merge(custom);\n }\n\n _.set(item, 'data.body', {message: result});\n callback(null, item);\n}\n\nfunction stackFromItem(item) {\n // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = item.stackInfo.stack;\n if (stack && stack.length === 0 && item._unhandledStackInfo && item._unhandledStackInfo.stack) {\n stack = item._unhandledStackInfo.stack;\n }\n return stack;\n}\n\nfunction addBodyTraceChain(item, options, callback) {\n var traceChain = item.stackInfo.traceChain;\n var traces = [];\n\n var traceChainLength = traceChain.length;\n for (var i = 0; i < traceChainLength; i++) {\n var trace = buildTrace(item, traceChain[i], options);\n traces.push(trace);\n }\n\n _.set(item, 'data.body', {trace_chain: traces});\n callback(null, item);\n}\n\nfunction addBodyTrace(item, options, callback) {\n var stack = stackFromItem(item);\n\n if (stack) {\n var trace = buildTrace(item, item.stackInfo, options);\n _.set(item, 'data.body', {trace: trace});\n callback(null, item);\n } else {\n var stackInfo = item.stackInfo;\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction buildTrace(item, stackInfo, options) {\n var description = item && item.data.description;\n var custom = item && item.custom;\n var stack = stackFromItem(item);\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n var trace = {\n exception: {\n 'class': className,\n message: message\n }\n };\n\n if (description) {\n trace.exception.description = description;\n }\n\n if (stack) {\n if (stack.length === 0) {\n trace.exception.stack = stackInfo.rawStack;\n trace.exception.raw = String(stackInfo.rawException);\n }\n var stackFrame;\n var frame;\n var code;\n var pre;\n var post;\n var contextLength;\n var i, mid;\n\n trace.frames = [];\n for (i = 0; i < stack.length; ++i) {\n stackFrame = stack[i];\n frame = {\n filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',\n lineno: stackFrame.line || null,\n method: (!stackFrame.func || stackFrame.func === '?') ? '[anonymous]' : stackFrame.func,\n colno: stackFrame.column\n };\n if (options.sendFrameUrl) {\n frame.url = stackFrame.url;\n }\n if (frame.method && frame.method.endsWith && frame.method.endsWith('_rollbar_wrapped')) {\n continue;\n }\n\n code = pre = post = null;\n contextLength = stackFrame.context ? stackFrame.context.length : 0;\n if (contextLength) {\n mid = Math.floor(contextLength / 2);\n pre = stackFrame.context.slice(0, mid);\n code = stackFrame.context[mid];\n post = stackFrame.context.slice(mid);\n }\n\n if (code) {\n frame.code = code;\n }\n\n if (pre || post) {\n frame.context = {};\n if (pre && pre.length) {\n frame.context.pre = pre;\n }\n if (post && post.length) {\n frame.context.post = post;\n }\n }\n\n if (stackFrame.args) {\n frame.args = stackFrame.args;\n }\n\n trace.frames.push(frame);\n }\n\n // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last\n trace.frames.reverse();\n\n if (custom) {\n trace.extra = _.merge(custom);\n }\n }\n\n return trace;\n}\n\nfunction errorClass(stackInfo, guess, options) {\n if (stackInfo.name) {\n return stackInfo.name;\n } else if (options.guessErrorClass) {\n return guess;\n } else {\n return '(unknown)';\n }\n}\n\nfunction addScrubber(scrubFn) {\n return function (item, options, callback) {\n if (scrubFn) {\n var scrubFields = options.scrubFields || [];\n var scrubPaths = options.scrubPaths || [];\n item.data = scrubFn(item.data, scrubFields, scrubPaths);\n }\n callback(null, item);\n }\n}\n\nmodule.exports = {\n handleDomException: handleDomException,\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n addScrubber: addScrubber\n};\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('error-stack-parser', ['stackframe'], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory(require('stackframe'));\n } else {\n root.ErrorStackParser = factory(root.StackFrame);\n }\n}(this, function ErrorStackParser(StackFrame) {\n 'use strict';\n\n var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\\S+:\\d+/;\n var CHROME_IE_STACK_REGEXP = /^\\s*at .*(\\S+:\\d+|\\(native\\))/m;\n var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\\[native code])?$/;\n\n return {\n /**\n * Given an Error object, extract the most information from it.\n *\n * @param {Error} error object\n * @return {Array} of StackFrames\n */\n parse: function ErrorStackParser$$parse(error) {\n if (typeof error.stacktrace !== 'undefined' || typeof error['opera#sourceloc'] !== 'undefined') {\n return this.parseOpera(error);\n } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {\n return this.parseV8OrIE(error);\n } else if (error.stack) {\n return this.parseFFOrSafari(error);\n } else {\n throw new Error('Cannot parse given Error object');\n }\n },\n\n // Separate line and column numbers from a string of the form: (URI:Line:Column)\n extractLocation: function ErrorStackParser$$extractLocation(urlLike) {\n // Fail-fast but return locations like \"(native)\"\n if (urlLike.indexOf(':') === -1) {\n return [urlLike];\n }\n\n var regExp = /(.+?)(?::(\\d+))?(?::(\\d+))?$/;\n var parts = regExp.exec(urlLike.replace(/[()]/g, ''));\n return [parts[1], parts[2] || undefined, parts[3] || undefined];\n },\n\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(CHROME_IE_STACK_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n if (line.indexOf('(eval ') > -1) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n line = line.replace(/eval code/g, 'eval').replace(/(\\(eval at [^()]*)|(\\),.*$)/g, '');\n }\n var sanitizedLine = line.replace(/^\\s+/, '').replace(/\\(eval code/g, '(');\n\n // capture and preseve the parenthesized location \"(/foo/my bar.js:12:87)\" in\n // case it has spaces in it, as the string is split on \\s+ later on\n var location = sanitizedLine.match(/ (\\((.+):(\\d+):(\\d+)\\)$)/);\n\n // remove the parenthesized location from the line, if it was matched\n sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;\n\n var tokens = sanitizedLine.split(/\\s+/).slice(1);\n // if a location was matched, pass it to extractLocation() otherwise pop the last token\n var locationParts = this.extractLocation(location ? location[1] : tokens.pop());\n var functionName = tokens.join(' ') || undefined;\n var fileName = ['eval', ''].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];\n\n return new StackFrame({\n functionName: functionName,\n fileName: fileName,\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n },\n\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n if (line.indexOf(' > eval') > -1) {\n line = line.replace(/ line (\\d+)(?: > eval line \\d+)* > eval:\\d+:\\d+/g, ':$1');\n }\n\n if (line.indexOf('@') === -1 && line.indexOf(':') === -1) {\n // Safari eval frames only have function names and nothing else\n return new StackFrame({\n functionName: line\n });\n } else {\n var functionNameRegex = /((.*\".+\"[^@]*)?[^@]*)(?:@)/;\n var matches = line.match(functionNameRegex);\n var functionName = matches && matches[1] ? matches[1] : undefined;\n var locationParts = this.extractLocation(line.replace(functionNameRegex, ''));\n\n return new StackFrame({\n functionName: functionName,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }\n }, this);\n },\n\n parseOpera: function ErrorStackParser$$parseOpera(e) {\n if (!e.stacktrace || (e.message.indexOf('\\n') > -1 &&\n e.message.split('\\n').length > e.stacktrace.split('\\n').length)) {\n return this.parseOpera9(e);\n } else if (!e.stack) {\n return this.parseOpera10(e);\n } else {\n return this.parseOpera11(e);\n }\n },\n\n parseOpera9: function ErrorStackParser$$parseOpera9(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)/i;\n var lines = e.message.split('\\n');\n var result = [];\n\n for (var i = 2, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(new StackFrame({\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n }));\n }\n }\n\n return result;\n },\n\n parseOpera10: function ErrorStackParser$$parseOpera10(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)(?:: In function (\\S+))?$/i;\n var lines = e.stacktrace.split('\\n');\n var result = [];\n\n for (var i = 0, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(\n new StackFrame({\n functionName: match[3] || undefined,\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n })\n );\n }\n }\n\n return result;\n },\n\n // Opera 10.65+ Error.stack very similar to FF/Safari\n parseOpera11: function ErrorStackParser$$parseOpera11(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);\n }, this);\n\n return filtered.map(function(line) {\n var tokens = line.split('@');\n var locationParts = this.extractLocation(tokens.pop());\n var functionCall = (tokens.shift() || '');\n var functionName = functionCall\n .replace(//, '$2')\n .replace(/\\([^)]*\\)/g, '') || undefined;\n var argsRaw;\n if (functionCall.match(/\\(([^)]*)\\)/)) {\n argsRaw = functionCall.replace(/^[^(]+\\(([^)]*)\\)$/, '$1');\n }\n var args = (argsRaw === undefined || argsRaw === '[arguments not available]') ?\n undefined : argsRaw.split(',');\n\n return new StackFrame({\n functionName: functionName,\n args: args,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n }\n };\n}));\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('stackframe', [], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.StackFrame = factory();\n }\n}(this, function() {\n 'use strict';\n function _isNumber(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n }\n\n function _capitalize(str) {\n return str.charAt(0).toUpperCase() + str.substring(1);\n }\n\n function _getter(p) {\n return function() {\n return this[p];\n };\n }\n\n var booleanProps = ['isConstructor', 'isEval', 'isNative', 'isToplevel'];\n var numericProps = ['columnNumber', 'lineNumber'];\n var stringProps = ['fileName', 'functionName', 'source'];\n var arrayProps = ['args'];\n var objectProps = ['evalOrigin'];\n\n var props = booleanProps.concat(numericProps, stringProps, arrayProps, objectProps);\n\n function StackFrame(obj) {\n if (!obj) return;\n for (var i = 0; i < props.length; i++) {\n if (obj[props[i]] !== undefined) {\n this['set' + _capitalize(props[i])](obj[props[i]]);\n }\n }\n }\n\n StackFrame.prototype = {\n getArgs: function() {\n return this.args;\n },\n setArgs: function(v) {\n if (Object.prototype.toString.call(v) !== '[object Array]') {\n throw new TypeError('Args must be an Array');\n }\n this.args = v;\n },\n\n getEvalOrigin: function() {\n return this.evalOrigin;\n },\n setEvalOrigin: function(v) {\n if (v instanceof StackFrame) {\n this.evalOrigin = v;\n } else if (v instanceof Object) {\n this.evalOrigin = new StackFrame(v);\n } else {\n throw new TypeError('Eval Origin must be an Object or StackFrame');\n }\n },\n\n toString: function() {\n var fileName = this.getFileName() || '';\n var lineNumber = this.getLineNumber() || '';\n var columnNumber = this.getColumnNumber() || '';\n var functionName = this.getFunctionName() || '';\n if (this.getIsEval()) {\n if (fileName) {\n return '[eval] (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return '[eval]:' + lineNumber + ':' + columnNumber;\n }\n if (functionName) {\n return functionName + ' (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return fileName + ':' + lineNumber + ':' + columnNumber;\n }\n };\n\n StackFrame.fromString = function StackFrame$$fromString(str) {\n var argsStartIndex = str.indexOf('(');\n var argsEndIndex = str.lastIndexOf(')');\n\n var functionName = str.substring(0, argsStartIndex);\n var args = str.substring(argsStartIndex + 1, argsEndIndex).split(',');\n var locationString = str.substring(argsEndIndex + 1);\n\n if (locationString.indexOf('@') === 0) {\n var parts = /@(.+?)(?::(\\d+))?(?::(\\d+))?$/.exec(locationString, '');\n var fileName = parts[1];\n var lineNumber = parts[2];\n var columnNumber = parts[3];\n }\n\n return new StackFrame({\n functionName: functionName,\n args: args || undefined,\n fileName: fileName,\n lineNumber: lineNumber || undefined,\n columnNumber: columnNumber || undefined\n });\n };\n\n for (var i = 0; i < booleanProps.length; i++) {\n StackFrame.prototype['get' + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);\n StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function(p) {\n return function(v) {\n this[p] = Boolean(v);\n };\n })(booleanProps[i]);\n }\n\n for (var j = 0; j < numericProps.length; j++) {\n StackFrame.prototype['get' + _capitalize(numericProps[j])] = _getter(numericProps[j]);\n StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function(p) {\n return function(v) {\n if (!_isNumber(v)) {\n throw new TypeError(p + ' must be a Number');\n }\n this[p] = Number(v);\n };\n })(numericProps[j]);\n }\n\n for (var k = 0; k < stringProps.length; k++) {\n StackFrame.prototype['get' + _capitalize(stringProps[k])] = _getter(stringProps[k]);\n StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function(p) {\n return function(v) {\n this[p] = String(v);\n };\n })(stringProps[k]);\n }\n\n return StackFrame;\n}));\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction itemToPayload(item, options, callback) {\n var payloadOptions = options.payload || {};\n if (payloadOptions.body) {\n delete payloadOptions.body;\n }\n\n var data = _.merge(item.data, payloadOptions);\n if (item._isUncaught) {\n data._isUncaught = true;\n }\n if (item._originalArgs) {\n data._originalArgs = item._originalArgs;\n }\n callback(null, data);\n}\n\nfunction addTelemetryData(item, options, callback) {\n if (item.telemetryEvents) {\n _.set(item, 'data.body.telemetry', item.telemetryEvents);\n }\n callback(null, item);\n}\n\nfunction addMessageWithError(item, options, callback) {\n if (!item.message) {\n callback(null, item);\n return;\n }\n var tracePath = 'data.body.trace_chain.0';\n var trace = _.get(item, tracePath);\n if (!trace) {\n tracePath = 'data.body.trace';\n trace = _.get(item, tracePath);\n }\n if (trace) {\n if (!(trace.exception && trace.exception.description)) {\n _.set(item, tracePath+'.exception.description', item.message);\n callback(null, item);\n return;\n }\n var extra = _.get(item, tracePath+'.extra') || {};\n var newExtra = _.merge(extra, {message: item.message});\n _.set(item, tracePath+'.extra', newExtra);\n }\n callback(null, item);\n}\n\nfunction userTransform(logger) {\n return function(item, options, callback) {\n var newItem = _.merge(item);\n var response = null;\n try {\n if (_.isFunction(options.transform)) {\n response = options.transform(newItem.data, item);\n }\n } catch (e) {\n options.transform = null;\n logger.error('Error while calling custom transform() function. Removing custom transform().', e);\n callback(null, item);\n return;\n }\n if(_.isPromise(response)) {\n response.then(function (promisedItem) {\n if(promisedItem) {\n newItem.data = promisedItem;\n }\n callback(null, newItem);\n }, function (error) {\n callback(error, item);\n });\n } else {\n callback(null, newItem);\n }\n }\n}\n\nfunction addConfigToPayload(item, options, callback) {\n if (!options.sendConfig) {\n return callback(null, item);\n }\n var configKey = '_rollbarConfig';\n var custom = _.get(item, 'data.custom') || {};\n custom[configKey] = options;\n item.data.custom = custom;\n callback(null, item);\n}\n\nfunction addFunctionOption(options, name) {\n if(_.isFunction(options[name])) {\n options[name] = options[name].toString();\n }\n}\n\nfunction addConfiguredOptions(item, options, callback) {\n var configuredOptions = options._configuredOptions;\n\n // These must be stringified or they'll get dropped during serialization.\n addFunctionOption(configuredOptions, 'transform');\n addFunctionOption(configuredOptions, 'checkIgnore');\n addFunctionOption(configuredOptions, 'onSendCallback');\n\n delete configuredOptions.accessToken;\n item.data.notifier.configured_options = configuredOptions;\n callback(null, item);\n}\n\nfunction addDiagnosticKeys(item, options, callback) {\n var diagnostic = _.merge(item.notifier.client.notifier.diagnostic, item.diagnostic);\n\n if (_.get(item, 'err._isAnonymous')) {\n diagnostic.is_anonymous = true;\n }\n\n if (item._isUncaught) {\n diagnostic.is_uncaught = item._isUncaught;\n }\n\n if (item.err) {\n try {\n diagnostic.raw_error = {\n message: item.err.message,\n name: item.err.name,\n constructor_name: item.err.constructor && item.err.constructor.name,\n filename: item.err.fileName,\n line: item.err.lineNumber,\n column: item.err.columnNumber,\n stack: item.err.stack\n };\n } catch (e) {\n diagnostic.raw_error = { failed: String(e) };\n }\n }\n\n item.data.notifier.diagnostic = _.merge(item.data.notifier.diagnostic, diagnostic);\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError,\n userTransform: userTransform,\n addConfigToPayload: addConfigToPayload,\n addConfiguredOptions: addConfiguredOptions,\n addDiagnosticKeys: addDiagnosticKeys\n};\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction checkIgnore(item, settings) {\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore\n};\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction checkLevel(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = settings.reportLevel;\n var reportLevelVal = _.LEVELS[reportLevel] || 0;\n\n if (levelVal < reportLevelVal) {\n return false;\n }\n return true;\n}\n\nfunction userCheckIgnore(logger) {\n return function(item, settings) {\n var isUncaught = !!item._isUncaught;\n delete item._isUncaught;\n var args = item._originalArgs;\n delete item._originalArgs;\n try {\n if (_.isFunction(settings.onSendCallback)) {\n settings.onSendCallback(isUncaught, args, item);\n }\n } catch (e) {\n settings.onSendCallback = null;\n logger.error('Error while calling onSendCallback, removing', e);\n }\n try {\n if (_.isFunction(settings.checkIgnore) && settings.checkIgnore(isUncaught, args, item)) {\n return false;\n }\n } catch (e) {\n settings.checkIgnore = null;\n logger.error('Error while calling custom checkIgnore(), removing', e);\n }\n return true;\n }\n}\n\nfunction urlIsNotBlockListed(logger) {\n return function(item, settings) {\n return !urlIsOnAList(item, settings, 'blocklist', logger);\n }\n}\n\nfunction urlIsSafeListed(logger) {\n return function(item, settings) {\n return urlIsOnAList(item, settings, 'safelist', logger);\n }\n}\n\nfunction matchFrames(trace, list, block) {\n if (!trace) { return !block }\n\n var frames = trace.frames;\n\n if (!frames || frames.length === 0) { return !block; }\n\n var frame, filename, url, urlRegex;\n var listLength = list.length;\n var frameLength = frames.length;\n for (var i = 0; i < frameLength; i++) {\n frame = frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) { return !block; }\n\n for (var j = 0; j < listLength; j++) {\n url = list[j];\n urlRegex = new RegExp(url);\n\n if (urlRegex.test(filename)) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction urlIsOnAList(item, settings, safeOrBlock, logger) {\n // safelist is the default\n var block = false;\n if (safeOrBlock === 'blocklist') {\n block = true;\n }\n\n var list, traces;\n try {\n list = block ? settings.hostBlockList : settings.hostSafeList;\n traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];\n\n // These two checks are important to come first as they are defaults\n // in case the list is missing or the trace is missing or not well-formed\n if (!list || list.length === 0) {\n return !block;\n }\n if (traces.length === 0 || !traces[0]) {\n return !block;\n }\n\n var tracesLength = traces.length;\n for (var i = 0; i < tracesLength; i++) {\n if(matchFrames(traces[i], list, block)) {\n return true;\n }\n }\n } catch (e)\n /* istanbul ignore next */\n {\n if (block) {\n settings.hostBlockList = null;\n } else {\n settings.hostSafeList = null;\n }\n var listName = block ? 'hostBlockList' : 'hostSafeList';\n logger.error('Error while reading your configuration\\'s ' + listName + ' option. Removing custom ' + listName + '.', e);\n return !block;\n }\n return false;\n}\n\nfunction messageIsIgnored(logger) {\n return function(item, settings) {\n var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n messages = messagesFromItem(item);\n\n if (messages.length === 0){\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n\n for (j = 0; j < messages.length; j++) {\n messageIsIgnored = rIgnoredMessage.test(messages[j]);\n\n if (messageIsIgnored) {\n return false;\n }\n }\n }\n } catch(e)\n /* istanbul ignore next */\n {\n settings.ignoredMessages = null;\n logger.error('Error while reading your configuration\\'s ignoredMessages option. Removing custom ignoredMessages.');\n }\n\n return true;\n }\n}\n\nfunction messagesFromItem(item) {\n var body = item.body;\n var messages = [];\n\n // The payload schema only allows one of trace_chain, message, or trace.\n // However, existing test cases are based on having both trace and message present.\n // So here we preserve the ability to collect strings from any combination of these keys.\n if (body.trace_chain) {\n var traceChain = body.trace_chain;\n for (var i = 0; i < traceChain.length; i++) {\n var trace = traceChain[i];\n messages.push(_.get(trace, 'exception.message'));\n }\n }\n if (body.trace) {\n messages.push(_.get(body, 'trace.exception.message'));\n }\n if (body.message) {\n messages.push(_.get(body, 'message.body'));\n }\n return messages;\n}\n\nmodule.exports = {\n checkLevel: checkLevel,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlockListed: urlIsNotBlockListed,\n urlIsSafeListed: urlIsSafeListed,\n messageIsIgnored: messageIsIgnored\n};\n","'use strict';\n\nmodule.exports = {\n version: '2.24.1',\n endpoint: 'api.rollbar.com/api/1/item/',\n logLevel: 'debug',\n reportLevel: 'debug',\n uncaughtErrorLevel: 'error',\n maxItems: 0,\n itemsPerMin: 60\n}\n","'use strict';\n\nmodule.exports = {\n scrubFields: [\n 'pw',\n 'pass',\n 'passwd',\n 'password',\n 'secret',\n 'confirm_password',\n 'confirmPassword',\n 'password_confirmation',\n 'passwordConfirmation',\n 'access_token',\n 'accessToken',\n 'X-Rollbar-Access-Token',\n 'secret_key',\n 'secretKey',\n 'secretToken',\n 'cc-number',\n 'card number',\n 'cardnumber',\n 'cardnum',\n 'ccnum',\n 'ccnumber',\n 'cc num',\n 'creditcardnumber',\n 'credit card number',\n 'newcreditcardnumber',\n 'new credit card',\n 'creditcardno',\n 'credit card no',\n 'card#',\n 'card #',\n 'cc-csc',\n 'cvc',\n 'cvc2',\n 'cvv2',\n 'ccv2',\n 'security code',\n 'card verification',\n 'name on credit card',\n 'name on card',\n 'nameoncard',\n 'cardholder',\n 'card holder',\n 'name des karteninhabers',\n 'ccname',\n 'card type',\n 'cardtype',\n 'cc type',\n 'cctype',\n 'payment type',\n 'expiration date',\n 'expirationdate',\n 'expdate',\n 'cc-exp',\n 'ccmonth',\n 'ccyear'\n ]\n}\n","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.merge(options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n}\n\nTelemeter.prototype.configure = function(options) {\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n var deleteCount = 0;\n if (this.maxQueueSize > newMaxEvents) {\n deleteCount = this.maxQueueSize - newMaxEvents;\n }\n this.maxQueueSize = newMaxEvents;\n this.queue.splice(0, deleteCount);\n};\n\nTelemeter.prototype.copyEvents = function() {\n var events = Array.prototype.slice.call(this.queue, 0);\n if (_.isFunction(this.options.filterTelemetry)) {\n try {\n var i = events.length;\n while (i--) {\n if (this.options.filterTelemetry(events[i])) {\n events.splice(i, 1);\n }\n }\n } catch (e) {\n this.options.filterTelemetry = null;\n }\n }\n return events;\n};\n\nTelemeter.prototype.capture = function(type, metadata, level, rollbarUUID, timestamp) {\n var e = {\n level: getLevel(type, level),\n type: type,\n timestamp_ms: timestamp || _.now(),\n body: metadata,\n source: 'client'\n };\n if (rollbarUUID) {\n e.uuid = rollbarUUID;\n }\n\n try {\n if (_.isFunction(this.options.filterTelemetry) && this.options.filterTelemetry(e)) {\n return false;\n }\n } catch (exc) {\n this.options.filterTelemetry = null;\n }\n\n this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function(type, metadata, level, rollbarUUID) {\n return this.capture(type, metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.captureError = function(err, level, rollbarUUID, timestamp) {\n var metadata = {\n message: err.message || String(err)\n };\n if (err.stack) {\n metadata.stack = err.stack;\n }\n return this.capture('error', metadata, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureLog = function(message, level, rollbarUUID, timestamp) {\n return this.capture('log', {\n message: message\n }, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID, requestData) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\n if (requestData) {\n metadata.request = requestData;\n }\n var level = this.levelFromStatus(metadata.status_code);\n return this.capture('network', metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.levelFromStatus = function(statusCode) {\n if (statusCode >= 200 && statusCode < 400) {\n return 'info';\n }\n if (statusCode === 0 || statusCode >= 400) {\n return 'error';\n }\n return 'info';\n};\n\nTelemeter.prototype.captureDom = function(subtype, element, value, checked, rollbarUUID) {\n var metadata = {\n subtype: subtype,\n element: element\n };\n if (value !== undefined) {\n metadata.value = value;\n }\n if (checked !== undefined) {\n metadata.checked = checked;\n }\n return this.capture('dom', metadata, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureNavigation = function(from, to, rollbarUUID) {\n return this.capture('navigation', {from: from, to: to}, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureDomContentLoaded = function(ts) {\n return this.capture('navigation', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n */\n};\nTelemeter.prototype.captureLoad = function(ts) {\n return this.capture('navigation', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n */\n};\n\nTelemeter.prototype.captureConnectivityChange = function(type, rollbarUUID) {\n return this.captureNetwork({change: type}, 'connectivity', rollbarUUID);\n};\n\n// Only intended to be used internally by the notifier\nTelemeter.prototype._captureRollbarItem = function(item) {\n if (!this.options.includeItemsInTelemetry) {\n return;\n }\n if (item.err) {\n return this.captureError(item.err, item.level, item.uuid, item.timestamp);\n }\n if (item.message) {\n return this.captureLog(item.message, item.level, item.uuid, item.timestamp);\n }\n if (item.custom) {\n return this.capture('log', item.custom, item.level, item.uuid, item.timestamp);\n }\n};\n\nTelemeter.prototype.push = function(e) {\n this.queue.push(e);\n if (this.queue.length > this.maxQueueSize) {\n this.queue.shift();\n }\n};\n\nfunction getLevel(type, level) {\n if (level) {\n return level;\n }\n var defaultLevel = {\n error: 'error',\n manual: 'info'\n };\n return defaultLevel[type] || 'info';\n}\n\nmodule.exports = Telemeter;\n","'use strict';\n\nvar _ = require('../utility');\nvar scrub = require('../scrub');\nvar urlparser = require('./url');\nvar domUtil = require('./domUtility');\n\nvar defaults = {\n network: true,\n networkResponseHeaders: false,\n networkResponseBody: false,\n networkRequestHeaders: false,\n networkRequestBody: false,\n networkErrorOnHttp5xx: false,\n networkErrorOnHttp4xx: false,\n networkErrorOnHttp0: false,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true,\n contentSecurityPolicy: true,\n errorOnContentSecurityPolicy: false\n};\n\nfunction replace(obj, name, replacement, replacements, type) {\n var orig = obj[name];\n obj[name] = replacement(orig);\n if (replacements) {\n replacements[type].push([obj, name, orig]);\n }\n}\n\nfunction restore(replacements, type) {\n var b;\n while (replacements[type].length) {\n b = replacements[type].shift();\n b[0][b[1]] = b[2];\n }\n}\n\nfunction nameFromDescription(description) {\n if (!description || !description.attributes) { return null; }\n var attrs = description.attributes;\n for (var a = 0; a < attrs.length; ++a) {\n if (attrs[a].key === 'name') {\n return attrs[a].value;\n }\n }\n return null;\n}\n\nfunction defaultValueScrubber(scrubFields) {\n var patterns = [];\n for (var i = 0; i < scrubFields.length; ++i) {\n patterns.push(new RegExp(scrubFields[i], 'i'));\n }\n return function(description) {\n var name = nameFromDescription(description);\n if (!name) { return false; }\n for (var i = 0; i < patterns.length; ++i) {\n if (patterns[i].test(name)) {\n return true;\n }\n }\n return false;\n };\n}\n\nfunction Instrumenter(options, telemeter, rollbar, _window, _document) {\n this.options = options;\n var autoInstrument = options.autoInstrument;\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);\n this.telemeter = telemeter;\n this.rollbar = rollbar;\n this.diagnostic = rollbar.client.notifier.diagnostic;\n this._window = _window || {};\n this._document = _document || {};\n this.replacements = {\n network: [],\n log: [],\n navigation: [],\n connectivity: []\n };\n this.eventRemovers = {\n dom: [],\n connectivity: [],\n contentsecuritypolicy: []\n };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function(options) {\n this.options = _.merge(this.options, options);\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.merge(this.autoInstrument);\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n if (options.scrubTelemetryInputs !== undefined) {\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n }\n if (options.telemetryScrubber !== undefined) {\n this.telemetryScrubber = options.telemetryScrubber;\n }\n};\n\n// eslint-disable-next-line complexity\nInstrumenter.prototype.instrument = function(oldSettings) {\n if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {\n this.instrumentNetwork();\n } else if (!this.autoInstrument.network && oldSettings && oldSettings.network) {\n this.deinstrumentNetwork();\n }\n\n if (this.autoInstrument.log && !(oldSettings && oldSettings.log)) {\n this.instrumentConsole();\n } else if (!this.autoInstrument.log && oldSettings && oldSettings.log) {\n this.deinstrumentConsole();\n }\n\n if (this.autoInstrument.dom && !(oldSettings && oldSettings.dom)) {\n this.instrumentDom();\n } else if (!this.autoInstrument.dom && oldSettings && oldSettings.dom) {\n this.deinstrumentDom();\n }\n\n if (this.autoInstrument.navigation && !(oldSettings && oldSettings.navigation)) {\n this.instrumentNavigation();\n } else if (!this.autoInstrument.navigation && oldSettings && oldSettings.navigation) {\n this.deinstrumentNavigation();\n }\n\n if (this.autoInstrument.connectivity && !(oldSettings && oldSettings.connectivity)) {\n this.instrumentConnectivity();\n } else if (!this.autoInstrument.connectivity && oldSettings && oldSettings.connectivity) {\n this.deinstrumentConnectivity();\n }\n\n if (this.autoInstrument.contentSecurityPolicy && !(oldSettings && oldSettings.contentSecurityPolicy)) {\n this.instrumentContentSecurityPolicy();\n } else if (!this.autoInstrument.contentSecurityPolicy && oldSettings && oldSettings.contentSecurityPolicy) {\n this.deinstrumentContentSecurityPolicy();\n }\n};\n\nInstrumenter.prototype.deinstrumentNetwork = function() {\n restore(this.replacements, 'network');\n};\n\nInstrumenter.prototype.instrumentNetwork = function() {\n var self = this;\n\n function wrapProp(prop, xhr) {\n if (prop in xhr && _.isFunction(xhr[prop])) {\n replace(xhr, prop, function(orig) {\n return self.rollbar.wrap(orig);\n });\n }\n }\n\n if ('XMLHttpRequest' in this._window) {\n var xhrp = this._window.XMLHttpRequest.prototype;\n replace(xhrp, 'open', function(orig) {\n return function(method, url) {\n if (_.isType(url, 'string')) {\n if (this.__rollbar_xhr) {\n this.__rollbar_xhr.method = method;\n this.__rollbar_xhr.url = url;\n this.__rollbar_xhr.status_code = null;\n this.__rollbar_xhr.start_time_ms = _.now();\n this.__rollbar_xhr.end_time_ms = null;\n } else {\n this.__rollbar_xhr = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'setRequestHeader', function(orig) {\n return function(header, value) {\n // If xhr.open is async, __rollbar_xhr may not be initialized yet.\n if (!this.__rollbar_xhr) {\n this.__rollbar_xhr = {};\n }\n if (_.isType(header, 'string') && _.isType(value, 'string')) {\n if (self.autoInstrument.networkRequestHeaders) {\n if (!this.__rollbar_xhr.request_headers) {\n this.__rollbar_xhr.request_headers = {};\n }\n this.__rollbar_xhr.request_headers[header] = value;\n }\n // We want the content type even if request header telemetry is off.\n if (header.toLowerCase() === 'content-type') {\n this.__rollbar_xhr.request_content_type = value;\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'send', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(data) {\n /* eslint-enable no-unused-vars */\n var xhr = this;\n\n function onreadystatechangeHandler() {\n if (xhr.__rollbar_xhr) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n if (self.autoInstrument.networkRequestBody) {\n xhr.__rollbar_xhr.request = data;\n }\n xhr.__rollbar_event = self.captureNetwork(xhr.__rollbar_xhr, 'xhr', undefined);\n }\n if (xhr.readyState < 2) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n }\n if (xhr.readyState > 3) {\n xhr.__rollbar_xhr.end_time_ms = _.now();\n\n var headers = null;\n xhr.__rollbar_xhr.response_content_type = xhr.getResponseHeader('Content-Type');\n if (self.autoInstrument.networkResponseHeaders) {\n var headersConfig = self.autoInstrument.networkResponseHeaders;\n headers = {};\n try {\n var header, i;\n if (headersConfig === true) {\n var allHeaders = xhr.getAllResponseHeaders();\n if (allHeaders) {\n var arr = allHeaders.trim().split(/[\\r\\n]+/);\n var parts, value;\n for (i=0; i < arr.length; i++) {\n parts = arr[i].split(': ');\n header = parts.shift();\n value = parts.join(': ');\n headers[header] = value;\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n header = headersConfig[i];\n headers[header] = xhr.getResponseHeader(header);\n }\n }\n } catch (e) {\n /* we ignore the errors here that could come from different\n * browser issues with the xhr methods */\n }\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n try {\n body = xhr.responseText;\n } catch (e) {\n /* ignore errors from reading responseText */\n }\n }\n var response = null;\n if (body || headers) {\n response = {};\n if (body) {\n if (self.isJsonContentType(xhr.__rollbar_xhr.response_content_type)) {\n response.body = self.scrubJson(body);\n } else {\n response.body = body;\n }\n }\n if (headers) {\n response.headers = headers;\n }\n }\n if (response) {\n xhr.__rollbar_xhr.response = response;\n }\n try {\n var code = xhr.status;\n code = code === 1223 ? 204 : code;\n xhr.__rollbar_xhr.status_code = code;\n xhr.__rollbar_event.level = self.telemeter.levelFromStatus(code);\n self.errorOnHttpStatus(xhr.__rollbar_xhr);\n } catch (e) {\n /* ignore possible exception from xhr.status */\n }\n }\n }\n }\n\n wrapProp('onload', xhr);\n wrapProp('onerror', xhr);\n wrapProp('onprogress', xhr);\n\n if ('onreadystatechange' in xhr && _.isFunction(xhr.onreadystatechange)) {\n replace(xhr, 'onreadystatechange', function(orig) {\n return self.rollbar.wrap(orig, undefined, onreadystatechangeHandler);\n });\n } else {\n xhr.onreadystatechange = onreadystatechangeHandler;\n }\n if (xhr.__rollbar_xhr && self.trackHttpErrors()) {\n xhr.__rollbar_xhr.stack = (new Error()).stack;\n }\n return orig.apply(this, arguments);\n }\n }, this.replacements, 'network');\n }\n\n if ('fetch' in this._window) {\n replace(this._window, 'fetch', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(fn, t) {\n /* eslint-enable no-unused-vars */\n var args = new Array(arguments.length);\n for (var i=0, len=args.length; i < len; i++) {\n args[i] = arguments[i];\n }\n var input = args[0];\n var method = 'GET';\n var url;\n if (_.isType(input, 'string')) {\n url = input;\n } else if (input) {\n url = input.url;\n if (input.method) {\n method = input.method;\n }\n }\n if (args[1] && args[1].method) {\n method = args[1].method;\n }\n var metadata = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n if (args[1] && args[1].headers) {\n // Argument may be a Headers object, or plain object. Ensure here that\n // we are working with a Headers object with case-insensitive keys.\n var reqHeaders = new Headers(args[1].headers);\n\n metadata.request_content_type = reqHeaders.get('Content-Type');\n\n if (self.autoInstrument.networkRequestHeaders) {\n metadata.request_headers = self.fetchHeaders(reqHeaders, self.autoInstrument.networkRequestHeaders)\n }\n }\n\n if (self.autoInstrument.networkRequestBody) {\n if (args[1] && args[1].body) {\n metadata.request = args[1].body;\n } else if (args[0] && !_.isType(args[0], 'string') && args[0].body) {\n metadata.request = args[0].body;\n }\n }\n self.captureNetwork(metadata, 'fetch', undefined);\n if (self.trackHttpErrors()) {\n metadata.stack = (new Error()).stack;\n }\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n metadata.response_content_type = resp.headers.get('Content-Type');\n var headers = null;\n if (self.autoInstrument.networkResponseHeaders) {\n headers = self.fetchHeaders(resp.headers, self.autoInstrument.networkResponseHeaders);\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n if (typeof resp.text === 'function') { // Response.text() is not implemented on some platforms\n // The response must be cloned to prevent reading (and locking) the original stream.\n body = resp.clone().text(); //returns a Promise\n }\n }\n if (headers || body) {\n metadata.response = {};\n if (body) {\n // Test to ensure body is a Promise, which it should always be.\n if (typeof body.then === 'function') {\n body.then(function (text) {\n if (self.isJsonContentType(metadata.response_content_type)) {\n metadata.response.body = self.scrubJson(text);\n }\n });\n } else {\n metadata.response.body = body;\n }\n }\n if (headers) {\n metadata.response.headers = headers;\n }\n }\n self.errorOnHttpStatus(metadata);\n return resp;\n });\n };\n }, this.replacements, 'network');\n }\n};\n\nInstrumenter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID) {\n if (metadata.request && this.isJsonContentType(metadata.request_content_type)) {\n metadata.request = this.scrubJson(metadata.request);\n }\n return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);\n};\n\nInstrumenter.prototype.isJsonContentType = function(contentType) {\n return (contentType && _.isType(contentType, 'string') && contentType.toLowerCase().includes('json')) ? true : false;\n}\n\nInstrumenter.prototype.scrubJson = function(json) {\n return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));\n}\n\nInstrumenter.prototype.fetchHeaders = function(inHeaders, headersConfig) {\n var outHeaders = {};\n try {\n var i;\n if (headersConfig === true) {\n if (typeof inHeaders.entries === 'function') { // Headers.entries() is not implemented in IE\n var allHeaders = inHeaders.entries();\n var currentHeader = allHeaders.next();\n while (!currentHeader.done) {\n outHeaders[currentHeader.value[0]] = currentHeader.value[1];\n currentHeader = allHeaders.next();\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n var header = headersConfig[i];\n outHeaders[header] = inHeaders.get(header);\n }\n }\n } catch (e) {\n /* ignore probable IE errors */\n }\n return outHeaders;\n}\n\nInstrumenter.prototype.trackHttpErrors = function() {\n return this.autoInstrument.networkErrorOnHttp5xx ||\n this.autoInstrument.networkErrorOnHttp4xx ||\n this.autoInstrument.networkErrorOnHttp0;\n}\n\nInstrumenter.prototype.errorOnHttpStatus = function(metadata) {\n var status = metadata.status_code;\n\n if ((status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||\n (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||\n (status === 0 && this.autoInstrument.networkErrorOnHttp0)) {\n var error = new Error('HTTP request failed with Status ' + status);\n error.stack = metadata.stack;\n this.rollbar.error(error, { skipFrames: 1 });\n }\n}\n\nInstrumenter.prototype.deinstrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n var b;\n while (this.replacements['log'].length) {\n b = this.replacements['log'].shift();\n this._window.console[b[0]] = b[1];\n }\n};\n\nInstrumenter.prototype.instrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n\n var self = this;\n var c = this._window.console;\n\n function wrapConsole(method) {\n 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778\n\n var orig = c[method];\n var origConsole = c;\n var level = method === 'warn' ? 'warning' : method;\n c[method] = function() {\n var args = Array.prototype.slice.call(arguments);\n var message = _.formatArgsAsString(args);\n self.telemeter.captureLog(message, level);\n if (orig) {\n Function.prototype.apply.call(orig, origConsole, args);\n }\n };\n self.replacements['log'].push([method, orig]);\n }\n var methods = ['debug','info','warn','error','log'];\n try {\n for (var i=0, len=methods.length; i < len; i++) {\n wrapConsole(methods[i]);\n }\n } catch (e) {\n this.diagnostic.instrumentConsole = { error: e.message };\n }\n};\n\nInstrumenter.prototype.deinstrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n this.removeListeners('dom');\n};\n\nInstrumenter.prototype.instrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n var clickHandler = this.handleClick.bind(this);\n var blurHandler = this.handleBlur.bind(this);\n this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);\n this.addListener('dom', this._window, 'blur', 'onfocusout', blurHandler, true);\n};\n\nInstrumenter.prototype.handleClick = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n var hasTag = e && e.tagName;\n var anchorOrButton = domUtil.isDescribedElement(e, 'a') || domUtil.isDescribedElement(e, 'button');\n if (hasTag && (anchorOrButton || domUtil.isDescribedElement(e, 'input', ['button', 'submit']))) {\n this.captureDomEvent('click', e);\n } else if (domUtil.isDescribedElement(e, 'input', ['checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value, e.checked);\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleBlur = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n if (e && e.tagName) {\n if (domUtil.isDescribedElement(e, 'textarea')) {\n this.captureDomEvent('input', e, e.value);\n } else if (domUtil.isDescribedElement(e, 'select') && e.options && e.options.length) {\n this.handleSelectInputChanged(e);\n } else if (domUtil.isDescribedElement(e, 'input') && !domUtil.isDescribedElement(e, 'input', ['button', 'submit', 'hidden', 'checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value);\n }\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleSelectInputChanged = function(elem) {\n if (elem.multiple) {\n for (var i = 0; i < elem.options.length; i++) {\n if (elem.options[i].selected) {\n this.captureDomEvent('input', elem, elem.options[i].value);\n }\n }\n } else if (elem.selectedIndex >= 0 && elem.options[elem.selectedIndex]) {\n this.captureDomEvent('input', elem, elem.options[elem.selectedIndex].value);\n }\n};\n\nInstrumenter.prototype.captureDomEvent = function(subtype, element, value, isChecked) {\n if (value !== undefined) {\n if (this.scrubTelemetryInputs || (domUtil.getElementType(element) === 'password')) {\n value = '[scrubbed]';\n } else {\n var description = domUtil.describeElement(element);\n if (this.telemetryScrubber) {\n if (this.telemetryScrubber(description)) {\n value = '[scrubbed]';\n }\n } else if (this.defaultValueScrubber(description)) {\n value = '[scrubbed]';\n }\n }\n }\n var elementString = domUtil.elementArrayToString(domUtil.treeToArray(element));\n this.telemeter.captureDom(subtype, elementString, value, isChecked);\n};\n\nInstrumenter.prototype.deinstrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n restore(this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.instrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n var self = this;\n replace(this._window, 'onpopstate', function(orig) {\n return function() {\n var current = self._location.href;\n self.handleUrlChange(self._lastHref, current);\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n }, this.replacements, 'navigation');\n\n replace(this._window.history, 'pushState', function(orig) {\n return function() {\n var url = arguments.length > 2 ? arguments[2] : undefined;\n if (url) {\n self.handleUrlChange(self._lastHref, url + '');\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.handleUrlChange = function(from, to) {\n var parsedHref = urlparser.parse(this._location.href);\n var parsedTo = urlparser.parse(to);\n var parsedFrom = urlparser.parse(from);\n this._lastHref = to;\n if (parsedHref.protocol === parsedTo.protocol && parsedHref.host === parsedTo.host) {\n to = parsedTo.path + (parsedTo.hash || '');\n }\n if (parsedHref.protocol === parsedFrom.protocol && parsedHref.host === parsedFrom.host) {\n from = parsedFrom.path + (parsedFrom.hash || '');\n }\n this.telemeter.captureNavigation(from, to);\n};\n\nInstrumenter.prototype.deinstrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.removeListeners('connectivity');\n } else {\n restore(this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.instrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.addListener('connectivity', this._window, 'online', undefined, function() {\n this.telemeter.captureConnectivityChange('online');\n }.bind(this), true);\n this.addListener('connectivity', this._window, 'offline', undefined, function() {\n this.telemeter.captureConnectivityChange('offline');\n }.bind(this), true);\n } else {\n var self = this;\n replace(this._document.body, 'ononline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('online');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n replace(this._document.body, 'onoffline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('offline');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.handleCspEvent = function(cspEvent) {\n var message = 'Security Policy Violation: ' +\n 'blockedURI: ' + cspEvent.blockedURI + ', ' +\n 'violatedDirective: ' + cspEvent.violatedDirective + ', ' +\n 'effectiveDirective: ' + cspEvent.effectiveDirective + ', ';\n\n if (cspEvent.sourceFile) {\n message += 'location: ' + cspEvent.sourceFile + ', ' +\n 'line: ' + cspEvent.lineNumber + ', ' +\n 'col: ' + cspEvent.columnNumber + ', ';\n }\n\n message += 'originalPolicy: ' + cspEvent.originalPolicy;\n\n this.telemeter.captureLog(message, 'error');\n this.handleCspError(message);\n}\n\nInstrumenter.prototype.handleCspError = function(message) {\n if (this.autoInstrument.errorOnContentSecurityPolicy) {\n this.rollbar.error(message);\n }\n}\n\nInstrumenter.prototype.deinstrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._window)) { return; }\n\n this.removeListeners('contentsecuritypolicy');\n};\n\nInstrumenter.prototype.instrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._window)) { return; }\n\n var cspHandler = this.handleCspEvent.bind(this);\n this.addListener('contentsecuritypolicy', this._window, 'securitypolicyviolation', null, cspHandler, false);\n};\n\nInstrumenter.prototype.addListener = function(section, obj, type, altType, handler, capture) {\n if (obj.addEventListener) {\n obj.addEventListener(type, handler, capture);\n this.eventRemovers[section].push(function() {\n obj.removeEventListener(type, handler, capture);\n });\n } else if (altType) {\n obj.attachEvent(altType, handler);\n this.eventRemovers[section].push(function() {\n obj.detachEvent(altType, handler);\n });\n }\n};\n\nInstrumenter.prototype.removeListeners = function(section) {\n var r;\n while (this.eventRemovers[section].length) {\n r = this.eventRemovers[section].shift();\n r();\n }\n};\n\nmodule.exports = Instrumenter;\n","'use strict';\n\nfunction getElementType(e) {\n return (e.getAttribute('type') || '').toLowerCase();\n}\n\nfunction isDescribedElement(element, type, subtypes) {\n if (element.tagName.toLowerCase() !== type.toLowerCase()) {\n return false;\n }\n if (!subtypes) {\n return true;\n }\n element = getElementType(element);\n for (var i = 0; i < subtypes.length; i++) {\n if (subtypes[i] === element) {\n return true;\n }\n }\n return false;\n}\n\nfunction getElementFromEvent(evt, doc) {\n if (evt.target) {\n return evt.target;\n }\n if (doc && doc.elementFromPoint) {\n return doc.elementFromPoint(evt.clientX, evt.clientY);\n }\n return undefined;\n}\n\nfunction treeToArray(elem) {\n var MAX_HEIGHT = 5;\n var out = [];\n var nextDescription;\n for (var height = 0; elem && height < MAX_HEIGHT; height++) {\n nextDescription = describeElement(elem);\n if (nextDescription.tagName === 'html') {\n break;\n }\n out.unshift(nextDescription);\n elem = elem.parentNode;\n }\n return out;\n}\n\nfunction elementArrayToString(a) {\n var MAX_LENGTH = 80;\n var separator = ' > ', separatorLength = separator.length;\n var out = [], len = 0, nextStr, totalLength;\n\n for (var i = a.length - 1; i >= 0; i--) {\n nextStr = descriptionToString(a[i]);\n totalLength = len + (out.length * separatorLength) + nextStr.length;\n if (i < a.length - 1 && totalLength >= MAX_LENGTH + 3) {\n out.unshift('...');\n break;\n }\n out.unshift(nextStr);\n len += nextStr.length;\n }\n return out.join(separator);\n}\n\nfunction descriptionToString(desc) {\n if (!desc || !desc.tagName) {\n return '';\n }\n var out = [desc.tagName];\n if (desc.id) {\n out.push('#' + desc.id);\n }\n if (desc.classes) {\n out.push('.' + desc.classes.join('.'));\n }\n for (var i = 0; i < desc.attributes.length; i++) {\n out.push('[' + desc.attributes[i].key + '=\"' + desc.attributes[i].value + '\"]');\n }\n\n return out.join('');\n}\n\n/**\n * Input: a dom element\n * Output: null if tagName is falsey or input is falsey, else\n * {\n * tagName: String,\n * id: String | undefined,\n * classes: [String] | undefined,\n * attributes: [\n * {\n * key: OneOf(type, name, title, alt),\n * value: String\n * }\n * ]\n * }\n */\nfunction describeElement(elem) {\n if (!elem || !elem.tagName) {\n return null;\n }\n var out = {}, className, key, attr, i;\n out.tagName = elem.tagName.toLowerCase();\n if (elem.id) {\n out.id = elem.id;\n }\n className = elem.className;\n if (className && (typeof className === 'string')) {\n out.classes = className.split(/\\s+/);\n }\n var attributes = ['type', 'name', 'title', 'alt'];\n out.attributes = [];\n for (i = 0; i < attributes.length; i++) {\n key = attributes[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.attributes.push({key: key, value: attr});\n }\n }\n return out;\n}\n\nmodule.exports = {\n describeElement: describeElement,\n descriptionToString: descriptionToString,\n elementArrayToString: elementArrayToString,\n treeToArray: treeToArray,\n getElementFromEvent: getElementFromEvent,\n isDescribedElement: isDescribedElement,\n getElementType: getElementType\n};\n","'use strict';\n\nvar polyfillJSON = require('../../vendor/JSON-js/json3');\n\nmodule.exports = polyfillJSON;\n","// json3.js\n// 2017-02-21\n// Public Domain.\n// NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.\n// See http://www.JSON.org/js.html\n// This code should be minified before deployment.\n// See http://javascript.crockford.com/jsmin.html\n\n// USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO\n// NOT CONTROL.\n\n// This file creates a global JSON object containing two methods: stringify\n// and parse. This file provides the ES5 JSON capability to ES3 systems.\n// If a project might run on IE8 or earlier, then this file should be included.\n// This file does nothing on ES5 systems.\n\n// JSON.stringify(value, replacer, space)\n// value any JavaScript value, usually an object or array.\n// replacer an optional parameter that determines how object\n// values are stringified for objects. It can be a\n// function or an array of strings.\n// space an optional parameter that specifies the indentation\n// of nested structures. If it is omitted, the text will\n// be packed without extra whitespace. If it is a number,\n// it will specify the number of spaces to indent at each\n// level. If it is a string (such as \"\\t\" or \" \"),\n// it contains the characters used to indent at each level.\n// This method produces a JSON text from a JavaScript value.\n// When an object value is found, if the object contains a toJSON\n// method, its toJSON method will be called and the result will be\n// stringified. A toJSON method does not serialize: it returns the\n// value represented by the name/value pair that should be serialized,\n// or undefined if nothing should be serialized. The toJSON method\n// will be passed the key associated with the value, and this will be\n// bound to the value.\n\n// For example, this would serialize Dates as ISO strings.\n\n// Date.prototype.toJSON = function (key) {\n// function f(n) {\n// // Format integers to have at least two digits.\n// return (n < 10)\n// ? \"0\" + n\n// : n;\n// }\n// return this.getUTCFullYear() + \"-\" +\n// f(this.getUTCMonth() + 1) + \"-\" +\n// f(this.getUTCDate()) + \"T\" +\n// f(this.getUTCHours()) + \":\" +\n// f(this.getUTCMinutes()) + \":\" +\n// f(this.getUTCSeconds()) + \"Z\";\n// };\n\n// You can provide an optional replacer method. It will be passed the\n// key and value of each member, with this bound to the containing\n// object. The value that is returned from your method will be\n// serialized. If your method returns undefined, then the member will\n// be excluded from the serialization.\n\n// If the replacer parameter is an array of strings, then it will be\n// used to select the members to be serialized. It filters the results\n// such that only members with keys listed in the replacer array are\n// stringified.\n\n// Values that do not have JSON representations, such as undefined or\n// functions, will not be serialized. Such values in objects will be\n// dropped; in arrays they will be replaced with null. You can use\n// a replacer function to replace those with JSON values.\n\n// JSON.stringify(undefined) returns undefined.\n\n// The optional space parameter produces a stringification of the\n// value that is filled with line breaks and indentation to make it\n// easier to read.\n\n// If the space parameter is a non-empty string, then that string will\n// be used for indentation. If the space parameter is a number, then\n// the indentation will be that many spaces.\n\n// Example:\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}]);\n// // text is '[\"e\",{\"pluribus\":\"unum\"}]'\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}], null, \"\\t\");\n// // text is '[\\n\\t\"e\",\\n\\t{\\n\\t\\t\"pluribus\": \"unum\"\\n\\t}\\n]'\n\n// text = JSON.stringify([new Date()], function (key, value) {\n// return this[key] instanceof Date\n// ? \"Date(\" + this[key] + \")\"\n// : value;\n// });\n// // text is '[\"Date(---current time---)\"]'\n\n// JSON.parse(text, reviver)\n// This method parses a JSON text to produce an object or array.\n// It can throw a SyntaxError exception.\n// This has been modified to use JSON-js/json_parse_state.js as the\n// parser instead of the one built around eval found in JSON-js/json2.js\n\n// The optional reviver parameter is a function that can filter and\n// transform the results. It receives each of the keys and values,\n// and its return value is used instead of the original value.\n// If it returns what it received, then the structure is not modified.\n// If it returns undefined then the member is deleted.\n\n// Example:\n\n// // Parse the text. Values that look like ISO date strings will\n// // be converted to Date objects.\n\n// myData = JSON.parse(text, function (key, value) {\n// var a;\n// if (typeof value === \"string\") {\n// a =\n// /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2}(?:\\.\\d*)?)Z$/.exec(value);\n// if (a) {\n// return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],\n// +a[5], +a[6]));\n// }\n// }\n// return value;\n// });\n\n// myData = JSON.parse('[\"Date(09/09/2001)\"]', function (key, value) {\n// var d;\n// if (typeof value === \"string\" &&\n// value.slice(0, 5) === \"Date(\" &&\n// value.slice(-1) === \")\") {\n// d = new Date(value.slice(5, -1));\n// if (d) {\n// return d;\n// }\n// }\n// return value;\n// });\n\n// This is a reference implementation. You are free to copy, modify, or\n// redistribute.\n\n/*jslint\n for, this\n */\n\n/*property\n JSON, apply, call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,\n getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,\n lastIndex, length, parse, prototype, push, replace, slice, stringify,\n test, toJSON, toString, valueOf\n */\n\nvar setupCustomJSON = function(JSON) {\n\n var rx_one = /^[\\],:{}\\s]*$/;\n var rx_two = /\\\\(?:[\"\\\\\\/bfnrt]|u[0-9a-fA-F]{4})/g;\n var rx_three = /\"[^\"\\\\\\n\\r]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g;\n var rx_four = /(?:^|:|,)(?:\\s*\\[)+/g;\n var rx_escapable = /[\\\\\"\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n var rx_dangerous = /[\\u0000\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n\n function f(n) {\n // Format integers to have at least two digits.\n return n < 10\n ? \"0\" + n\n : n;\n }\n\n function this_value() {\n return this.valueOf();\n }\n\n if (typeof Date.prototype.toJSON !== \"function\") {\n\n Date.prototype.toJSON = function () {\n\n return isFinite(this.valueOf())\n ? this.getUTCFullYear() + \"-\" +\n f(this.getUTCMonth() + 1) + \"-\" +\n f(this.getUTCDate()) + \"T\" +\n f(this.getUTCHours()) + \":\" +\n f(this.getUTCMinutes()) + \":\" +\n f(this.getUTCSeconds()) + \"Z\"\n : null;\n };\n\n Boolean.prototype.toJSON = this_value;\n Number.prototype.toJSON = this_value;\n String.prototype.toJSON = this_value;\n }\n\n var gap;\n var indent;\n var meta;\n var rep;\n\n\n function quote(string) {\n\n // If the string contains no control characters, no quote characters, and no\n // backslash characters, then we can safely slap some quotes around it.\n // Otherwise we must also replace the offending characters with safe escape\n // sequences.\n\n rx_escapable.lastIndex = 0;\n return rx_escapable.test(string)\n ? \"\\\"\" + string.replace(rx_escapable, function (a) {\n var c = meta[a];\n return typeof c === \"string\"\n ? c\n : \"\\\\u\" + (\"0000\" + a.charCodeAt(0).toString(16)).slice(-4);\n }) + \"\\\"\"\n : \"\\\"\" + string + \"\\\"\";\n }\n\n\n function str(key, holder) {\n\n // Produce a string from holder[key].\n\n var i; // The loop counter.\n var k; // The member key.\n var v; // The member value.\n var length;\n var mind = gap;\n var partial;\n var value = holder[key];\n\n // If the value has a toJSON method, call it to obtain a replacement value.\n\n if (value && typeof value === \"object\" &&\n typeof value.toJSON === \"function\") {\n value = value.toJSON(key);\n }\n\n // If we were called with a replacer function, then call the replacer to\n // obtain a replacement value.\n\n if (typeof rep === \"function\") {\n value = rep.call(holder, key, value);\n }\n\n // What happens next depends on the value's type.\n\n switch (typeof value) {\n case \"string\":\n return quote(value);\n\n case \"number\":\n\n // JSON numbers must be finite. Encode non-finite numbers as null.\n\n return isFinite(value)\n ? String(value)\n : \"null\";\n\n case \"boolean\":\n case \"null\":\n\n // If the value is a boolean or null, convert it to a string. Note:\n // typeof null does not produce \"null\". The case is included here in\n // the remote chance that this gets fixed someday.\n\n return String(value);\n\n // If the type is \"object\", we might be dealing with an object or an array or\n // null.\n\n case \"object\":\n\n // Due to a specification blunder in ECMAScript, typeof null is \"object\",\n // so watch out for that case.\n\n if (!value) {\n return \"null\";\n }\n\n // Make an array to hold the partial results of stringifying this object value.\n\n gap += indent;\n partial = [];\n\n // Is the value an array?\n\n if (Object.prototype.toString.apply(value) === \"[object Array]\") {\n\n // The value is an array. Stringify every element. Use null as a placeholder\n // for non-JSON values.\n\n length = value.length;\n for (i = 0; i < length; i += 1) {\n partial[i] = str(i, value) || \"null\";\n }\n\n // Join all of the elements together, separated with commas, and wrap them in\n // brackets.\n\n v = partial.length === 0\n ? \"[]\"\n : gap\n ? \"[\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"]\"\n : \"[\" + partial.join(\",\") + \"]\";\n gap = mind;\n return v;\n }\n\n // If the replacer is an array, use it to select the members to be stringified.\n\n if (rep && typeof rep === \"object\") {\n length = rep.length;\n for (i = 0; i < length; i += 1) {\n if (typeof rep[i] === \"string\") {\n k = rep[i];\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n } else {\n\n // Otherwise, iterate through all of the keys in the object.\n\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(value, k)) {\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n }\n\n // Join all of the member texts together, separated with commas,\n // and wrap them in braces.\n\n v = partial.length === 0\n ? \"{}\"\n : gap\n ? \"{\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"}\"\n : \"{\" + partial.join(\",\") + \"}\";\n gap = mind;\n return v;\n }\n }\n\n // If the JSON object does not yet have a stringify method, give it one.\n\n if (typeof JSON.stringify !== \"function\") {\n meta = { // table of character substitutions\n \"\\b\": \"\\\\b\",\n \"\\t\": \"\\\\t\",\n \"\\n\": \"\\\\n\",\n \"\\f\": \"\\\\f\",\n \"\\r\": \"\\\\r\",\n \"\\\"\": \"\\\\\\\"\",\n \"\\\\\": \"\\\\\\\\\"\n };\n JSON.stringify = function (value, replacer, space) {\n\n // The stringify method takes a value and an optional replacer, and an optional\n // space parameter, and returns a JSON text. The replacer can be a function\n // that can replace values, or an array of strings that will select the keys.\n // A default replacer method can be provided. Use of the space parameter can\n // produce text that is more easily readable.\n\n var i;\n gap = \"\";\n indent = \"\";\n\n // If the space parameter is a number, make an indent string containing that\n // many spaces.\n\n if (typeof space === \"number\") {\n for (i = 0; i < space; i += 1) {\n indent += \" \";\n }\n\n // If the space parameter is a string, it will be used as the indent string.\n\n } else if (typeof space === \"string\") {\n indent = space;\n }\n\n // If there is a replacer, it must be a function or an array.\n // Otherwise, throw an error.\n\n rep = replacer;\n if (replacer && typeof replacer !== \"function\" &&\n (typeof replacer !== \"object\" ||\n typeof replacer.length !== \"number\")) {\n throw new Error(\"JSON.stringify\");\n }\n\n // Make a fake root object containing our value under the key of \"\".\n // Return the result of stringifying the value.\n\n return str(\"\", {\"\": value});\n };\n }\n\n\n // If the JSON object does not yet have a parse method, give it one.\n\n if (typeof JSON.parse !== \"function\") {\n JSON.parse = (function () {\n\n // This function creates a JSON parse function that uses a state machine rather\n // than the dangerous eval function to parse a JSON text.\n\n var state; // The state of the parser, one of\n // 'go' The starting state\n // 'ok' The final, accepting state\n // 'firstokey' Ready for the first key of the object or\n // the closing of an empty object\n // 'okey' Ready for the next key of the object\n // 'colon' Ready for the colon\n // 'ovalue' Ready for the value half of a key/value pair\n // 'ocomma' Ready for a comma or closing }\n // 'firstavalue' Ready for the first value of an array or\n // an empty array\n // 'avalue' Ready for the next value of an array\n // 'acomma' Ready for a comma or closing ]\n var stack; // The stack, for controlling nesting.\n var container; // The current container object or array\n var key; // The current key\n var value; // The current value\n var escapes = { // Escapement translation table\n \"\\\\\": \"\\\\\",\n \"\\\"\": \"\\\"\",\n \"/\": \"/\",\n \"t\": \"\\t\",\n \"n\": \"\\n\",\n \"r\": \"\\r\",\n \"f\": \"\\f\",\n \"b\": \"\\b\"\n };\n var string = { // The actions for string tokens\n go: function () {\n state = \"ok\";\n },\n firstokey: function () {\n key = value;\n state = \"colon\";\n },\n okey: function () {\n key = value;\n state = \"colon\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var number = { // The actions for number tokens\n go: function () {\n state = \"ok\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var action = {\n\n // The action table describes the behavior of the machine. It contains an\n // object for each token. Each object contains a method that is called when\n // a token is matched in a state. An object will lack a method for illegal\n // states.\n\n \"{\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = {};\n state = \"firstokey\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = {};\n state = \"firstokey\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n }\n },\n \"}\": {\n firstokey: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n ocomma: function () {\n var pop = stack.pop();\n container[key] = value;\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \"[\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = [];\n state = \"firstavalue\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = [];\n state = \"firstavalue\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n }\n },\n \"]\": {\n firstavalue: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n acomma: function () {\n var pop = stack.pop();\n container.push(value);\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \":\": {\n colon: function () {\n if (Object.hasOwnProperty.call(container, key)) {\n throw new SyntaxError(\"Duplicate key '\" + key + \"\\\"\");\n }\n state = \"ovalue\";\n }\n },\n \",\": {\n ocomma: function () {\n container[key] = value;\n state = \"okey\";\n },\n acomma: function () {\n container.push(value);\n state = \"avalue\";\n }\n },\n \"true\": {\n go: function () {\n value = true;\n state = \"ok\";\n },\n ovalue: function () {\n value = true;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = true;\n state = \"acomma\";\n },\n avalue: function () {\n value = true;\n state = \"acomma\";\n }\n },\n \"false\": {\n go: function () {\n value = false;\n state = \"ok\";\n },\n ovalue: function () {\n value = false;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = false;\n state = \"acomma\";\n },\n avalue: function () {\n value = false;\n state = \"acomma\";\n }\n },\n \"null\": {\n go: function () {\n value = null;\n state = \"ok\";\n },\n ovalue: function () {\n value = null;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = null;\n state = \"acomma\";\n },\n avalue: function () {\n value = null;\n state = \"acomma\";\n }\n }\n };\n\n function debackslashify(text) {\n\n // Remove and replace any backslash escapement.\n\n return text.replace(/\\\\(?:u(.{4})|([^u]))/g, function (ignore, b, c) {\n return b\n ? String.fromCharCode(parseInt(b, 16))\n : escapes[c];\n });\n }\n\n return function (source, reviver) {\n\n // A regular expression is used to extract tokens from the JSON text.\n // The extraction process is cautious.\n\n var result;\n var tx = /^[\\u0020\\t\\n\\r]*(?:([,:\\[\\]{}]|true|false|null)|(-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?)|\"((?:[^\\r\\n\\t\\\\\\\"]|\\\\(?:[\"\\\\\\/trnfb]|u[0-9a-fA-F]{4}))*)\")/;\n\n // Set the starting state.\n\n state = \"go\";\n\n // The stack records the container, key, and state for each object or array\n // that contains another object or array while processing nested structures.\n\n stack = [];\n\n // If any error occurs, we will catch it and ultimately throw a syntax error.\n\n try {\n\n // For each token...\n\n while (true) {\n result = tx.exec(source);\n if (!result) {\n break;\n }\n\n // result is the result array from matching the tokenizing regular expression.\n // result[0] contains everything that matched, including any initial whitespace.\n // result[1] contains any punctuation that was matched, or true, false, or null.\n // result[2] contains a matched number, still in string form.\n // result[3] contains a matched string, without quotes but with escapement.\n\n if (result[1]) {\n\n // Token: Execute the action for this state and token.\n\n action[result[1]][state]();\n\n } else if (result[2]) {\n\n // Number token: Convert the number string into a number value and execute\n // the action for this state and number.\n\n value = +result[2];\n number[state]();\n } else {\n\n // String token: Replace the escapement sequences and execute the action for\n // this state and string.\n\n value = debackslashify(result[3]);\n string[state]();\n }\n\n // Remove the token from the string. The loop will continue as long as there\n // are tokens. This is a slow process, but it allows the use of ^ matching,\n // which assures that no illegal tokens slip through.\n\n source = source.slice(result[0].length);\n }\n\n // If we find a state/token combination that is illegal, then the action will\n // cause an error. We handle the error by simply changing the state.\n\n } catch (e) {\n state = e;\n }\n\n // The parsing is finished. If we are not in the final \"ok\" state, or if the\n // remaining source contains anything except whitespace, then we did not have\n //a well-formed JSON text.\n\n if (state !== \"ok\" || (/[^\\u0020\\t\\n\\r]/.test(source))) {\n throw (state instanceof SyntaxError)\n ? state\n : new SyntaxError(\"JSON\");\n }\n\n // If there is a reviver function, we recursively walk the new structure,\n // passing each name/value pair to the reviver function for possible\n // transformation, starting with a temporary root object that holds the current\n // value in an empty key. If there is not a reviver function, we simply return\n // that value.\n\n return (typeof reviver === \"function\")\n ? (function walk(holder, key) {\n var k;\n var v;\n var val = holder[key];\n if (val && typeof val === \"object\") {\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(val, k)) {\n v = walk(val, k);\n if (v !== undefined) {\n val[k] = v;\n } else {\n delete val[k];\n }\n }\n }\n }\n return reviver.call(holder, key, val);\n }({\"\": value}, \"\"))\n : value;\n };\n }());\n }\n}\n\nmodule.exports = setupCustomJSON;\n","'use strict';\n\nfunction wrapGlobals(window, handler, shim) {\n if (!window) { return; }\n // Adapted from https://github.com/bugsnag/bugsnag-js\n var globals = 'EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload'.split(',');\n var i, global;\n for (i = 0; i < globals.length; ++i) {\n global = globals[i];\n\n if (window[global] && window[global].prototype) {\n _extendListenerPrototype(handler, window[global].prototype, shim);\n }\n }\n}\n\nfunction _extendListenerPrototype(handler, prototype, shim) {\n if (prototype.hasOwnProperty && prototype.hasOwnProperty('addEventListener')) {\n var oldAddEventListener = prototype.addEventListener;\n while (oldAddEventListener._rollbarOldAdd && oldAddEventListener.belongsToShim) {\n oldAddEventListener = oldAddEventListener._rollbarOldAdd;\n }\n var addFn = function(event, callback, bubble) {\n oldAddEventListener.call(this, event, handler.wrap(callback), bubble);\n };\n addFn._rollbarOldAdd = oldAddEventListener;\n addFn.belongsToShim = shim;\n prototype.addEventListener = addFn;\n\n var oldRemoveEventListener = prototype.removeEventListener;\n while (oldRemoveEventListener._rollbarOldRemove && oldRemoveEventListener.belongsToShim) {\n oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;\n }\n var removeFn = function(event, callback, bubble) {\n oldRemoveEventListener.call(this, event, callback && callback._rollbar_wrapped || callback, bubble);\n };\n removeFn._rollbarOldRemove = oldRemoveEventListener;\n removeFn.belongsToShim = shim;\n prototype.removeEventListener = removeFn;\n }\n}\n\nmodule.exports = wrapGlobals;\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction raw(payload, jsonBackup) {\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction selectFrames(frames, range) {\n var len = frames.length;\n if (len > range * 2) {\n return frames.slice(0, range).concat(frames.slice(len - range));\n }\n return frames;\n}\n\nfunction truncateFrames(payload, jsonBackup, range) {\n range = (typeof range === 'undefined') ? 30 : range;\n var body = payload.data.body;\n var frames;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n frames = chain[i].frames;\n frames = selectFrames(frames, range);\n chain[i].frames = frames;\n }\n } else if (body.trace) {\n frames = body.trace.frames;\n frames = selectFrames(frames, range);\n body.trace.frames = frames;\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction maybeTruncateValue(len, val) {\n if (!val) {\n return val;\n }\n if (val.length > len) {\n return val.slice(0, len - 3).concat('...');\n }\n return val;\n}\n\nfunction truncateStrings(len, payload, jsonBackup) {\n function truncator(k, v, seen) {\n switch (_.typeName(v)) {\n case 'string':\n return maybeTruncateValue(len, v);\n case 'object':\n case 'array':\n return traverse(v, truncator, seen);\n default:\n return v;\n }\n }\n payload = traverse(payload, truncator);\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction truncateTraceData(traceData) {\n if (traceData.exception) {\n delete traceData.exception.description;\n traceData.exception.message = maybeTruncateValue(255, traceData.exception.message);\n }\n traceData.frames = selectFrames(traceData.frames, 1);\n return traceData;\n}\n\nfunction minBody(payload, jsonBackup) {\n var body = payload.data.body;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n chain[i] = truncateTraceData(chain[i]);\n }\n } else if (body.trace) {\n body.trace = truncateTraceData(body.trace);\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction needsTruncation(payload, maxSize) {\n return _.maxByteSize(payload) > maxSize;\n}\n\nfunction truncate(payload, jsonBackup, maxSize) {\n maxSize = (typeof maxSize === 'undefined') ? (512 * 1024) : maxSize;\n var strategies = [\n raw,\n truncateFrames,\n truncateStrings.bind(null, 1024),\n truncateStrings.bind(null, 512),\n truncateStrings.bind(null, 256),\n minBody\n ];\n var strategy, results, result;\n\n while ((strategy = strategies.shift())) {\n results = strategy(payload, jsonBackup);\n payload = results[0];\n result = results[1];\n if (result.error || !needsTruncation(result.value, maxSize)) {\n return result;\n }\n }\n return result;\n}\n\nmodule.exports = {\n truncate: truncate,\n\n /* for testing */\n raw: raw,\n truncateFrames: truncateFrames,\n truncateStrings: truncateStrings,\n maybeTruncateValue: maybeTruncateValue\n};\n"],"sourceRoot":""} \ No newline at end of file diff --git a/examples/chrome_extension/background.js b/examples/chrome_extension/background.js index 0185b8548..e55f90890 100644 --- a/examples/chrome_extension/background.js +++ b/examples/chrome_extension/background.js @@ -11,7 +11,7 @@ var _rollbarConfig = { }; // Rollbar Snippet -!function(r){var e={};function o(n){if(e[n])return e[n].exports;var t=e[n]={i:n,l:!1,exports:{}};return r[n].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.m=r,o.c=e,o.d=function(r,e,n){o.o(r,e)||Object.defineProperty(r,e,{enumerable:!0,get:n})},o.r=function(r){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},o.t=function(r,e){if(1&e&&(r=o(r)),8&e)return r;if(4&e&&"object"==typeof r&&r&&r.__esModule)return r;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:r}),2&e&&"string"!=typeof r)for(var t in r)o.d(n,t,function(e){return r[e]}.bind(null,t));return n},o.n=function(r){var e=r&&r.__esModule?function(){return r.default}:function(){return r};return o.d(e,"a",e),e},o.o=function(r,e){return Object.prototype.hasOwnProperty.call(r,e)},o.p="",o(o.s=0)}([function(r,e,o){"use strict";var n=o(1),t=o(5);_rollbarConfig=_rollbarConfig||{},_rollbarConfig.rollbarJsUrl=_rollbarConfig.rollbarJsUrl||"https://cdn.rollbar.com/rollbarjs/refs/tags/v2.24.0/rollbar.min.js",_rollbarConfig.async=void 0===_rollbarConfig.async||_rollbarConfig.async;var a=n.setupShim(window,_rollbarConfig),l=t(_rollbarConfig);window.rollbar=n.Rollbar,a.loadFull(window,document,!_rollbarConfig.async,_rollbarConfig,l)},function(r,e,o){"use strict";var n=o(2),t=o(3);function a(r){return function(){try{return r.apply(this,arguments)}catch(r){try{console.error("[Rollbar]: Internal error",r)}catch(r){}}}}var l=0;function i(r,e){this.options=r,this._rollbarOldOnError=null;var o=l++;this.shimId=function(){return o},"undefined"!=typeof window&&window._rollbarShims&&(window._rollbarShims[o]={handler:e,messages:[]})}var s=o(4),d=function(r,e){return new i(r,e)},c=function(r){return new s(d,r)};function u(r){return a((function(){var e=this,o=Array.prototype.slice.call(arguments,0),n={shim:e,method:r,args:o,ts:new Date};window._rollbarShims[this.shimId()].messages.push(n)}))}i.prototype.loadFull=function(r,e,o,n,t){var l=!1,i=e.createElement("script"),s=e.getElementsByTagName("script")[0],d=s.parentNode;i.crossOrigin="",i.src=n.rollbarJsUrl,o||(i.async=!0),i.onload=i.onreadystatechange=a((function(){if(!(l||this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState)){i.onload=i.onreadystatechange=null;try{d.removeChild(i)}catch(r){}l=!0,function(){var e;if(void 0===r._rollbarDidLoad){e=new Error("rollbar.js did not load");for(var o,n,a,l,i=0;o=r._rollbarShims[i++];)for(o=o.messages||[];n=o.shift();)for(a=n.args||[],i=0;i diff --git a/examples/snippet.html b/examples/snippet.html index 7c441ce73..809a5339d 100644 --- a/examples/snippet.html +++ b/examples/snippet.html @@ -13,7 +13,7 @@ diff --git a/examples/test.html b/examples/test.html index 354aa6b40..0adccd715 100644 --- a/examples/test.html +++ b/examples/test.html @@ -35,7 +35,7 @@ diff --git a/examples/universal-browser/test.html b/examples/universal-browser/test.html index a90a01c86..072f1f6c3 100644 --- a/examples/universal-browser/test.html +++ b/examples/universal-browser/test.html @@ -35,7 +35,7 @@ diff --git a/examples/snippet.html b/examples/snippet.html index 809a5339d..5689a06e1 100644 --- a/examples/snippet.html +++ b/examples/snippet.html @@ -13,7 +13,7 @@ diff --git a/examples/test.html b/examples/test.html index 0adccd715..93e24706f 100644 --- a/examples/test.html +++ b/examples/test.html @@ -35,7 +35,7 @@ diff --git a/examples/universal-browser/test.html b/examples/universal-browser/test.html index 072f1f6c3..9a5ae388e 100644 --- a/examples/universal-browser/test.html +++ b/examples/universal-browser/test.html @@ -35,7 +35,7 @@ diff --git a/examples/snippet.html b/examples/snippet.html index 5689a06e1..93b83ece1 100644 --- a/examples/snippet.html +++ b/examples/snippet.html @@ -13,7 +13,7 @@ diff --git a/examples/test.html b/examples/test.html index 93e24706f..6491a30d4 100644 --- a/examples/test.html +++ b/examples/test.html @@ -35,7 +35,7 @@ diff --git a/examples/universal-browser/test-with-non-default-options.html b/examples/universal-browser/test-with-non-default-options.html new file mode 100644 index 000000000..48c99f504 --- /dev/null +++ b/examples/universal-browser/test-with-non-default-options.html @@ -0,0 +1,26 @@ + + + + + + + +

Test snippet with non-default options.

+ + diff --git a/examples/universal-browser/test.html b/examples/universal-browser/test.html index 9a5ae388e..e9b6845a0 100644 --- a/examples/universal-browser/test.html +++ b/examples/universal-browser/test.html @@ -35,7 +35,7 @@ diff --git a/examples/snippet.html b/examples/snippet.html index 93b83ece1..3dd60295c 100644 --- a/examples/snippet.html +++ b/examples/snippet.html @@ -13,7 +13,7 @@ diff --git a/examples/test.html b/examples/test.html index 6491a30d4..23019ba76 100644 --- a/examples/test.html +++ b/examples/test.html @@ -35,7 +35,7 @@ diff --git a/examples/universal-browser/test-with-non-default-options.html b/examples/universal-browser/test-with-non-default-options.html index 48c99f504..9cb16ce15 100644 --- a/examples/universal-browser/test-with-non-default-options.html +++ b/examples/universal-browser/test-with-non-default-options.html @@ -15,7 +15,7 @@ diff --git a/examples/universal-browser/test.html b/examples/universal-browser/test.html index e9b6845a0..982731af5 100644 --- a/examples/universal-browser/test.html +++ b/examples/universal-browser/test.html @@ -35,7 +35,7 @@ diff --git a/examples/snippet.html b/examples/snippet.html index 3dd60295c..aad82dca1 100644 --- a/examples/snippet.html +++ b/examples/snippet.html @@ -13,7 +13,7 @@ diff --git a/examples/test.html b/examples/test.html index 23019ba76..fc17acd81 100644 --- a/examples/test.html +++ b/examples/test.html @@ -35,7 +35,7 @@ diff --git a/examples/universal-browser/test-with-non-default-options.html b/examples/universal-browser/test-with-non-default-options.html index 9cb16ce15..92bc50b3d 100644 --- a/examples/universal-browser/test-with-non-default-options.html +++ b/examples/universal-browser/test-with-non-default-options.html @@ -15,7 +15,7 @@ diff --git a/examples/universal-browser/test.html b/examples/universal-browser/test.html index 982731af5..be450bb98 100644 --- a/examples/universal-browser/test.html +++ b/examples/universal-browser/test.html @@ -35,7 +35,7 @@ diff --git a/examples/snippet.html b/examples/snippet.html index aad82dca1..67074bef5 100644 --- a/examples/snippet.html +++ b/examples/snippet.html @@ -13,7 +13,7 @@ diff --git a/examples/test.html b/examples/test.html index fc17acd81..59c3ed239 100644 --- a/examples/test.html +++ b/examples/test.html @@ -35,7 +35,7 @@ diff --git a/examples/universal-browser/test-with-non-default-options.html b/examples/universal-browser/test-with-non-default-options.html index 92bc50b3d..626ca49d0 100644 --- a/examples/universal-browser/test-with-non-default-options.html +++ b/examples/universal-browser/test-with-non-default-options.html @@ -15,7 +15,7 @@ diff --git a/examples/universal-browser/test.html b/examples/universal-browser/test.html index be450bb98..8b5f3a8c2 100644 --- a/examples/universal-browser/test.html +++ b/examples/universal-browser/test.html @@ -35,7 +35,7 @@ diff --git a/examples/snippet.html b/examples/snippet.html index 67074bef5..6b33ddda9 100644 --- a/examples/snippet.html +++ b/examples/snippet.html @@ -13,7 +13,7 @@ diff --git a/examples/test.html b/examples/test.html index 59c3ed239..d6889b8c8 100644 --- a/examples/test.html +++ b/examples/test.html @@ -35,7 +35,7 @@ diff --git a/examples/universal-browser/test-with-non-default-options.html b/examples/universal-browser/test-with-non-default-options.html index 626ca49d0..85b25525f 100644 --- a/examples/universal-browser/test-with-non-default-options.html +++ b/examples/universal-browser/test-with-non-default-options.html @@ -15,7 +15,7 @@ diff --git a/examples/universal-browser/test.html b/examples/universal-browser/test.html index 8b5f3a8c2..e82f25c8f 100644 --- a/examples/universal-browser/test.html +++ b/examples/universal-browser/test.html @@ -35,7 +35,7 @@ diff --git a/examples/snippet.html b/examples/snippet.html index 6b33ddda9..9d3b192fd 100644 --- a/examples/snippet.html +++ b/examples/snippet.html @@ -13,7 +13,7 @@ diff --git a/examples/test.html b/examples/test.html index d6889b8c8..f06b76700 100644 --- a/examples/test.html +++ b/examples/test.html @@ -35,7 +35,7 @@ diff --git a/examples/universal-browser/test-with-non-default-options.html b/examples/universal-browser/test-with-non-default-options.html index 85b25525f..9b8737a47 100644 --- a/examples/universal-browser/test-with-non-default-options.html +++ b/examples/universal-browser/test-with-non-default-options.html @@ -15,7 +15,7 @@ diff --git a/examples/universal-browser/test.html b/examples/universal-browser/test.html index e82f25c8f..b37196728 100644 --- a/examples/universal-browser/test.html +++ b/examples/universal-browser/test.html @@ -35,7 +35,7 @@ + + diff --git a/examples/vuejs3/package.json b/examples/vuejs3/package.json new file mode 100644 index 000000000..54e038479 --- /dev/null +++ b/examples/vuejs3/package.json @@ -0,0 +1,18 @@ +{ + "name": "vue-project", + "version": "0.0.0", + "private": true, + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview" + }, + "dependencies": { + "rollbar": "^2.26.2", + "vue": "^3.3.4" + }, + "devDependencies": { + "@vitejs/plugin-vue": "^4.2.3", + "vite": "^4.4.6" + } +} diff --git a/examples/vuejs3/public/favicon.ico b/examples/vuejs3/public/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..df36fcfb72584e00488330b560ebcf34a41c64c2 GIT binary patch literal 4286 zcmds*O-Phc6o&64GDVCEQHxsW(p4>LW*W<827=Unuo8sGpRux(DN@jWP-e29Wl%wj zY84_aq9}^Am9-cWTD5GGEo#+5Fi2wX_P*bo+xO!)p*7B;iKlbFd(U~_d(U?#hLj56 zPhFkj-|A6~Qk#@g^#D^U0XT1cu=c-vu1+SElX9NR;kzAUV(q0|dl0|%h|dI$%VICy zJnu2^L*Te9JrJMGh%-P79CL0}dq92RGU6gI{v2~|)p}sG5x0U*z<8U;Ij*hB9z?ei z@g6Xq-pDoPl=MANPiR7%172VA%r)kevtV-_5H*QJKFmd;8yA$98zCxBZYXTNZ#QFk2(TX0;Y2dt&WitL#$96|gJY=3xX zpCoi|YNzgO3R`f@IiEeSmKrPSf#h#Qd<$%Ej^RIeeYfsxhPMOG`S`Pz8q``=511zm zAm)MX5AV^5xIWPyEu7u>qYs?pn$I4nL9J!=K=SGlKLXpE<5x+2cDTXq?brj?n6sp= zphe9;_JHf40^9~}9i08r{XM$7HB!`{Ys~TK0kx<}ZQng`UPvH*11|q7&l9?@FQz;8 zx!=3<4seY*%=OlbCbcae?5^V_}*K>Uo6ZWV8mTyE^B=DKy7-sdLYkR5Z?paTgK-zyIkKjIcpyO z{+uIt&YSa_$QnN_@t~L014dyK(fOOo+W*MIxbA6Ndgr=Y!f#Tokqv}n<7-9qfHkc3 z=>a|HWqcX8fzQCT=dqVbogRq!-S>H%yA{1w#2Pn;=e>JiEj7Hl;zdt-2f+j2%DeVD zsW0Ab)ZK@0cIW%W7z}H{&~yGhn~D;aiP4=;m-HCo`BEI+Kd6 z={Xwx{TKxD#iCLfl2vQGDitKtN>z|-AdCN|$jTFDg0m3O`WLD4_s#$S literal 0 HcmV?d00001 diff --git a/examples/vuejs3/src/App.vue b/examples/vuejs3/src/App.vue new file mode 100644 index 000000000..303117d94 --- /dev/null +++ b/examples/vuejs3/src/App.vue @@ -0,0 +1,9 @@ + + + diff --git a/examples/vuejs3/src/components/RollbarTest.vue b/examples/vuejs3/src/components/RollbarTest.vue new file mode 100644 index 000000000..dfcfb9d4d --- /dev/null +++ b/examples/vuejs3/src/components/RollbarTest.vue @@ -0,0 +1,16 @@ + + + diff --git a/examples/vuejs3/src/main.js b/examples/vuejs3/src/main.js new file mode 100644 index 000000000..f57561658 --- /dev/null +++ b/examples/vuejs3/src/main.js @@ -0,0 +1,13 @@ +import './assets/main.css'; + +import { createApp } from 'vue'; +import App from './App.vue'; + +import RollbarPlugin from './rollbar'; // Path to your rollbar.js file +import RollbarTest from './components/RollbarTest.vue'; // Path to your RollbarTest.vue file //TESTING + +const app = createApp(App); +app.use(RollbarPlugin); +app.component('RollbarTest', RollbarTest); + +createApp(App).mount('#app'); diff --git a/examples/vuejs3/src/rollbar.config.js b/examples/vuejs3/src/rollbar.config.js new file mode 100644 index 000000000..993c82b2c --- /dev/null +++ b/examples/vuejs3/src/rollbar.config.js @@ -0,0 +1,13 @@ +export default { + accessToken: 'POST_CLIENT_ITEM_ACCESS_TOKEN', + captureUncaught: true, + captureUnhandledRejections: true, + payload: { + environment: 'dev', + client: { + javascript: { + code_version: '1.0.0', + } + } + }, +}; \ No newline at end of file diff --git a/examples/vuejs3/src/rollbar.js b/examples/vuejs3/src/rollbar.js new file mode 100644 index 000000000..0887d9fdf --- /dev/null +++ b/examples/vuejs3/src/rollbar.js @@ -0,0 +1,17 @@ +// rollbar.js +import Rollbar from 'rollbar'; +import config from './rollbar.config'; + +const rollbar = new Rollbar(config); + +export default { + install(app) { + app.config.errorHandler = (error, vm, info) => { + rollbar.error(error, { vueComponent: vm, info }); + if (app.config.devtools) { + console.error(error); + } + }; + app.provide('rollbar', rollbar); + }, +}; diff --git a/examples/vuejs3/vite.config.js b/examples/vuejs3/vite.config.js new file mode 100644 index 000000000..5c45e1d9b --- /dev/null +++ b/examples/vuejs3/vite.config.js @@ -0,0 +1,16 @@ +import { fileURLToPath, URL } from 'node:url' + +import { defineConfig } from 'vite' +import vue from '@vitejs/plugin-vue' + +// https://vitejs.dev/config/ +export default defineConfig({ + plugins: [ + vue(), + ], + resolve: { + alias: { + '@': fileURLToPath(new URL('./src', import.meta.url)) + } + } +}) From 6f83da13c7b32371e9a384e1285142df2acb8b2f Mon Sep 17 00:00:00 2001 From: Melvrick Date: Mon, 14 Aug 2023 23:49:39 +0800 Subject: [PATCH 58/81] bump request-ip to 3.3.0 in package-lock.json (#1111) Co-authored-by: Walt Jones --- package-lock.json | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index ad4b6fa06..d8e76bcba 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7257,12 +7257,10 @@ } }, "request-ip": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/request-ip/-/request-ip-2.0.2.tgz", - "integrity": "sha1-3urm1K8hdoSX24zQX6NxQ/jxJX4=", - "requires": { - "is_js": "^0.9.0" - } + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/request-ip/-/request-ip-3.3.0.tgz", + "integrity": "sha512-cA6Xh6e0fDBBBwH77SLJaJPBmD3nWVAcF9/XAcsrIHdjhFzFiB5aNQFytdjCGPezU3ROwrR11IddKAM08vohxA==", + "dev": true }, "require-directory": { "version": "2.1.1", From 848d5f0a8071147ec5ff35ec949ad29e7d2c901c Mon Sep 17 00:00:00 2001 From: Ilya Kuznetsov Date: Wed, 16 Aug 2023 22:09:42 +0400 Subject: [PATCH 59/81] feat: Support `URL` object in `fetch` / `XHR` telemetry (#1118) * feat: Support `URL` type in `XHR.open` telemetry * feat: Support `URL` object in `fetch` telemetry * test: XHR test * test: Fetch telemetry tests --- src/browser/telemetry.js | 13 +++++-- test/browser.telemetry.test.js | 69 ++++++++++++++++++++++++++++++++++ 2 files changed, 79 insertions(+), 3 deletions(-) create mode 100644 test/browser.telemetry.test.js diff --git a/src/browser/telemetry.js b/src/browser/telemetry.js index 04a854710..e4e965781 100644 --- a/src/browser/telemetry.js +++ b/src/browser/telemetry.js @@ -179,7 +179,9 @@ Instrumenter.prototype.instrumentNetwork = function() { var xhrp = this._window.XMLHttpRequest.prototype; replace(xhrp, 'open', function(orig) { return function(method, url) { - if (_.isType(url, 'string')) { + var isUrlObject = _isUrlObject(url) + if (_.isType(url, 'string') || isUrlObject) { + url = isUrlObject ? url.toString() : url; if (this.__rollbar_xhr) { this.__rollbar_xhr.method = method; this.__rollbar_xhr.url = url; @@ -342,8 +344,9 @@ Instrumenter.prototype.instrumentNetwork = function() { var input = args[0]; var method = 'GET'; var url; - if (_.isType(input, 'string')) { - url = input; + var isUrlObject = _isUrlObject(input) + if (_.isType(input, 'string') || isUrlObject) { + url = isUrlObject ? input.toString() : input; } else if (input) { url = input.url; if (input.method) { @@ -770,4 +773,8 @@ Instrumenter.prototype.removeListeners = function(section) { } }; +function _isUrlObject(input) { + return typeof URL !== 'undefined' && input instanceof URL +} + module.exports = Instrumenter; diff --git a/test/browser.telemetry.test.js b/test/browser.telemetry.test.js new file mode 100644 index 000000000..cf2eafd22 --- /dev/null +++ b/test/browser.telemetry.test.js @@ -0,0 +1,69 @@ +/* globals expect */ +/* globals describe */ +/* globals it */ +/* globals sinon */ + +var Instrumenter = require('../src/browser/telemetry'); + +describe('instrumentNetwork', function () { + it('should capture XHR requests with string URL', function (done) { + var callback = sinon.spy(); + var windowMock = { + XMLHttpRequest: function () { } + } + + windowMock.XMLHttpRequest.prototype.open = function () { } + windowMock.XMLHttpRequest.prototype.send = function () { } + + var i = createInstrumenter(callback, windowMock) + i.instrumentNetwork() + + var xhr = new windowMock.XMLHttpRequest(); + xhr.open('GET', 'http://first.call') + xhr.send() + xhr.onreadystatechange() + + expect(callback.callCount).to.eql(1) + expect(callback.args[0][0].url).to.eql('http://first.call') + + i.deinstrumentNetwork() + i = createInstrumenter(callback, windowMock) + i.instrumentNetwork() + var xhr = new windowMock.XMLHttpRequest(); + xhr.open('GET', new URL('http://second.call')) + xhr.send() + xhr.onreadystatechange() + expect(callback.callCount).to.eql(2) + expect(callback.args[1][0].url).to.eql('http://second.call/') + + done() + }) + + it('should capture XHR requests with string URL', function (done) { + var callback = sinon.spy(); + var windowMock = { + fetch: function () { return Promise.resolve() } + } + + var i = createInstrumenter(callback, windowMock); + i.instrumentNetwork() + + windowMock.fetch('http://first.call') + expect(callback.callCount).to.eql(1) + expect(callback.args[0][0].url).to.eql('http://first.call') + + i.deinstrumentNetwork() + i = createInstrumenter(callback, windowMock) + i.instrumentNetwork() + + windowMock.fetch(new URL('http://second.call')) + expect(callback.callCount).to.eql(2) + expect(callback.args[1][0].url).to.eql('http://second.call/') + + done() + }) +}) + +function createInstrumenter(callback, windowMock) { + return new Instrumenter({ scrubFields: [] }, { captureNetwork: callback }, { wrap: function () { }, client: { notifier: { diagnostic: {} } } }, windowMock); +} \ No newline at end of file From cc12b50e0a84b5e666012047fa4cd6a0c5d27e97 Mon Sep 17 00:00:00 2001 From: Matthew LaForest Date: Tue, 22 Aug 2023 14:38:00 -0400 Subject: [PATCH 60/81] chore: remove node v8 from support matrix --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 287c0b9cc..e58eedb37 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - node-version: [8, 10, 12, 14, 16] + node-version: [10, 12, 14, 16] steps: - uses: actions/checkout@v2 From e9357653fba839ee634497d020dbabc7db29f90f Mon Sep 17 00:00:00 2001 From: Matthew LaForest Date: Tue, 22 Aug 2023 14:58:07 -0400 Subject: [PATCH 61/81] chore(deps): handle autoupdatable security vulnerabilities --- package-lock.json | 653 ++++++++++++++++++++++++++++++---------------- package.json | 10 +- 2 files changed, 433 insertions(+), 230 deletions(-) diff --git a/package-lock.json b/package-lock.json index d8e76bcba..1f6eecbe3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -588,7 +588,7 @@ "array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", "dev": true }, "array-slice": { @@ -1730,12 +1730,20 @@ "dev": true }, "content-disposition": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", - "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", "dev": true, "requires": { - "safe-buffer": "5.1.2" + "safe-buffer": "5.2.1" + }, + "dependencies": { + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true + } } }, "content-type": { @@ -1760,15 +1768,15 @@ } }, "cookie": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", - "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==", + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", + "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", "dev": true }, "cookie-signature": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", "dev": true }, "copy-concurrently": { @@ -1945,12 +1953,6 @@ "assert-plus": "^1.0.0" } }, - "date-format": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/date-format/-/date-format-3.0.0.tgz", - "integrity": "sha512-eyTcpKOcamdhWJXj56DpQMo1ylSQpcGtGKXcU0Tb97+K56/CF5amAqqqNj0+KvA0iw2ynxtHWFsPDSClCxe48w==", - "dev": true - }, "date-now": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", @@ -2310,49 +2312,6 @@ "once": "^1.4.0" } }, - "engine.io": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-3.5.0.tgz", - "integrity": "sha512-21HlvPUKaitDGE4GXNtQ7PLP0Sz4aWLddMPw2VTyFz1FVZqu/kZsJUO8WNpKuE/OCL7nkfRaOui2ZCJloGznGA==", - "dev": true, - "requires": { - "accepts": "~1.3.4", - "base64id": "2.0.0", - "cookie": "~0.4.1", - "debug": "~4.1.0", - "engine.io-parser": "~2.2.0", - "ws": "~7.4.2" - }, - "dependencies": { - "cookie": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.1.tgz", - "integrity": "sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA==", - "dev": true - }, - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, - "ws": { - "version": "7.4.6", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", - "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==", - "dev": true - } - } - }, "engine.io-client": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-3.5.2.tgz", @@ -2596,9 +2555,9 @@ }, "dependencies": { "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", "dev": true }, "ansi-styles": { @@ -2872,47 +2831,232 @@ "dev": true }, "express": { - "version": "4.17.1", - "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", - "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", + "version": "4.18.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", + "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", "dev": true, "requires": { - "accepts": "~1.3.7", + "accepts": "~1.3.8", "array-flatten": "1.1.1", - "body-parser": "1.19.0", - "content-disposition": "0.5.3", + "body-parser": "1.20.1", + "content-disposition": "0.5.4", "content-type": "~1.0.4", - "cookie": "0.4.0", + "cookie": "0.5.0", "cookie-signature": "1.0.6", "debug": "2.6.9", - "depd": "~1.1.2", + "depd": "2.0.0", "encodeurl": "~1.0.2", "escape-html": "~1.0.3", "etag": "~1.8.1", - "finalhandler": "~1.1.2", + "finalhandler": "1.2.0", "fresh": "0.5.2", + "http-errors": "2.0.0", "merge-descriptors": "1.0.1", "methods": "~1.1.2", - "on-finished": "~2.3.0", + "on-finished": "2.4.1", "parseurl": "~1.3.3", "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.5", - "qs": "6.7.0", + "proxy-addr": "~2.0.7", + "qs": "6.11.0", "range-parser": "~1.2.1", - "safe-buffer": "5.1.2", - "send": "0.17.1", - "serve-static": "1.14.1", - "setprototypeof": "1.1.1", - "statuses": "~1.5.0", + "safe-buffer": "5.2.1", + "send": "0.18.0", + "serve-static": "1.15.0", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", "type-is": "~1.6.18", "utils-merge": "1.0.1", "vary": "~1.1.2" }, "dependencies": { + "accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "dev": true, + "requires": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + } + }, + "body-parser": { + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", + "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", + "dev": true, + "requires": { + "bytes": "3.1.2", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.11.0", + "raw-body": "2.5.1", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + } + }, + "bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "dev": true + }, + "depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "dev": true + }, + "destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "dev": true + }, + "finalhandler": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", + "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", + "dev": true, + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + } + }, + "http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "dev": true, + "requires": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + } + }, + "mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true + }, + "mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, + "requires": { + "mime-db": "1.52.0" + } + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, + "negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "dev": true + }, + "on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "dev": true, + "requires": { + "ee-first": "1.1.1" + } + }, "qs": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", - "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==", + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "dev": true, + "requires": { + "side-channel": "^1.0.4" + } + }, + "raw-body": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", + "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", + "dev": true, + "requires": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + } + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true + }, + "send": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", + "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "dev": true, + "requires": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + } + }, + "serve-static": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", + "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", + "dev": true, + "requires": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.18.0" + } + }, + "setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "dev": true + }, + "statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "dev": true + }, + "toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", "dev": true } } @@ -3209,9 +3353,9 @@ } }, "follow-redirects": { - "version": "1.14.4", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.4.tgz", - "integrity": "sha512-zwGkiSXC1MUJG/qmeIFH2HBJx9u0V46QGUe3YR1fXG8bXQxq7fLj0RjLZQ5nubr9qNJUZrH+xUcwXEoXNpfS+g==", + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", + "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", "dev": true }, "for-in": { @@ -3479,6 +3623,15 @@ "once": "^1.3.0", "path-is-absolute": "^1.0.0" } + }, + "minimatch": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.8.tgz", + "integrity": "sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } } } }, @@ -3531,6 +3684,15 @@ "path-is-absolute": "^1.0.0" } }, + "minimatch": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.8.tgz", + "integrity": "sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, "mkdirp": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", @@ -3615,9 +3777,9 @@ }, "dependencies": { "async": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", - "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", + "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", "dev": true, "requires": { "lodash": "^4.17.14" @@ -3729,9 +3891,9 @@ }, "dependencies": { "async": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", - "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", + "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", "dev": true, "requires": { "lodash": "^4.17.14" @@ -4749,11 +4911,6 @@ "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=", "dev": true }, - "is_js": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/is_js/-/is_js-0.9.0.tgz", - "integrity": "sha1-CrlFQFArp6+iTIVqqYVWFmnpxS0=" - }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", @@ -4944,6 +5101,15 @@ "strip-json-comments": "1.0.x" }, "dependencies": { + "minimatch": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.8.tgz", + "integrity": "sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, "strip-json-comments": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz", @@ -4958,12 +5124,6 @@ "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", "dev": true }, - "json-schema": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", - "dev": true - }, "json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", @@ -4997,15 +5157,23 @@ } }, "jsprim": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", + "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", "dev": true, "requires": { "assert-plus": "1.0.0", "extsprintf": "1.3.0", - "json-schema": "0.2.3", + "json-schema": "0.4.0", "verror": "1.10.0" + }, + "dependencies": { + "json-schema": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", + "dev": true + } } }, "just-extend": { @@ -5387,9 +5555,9 @@ "dev": true }, "loader-utils": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz", - "integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==", + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.2.tgz", + "integrity": "sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg==", "dev": true, "requires": { "big.js": "^5.2.2", @@ -5398,9 +5566,9 @@ }, "dependencies": { "json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", "dev": true, "requires": { "minimist": "^1.2.0" @@ -5482,32 +5650,55 @@ } }, "log4js": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/log4js/-/log4js-6.3.0.tgz", - "integrity": "sha512-Mc8jNuSFImQUIateBFwdOQcmC6Q5maU0VVvdC2R6XMb66/VnT+7WS4D/0EeNMZu1YODmJe5NIn2XftCzEocUgw==", + "version": "6.9.1", + "resolved": "https://registry.npmjs.org/log4js/-/log4js-6.9.1.tgz", + "integrity": "sha512-1somDdy9sChrr9/f4UlzhdaGfDR2c/SaD2a4T7qEkG4jTS57/B3qmnjLYePwQ8cqWnUHZI0iAKxMBpCZICiZ2g==", "dev": true, "requires": { - "date-format": "^3.0.0", - "debug": "^4.1.1", - "flatted": "^2.0.1", - "rfdc": "^1.1.4", - "streamroller": "^2.2.4" + "date-format": "^4.0.14", + "debug": "^4.3.4", + "flatted": "^3.2.7", + "rfdc": "^1.3.0", + "streamroller": "^3.1.5" }, "dependencies": { + "date-format": { + "version": "4.0.14", + "resolved": "https://registry.npmjs.org/date-format/-/date-format-4.0.14.tgz", + "integrity": "sha512-39BOQLs9ZjKh0/patS9nrT8wc3ioX3/eA/zgbKNopnF2wCqJEoxywwwElATYvRsXdnOxA/OQeQoFZ3rFjVajhg==", + "dev": true + }, "debug": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", - "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "requires": { "ms": "2.1.2" } }, + "flatted": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", + "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", + "dev": true + }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true + }, + "streamroller": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-3.1.5.tgz", + "integrity": "sha512-KFxaM7XT+irxvdqSP1LGLgNWbYN7ay5owZ3r/8t77p+EtSUAfUgtl7be3xtqtOmGUl9K9YPO2ca8133RlTjvKw==", + "dev": true, + "requires": { + "date-format": "^4.0.14", + "debug": "^4.3.4", + "fs-extra": "^8.1.0" + } } } }, @@ -5633,13 +5824,13 @@ "merge-descriptors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", + "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==", "dev": true }, "methods": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", "dev": true }, "micromatch": { @@ -5710,9 +5901,9 @@ "dev": true }, "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "requires": { "brace-expansion": "^1.1.7" @@ -5954,6 +6145,15 @@ "chalk": "^2.4.2" } }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, "ms": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", @@ -6776,7 +6976,7 @@ "path-to-regexp": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=", + "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==", "dev": true }, "pathval": { @@ -6894,9 +7094,9 @@ }, "dependencies": { "async": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", - "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", + "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", "dev": true, "requires": { "lodash": "^4.17.14" @@ -7259,8 +7459,7 @@ "request-ip": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/request-ip/-/request-ip-3.3.0.tgz", - "integrity": "sha512-cA6Xh6e0fDBBBwH77SLJaJPBmD3nWVAcF9/XAcsrIHdjhFzFiB5aNQFytdjCGPezU3ROwrR11IddKAM08vohxA==", - "dev": true + "integrity": "sha512-cA6Xh6e0fDBBBwH77SLJaJPBmD3nWVAcF9/XAcsrIHdjhFzFiB5aNQFytdjCGPezU3ROwrR11IddKAM08vohxA==" }, "require-directory": { "version": "2.1.1", @@ -7443,9 +7642,9 @@ } }, "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true }, "send": { @@ -7819,19 +8018,25 @@ } }, "socket.io": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-2.4.1.tgz", - "integrity": "sha512-Si18v0mMXGAqLqCVpTxBa8MGqriHGQh8ccEOhmsmNS3thNCGBwO8WGrwMibANsWtQQ5NStdZwHqZR3naJVFc3w==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-2.5.0.tgz", + "integrity": "sha512-gGunfS0od3VpwDBpGwVkzSZx6Aqo9uOcf1afJj2cKnKFAoyl16fvhpsUhmUFd4Ldbvl5JvRQed6eQw6oQp6n8w==", "dev": true, "requires": { "debug": "~4.1.0", - "engine.io": "~3.5.0", + "engine.io": "~3.6.0", "has-binary2": "~1.0.2", "socket.io-adapter": "~1.1.0", - "socket.io-client": "2.4.0", + "socket.io-client": "2.5.0", "socket.io-parser": "~3.4.0" }, "dependencies": { + "cookie": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", + "integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==", + "dev": true + }, "debug": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", @@ -7841,71 +8046,97 @@ "ms": "^2.1.1" } }, - "ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - } - } - }, - "socket.io-adapter": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-1.1.2.tgz", - "integrity": "sha512-WzZRUj1kUjrTIrUKpZLEzFZ1OLj5FwLlAFQs9kuZJzJi5DKdU7FsWc36SNmA8iDOtwBQyT8FkrriRM8vXLYz8g==", - "dev": true - }, - "socket.io-client": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-2.4.0.tgz", - "integrity": "sha512-M6xhnKQHuuZd4Ba9vltCLT9oa+YvTsP8j9NcEiLElfIg8KeYPyhWOes6x4t+LTAC8enQbE/995AdTem2uNyKKQ==", - "dev": true, - "requires": { - "backo2": "1.0.2", - "component-bind": "1.0.0", - "component-emitter": "~1.3.0", - "debug": "~3.1.0", - "engine.io-client": "~3.5.0", - "has-binary2": "~1.0.2", - "indexof": "0.0.1", - "parseqs": "0.0.6", - "parseuri": "0.0.6", - "socket.io-parser": "~3.3.0", - "to-array": "0.1.4" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "engine.io": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-3.6.1.tgz", + "integrity": "sha512-dfs8EVg/i7QjFsXxn7cCRQ+Wai1G1TlEvHhdYEi80fxn5R1vZ2K661O6v/rezj1FP234SZ14r9CmJke99iYDGg==", "dev": true, "requires": { - "ms": "2.0.0" + "accepts": "~1.3.4", + "base64id": "2.0.0", + "cookie": "~0.4.1", + "debug": "~4.1.0", + "engine.io-parser": "~2.2.0", + "ws": "~7.4.2" } }, "isarray": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz", - "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=", + "integrity": "sha512-c2cu3UxbI+b6kR3fy0nRnAhodsvR9dx7U5+znCOzdj6IfP3upFURTr0Xl5BlQZNKZjEtxrmVyfSdeE3O57smoQ==", + "dev": true + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true }, - "socket.io-parser": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.3.2.tgz", - "integrity": "sha512-FJvDBuOALxdCI9qwRrO/Rfp9yfndRtc1jSgVgV8FDraihmSP/MLGD5PEuJrNfjALvcQ+vMDM/33AWOYP/JSjDg==", + "socket.io-client": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-2.5.0.tgz", + "integrity": "sha512-lOO9clmdgssDykiOmVQQitwBAF3I6mYcQAo7hQ7AM6Ny5X7fp8hIJ3HcQs3Rjz4SoggoxA1OgrQyY8EgTbcPYw==", "dev": true, "requires": { + "backo2": "1.0.2", + "component-bind": "1.0.0", "component-emitter": "~1.3.0", "debug": "~3.1.0", - "isarray": "2.0.1" + "engine.io-client": "~3.5.0", + "has-binary2": "~1.0.2", + "indexof": "0.0.1", + "parseqs": "0.0.6", + "parseuri": "0.0.6", + "socket.io-parser": "~3.3.0", + "to-array": "0.1.4" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true + }, + "socket.io-parser": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.3.3.tgz", + "integrity": "sha512-qOg87q1PMWWTeO01768Yh9ogn7chB9zkKtQnya41Y355S0UmpXgpcrFwAgjYJxu9BdKug5r5e9YtVSeWhKBUZg==", + "dev": true, + "requires": { + "component-emitter": "~1.3.0", + "debug": "~3.1.0", + "isarray": "2.0.1" + } + } } + }, + "ws": { + "version": "7.4.6", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", + "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==", + "dev": true } } }, + "socket.io-adapter": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-1.1.2.tgz", + "integrity": "sha512-WzZRUj1kUjrTIrUKpZLEzFZ1OLj5FwLlAFQs9kuZJzJi5DKdU7FsWc36SNmA8iDOtwBQyT8FkrriRM8vXLYz8g==", + "dev": true + }, "socket.io-parser": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.4.1.tgz", - "integrity": "sha512-11hMgzL+WCLWf1uFtHSNvliI++tcRUWdoeYuwIl+Axvwy9z2gQM+7nJyN3STj1tLj5JyIUH8/gpDGxzAlDdi0A==", + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.4.3.tgz", + "integrity": "sha512-1rE4dZN3kCI/E5wixd393hmbqa78vVpkKmnEJhLeWoS/C5hbFYAbcSfnWoaVH43u9ToUVtzKjguxEZq+1XZfCQ==", "dev": true, "requires": { "component-emitter": "1.2.1", @@ -7916,7 +8147,7 @@ "component-emitter": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", - "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", + "integrity": "sha512-jPatnhd33viNplKjqXKRkGU345p263OIWzDL2wH3LGIGp5Kojo+uXizHmOADRvhGFFTnJqX3jBAKP6vvmSDKcA==", "dev": true }, "debug": { @@ -7931,7 +8162,7 @@ "isarray": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz", - "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=", + "integrity": "sha512-c2cu3UxbI+b6kR3fy0nRnAhodsvR9dx7U5+znCOzdj6IfP3upFURTr0Xl5BlQZNKZjEtxrmVyfSdeE3O57smoQ==", "dev": true }, "ms": { @@ -8112,40 +8343,6 @@ "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==", "dev": true }, - "streamroller": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-2.2.4.tgz", - "integrity": "sha512-OG79qm3AujAM9ImoqgWEY1xG4HX+Lw+yY6qZj9R1K2mhF5bEmQ849wvrb+4vt4jLMLzwXttJlQbOdPOQVRv7DQ==", - "dev": true, - "requires": { - "date-format": "^2.1.0", - "debug": "^4.1.1", - "fs-extra": "^8.1.0" - }, - "dependencies": { - "date-format": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/date-format/-/date-format-2.1.0.tgz", - "integrity": "sha512-bYQuGLeFxhkxNOF3rcMtiZxvCBAquGzZm6oWA1oZ0g2THUzivaRhv8uOhdr19LmoobSOLoIAxeUK2RdbM8IFTA==", - "dev": true - }, - "debug": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", - "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - } - } - }, "strict-loader": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/strict-loader/-/strict-loader-1.2.0.tgz", @@ -8978,7 +9175,7 @@ "vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", "dev": true }, "verror": { @@ -9767,9 +9964,9 @@ } }, "word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", "dev": true }, "worker-farm": { diff --git a/package.json b/package.json index f141b8d75..8403f84d0 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,13 @@ "url": "http://github.com/rollbar/rollbar.js" }, "description": "Effortlessly track and debug errors in your JavaScript applications with Rollbar. This package includes advanced error tracking features and an intuitive interface to help you identify and fix issues more quickly.", - "keywords": ["error", "tracking", "logging", "debugging", "javascript"], + "keywords": [ + "error", + "tracking", + "logging", + "debugging", + "javascript" + ], "license": "MIT", "main": "src/server/rollbar.js", "browser": "dist/rollbar.umd.min.js", @@ -30,7 +36,7 @@ "chalk": "^1.1.1", "eslint": "^6.8.0", "eslint-loader": "^3.0.3", - "express": "^4.16.4", + "express": "^4.18.2", "glob": "^5.0.14", "grunt": "^1.1.0", "grunt-bumpup": "^0.6.3", From 1110e2ff3e1aef16445c7987a90e86a09c32e3af Mon Sep 17 00:00:00 2001 From: Matthew LaForest Date: Tue, 22 Aug 2023 15:47:50 -0400 Subject: [PATCH 62/81] chore(deps): update mocha - remaining critical vulnerability --- package-lock.json | 904 +++++++++++++--------------------------------- package.json | 2 +- 2 files changed, 255 insertions(+), 651 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1f6eecbe3..1cb5f95eb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2028,15 +2028,6 @@ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, - "define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "dev": true, - "requires": { - "object-keys": "^1.0.12" - } - }, "define-property": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", @@ -2128,9 +2119,9 @@ "dev": true }, "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", + "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", "dev": true }, "diffie-hellman": { @@ -2429,59 +2420,6 @@ } } }, - "es-abstract": { - "version": "1.19.1", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.19.1.tgz", - "integrity": "sha512-2vJ6tjA/UfqLm2MPs7jxVybLoB8i1t1Jd9R3kISld20sIxPcTbLuggQOUxeWeAvIUkduv/CfMjuh4WmiXr2v9w==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "get-intrinsic": "^1.1.1", - "get-symbol-description": "^1.0.0", - "has": "^1.0.3", - "has-symbols": "^1.0.2", - "internal-slot": "^1.0.3", - "is-callable": "^1.2.4", - "is-negative-zero": "^2.0.1", - "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.1", - "is-string": "^1.0.7", - "is-weakref": "^1.0.1", - "object-inspect": "^1.11.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.2", - "string.prototype.trimend": "^1.0.4", - "string.prototype.trimstart": "^1.0.4", - "unbox-primitive": "^1.0.1" - }, - "dependencies": { - "object.assign": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", - "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", - "object-keys": "^1.1.1" - } - } - } - }, - "es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "dev": true, - "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - } - }, "es6-promise": { "version": "4.2.8", "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", @@ -2497,6 +2435,12 @@ "es6-promise": "^4.0.3" } }, + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true + }, "escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", @@ -3191,7 +3135,7 @@ "fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", "dev": true }, "faye-websocket": { @@ -3317,13 +3261,10 @@ "dev": true }, "flat": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.1.tgz", - "integrity": "sha512-FmTtBsHskrU6FJ2VxCnsDb84wu9zhmO3cUX2kGFb5tuwhfXxGciiT0oRY+cck35QmG+NmGh5eLz6lLCpWTqwpA==", - "dev": true, - "requires": { - "is-buffer": "~2.0.3" - } + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true }, "flat-cache": { "version": "2.0.1", @@ -3481,7 +3422,7 @@ "functional-red-black-tree": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==", "dev": true }, "gaze": { @@ -3516,16 +3457,6 @@ "has-symbols": "^1.0.1" } }, - "get-symbol-description": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", - "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.1" - } - }, "get-value": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", @@ -3641,12 +3572,6 @@ "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==", "dev": true }, - "growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", - "dev": true - }, "grunt": { "version": "1.5.3", "resolved": "https://registry.npmjs.org/grunt/-/grunt-1.5.3.tgz", @@ -4098,12 +4023,6 @@ "ansi-regex": "^2.0.0" } }, - "has-bigints": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz", - "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==", - "dev": true - }, "has-binary2": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-binary2/-/has-binary2-1.0.3.tgz", @@ -4139,15 +4058,6 @@ "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", "dev": true }, - "has-tostringtag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", - "dev": true, - "requires": { - "has-symbols": "^1.0.2" - } - }, "has-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", @@ -4583,17 +4493,6 @@ } } }, - "internal-slot": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", - "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==", - "dev": true, - "requires": { - "get-intrinsic": "^1.1.0", - "has": "^1.0.3", - "side-channel": "^1.0.4" - } - }, "interpret": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz", @@ -4651,15 +4550,6 @@ } } }, - "is-bigint": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", - "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", - "dev": true, - "requires": { - "has-bigints": "^1.0.1" - } - }, "is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", @@ -4669,28 +4559,6 @@ "binary-extensions": "^2.0.0" } }, - "is-boolean-object": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", - "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - } - }, - "is-buffer": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", - "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", - "dev": true - }, - "is-callable": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", - "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==", - "dev": true - }, "is-core-module": { "version": "2.8.0", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.0.tgz", @@ -4726,15 +4594,6 @@ } } }, - "is-date-object": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", - "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", - "dev": true, - "requires": { - "has-tostringtag": "^1.0.0" - } - }, "is-descriptor": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", @@ -4787,12 +4646,6 @@ "is-extglob": "^2.1.1" } }, - "is-negative-zero": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", - "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==", - "dev": true - }, "is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -4808,14 +4661,11 @@ "lodash.isfinite": "^3.3.2" } }, - "is-number-object": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.6.tgz", - "integrity": "sha512-bEVOqiRcvo3zO1+G2lVMy+gkkEm9Yh7cDMRusKKu5ZJKPUYSJwICTKZrNKHA2EbSP0Tu0+6B/emsYNHZyn6K8g==", - "dev": true, - "requires": { - "has-tostringtag": "^1.0.0" - } + "is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "dev": true }, "is-plain-object": { "version": "2.0.4", @@ -4826,16 +4676,6 @@ "isobject": "^3.0.1" } }, - "is-regex": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", - "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - } - }, "is-relative": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", @@ -4851,30 +4691,6 @@ "integrity": "sha1-MKc/9cw4VOT8JUkICen1q/jeCeA=", "dev": true }, - "is-shared-array-buffer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.1.tgz", - "integrity": "sha512-IU0NmyknYZN0rChcKhRO1X8LYz5Isj/Fsqh8NJOSf+N/hCOTwy29F32Ik7a+QszE63IdvmwdTPDd6cZ5pg4cwA==", - "dev": true - }, - "is-string": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", - "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", - "dev": true, - "requires": { - "has-tostringtag": "^1.0.0" - } - }, - "is-symbol": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", - "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", - "dev": true, - "requires": { - "has-symbols": "^1.0.2" - } - }, "is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", @@ -4890,14 +4706,11 @@ "unc-path-regex": "^0.1.2" } }, - "is-weakref": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.1.tgz", - "integrity": "sha512-b2jKc2pQZjaeFYWEf7ScFj+Be1I+PXmlu572Q8coTXZ+LD/QQZ7ShPMst8h16riVgyXTQwUsFEl74mDvc/3MHQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.0" - } + "is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true }, "is-windows": { "version": "1.0.2", @@ -5133,7 +4946,7 @@ "json-stable-stringify-without-jsonify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", "dev": true }, "json-stringify-safe": { @@ -5606,7 +5419,7 @@ "lodash.isplainobject": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", - "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=", + "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==", "dev": true }, "log-symbols": { @@ -5964,142 +5777,161 @@ } }, "mocha": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.2.0.tgz", - "integrity": "sha512-O9CIypScywTVpNaRrCAgoUnJgozpIofjKUYmJhiCIJMiuYnLI6otcb1/kpW9/n/tJODHGZ7i8aLQoDVsMtOKQQ==", + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.2.0.tgz", + "integrity": "sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg==", "dev": true, "requires": { - "ansi-colors": "3.2.3", + "ansi-colors": "4.1.1", "browser-stdout": "1.3.1", - "chokidar": "3.3.0", - "debug": "3.2.6", - "diff": "3.5.0", - "escape-string-regexp": "1.0.5", - "find-up": "3.0.0", - "glob": "7.1.3", - "growl": "1.10.5", + "chokidar": "3.5.3", + "debug": "4.3.4", + "diff": "5.0.0", + "escape-string-regexp": "4.0.0", + "find-up": "5.0.0", + "glob": "7.2.0", "he": "1.2.0", - "js-yaml": "3.13.1", - "log-symbols": "3.0.0", - "minimatch": "3.0.4", - "mkdirp": "0.5.5", - "ms": "2.1.1", - "node-environment-flags": "1.0.6", - "object.assign": "4.1.0", - "strip-json-comments": "2.0.1", - "supports-color": "6.0.0", - "which": "1.3.1", - "wide-align": "1.1.3", - "yargs": "13.3.2", - "yargs-parser": "13.1.2", - "yargs-unparser": "1.6.0" + "js-yaml": "4.1.0", + "log-symbols": "4.1.0", + "minimatch": "5.0.1", + "ms": "2.1.3", + "nanoid": "3.3.3", + "serialize-javascript": "6.0.0", + "strip-json-comments": "3.1.1", + "supports-color": "8.1.1", + "workerpool": "6.2.1", + "yargs": "16.2.0", + "yargs-parser": "20.2.4", + "yargs-unparser": "2.0.0" }, "dependencies": { "ansi-colors": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", - "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", "dev": true }, "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true }, "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { - "color-convert": "^1.9.0" + "color-convert": "^2.0.1" } }, + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" }, "dependencies": { "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { - "has-flag": "^3.0.0" + "has-flag": "^4.0.0" } } } }, "chokidar": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.0.tgz", - "integrity": "sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A==", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", "dev": true, "requires": { - "anymatch": "~3.1.1", + "anymatch": "~3.1.2", "braces": "~3.0.2", - "fsevents": "~2.1.1", - "glob-parent": "~5.1.0", + "fsevents": "~2.3.2", + "glob-parent": "~5.1.2", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", "normalize-path": "~3.0.0", - "readdirp": "~3.2.0" + "readdirp": "~3.6.0" } }, "cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", "dev": true, "requires": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" } }, - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { - "ms": "^2.1.1" + "color-name": "~1.1.4" } }, - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "requires": { - "locate-path": "^3.0.0" + "ms": "2.1.2" + }, + "dependencies": { + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } } }, - "fsevents": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", - "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true + }, + "find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, - "optional": true + "requires": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + } }, "glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", "dev": true, "requires": { "fs.realpath": "^1.0.0", @@ -6108,155 +5940,161 @@ "minimatch": "^3.0.4", "once": "^1.3.0", "path-is-absolute": "^1.0.0" + }, + "dependencies": { + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + } } }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, "js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "argparse": "^2.0.1" } }, "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" + "p-locate": "^5.0.0" } }, "log-symbols": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", - "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", "dev": true, "requires": { - "chalk": "^2.4.2" + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" } }, "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", + "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", "dev": true, "requires": { - "brace-expansion": "^1.1.7" + "brace-expansion": "^2.0.1" + }, + "dependencies": { + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0" + } + } } }, "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, "requires": { - "p-limit": "^2.0.0" + "yocto-queue": "^0.1.0" } }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true - }, - "readdirp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.2.0.tgz", - "integrity": "sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ==", + "p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, "requires": { - "picomatch": "^2.0.4" + "p-limit": "^3.0.2" } }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "serialize-javascript": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", + "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", "dev": true, "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" + "randombytes": "^2.1.0" } }, "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "requires": { - "ansi-regex": "^4.1.0" + "ansi-regex": "^5.0.1" } }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "dev": true - }, "supports-color": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", - "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, "requires": { - "has-flag": "^3.0.0" + "has-flag": "^4.0.0" } }, "wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, "requires": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" } }, + "y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true + }, "yargs": { - "version": "13.3.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", - "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", "dev": true, "requires": { - "cliui": "^5.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.1.2" + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" } }, "yargs-parser": { - "version": "13.1.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", - "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } + "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", + "dev": true } } }, @@ -6320,6 +6158,12 @@ "dev": true, "optional": true }, + "nanoid": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", + "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", + "dev": true + }, "nanomatch": { "version": "1.2.13", "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", @@ -6348,7 +6192,7 @@ "natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "dev": true }, "negotiator": { @@ -6430,24 +6274,6 @@ } } }, - "node-environment-flags": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.6.tgz", - "integrity": "sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw==", - "dev": true, - "requires": { - "object.getownpropertydescriptors": "^2.0.3", - "semver": "^5.7.0" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } - } - }, "node-http2": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/node-http2/-/node-http2-4.0.1.tgz", @@ -6658,12 +6484,6 @@ "integrity": "sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg==", "dev": true }, - "object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true - }, "object-visit": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", @@ -6673,18 +6493,6 @@ "isobject": "^3.0.0" } }, - "object.assign": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", - "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", - "dev": true, - "requires": { - "define-properties": "^1.1.2", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.0", - "object-keys": "^1.0.11" - } - }, "object.defaults": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz", @@ -6697,17 +6505,6 @@ "isobject": "^3.0.0" } }, - "object.getownpropertydescriptors": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.3.tgz", - "integrity": "sha512-VdDoCwvJI4QdC6ndjpqFmoL3/+HxffFBbcJzKi5hwLLqqx3mdbedRpfZDdK0SrOSauj8X4GzBvnDZl4vTN7dOw==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.1" - } - }, "object.map": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz", @@ -8396,26 +8193,6 @@ } } }, - "string.prototype.trimend": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", - "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" - } - }, - "string.prototype.trimstart": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", - "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" - } - }, "string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", @@ -8958,18 +8735,6 @@ "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==", "dev": true }, - "unbox-primitive": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", - "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1", - "has-bigints": "^1.0.1", - "has-symbols": "^1.0.2", - "which-boxed-primitive": "^1.0.2" - } - }, "unc-path-regex": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", @@ -9902,67 +9667,12 @@ "isexe": "^2.0.0" } }, - "which-boxed-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", - "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", - "dev": true, - "requires": { - "is-bigint": "^1.0.1", - "is-boolean-object": "^1.1.0", - "is-number-object": "^1.0.4", - "is-string": "^1.0.5", - "is-symbol": "^1.0.3" - } - }, "which-module": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", "dev": true }, - "wide-align": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", - "dev": true, - "requires": { - "string-width": "^1.0.2 || 2" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, "word-wrap": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", @@ -9978,6 +9688,12 @@ "errno": "~0.1.7" } }, + "workerpool": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", + "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", + "dev": true + }, "wrap-ansi": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", @@ -10110,146 +9826,28 @@ } }, "yargs-unparser": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz", - "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", + "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", "dev": true, "requires": { - "flat": "^4.1.0", - "lodash": "^4.17.15", - "yargs": "^13.3.0" + "camelcase": "^6.0.0", + "decamelize": "^4.0.0", + "flat": "^5.0.2", + "is-plain-obj": "^2.1.0" }, "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", "dev": true }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", - "dev": true, - "requires": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" - } - }, - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true - }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", "dev": true - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - }, - "wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" - } - }, - "yargs": { - "version": "13.3.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", - "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", - "dev": true, - "requires": { - "cliui": "^5.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.1.2" - } - }, - "yargs-parser": { - "version": "13.1.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", - "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } } } }, @@ -10258,6 +9856,12 @@ "resolved": "https://registry.npmjs.org/yeast/-/yeast-0.1.2.tgz", "integrity": "sha1-AI4G2AlDIMNy28L47XagymyKxBk=", "dev": true + }, + "yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true } } } diff --git a/package.json b/package.json index 8403f84d0..55da9850e 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,7 @@ "karma-sinon": "^1.0.4", "karma-sourcemap-loader": "^0.3.5", "karma-webpack": "^4.0.2", - "mocha": "^7.1.2", + "mocha": "^10.2.0", "natives": "^1.1.6", "nock": "^11.9.1", "node-libs-browser": "^0.5.2", From 465d317ebd134790d611982c24dbe05b12a853fe Mon Sep 17 00:00:00 2001 From: Matthew LaForest Date: Thu, 24 Aug 2023 14:41:57 -0400 Subject: [PATCH 63/81] chore(deps): upgrade webpack This introduces some warnings from older packages that are no longer maintained. Will revisit them later in this branch. --- package-lock.json | 3744 +++++++++++++-------------------------------- package.json | 13 +- 2 files changed, 1066 insertions(+), 2691 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1cb5f95eb..1dbe894f2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,6 +4,16 @@ "lockfileVersion": 1, "requires": true, "dependencies": { + "@ampproject/remapping": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", + "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==", + "dev": true, + "requires": { + "@jridgewell/gen-mapping": "^0.3.0", + "@jridgewell/trace-mapping": "^0.3.9" + } + }, "@babel/code-frame": { "version": "7.15.8", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.15.8.tgz", @@ -13,6 +23,224 @@ "@babel/highlight": "^7.14.5" } }, + "@babel/compat-data": { + "version": "7.22.9", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.22.9.tgz", + "integrity": "sha512-5UamI7xkUcJ3i9qVDS+KFDEK8/7oJ55/sJMB1Ge7IEapr7KfdfV/HErR+koZwOfd+SgtFKOKRhRakdg++DcJpQ==", + "dev": true + }, + "@babel/core": { + "version": "7.22.11", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.22.11.tgz", + "integrity": "sha512-lh7RJrtPdhibbxndr6/xx0w8+CVlY5FJZiaSz908Fpy+G0xkBFTvwLcKJFF4PJxVfGhVWNebikpWGnOoC71juQ==", + "dev": true, + "requires": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.22.10", + "@babel/generator": "^7.22.10", + "@babel/helper-compilation-targets": "^7.22.10", + "@babel/helper-module-transforms": "^7.22.9", + "@babel/helpers": "^7.22.11", + "@babel/parser": "^7.22.11", + "@babel/template": "^7.22.5", + "@babel/traverse": "^7.22.11", + "@babel/types": "^7.22.11", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.22.10", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.10.tgz", + "integrity": "sha512-/KKIMG4UEL35WmI9OlvMhurwtytjvXoFcGNrOvyG9zIzA8YmPjVtIZUf7b05+TPO7G7/GEmLHDaoCgACHl9hhA==", + "dev": true, + "requires": { + "@babel/highlight": "^7.22.10", + "chalk": "^2.4.2" + } + }, + "@babel/generator": { + "version": "7.22.10", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.22.10.tgz", + "integrity": "sha512-79KIf7YiWjjdZ81JnLujDRApWtl7BxTqWD88+FFdQEIOG8LJ0etDOM7CXuIgGJa55sGOwZVwuEsaLEm0PJ5/+A==", + "dev": true, + "requires": { + "@babel/types": "^7.22.10", + "@jridgewell/gen-mapping": "^0.3.2", + "@jridgewell/trace-mapping": "^0.3.17", + "jsesc": "^2.5.1" + } + }, + "@babel/helper-function-name": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.22.5.tgz", + "integrity": "sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ==", + "dev": true, + "requires": { + "@babel/template": "^7.22.5", + "@babel/types": "^7.22.5" + } + }, + "@babel/helper-hoist-variables": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", + "dev": true, + "requires": { + "@babel/types": "^7.22.5" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", + "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", + "dev": true, + "requires": { + "@babel/types": "^7.22.5" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz", + "integrity": "sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==", + "dev": true + }, + "@babel/highlight": { + "version": "7.22.10", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.10.tgz", + "integrity": "sha512-78aUtVcT7MUscr0K5mIEnkwxPE0MaxkR5RxRwuHaQ+JuU5AmTPhY+do2mdzVTnIJJpyBglql2pehuBIWHug+WQ==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.22.5", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0" + } + }, + "@babel/parser": { + "version": "7.22.11", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.11.tgz", + "integrity": "sha512-R5zb8eJIBPJriQtbH/htEQy4k7E2dHWlD2Y2VT07JCzwYZHBxV5ZYtM0UhXSNMT74LyxuM+b1jdL7pSesXbC/g==", + "dev": true + }, + "@babel/template": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.5.tgz", + "integrity": "sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.22.5", + "@babel/parser": "^7.22.5", + "@babel/types": "^7.22.5" + } + }, + "@babel/traverse": { + "version": "7.22.11", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.11.tgz", + "integrity": "sha512-mzAenteTfomcB7mfPtyi+4oe5BZ6MXxWcn4CX+h4IRJ+OOGXBrWU6jDQavkQI9Vuc5P+donFabBfFCcmWka9lQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.22.10", + "@babel/generator": "^7.22.10", + "@babel/helper-environment-visitor": "^7.22.5", + "@babel/helper-function-name": "^7.22.5", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.22.11", + "@babel/types": "^7.22.11", + "debug": "^4.1.0", + "globals": "^11.1.0" + } + }, + "@babel/types": { + "version": "7.22.11", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.11.tgz", + "integrity": "sha512-siazHiGuZRz9aB9NpHy9GOs9xiQPKnMzgdr493iI1M67vRXpnEq8ZOOKzezC5q7zwuQ6sDhdSp4SD9ixKSqKZg==", + "dev": true, + "requires": { + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.5", + "to-fast-properties": "^2.0.0" + } + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true + }, + "json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", + "dev": true + } + } + }, "@babel/generator": { "version": "7.15.8", "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.15.8.tgz", @@ -32,6 +260,36 @@ } } }, + "@babel/helper-compilation-targets": { + "version": "7.22.10", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.10.tgz", + "integrity": "sha512-JMSwHD4J7SLod0idLq5PKgI+6g/hLD/iuWBq08ZX49xE14VpVEojJ5rHWptpirV2j020MvypRLAXAO50igCJ5Q==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.22.9", + "@babel/helper-validator-option": "^7.22.5", + "browserslist": "^4.21.9", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "dependencies": { + "lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "requires": { + "yallist": "^3.0.2" + } + } + } + }, + "@babel/helper-environment-visitor": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.5.tgz", + "integrity": "sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q==", + "dev": true + }, "@babel/helper-function-name": { "version": "7.15.4", "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.15.4.tgz", @@ -61,6 +319,121 @@ "@babel/types": "^7.15.4" } }, + "@babel/helper-module-imports": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.5.tgz", + "integrity": "sha512-8Dl6+HD/cKifutF5qGd/8ZJi84QeAKh+CEe1sBzz8UayBBGg1dAIJrdHOcOM5b2MpzWL2yuotJTtGjETq0qjXg==", + "dev": true, + "requires": { + "@babel/types": "^7.22.5" + }, + "dependencies": { + "@babel/helper-validator-identifier": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz", + "integrity": "sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==", + "dev": true + }, + "@babel/types": { + "version": "7.22.11", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.11.tgz", + "integrity": "sha512-siazHiGuZRz9aB9NpHy9GOs9xiQPKnMzgdr493iI1M67vRXpnEq8ZOOKzezC5q7zwuQ6sDhdSp4SD9ixKSqKZg==", + "dev": true, + "requires": { + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.5", + "to-fast-properties": "^2.0.0" + } + }, + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", + "dev": true + } + } + }, + "@babel/helper-module-transforms": { + "version": "7.22.9", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.22.9.tgz", + "integrity": "sha512-t+WA2Xn5K+rTeGtC8jCsdAH52bjggG5TKRuRrAGNM/mjIbO4GxvlLMFOEz9wXY5I2XQ60PMFsAG2WIcG82dQMQ==", + "dev": true, + "requires": { + "@babel/helper-environment-visitor": "^7.22.5", + "@babel/helper-module-imports": "^7.22.5", + "@babel/helper-simple-access": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/helper-validator-identifier": "^7.22.5" + }, + "dependencies": { + "@babel/helper-split-export-declaration": { + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", + "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", + "dev": true, + "requires": { + "@babel/types": "^7.22.5" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz", + "integrity": "sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==", + "dev": true + }, + "@babel/types": { + "version": "7.22.11", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.11.tgz", + "integrity": "sha512-siazHiGuZRz9aB9NpHy9GOs9xiQPKnMzgdr493iI1M67vRXpnEq8ZOOKzezC5q7zwuQ6sDhdSp4SD9ixKSqKZg==", + "dev": true, + "requires": { + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.5", + "to-fast-properties": "^2.0.0" + } + }, + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", + "dev": true + } + } + }, + "@babel/helper-simple-access": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz", + "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==", + "dev": true, + "requires": { + "@babel/types": "^7.22.5" + }, + "dependencies": { + "@babel/helper-validator-identifier": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz", + "integrity": "sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==", + "dev": true + }, + "@babel/types": { + "version": "7.22.11", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.11.tgz", + "integrity": "sha512-siazHiGuZRz9aB9NpHy9GOs9xiQPKnMzgdr493iI1M67vRXpnEq8ZOOKzezC5q7zwuQ6sDhdSp4SD9ixKSqKZg==", + "dev": true, + "requires": { + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.5", + "to-fast-properties": "^2.0.0" + } + }, + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", + "dev": true + } + } + }, "@babel/helper-split-export-declaration": { "version": "7.15.4", "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.15.4.tgz", @@ -70,12 +443,218 @@ "@babel/types": "^7.15.4" } }, + "@babel/helper-string-parser": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", + "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", + "dev": true + }, "@babel/helper-validator-identifier": { "version": "7.15.7", "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.15.7.tgz", "integrity": "sha512-K4JvCtQqad9OY2+yTU8w+E82ywk/fe+ELNlt1G8z3bVGlZfn/hOcQQsUhGhW/N+tb3fxK800wLtKOE/aM0m72w==", "dev": true }, + "@babel/helper-validator-option": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.22.5.tgz", + "integrity": "sha512-R3oB6xlIVKUnxNUxbmgq7pKjxpru24zlimpE8WK47fACIlM0II/Hm1RS8IaOI7NgCr6LNS+jl5l75m20npAziw==", + "dev": true + }, + "@babel/helpers": { + "version": "7.22.11", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.22.11.tgz", + "integrity": "sha512-vyOXC8PBWaGc5h7GMsNx68OH33cypkEDJCHvYVVgVbbxJDROYVtexSk0gK5iCF1xNjRIN2s8ai7hwkWDq5szWg==", + "dev": true, + "requires": { + "@babel/template": "^7.22.5", + "@babel/traverse": "^7.22.11", + "@babel/types": "^7.22.11" + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.22.10", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.10.tgz", + "integrity": "sha512-/KKIMG4UEL35WmI9OlvMhurwtytjvXoFcGNrOvyG9zIzA8YmPjVtIZUf7b05+TPO7G7/GEmLHDaoCgACHl9hhA==", + "dev": true, + "requires": { + "@babel/highlight": "^7.22.10", + "chalk": "^2.4.2" + } + }, + "@babel/generator": { + "version": "7.22.10", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.22.10.tgz", + "integrity": "sha512-79KIf7YiWjjdZ81JnLujDRApWtl7BxTqWD88+FFdQEIOG8LJ0etDOM7CXuIgGJa55sGOwZVwuEsaLEm0PJ5/+A==", + "dev": true, + "requires": { + "@babel/types": "^7.22.10", + "@jridgewell/gen-mapping": "^0.3.2", + "@jridgewell/trace-mapping": "^0.3.17", + "jsesc": "^2.5.1" + } + }, + "@babel/helper-function-name": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.22.5.tgz", + "integrity": "sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ==", + "dev": true, + "requires": { + "@babel/template": "^7.22.5", + "@babel/types": "^7.22.5" + } + }, + "@babel/helper-hoist-variables": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", + "dev": true, + "requires": { + "@babel/types": "^7.22.5" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", + "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", + "dev": true, + "requires": { + "@babel/types": "^7.22.5" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz", + "integrity": "sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==", + "dev": true + }, + "@babel/highlight": { + "version": "7.22.10", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.10.tgz", + "integrity": "sha512-78aUtVcT7MUscr0K5mIEnkwxPE0MaxkR5RxRwuHaQ+JuU5AmTPhY+do2mdzVTnIJJpyBglql2pehuBIWHug+WQ==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.22.5", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0" + } + }, + "@babel/parser": { + "version": "7.22.11", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.11.tgz", + "integrity": "sha512-R5zb8eJIBPJriQtbH/htEQy4k7E2dHWlD2Y2VT07JCzwYZHBxV5ZYtM0UhXSNMT74LyxuM+b1jdL7pSesXbC/g==", + "dev": true + }, + "@babel/template": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.5.tgz", + "integrity": "sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.22.5", + "@babel/parser": "^7.22.5", + "@babel/types": "^7.22.5" + } + }, + "@babel/traverse": { + "version": "7.22.11", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.11.tgz", + "integrity": "sha512-mzAenteTfomcB7mfPtyi+4oe5BZ6MXxWcn4CX+h4IRJ+OOGXBrWU6jDQavkQI9Vuc5P+donFabBfFCcmWka9lQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.22.10", + "@babel/generator": "^7.22.10", + "@babel/helper-environment-visitor": "^7.22.5", + "@babel/helper-function-name": "^7.22.5", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.22.11", + "@babel/types": "^7.22.11", + "debug": "^4.1.0", + "globals": "^11.1.0" + } + }, + "@babel/types": { + "version": "7.22.11", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.11.tgz", + "integrity": "sha512-siazHiGuZRz9aB9NpHy9GOs9xiQPKnMzgdr493iI1M67vRXpnEq8ZOOKzezC5q7zwuQ6sDhdSp4SD9ixKSqKZg==", + "dev": true, + "requires": { + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.5", + "to-fast-properties": "^2.0.0" + } + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", + "dev": true + } + } + }, "@babel/highlight": { "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.5.tgz", @@ -199,6 +778,55 @@ } } }, + "@jridgewell/gen-mapping": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", + "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", + "dev": true, + "requires": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + } + }, + "@jridgewell/resolve-uri": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", + "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", + "dev": true + }, + "@jridgewell/set-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "dev": true + }, + "@jridgewell/source-map": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.5.tgz", + "integrity": "sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ==", + "dev": true, + "requires": { + "@jridgewell/gen-mapping": "^0.3.0", + "@jridgewell/trace-mapping": "^0.3.9" + } + }, + "@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true + }, + "@jridgewell/trace-mapping": { + "version": "0.3.19", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz", + "integrity": "sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw==", + "dev": true, + "requires": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, "@sinonjs/commons": { "version": "1.8.3", "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", @@ -235,184 +863,187 @@ "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==", "dev": true }, + "@types/eslint": { + "version": "8.44.2", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.44.2.tgz", + "integrity": "sha512-sdPRb9K6iL5XZOmBubg8yiFp5yS/JdUDQsq5e6h95km91MCYMuvp7mh1fjPEYUhvHepKpZOjnEaMBR4PxjWDzg==", + "dev": true, + "requires": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "@types/eslint-scope": { + "version": "3.7.4", + "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.4.tgz", + "integrity": "sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA==", + "dev": true, + "requires": { + "@types/eslint": "*", + "@types/estree": "*" + } + }, + "@types/estree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.1.tgz", + "integrity": "sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA==", + "dev": true + }, "@types/json-schema": { "version": "7.0.9", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==", "dev": true }, + "@types/node": { + "version": "20.5.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.5.4.tgz", + "integrity": "sha512-Y9vbIAoM31djQZrPYjpTLo0XlaSwOIsrlfE3LpulZeRblttsLQRFRlBAppW0LOxyT3ALj2M5vU1ucQQayQH3jA==", + "dev": true + }, "@webassemblyjs/ast": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.9.0.tgz", - "integrity": "sha512-C6wW5L+b7ogSDVqymbkkvuW9kruN//YisMED04xzeBBqjHa2FYnmvOlS6Xj68xWQRgWvI9cIglsjFowH/RJyEA==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz", + "integrity": "sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q==", "dev": true, "requires": { - "@webassemblyjs/helper-module-context": "1.9.0", - "@webassemblyjs/helper-wasm-bytecode": "1.9.0", - "@webassemblyjs/wast-parser": "1.9.0" + "@webassemblyjs/helper-numbers": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6" } }, "@webassemblyjs/floating-point-hex-parser": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.9.0.tgz", - "integrity": "sha512-TG5qcFsS8QB4g4MhrxK5TqfdNe7Ey/7YL/xN+36rRjl/BlGE/NcBvJcqsRgCP6Z92mRE+7N50pRIi8SmKUbcQA==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz", + "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==", "dev": true }, "@webassemblyjs/helper-api-error": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.9.0.tgz", - "integrity": "sha512-NcMLjoFMXpsASZFxJ5h2HZRcEhDkvnNFOAKneP5RbKRzaWJN36NC4jqQHKwStIhGXu5mUWlUUk7ygdtrO8lbmw==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz", + "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==", "dev": true }, "@webassemblyjs/helper-buffer": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.9.0.tgz", - "integrity": "sha512-qZol43oqhq6yBPx7YM3m9Bv7WMV9Eevj6kMi6InKOuZxhw+q9hOkvq5e/PpKSiLfyetpaBnogSbNCfBwyB00CA==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.6.tgz", + "integrity": "sha512-z3nFzdcp1mb8nEOFFk8DrYLpHvhKC3grJD2ardfKOzmbmJvEf/tPIqCY+sNcwZIY8ZD7IkB2l7/pqhUhqm7hLA==", "dev": true }, - "@webassemblyjs/helper-code-frame": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.9.0.tgz", - "integrity": "sha512-ERCYdJBkD9Vu4vtjUYe8LZruWuNIToYq/ME22igL+2vj2dQ2OOujIZr3MEFvfEaqKoVqpsFKAGsRdBSBjrIvZA==", + "@webassemblyjs/helper-numbers": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz", + "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==", "dev": true, "requires": { - "@webassemblyjs/wast-printer": "1.9.0" - } - }, - "@webassemblyjs/helper-fsm": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-fsm/-/helper-fsm-1.9.0.tgz", - "integrity": "sha512-OPRowhGbshCb5PxJ8LocpdX9Kl0uB4XsAjl6jH/dWKlk/mzsANvhwbiULsaiqT5GZGT9qinTICdj6PLuM5gslw==", - "dev": true - }, - "@webassemblyjs/helper-module-context": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-module-context/-/helper-module-context-1.9.0.tgz", - "integrity": "sha512-MJCW8iGC08tMk2enck1aPW+BE5Cw8/7ph/VGZxwyvGbJwjktKkDK7vy7gAmMDx88D7mhDTCNKAW5tED+gZ0W8g==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.9.0" + "@webassemblyjs/floating-point-hex-parser": "1.11.6", + "@webassemblyjs/helper-api-error": "1.11.6", + "@xtuc/long": "4.2.2" } }, "@webassemblyjs/helper-wasm-bytecode": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.9.0.tgz", - "integrity": "sha512-R7FStIzyNcd7xKxCZH5lE0Bqy+hGTwS3LJjuv1ZVxd9O7eHCedSdrId/hMOd20I+v8wDXEn+bjfKDLzTepoaUw==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz", + "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==", "dev": true }, "@webassemblyjs/helper-wasm-section": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.9.0.tgz", - "integrity": "sha512-XnMB8l3ek4tvrKUUku+IVaXNHz2YsJyOOmz+MMkZvh8h1uSJpSen6vYnw3IoQ7WwEuAhL8Efjms1ZWjqh2agvw==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.6.tgz", + "integrity": "sha512-LPpZbSOwTpEC2cgn4hTydySy1Ke+XEu+ETXuoyvuyezHO3Kjdu90KK95Sh9xTbmjrCsUwvWwCOQQNta37VrS9g==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.9.0", - "@webassemblyjs/helper-buffer": "1.9.0", - "@webassemblyjs/helper-wasm-bytecode": "1.9.0", - "@webassemblyjs/wasm-gen": "1.9.0" + "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/helper-buffer": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/wasm-gen": "1.11.6" } }, "@webassemblyjs/ieee754": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.9.0.tgz", - "integrity": "sha512-dcX8JuYU/gvymzIHc9DgxTzUUTLexWwt8uCTWP3otys596io0L5aW02Gb1RjYpx2+0Jus1h4ZFqjla7umFniTg==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz", + "integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==", "dev": true, "requires": { "@xtuc/ieee754": "^1.2.0" } }, "@webassemblyjs/leb128": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.9.0.tgz", - "integrity": "sha512-ENVzM5VwV1ojs9jam6vPys97B/S65YQtv/aanqnU7D8aSoHFX8GyhGg0CMfyKNIHBuAVjy3tlzd5QMMINa7wpw==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz", + "integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==", "dev": true, "requires": { "@xtuc/long": "4.2.2" } }, "@webassemblyjs/utf8": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.9.0.tgz", - "integrity": "sha512-GZbQlWtopBTP0u7cHrEx+73yZKrQoBMpwkGEIqlacljhXCkVM1kMQge/Mf+csMJAjEdSwhOyLAS0AoR3AG5P8w==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz", + "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==", "dev": true }, "@webassemblyjs/wasm-edit": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.9.0.tgz", - "integrity": "sha512-FgHzBm80uwz5M8WKnMTn6j/sVbqilPdQXTWraSjBwFXSYGirpkSWE2R9Qvz9tNiTKQvoKILpCuTjBKzOIm0nxw==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.6.tgz", + "integrity": "sha512-Ybn2I6fnfIGuCR+Faaz7YcvtBKxvoLV3Lebn1tM4o/IAJzmi9AWYIPWpyBfU8cC+JxAO57bk4+zdsTjJR+VTOw==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.9.0", - "@webassemblyjs/helper-buffer": "1.9.0", - "@webassemblyjs/helper-wasm-bytecode": "1.9.0", - "@webassemblyjs/helper-wasm-section": "1.9.0", - "@webassemblyjs/wasm-gen": "1.9.0", - "@webassemblyjs/wasm-opt": "1.9.0", - "@webassemblyjs/wasm-parser": "1.9.0", - "@webassemblyjs/wast-printer": "1.9.0" + "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/helper-buffer": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/helper-wasm-section": "1.11.6", + "@webassemblyjs/wasm-gen": "1.11.6", + "@webassemblyjs/wasm-opt": "1.11.6", + "@webassemblyjs/wasm-parser": "1.11.6", + "@webassemblyjs/wast-printer": "1.11.6" } }, "@webassemblyjs/wasm-gen": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.9.0.tgz", - "integrity": "sha512-cPE3o44YzOOHvlsb4+E9qSqjc9Qf9Na1OO/BHFy4OI91XDE14MjFN4lTMezzaIWdPqHnsTodGGNP+iRSYfGkjA==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.6.tgz", + "integrity": "sha512-3XOqkZP/y6B4F0PBAXvI1/bky7GryoogUtfwExeP/v7Nzwo1QLcq5oQmpKlftZLbT+ERUOAZVQjuNVak6UXjPA==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.9.0", - "@webassemblyjs/helper-wasm-bytecode": "1.9.0", - "@webassemblyjs/ieee754": "1.9.0", - "@webassemblyjs/leb128": "1.9.0", - "@webassemblyjs/utf8": "1.9.0" + "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/ieee754": "1.11.6", + "@webassemblyjs/leb128": "1.11.6", + "@webassemblyjs/utf8": "1.11.6" } }, "@webassemblyjs/wasm-opt": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.9.0.tgz", - "integrity": "sha512-Qkjgm6Anhm+OMbIL0iokO7meajkzQD71ioelnfPEj6r4eOFuqm4YC3VBPqXjFyyNwowzbMD+hizmprP/Fwkl2A==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.6.tgz", + "integrity": "sha512-cOrKuLRE7PCe6AsOVl7WasYf3wbSo4CeOk6PkrjS7g57MFfVUF9u6ysQBBODX0LdgSvQqRiGz3CXvIDKcPNy4g==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.9.0", - "@webassemblyjs/helper-buffer": "1.9.0", - "@webassemblyjs/wasm-gen": "1.9.0", - "@webassemblyjs/wasm-parser": "1.9.0" + "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/helper-buffer": "1.11.6", + "@webassemblyjs/wasm-gen": "1.11.6", + "@webassemblyjs/wasm-parser": "1.11.6" } }, "@webassemblyjs/wasm-parser": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.9.0.tgz", - "integrity": "sha512-9+wkMowR2AmdSWQzsPEjFU7njh8HTO5MqO8vjwEHuM+AMHioNqSBONRdr0NQQ3dVQrzp0s8lTcYqzUdb7YgELA==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.9.0", - "@webassemblyjs/helper-api-error": "1.9.0", - "@webassemblyjs/helper-wasm-bytecode": "1.9.0", - "@webassemblyjs/ieee754": "1.9.0", - "@webassemblyjs/leb128": "1.9.0", - "@webassemblyjs/utf8": "1.9.0" - } - }, - "@webassemblyjs/wast-parser": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-parser/-/wast-parser-1.9.0.tgz", - "integrity": "sha512-qsqSAP3QQ3LyZjNC/0jBJ/ToSxfYJ8kYyuiGvtn/8MK89VrNEfwj7BPQzJVHi0jGTRK2dGdJ5PRqhtjzoww+bw==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.6.tgz", + "integrity": "sha512-6ZwPeGzMJM3Dqp3hCsLgESxBGtT/OeCvCZ4TA1JUPYgmhAx38tTPR9JaKy0S5H3evQpO/h2uWs2j6Yc/fjkpTQ==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.9.0", - "@webassemblyjs/floating-point-hex-parser": "1.9.0", - "@webassemblyjs/helper-api-error": "1.9.0", - "@webassemblyjs/helper-code-frame": "1.9.0", - "@webassemblyjs/helper-fsm": "1.9.0", - "@xtuc/long": "4.2.2" + "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/helper-api-error": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/ieee754": "1.11.6", + "@webassemblyjs/leb128": "1.11.6", + "@webassemblyjs/utf8": "1.11.6" } }, "@webassemblyjs/wast-printer": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.9.0.tgz", - "integrity": "sha512-2J0nE95rHXHyQ24cWjMKJ1tqB/ds8z/cyeOZxJhcb+rW+SQASVjuznUSmdz5GpVJTzU8JkhYut0D3siFDD6wsA==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.6.tgz", + "integrity": "sha512-JM7AhRcE+yW2GWYaKeHL5vt4xqee5N2WcezptmgyhNS+ScggqcT1OtXykhAb13Sn5Yas0j2uv9tHgrjwvzAP4A==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.9.0", - "@webassemblyjs/wast-parser": "1.9.0", + "@webassemblyjs/ast": "1.11.6", "@xtuc/long": "4.2.2" } }, @@ -456,6 +1087,12 @@ "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", "dev": true }, + "acorn-import-assertions": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz", + "integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==", + "dev": true + }, "acorn-jsx": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", @@ -489,24 +1126,12 @@ "uri-js": "^4.2.2" } }, - "ajv-errors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-1.0.1.tgz", - "integrity": "sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==", - "dev": true - }, "ajv-keywords": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", "dev": true }, - "ansi-colors": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.4.tgz", - "integrity": "sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA==", - "dev": true - }, "ansi-escapes": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", @@ -546,12 +1171,6 @@ "picomatch": "^2.0.4" } }, - "aproba": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", - "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", - "dev": true - }, "argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", @@ -561,24 +1180,6 @@ "sprintf-js": "~1.0.2" } }, - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", - "dev": true - }, - "arr-flatten": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", - "dev": true - }, - "arr-union": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", - "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", - "dev": true - }, "array-each": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", @@ -597,12 +1198,6 @@ "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==", "dev": true }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", - "dev": true - }, "arraybuffer.slice": { "version": "0.0.7", "resolved": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz", @@ -618,26 +1213,6 @@ "safer-buffer": "~2.1.0" } }, - "asn1.js": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz", - "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==", - "dev": true, - "requires": { - "bn.js": "^4.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "safer-buffer": "^2.1.0" - }, - "dependencies": { - "bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true - } - } - }, "assert": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz", @@ -659,12 +1234,6 @@ "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", "dev": true }, - "assign-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", - "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", - "dev": true - }, "astral-regex": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", @@ -676,13 +1245,6 @@ "resolved": "https://registry.npmjs.org/async/-/async-3.2.3.tgz", "integrity": "sha512-spZRyzKL5l5BZQrr/6m/SqFdBN0q3OCI0f9rjfBzCMBIP4p75P620rR3gTmaksNOhmzgdxcaxdNfMy6anrbM0g==" }, - "async-each": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz", - "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==", - "dev": true, - "optional": true - }, "async-limiter": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", @@ -695,12 +1257,6 @@ "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", "dev": true }, - "atob": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", - "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", - "dev": true - }, "aws-sign2": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", @@ -891,67 +1447,12 @@ "integrity": "sha1-MasayLEpNjRj41s+u2n038+6eUc=", "dev": true }, - "balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "base": { - "version": "0.11.2", - "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", - "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", - "dev": true, - "requires": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, "base64-arraybuffer": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.4.tgz", @@ -1006,16 +1507,6 @@ "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", "dev": true }, - "bindings": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", - "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", - "dev": true, - "optional": true, - "requires": { - "file-uri-to-path": "1.0.0" - } - }, "blob": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/blob/-/blob-0.0.5.tgz", @@ -1028,12 +1519,6 @@ "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", "dev": true }, - "bn.js": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", - "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==", - "dev": true - }, "body": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/body/-/body-5.1.0.tgz", @@ -1115,101 +1600,12 @@ "fill-range": "^7.0.1" } }, - "brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", - "dev": true - }, "browser-stdout": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", "dev": true }, - "browserify-aes": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", - "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", - "dev": true, - "requires": { - "buffer-xor": "^1.0.3", - "cipher-base": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.3", - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "browserify-cipher": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", - "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", - "dev": true, - "requires": { - "browserify-aes": "^1.0.4", - "browserify-des": "^1.0.0", - "evp_bytestokey": "^1.0.0" - } - }, - "browserify-des": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", - "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", - "dev": true, - "requires": { - "cipher-base": "^1.0.1", - "des.js": "^1.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "browserify-rsa": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.0.tgz", - "integrity": "sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==", - "dev": true, - "requires": { - "bn.js": "^5.0.0", - "randombytes": "^2.0.1" - } - }, - "browserify-sign": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.1.tgz", - "integrity": "sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==", - "dev": true, - "requires": { - "bn.js": "^5.1.1", - "browserify-rsa": "^4.0.1", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "elliptic": "^6.5.3", - "inherits": "^2.0.4", - "parse-asn1": "^5.1.5", - "readable-stream": "^3.6.0", - "safe-buffer": "^5.2.0" - }, - "dependencies": { - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - }, - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true - } - } - }, "browserify-zlib": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.1.4.tgz", @@ -1219,6 +1615,18 @@ "pako": "~0.2.0" } }, + "browserslist": { + "version": "4.21.10", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.10.tgz", + "integrity": "sha512-bipEBdZfVH5/pwrvqc+Ub0kUPVfGUhlKxbvfD+z1BDnPEO/X98ruXGA1WP5ASpAFKan7Qr6j736IacbZQuAlKQ==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30001517", + "electron-to-chromium": "^1.4.477", + "node-releases": "^2.0.13", + "update-browserslist-db": "^1.0.11" + } + }, "browserstack": { "version": "1.5.3", "resolved": "https://registry.npmjs.org/browserstack/-/browserstack-1.5.3.tgz", @@ -1300,89 +1708,12 @@ "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", "dev": true }, - "buffer-xor": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", - "dev": true - }, - "builtin-status-codes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", - "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", - "dev": true - }, "bytes": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==", "dev": true }, - "cacache": { - "version": "12.0.4", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-12.0.4.tgz", - "integrity": "sha512-a0tMB40oefvuInr4Cwb3GerbL9xTj1D5yg0T5xrjGCGyfvbxseIXX7BAO/u/hIXdafzOI5JC3wDwHyf24buOAQ==", - "dev": true, - "requires": { - "bluebird": "^3.5.5", - "chownr": "^1.1.1", - "figgy-pudding": "^3.5.1", - "glob": "^7.1.4", - "graceful-fs": "^4.1.15", - "infer-owner": "^1.0.3", - "lru-cache": "^5.1.1", - "mississippi": "^3.0.0", - "mkdirp": "^0.5.1", - "move-concurrently": "^1.0.1", - "promise-inflight": "^1.0.1", - "rimraf": "^2.6.3", - "ssri": "^6.0.1", - "unique-filename": "^1.1.1", - "y18n": "^4.0.0" - }, - "dependencies": { - "glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "requires": { - "yallist": "^3.0.2" - } - } - } - }, - "cache-base": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", - "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", - "dev": true, - "requires": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" - } - }, "call-bind": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", @@ -1405,6 +1736,12 @@ "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true }, + "caniuse-lite": { + "version": "1.0.30001522", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001522.tgz", + "integrity": "sha512-TKiyTVZxJGhsTszLuzb+6vUZSjVOAhClszBr2Ta2k9IwtNBT/4dzmL6aywt0HCgEZlmwJzXJd8yNiob6HgwTRg==", + "dev": true + }, "caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", @@ -1466,51 +1803,12 @@ "readdirp": "~3.6.0" } }, - "chownr": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", - "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", - "dev": true - }, "chrome-trace-event": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", "dev": true }, - "cipher-base": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", - "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "class-utils": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", - "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", - "dev": true, - "requires": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, "cli": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/cli/-/cli-1.0.1.tgz", @@ -1580,17 +1878,6 @@ } } }, - "clone-deep": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", - "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4", - "kind-of": "^6.0.2", - "shallow-clone": "^3.0.0" - } - }, "co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", @@ -1603,16 +1890,6 @@ "integrity": "sha1-XjvIqsJsAajie/EHcixWVfWtfTY=", "dev": true }, - "collection-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", - "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", - "dev": true, - "requires": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" - } - }, "color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", @@ -1679,18 +1956,6 @@ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, - "concat-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" - } - }, "connect": { "version": "3.7.0", "resolved": "https://registry.npmjs.org/connect/-/connect-3.7.0.tgz", @@ -1779,26 +2044,6 @@ "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", "dev": true }, - "copy-concurrently": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz", - "integrity": "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==", - "dev": true, - "requires": { - "aproba": "^1.1.1", - "fs-write-stream-atomic": "^1.0.8", - "iferr": "^0.1.5", - "mkdirp": "^0.5.1", - "rimraf": "^2.5.4", - "run-queue": "^1.0.0" - } - }, - "copy-descriptor": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", - "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", - "dev": true - }, "core-js": { "version": "2.6.12", "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz", @@ -1811,95 +2056,6 @@ "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", "dev": true }, - "create-ecdh": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", - "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "elliptic": "^6.5.3" - }, - "dependencies": { - "bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true - } - } - }, - "create-hash": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", - "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", - "dev": true, - "requires": { - "cipher-base": "^1.0.1", - "inherits": "^2.0.1", - "md5.js": "^1.3.4", - "ripemd160": "^2.0.1", - "sha.js": "^2.4.0" - }, - "dependencies": { - "ripemd160": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", - "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", - "dev": true, - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" - } - }, - "sha.js": { - "version": "2.4.11", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", - "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - } - } - }, - "create-hmac": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", - "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", - "dev": true, - "requires": { - "cipher-base": "^1.0.3", - "create-hash": "^1.1.0", - "inherits": "^2.0.1", - "ripemd160": "^2.0.0", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - }, - "dependencies": { - "ripemd160": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", - "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", - "dev": true, - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" - } - }, - "sha.js": { - "version": "2.4.11", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", - "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - } - } - }, "cross-spawn": { "version": "6.0.5", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", @@ -1938,12 +2094,6 @@ "integrity": "sha1-XQKkaFCt8bSjF5RqOSj8y1v9BCU=", "dev": true }, - "cyclist": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-1.0.1.tgz", - "integrity": "sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk=", - "dev": true - }, "dashdash": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", @@ -1998,12 +2148,6 @@ "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", "dev": true }, - "decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", - "dev": true - }, "deep-eql": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", @@ -2014,9 +2158,9 @@ } }, "deep-for-each": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/deep-for-each/-/deep-for-each-2.0.3.tgz", - "integrity": "sha512-Y9mu+rplGcNZ7veer+5rqcdI9w3aPb7/WyE/nYnsuPevaE2z5YuC2u7/Gz/hIKsa0zo8sE8gKoBimSNsO/sr+A==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/deep-for-each/-/deep-for-each-3.0.0.tgz", + "integrity": "sha512-pPN+0f8jlnNP+z90qqOdxGghJU5XM6oBDhvAR+qdQzjCg5pk/7VPPvKK1GqoXEFkHza6ZS+Otzzvmr0g3VUaKw==", "dev": true, "requires": { "lodash.isplainobject": "^4.0.6" @@ -2028,47 +2172,6 @@ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, - "define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", - "dev": true, - "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - }, - "dependencies": { - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -2081,16 +2184,6 @@ "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", "dev": true }, - "des.js": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", - "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } - }, "destroy": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", @@ -2124,25 +2217,6 @@ "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", "dev": true }, - "diffie-hellman": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", - "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "miller-rabin": "^4.0.0", - "randombytes": "^2.0.0" - }, - "dependencies": { - "bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true - } - } - }, "doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", @@ -2253,28 +2327,11 @@ "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", "dev": true }, - "elliptic": { - "version": "6.5.4", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", - "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", - "dev": true, - "requires": { - "bn.js": "^4.11.9", - "brorand": "^1.1.0", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.1", - "inherits": "^2.0.4", - "minimalistic-assert": "^1.0.1", - "minimalistic-crypto-utils": "^1.0.1" - }, - "dependencies": { - "bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true - } - } + "electron-to-chromium": { + "version": "1.4.500", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.500.tgz", + "integrity": "sha512-P38NO8eOuWOKY1sQk5yE0crNtrjgjJj6r3NrbIKtG18KzCHmHE2Bt+aQA7/y0w3uYsHWxDa6icOohzjLJ4vJ4A==", + "dev": true }, "emoji-regex": { "version": "8.0.0", @@ -2353,26 +2410,13 @@ } }, "enhanced-resolve": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.5.0.tgz", - "integrity": "sha512-Nv9m36S/vxpsI+Hc4/ZGRs0n9mXqSWGGq49zxb/cJfPAQMbUtttJAlNPS4AQzaBdw/pKskw5bMbekT/Y7W/Wlg==", + "version": "5.15.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz", + "integrity": "sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "memory-fs": "^0.5.0", - "tapable": "^1.0.0" - }, - "dependencies": { - "memory-fs": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.5.0.tgz", - "integrity": "sha512-jA0rdU5KoQMC0e6ppoNRtpp6vjFq6+NY7r8hywnC7V+1Xj/MtHwGIbB1QaK/dunyjWteJzmkpd7ooeWg10T7GA==", - "dev": true, - "requires": { - "errno": "^0.1.3", - "readable-stream": "^2.0.1" - } - } + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" } }, "ent": { @@ -2384,17 +2428,8 @@ "entities": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/entities/-/entities-1.0.0.tgz", - "integrity": "sha1-sph6o4ITR/zeZCsk/fyeT7cSvyY=", - "dev": true - }, - "errno": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz", - "integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==", - "dev": true, - "requires": { - "prr": "~1.0.1" - } + "integrity": "sha1-sph6o4ITR/zeZCsk/fyeT7cSvyY=", + "dev": true }, "error": { "version": "7.2.1", @@ -2420,6 +2455,12 @@ } } }, + "es-module-lexer": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.3.0.tgz", + "integrity": "sha512-vZK7T0N2CBmBOixhmjdqx2gWVbFZ4DXZ/NyRMZVlJXPa7CyFS+/a4QQsDGDQy9ZfEzxFuNEsMLeQJnKP2p5/JA==", + "dev": true + }, "es6-promise": { "version": "4.2.8", "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", @@ -2708,57 +2749,12 @@ "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=", "dev": true }, - "evp_bytestokey": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", - "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", - "dev": true, - "requires": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" - } - }, "exit": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=", "dev": true }, - "expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", - "dev": true, - "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, "expand-tilde": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", @@ -3011,27 +3007,6 @@ "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", "dev": true }, - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dev": true, - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, "external-editor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", @@ -3043,71 +3018,6 @@ "tmp": "^0.0.33" } }, - "extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", - "dev": true, - "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, "extsprintf": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", @@ -3147,12 +3057,6 @@ "websocket-driver": ">=0.5.1" } }, - "figgy-pudding": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.2.tgz", - "integrity": "sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw==", - "dev": true - }, "figures": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", @@ -3171,12 +3075,11 @@ "flat-cache": "^2.0.1" } }, - "file-uri-to-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", - "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", - "dev": true, - "optional": true + "file-sync-cmp": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/file-sync-cmp/-/file-sync-cmp-0.1.1.tgz", + "integrity": "sha512-0k45oWBokCqh2MOexeYKpyqmGKG+8mQ2Wd8iawx+uWd/weWJQAZ6SoPybagdCI4xFisag8iAR77WPm4h3pTfxA==", + "dev": true }, "fill-range": { "version": "7.0.1", @@ -3283,16 +3186,6 @@ "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==", "dev": true }, - "flush-write-stream": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz", - "integrity": "sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "readable-stream": "^2.3.6" - } - }, "follow-redirects": { "version": "1.15.2", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", @@ -3337,15 +3230,6 @@ "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", "dev": true }, - "fragment-cache": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", - "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", - "dev": true, - "requires": { - "map-cache": "^0.2.2" - } - }, "fresh": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", @@ -3358,16 +3242,6 @@ "integrity": "sha1-g8YK/Fi5xWmXAH7Rp2izqzA6RP4=", "dev": true }, - "from2": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", - "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.0" - } - }, "fs-access": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/fs-access/-/fs-access-1.0.1.tgz", @@ -3388,18 +3262,6 @@ "universalify": "^0.1.0" } }, - "fs-write-stream-atomic": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", - "integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "iferr": "^0.1.5", - "imurmurhash": "^0.1.4", - "readable-stream": "1 || 2" - } - }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -3434,6 +3296,12 @@ "globule": "^1.0.0" } }, + "gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true + }, "get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", @@ -3457,12 +3325,6 @@ "has-symbols": "^1.0.1" } }, - "get-value": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", - "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", - "dev": true - }, "getobject": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/getobject/-/getobject-1.0.2.tgz", @@ -3500,6 +3362,12 @@ "is-glob": "^4.0.1" } }, + "glob-to-regexp": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", + "dev": true + }, "global-modules": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", @@ -3679,10 +3547,65 @@ } }, "grunt-contrib-concat": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/grunt-contrib-concat/-/grunt-contrib-concat-0.3.0.tgz", - "integrity": "sha1-SPoNQzbSm2U62CJaa9b4VrRIPjI=", - "dev": true + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/grunt-contrib-concat/-/grunt-contrib-concat-2.1.0.tgz", + "integrity": "sha512-Vnl95JIOxfhEN7bnYIlCgQz41kkbi7tsZ/9a4usZmxNxi1S2YAIOy8ysFmO8u4MN26Apal1O106BwARdaNxXQw==", + "dev": true, + "requires": { + "chalk": "^4.1.2", + "source-map": "^0.5.3" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } }, "grunt-contrib-connect": { "version": "2.1.0", @@ -3713,10 +3636,14 @@ } }, "grunt-contrib-copy": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/grunt-contrib-copy/-/grunt-contrib-copy-0.5.0.tgz", - "integrity": "sha1-QQB1rEWlhWuhkbHMclclRQ1KAhU=", - "dev": true + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/grunt-contrib-copy/-/grunt-contrib-copy-1.0.0.tgz", + "integrity": "sha512-gFRFUB0ZbLcjKb67Magz1yOHGBkyU6uL29hiEW1tdQ9gQt72NuMKIy/kS6dsCbV0cZ0maNCb0s6y+uT1FKU7jA==", + "dev": true, + "requires": { + "chalk": "^1.1.1", + "file-sync-cmp": "^0.1.0" + } }, "grunt-contrib-jshint": { "version": "2.1.0", @@ -3827,9 +3754,9 @@ } }, "grunt-karma": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/grunt-karma/-/grunt-karma-3.0.2.tgz", - "integrity": "sha512-imNhQO1bR1O7X6/3F5vO0o7mKy4xdkpSd40QVfxGO70cBAFcOqjv2Zu5QzsfEsSrppuu3N0vIQPbfBRjeGdpWg==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/grunt-karma/-/grunt-karma-4.0.2.tgz", + "integrity": "sha512-4+iBBkXZjHHMDAG5kpHCdDUqlSEBJ6sqouLMRf0p+QB8wGMs300DtaCQphHqd7pM3gpXoGVT3yRRsT7KOZpJMA==", "dev": true, "requires": { "lodash": "^4.17.10" @@ -3971,13 +3898,13 @@ "dev": true }, "grunt-webpack": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/grunt-webpack/-/grunt-webpack-3.1.3.tgz", - "integrity": "sha512-SaZ8K8lG4iTxs7ClZxOWCf3kxqS2y+Eel8SbaEGgBKwhAp6e45beIu+vhBZRLX3vonKML2kjemKsQ21REaqNFQ==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/grunt-webpack/-/grunt-webpack-5.0.0.tgz", + "integrity": "sha512-C7emzVIGJhZ5V5ZYjylr9sDD9PE9Dh/55NaSzP2P2dhif+m/1gHbjDZQ7PDzguyuzwBz4Qc8voQHR06FSp4CKg==", "dev": true, "requires": { - "deep-for-each": "^2.0.2", - "lodash": "^4.7.0" + "deep-for-each": "^3.0.0", + "lodash": "^4.17.19" } }, "gzip-size": { @@ -4058,121 +3985,12 @@ "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", "dev": true }, - "has-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", - "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", - "dev": true, - "requires": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" - } - }, - "has-values": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", - "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", - "dev": true, - "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" - }, - "dependencies": { - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true - }, - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "hash-base": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", - "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", - "dev": true, - "requires": { - "inherits": "^2.0.4", - "readable-stream": "^3.6.0", - "safe-buffer": "^5.2.0" - }, - "dependencies": { - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - }, - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true - } - } - }, - "hash.js": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", - "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, "he": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", "dev": true }, - "hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", - "dev": true, - "requires": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, "home-or-tmp": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", @@ -4344,12 +4162,6 @@ "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", "dev": true }, - "iferr": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz", - "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=", - "dev": true - }, "ignore": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", @@ -4378,12 +4190,6 @@ "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=", "dev": true }, - "infer-owner": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz", - "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==", - "dev": true - }, "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -4514,40 +4320,14 @@ "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", "dev": true }, - "is-absolute": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", - "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", - "dev": true, - "requires": { - "is-relative": "^1.0.0", - "is-windows": "^1.0.1" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } + "is-absolute": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", + "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", + "dev": true, + "requires": { + "is-relative": "^1.0.0", + "is-windows": "^1.0.1" } }, "is-binary-path": { @@ -4568,57 +4348,6 @@ "has": "^1.0.3" } }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } - } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true - }, "is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -4855,6 +4584,34 @@ "integrity": "sha1-5kAN8ea1bhMLYcS80JPap/boyhU=", "dev": true }, + "jest-worker": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", + "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", + "dev": true, + "requires": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "dependencies": { + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, "jquery": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.0.tgz", @@ -4931,10 +4688,10 @@ } } }, - "json-parse-better-errors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", "dev": true }, "json-schema-traverse": { @@ -5226,35 +4983,29 @@ } }, "karma-webpack": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/karma-webpack/-/karma-webpack-4.0.2.tgz", - "integrity": "sha512-970/okAsdUOmiMOCY8sb17A2I8neS25Ad9uhyK3GHgmRSIFJbDcNEFE8dqqUhNe9OHiCC9k3DMrSmtd/0ymP1A==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/karma-webpack/-/karma-webpack-5.0.0.tgz", + "integrity": "sha512-+54i/cd3/piZuP3dr54+NcFeKOPnys5QeM1IY+0SPASwrtHsliXUiCL50iW+K9WWA7RvamC4macvvQ86l3KtaA==", "dev": true, "requires": { - "clone-deep": "^4.0.1", - "loader-utils": "^1.1.0", - "neo-async": "^2.6.1", - "schema-utils": "^1.0.0", - "source-map": "^0.7.3", - "webpack-dev-middleware": "^3.7.0" + "glob": "^7.1.3", + "minimatch": "^3.0.4", + "webpack-merge": "^4.1.5" }, "dependencies": { - "schema-utils": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", - "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "dev": true, "requires": { - "ajv": "^6.1.0", - "ajv-errors": "^1.0.0", - "ajv-keywords": "^3.1.0" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" } - }, - "source-map": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", - "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", - "dev": true } } }, @@ -5362,9 +5113,9 @@ } }, "loader-runner": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.4.0.tgz", - "integrity": "sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", + "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", "dev": true }, "loader-utils": { @@ -5574,15 +5325,6 @@ "integrity": "sha1-5WqpTEyAVaFkBKBnS3jyFffI4ZQ=", "dev": true }, - "map-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", - "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", - "dev": true, - "requires": { - "object-visit": "^1.0.0" - } - }, "maxmin": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/maxmin/-/maxmin-2.1.0.tgz", @@ -5607,39 +5349,24 @@ } } }, - "md5.js": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", - "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", - "dev": true, - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, "media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", "dev": true }, - "memory-fs": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz", - "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", - "dev": true, - "requires": { - "errno": "^0.1.3", - "readable-stream": "^2.0.1" - } - }, "merge-descriptors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==", "dev": true }, + "merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, "methods": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", @@ -5656,24 +5383,6 @@ "picomatch": "^2.2.3" } }, - "miller-rabin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", - "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", - "dev": true, - "requires": { - "bn.js": "^4.0.0", - "brorand": "^1.0.1" - }, - "dependencies": { - "bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true - } - } - }, "mime": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", @@ -5701,18 +5410,6 @@ "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", "dev": true }, - "minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", - "dev": true - }, - "minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", - "dev": true - }, "minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -5728,45 +5425,6 @@ "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", "dev": true }, - "mississippi": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-3.0.0.tgz", - "integrity": "sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA==", - "dev": true, - "requires": { - "concat-stream": "^1.5.0", - "duplexify": "^3.4.2", - "end-of-stream": "^1.1.0", - "flush-write-stream": "^1.0.0", - "from2": "^2.1.0", - "parallel-transform": "^1.1.0", - "pump": "^3.0.0", - "pumpify": "^1.3.3", - "stream-each": "^1.1.0", - "through2": "^2.0.0" - } - }, - "mixin-deep": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", - "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", - "dev": true, - "requires": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, "mkdirp": { "version": "0.5.5", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", @@ -6125,20 +5783,6 @@ } } }, - "move-concurrently": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", - "integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=", - "dev": true, - "requires": { - "aproba": "^1.1.1", - "copy-concurrently": "^1.0.0", - "fs-write-stream-atomic": "^1.0.8", - "mkdirp": "^0.5.1", - "rimraf": "^2.5.4", - "run-queue": "^1.0.3" - } - }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", @@ -6151,38 +5795,12 @@ "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", "dev": true }, - "nan": { - "version": "2.16.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.16.0.tgz", - "integrity": "sha512-UdAqHyFngu7TfQKsCBgAA6pWDkT8MAO7d0jyOecVhN5354xbLqdn8mV9Tat9gepAupm0bt2DbeaSC8vS52MuFA==", - "dev": true, - "optional": true - }, "nanoid": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", "dev": true }, - "nanomatch": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", - "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "fragment-cache": "^0.2.1", - "is-windows": "^1.0.2", - "kind-of": "^6.0.2", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - } - }, "natives": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/natives/-/natives-1.1.6.tgz", @@ -6396,6 +6014,12 @@ } } }, + "node-releases": { + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", + "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==", + "dev": true + }, "nopt": { "version": "3.0.6", "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", @@ -6435,43 +6059,6 @@ "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", "dev": true }, - "object-copy": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", - "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", - "dev": true, - "requires": { - "copy-descriptor": "^0.1.0", - "define-property": "^0.2.5", - "kind-of": "^3.0.3" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, "object-hash": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-2.2.0.tgz", @@ -6484,15 +6071,6 @@ "integrity": "sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg==", "dev": true }, - "object-visit": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", - "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", - "dev": true, - "requires": { - "isobject": "^3.0.0" - } - }, "object.defaults": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz", @@ -6638,17 +6216,6 @@ "integrity": "sha1-8/dSL073gjSNqBYbrZ7P1Rv4OnU=", "dev": true }, - "parallel-transform": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.2.0.tgz", - "integrity": "sha512-P2vSmIu38uIlvdcU7fDkyrxj33gTUy/ABO5ZUbGowxNCopBq/OoD42bP4UmMrJoPyk4Uqf0mu3mtWBhHCZD8yg==", - "dev": true, - "requires": { - "cyclist": "^1.0.1", - "inherits": "^2.0.3", - "readable-stream": "^2.1.5" - } - }, "parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -6658,19 +6225,6 @@ "callsites": "^3.0.0" } }, - "parse-asn1": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz", - "integrity": "sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==", - "dev": true, - "requires": { - "asn1.js": "^5.2.0", - "browserify-aes": "^1.0.0", - "evp_bytestokey": "^1.0.0", - "pbkdf2": "^3.0.3", - "safe-buffer": "^5.1.1" - } - }, "parse-filepath": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz", @@ -6712,25 +6266,12 @@ "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", "dev": true }, - "pascalcase": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", - "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", - "dev": true - }, "path-browserify": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz", "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=", "dev": true }, - "path-dirname": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", - "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", - "dev": true, - "optional": true - }, "path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -6791,41 +6332,6 @@ "through": "~2.3" } }, - "pbkdf2": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", - "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", - "dev": true, - "requires": { - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4", - "ripemd160": "^2.0.1", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - }, - "dependencies": { - "ripemd160": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", - "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", - "dev": true, - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" - } - }, - "sha.js": { - "version": "2.4.11", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", - "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - } - } - }, "pbkdf2-compat": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/pbkdf2-compat/-/pbkdf2-compat-2.0.1.tgz", @@ -6838,18 +6344,18 @@ "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", "dev": true }, + "picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, "picomatch": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", "dev": true }, - "pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", - "dev": true - }, "pinkie": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", @@ -6901,12 +6407,6 @@ } } }, - "posix-character-classes": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", - "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", - "dev": true - }, "prelude-ls": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", @@ -6957,12 +6457,6 @@ "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", "dev": true }, - "promise-inflight": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", - "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=", - "dev": true - }, "propagate": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/propagate/-/propagate-2.0.1.tgz", @@ -6979,12 +6473,6 @@ "ipaddr.js": "1.9.1" } }, - "prr": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", - "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", - "dev": true - }, "ps-tree": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/ps-tree/-/ps-tree-1.2.0.tgz", @@ -7000,61 +6488,6 @@ "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", "dev": true }, - "public-encrypt": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", - "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "parse-asn1": "^5.0.0", - "randombytes": "^2.0.1", - "safe-buffer": "^5.1.2" - }, - "dependencies": { - "bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true - } - } - }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "pumpify": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", - "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", - "dev": true, - "requires": { - "duplexify": "^3.6.0", - "inherits": "^2.0.3", - "pump": "^2.0.0" - }, - "dependencies": { - "pump": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", - "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - } - } - }, "punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", @@ -7100,16 +6533,6 @@ "safe-buffer": "^5.1.0" } }, - "randomfill": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", - "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", - "dev": true, - "requires": { - "randombytes": "^2.0.5", - "safe-buffer": "^5.1.0" - } - }, "range-parser": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", @@ -7173,41 +6596,12 @@ "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", "dev": true }, - "regex-not": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", - "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", - "dev": true, - "requires": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" - } - }, "regexpp": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", "dev": true }, - "remove-trailing-separator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", - "dev": true, - "optional": true - }, - "repeat-element": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.4.tgz", - "integrity": "sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==", - "dev": true - }, - "repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", - "dev": true - }, "repeating": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", @@ -7308,12 +6702,6 @@ "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true }, - "resolve-url": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", - "dev": true - }, "restore-cursor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", @@ -7322,13 +6710,7 @@ "requires": { "onetime": "^5.1.0", "signal-exit": "^3.0.2" - } - }, - "ret": { - "version": "0.1.15", - "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", - "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", - "dev": true + } }, "rfdc": { "version": "1.3.0", @@ -7373,15 +6755,6 @@ "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", "dev": true }, - "run-queue": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/run-queue/-/run-queue-1.0.3.tgz", - "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=", - "dev": true, - "requires": { - "aproba": "^1.1.1" - } - }, "rxjs": { "version": "6.6.7", "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", @@ -7403,15 +6776,6 @@ "integrity": "sha1-PnZyPjjf3aE8mx0poeB//uSzC1c=", "dev": true }, - "safe-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", - "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", - "dev": true, - "requires": { - "ret": "~0.1.10" - } - }, "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -7474,9 +6838,9 @@ } }, "serialize-javascript": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz", - "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.1.tgz", + "integrity": "sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==", "dev": true, "requires": { "randombytes": "^2.1.0" @@ -7541,29 +6905,6 @@ "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", "dev": true }, - "set-value": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", - "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.3", - "split-string": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, "setimmediate": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", @@ -7582,15 +6923,6 @@ "integrity": "sha1-F93t3F9yL7ZlAWWIlUYZd4ZzFbo=", "dev": true }, - "shallow-clone": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", - "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", - "dev": true, - "requires": { - "kind-of": "^6.0.2" - } - }, "shebang-command": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", @@ -7701,119 +7033,6 @@ } } }, - "snapdragon": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", - "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", - "dev": true, - "requires": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "snapdragon-node": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", - "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", - "dev": true, - "requires": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "snapdragon-util": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", - "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", - "dev": true, - "requires": { - "kind-of": "^3.2.0" - }, - "dependencies": { - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, "socket.io": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-2.5.0.tgz", @@ -7970,30 +7189,11 @@ } } }, - "source-list-map": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz", - "integrity": "sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==", - "dev": true - }, "source-map": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" }, - "source-map-resolve": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", - "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", - "dev": true, - "requires": { - "atob": "^2.1.2", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" - } - }, "source-map-support": { "version": "0.4.18", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", @@ -8003,12 +7203,6 @@ "source-map": "^0.5.6" } }, - "source-map-url": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz", - "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==", - "dev": true - }, "split": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/split/-/split-0.3.3.tgz", @@ -8018,15 +7212,6 @@ "through": "2" } }, - "split-string": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", - "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", - "dev": true, - "requires": { - "extend-shallow": "^3.0.0" - } - }, "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", @@ -8050,42 +7235,12 @@ "tweetnacl": "~0.14.0" } }, - "ssri": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.2.tgz", - "integrity": "sha512-cepbSq/neFK7xB6A50KHN0xHDotYzq58wWCa5LeWqnPrHG8GzfEjO/4O8kpmcGW+oaxkvhEJCWgbgNk4/ZV93Q==", - "dev": true, - "requires": { - "figgy-pudding": "^3.5.1" - } - }, "stackframe": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/stackframe/-/stackframe-0.2.2.tgz", "integrity": "sha1-R3s9BnsspRwocDmtBUGS/lSS+V4=", "dev": true }, - "static-extend": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", - "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", - "dev": true, - "requires": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, "statuses": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", @@ -8111,29 +7266,6 @@ "duplexer": "~0.1.1" } }, - "stream-each": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.3.tgz", - "integrity": "sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "stream-shift": "^1.0.0" - } - }, - "stream-http": { - "version": "2.8.3", - "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz", - "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==", - "dev": true, - "requires": { - "builtin-status-codes": "^3.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.3.6", - "to-arraybuffer": "^1.0.0", - "xtend": "^4.0.0" - } - }, "stream-shift": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz", @@ -8276,9 +7408,9 @@ } }, "tapable": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.3.tgz", - "integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", "dev": true }, "temp-fs": { @@ -8316,16 +7448,23 @@ } }, "terser": { - "version": "4.8.1", - "resolved": "https://registry.npmjs.org/terser/-/terser-4.8.1.tgz", - "integrity": "sha512-4GnLC0x667eJG0ewJTa6z/yXrbLGv80D9Ru6HIpCQmO+Q4PfEtBFi0ObSckqwL6VyQv/7ENJieXHo2ANmdQwgw==", + "version": "5.19.2", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.19.2.tgz", + "integrity": "sha512-qC5+dmecKJA4cpYxRa5aVkKehYsQKc+AHeKl0Oe62aYjBL8ZA33tTljktDHJSaxxMnbI5ZYw+o/S2DxxLu8OfA==", "dev": true, "requires": { + "@jridgewell/source-map": "^0.3.3", + "acorn": "^8.8.2", "commander": "^2.20.0", - "source-map": "~0.6.1", - "source-map-support": "~0.5.12" + "source-map-support": "~0.5.20" }, "dependencies": { + "acorn": { + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", + "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", + "dev": true + }, "commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", @@ -8351,108 +7490,28 @@ } }, "terser-webpack-plugin": { - "version": "1.4.5", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.4.5.tgz", - "integrity": "sha512-04Rfe496lN8EYruwi6oPQkG0vo8C+HT49X687FZnpPF0qMAIHONI6HEXYPKDOE8e5HjXTyKfqRd/agHtH0kOtw==", + "version": "5.3.9", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.9.tgz", + "integrity": "sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==", "dev": true, "requires": { - "cacache": "^12.0.2", - "find-cache-dir": "^2.1.0", - "is-wsl": "^1.1.0", - "schema-utils": "^1.0.0", - "serialize-javascript": "^4.0.0", - "source-map": "^0.6.1", - "terser": "^4.1.2", - "webpack-sources": "^1.4.0", - "worker-farm": "^1.7.0" + "@jridgewell/trace-mapping": "^0.3.17", + "jest-worker": "^27.4.5", + "schema-utils": "^3.1.1", + "serialize-javascript": "^6.0.1", + "terser": "^5.16.8" }, "dependencies": { - "find-cache-dir": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", - "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", - "dev": true, - "requires": { - "commondir": "^1.0.1", - "make-dir": "^2.0.0", - "pkg-dir": "^3.0.0" - } - }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "make-dir": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", - "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", - "dev": true, - "requires": { - "pify": "^4.0.1", - "semver": "^5.6.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true - }, - "pkg-dir": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", - "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", - "dev": true, - "requires": { - "find-up": "^3.0.0" - } - }, "schema-utils": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", - "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", + "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", "dev": true, "requires": { - "ajv": "^6.1.0", - "ajv-errors": "^1.0.0", - "ajv-keywords": "^3.1.0" + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" } - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true } } }, @@ -8468,16 +7527,6 @@ "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", "dev": true }, - "through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "requires": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, "time-grunt": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/time-grunt/-/time-grunt-1.4.0.tgz", @@ -8566,56 +7615,12 @@ "integrity": "sha1-F+bBH3PdTz10zaek/zI46a2b+JA=", "dev": true }, - "to-arraybuffer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", - "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=", - "dev": true - }, "to-fast-properties": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", "dev": true }, - "to-object-path": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", - "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "to-regex": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", - "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", - "dev": true, - "requires": { - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "regex-not": "^1.0.2", - "safe-regex": "^1.1.0" - } - }, "to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -8711,12 +7716,6 @@ "mime-types": "~2.1.24" } }, - "typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", - "dev": true - }, "ua-parser-js": { "version": "0.7.22", "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.22.tgz", @@ -8759,36 +7758,6 @@ } } }, - "union-value": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", - "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", - "dev": true, - "requires": { - "arr-union": "^3.1.0", - "get-value": "^2.0.6", - "is-extendable": "^0.1.1", - "set-value": "^2.0.1" - } - }, - "unique-filename": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", - "integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==", - "dev": true, - "requires": { - "unique-slug": "^2.0.0" - } - }, - "unique-slug": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.2.tgz", - "integrity": "sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w==", - "dev": true, - "requires": { - "imurmurhash": "^0.1.4" - } - }, "universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", @@ -8796,57 +7765,20 @@ "dev": true }, "unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", - "dev": true - }, - "unset-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", - "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", - "dev": true, - "requires": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" - }, - "dependencies": { - "has-value": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", - "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", - "dev": true, - "requires": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" - }, - "dependencies": { - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dev": true, - "requires": { - "isarray": "1.0.0" - } - } - } - }, - "has-values": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", - "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", - "dev": true - } - } + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", + "dev": true }, - "upath": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz", - "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==", + "update-browserslist-db": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", + "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==", "dev": true, - "optional": true + "requires": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + } }, "uri-js": { "version": "4.4.1", @@ -8863,12 +7795,6 @@ "integrity": "sha1-l0fwGDWJM8Md4PzP2C0TjmcmLjI=", "dev": true }, - "urix": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", - "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", - "dev": true - }, "url": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", @@ -8887,12 +7813,6 @@ } } }, - "use": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", - "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", - "dev": true - }, "util": { "version": "0.10.3", "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", @@ -9003,629 +7923,92 @@ } }, "watchpack": { - "version": "1.7.5", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.7.5.tgz", - "integrity": "sha512-9P3MWk6SrKjHsGkLT2KHXdQ/9SNkyoJbabxnKOoJepsvJjJG8uYTR3yTPxPQvNDI3w4Nz1xnE0TLHK4RIVe/MQ==", - "dev": true, - "requires": { - "chokidar": "^3.4.1", - "graceful-fs": "^4.1.2", - "neo-async": "^2.5.0", - "watchpack-chokidar2": "^2.0.1" - } - }, - "watchpack-chokidar2": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/watchpack-chokidar2/-/watchpack-chokidar2-2.0.1.tgz", - "integrity": "sha512-nCFfBIPKr5Sh61s4LPpy1Wtfi0HE8isJ3d2Yb5/Ppw2P2B/3eVSEBjKfN0fmHJSK14+31KwMKmcrzs2GM4P0Ww==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", + "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", "dev": true, - "optional": true, "requires": { - "chokidar": "^2.1.8" - }, - "dependencies": { - "anymatch": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", - "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", - "dev": true, - "optional": true, - "requires": { - "micromatch": "^3.1.4", - "normalize-path": "^2.1.1" - }, - "dependencies": { - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "dev": true, - "optional": true, - "requires": { - "remove-trailing-separator": "^1.0.1" - } - } - } - }, - "binary-extensions": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", - "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", - "dev": true, - "optional": true - }, - "braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", - "dev": true, - "optional": true, - "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "optional": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "chokidar": { - "version": "2.1.8", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", - "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", - "dev": true, - "optional": true, - "requires": { - "anymatch": "^2.0.0", - "async-each": "^1.0.1", - "braces": "^2.3.2", - "fsevents": "^1.2.7", - "glob-parent": "^3.1.0", - "inherits": "^2.0.3", - "is-binary-path": "^1.0.0", - "is-glob": "^4.0.0", - "normalize-path": "^3.0.0", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.2.1", - "upath": "^1.1.1" - } - }, - "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", - "dev": true, - "optional": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "optional": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "fsevents": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", - "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", - "dev": true, - "optional": true, - "requires": { - "bindings": "^1.5.0", - "nan": "^2.12.1" - } - }, - "glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", - "dev": true, - "optional": true, - "requires": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" - }, - "dependencies": { - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "dev": true, - "optional": true, - "requires": { - "is-extglob": "^2.1.0" - } - } - } - }, - "is-binary-path": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", - "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", - "dev": true, - "optional": true, - "requires": { - "binary-extensions": "^1.0.0" - } - }, - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true, - "optional": true - }, - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "optional": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "optional": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "dev": true, - "optional": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - } - }, - "readdirp": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", - "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", - "dev": true, - "optional": true, - "requires": { - "graceful-fs": "^4.1.11", - "micromatch": "^3.1.10", - "readable-stream": "^2.0.2" - } - }, - "to-regex-range": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", - "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", - "dev": true, - "optional": true, - "requires": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" - } - } + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.1.2" } }, "webpack": { - "version": "4.46.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.46.0.tgz", - "integrity": "sha512-6jJuJjg8znb/xRItk7bkT0+Q7AHCYjjFnvKIWQPkNIOyRqoCGvkOs0ipeQzrqz4l5FtN5ZI/ukEHroeX/o1/5Q==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.9.0", - "@webassemblyjs/helper-module-context": "1.9.0", - "@webassemblyjs/wasm-edit": "1.9.0", - "@webassemblyjs/wasm-parser": "1.9.0", - "acorn": "^6.4.1", - "ajv": "^6.10.2", - "ajv-keywords": "^3.4.1", + "version": "5.88.2", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.88.2.tgz", + "integrity": "sha512-JmcgNZ1iKj+aiR0OvTYtWQqJwq37Pf683dY9bVORwVbUrDhLhdn/PlO2sHsFHPkj7sHNQF3JwaAkp49V+Sq1tQ==", + "dev": true, + "requires": { + "@types/eslint-scope": "^3.7.3", + "@types/estree": "^1.0.0", + "@webassemblyjs/ast": "^1.11.5", + "@webassemblyjs/wasm-edit": "^1.11.5", + "@webassemblyjs/wasm-parser": "^1.11.5", + "acorn": "^8.7.1", + "acorn-import-assertions": "^1.9.0", + "browserslist": "^4.14.5", "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^4.5.0", - "eslint-scope": "^4.0.3", - "json-parse-better-errors": "^1.0.2", - "loader-runner": "^2.4.0", - "loader-utils": "^1.2.3", - "memory-fs": "^0.4.1", - "micromatch": "^3.1.10", - "mkdirp": "^0.5.3", - "neo-async": "^2.6.1", - "node-libs-browser": "^2.2.1", - "schema-utils": "^1.0.0", - "tapable": "^1.1.3", - "terser-webpack-plugin": "^1.4.3", - "watchpack": "^1.7.4", - "webpack-sources": "^1.4.1" + "enhanced-resolve": "^5.15.0", + "es-module-lexer": "^1.2.1", + "eslint-scope": "5.1.1", + "events": "^3.2.0", + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.2.9", + "json-parse-even-better-errors": "^2.3.1", + "loader-runner": "^4.2.0", + "mime-types": "^2.1.27", + "neo-async": "^2.6.2", + "schema-utils": "^3.2.0", + "tapable": "^2.1.1", + "terser-webpack-plugin": "^5.3.7", + "watchpack": "^2.4.0", + "webpack-sources": "^3.2.3" }, "dependencies": { "acorn": { - "version": "6.4.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.2.tgz", - "integrity": "sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==", - "dev": true - }, - "base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "dev": true - }, - "braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", - "dev": true, - "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "browserify-zlib": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", - "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", - "dev": true, - "requires": { - "pako": "~1.0.5" - } - }, - "buffer": { - "version": "4.9.2", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", - "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==", - "dev": true, - "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4", - "isarray": "^1.0.0" - } - }, - "constants-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", - "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", + "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", "dev": true }, - "crypto-browserify": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", - "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", - "dev": true, - "requires": { - "browserify-cipher": "^1.0.0", - "browserify-sign": "^4.0.0", - "create-ecdh": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.0", - "diffie-hellman": "^5.0.0", - "inherits": "^2.0.1", - "pbkdf2": "^3.0.3", - "public-encrypt": "^4.0.0", - "randombytes": "^2.0.0", - "randomfill": "^1.0.3" - } - }, - "eslint-scope": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", - "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", - "dev": true, - "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" - } - }, "events": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", "dev": true }, - "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "https-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", - "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=", - "dev": true - }, - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true - }, - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - } - }, - "node-libs-browser": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.2.1.tgz", - "integrity": "sha512-h/zcD8H9kaDZ9ALUWwlBUDo6TKF8a7qBSCSEGfjTVIYeqsioSKaAX+BN7NgiMGp6iSIXZ3PxgCu8KS3b71YK5Q==", - "dev": true, - "requires": { - "assert": "^1.1.1", - "browserify-zlib": "^0.2.0", - "buffer": "^4.3.0", - "console-browserify": "^1.1.0", - "constants-browserify": "^1.0.0", - "crypto-browserify": "^3.11.0", - "domain-browser": "^1.1.1", - "events": "^3.0.0", - "https-browserify": "^1.0.0", - "os-browserify": "^0.3.0", - "path-browserify": "0.0.1", - "process": "^0.11.10", - "punycode": "^1.2.4", - "querystring-es3": "^0.2.0", - "readable-stream": "^2.3.3", - "stream-browserify": "^2.0.1", - "stream-http": "^2.7.2", - "string_decoder": "^1.0.0", - "timers-browserify": "^2.0.4", - "tty-browserify": "0.0.0", - "url": "^0.11.0", - "util": "^0.11.0", - "vm-browserify": "^1.0.1" - } - }, - "os-browserify": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", - "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=", - "dev": true - }, - "pako": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", - "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", - "dev": true - }, - "path-browserify": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz", - "integrity": "sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==", - "dev": true - }, - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "dev": true }, "schema-utils": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", - "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", - "dev": true, - "requires": { - "ajv": "^6.1.0", - "ajv-errors": "^1.0.0", - "ajv-keywords": "^3.1.0" - } - }, - "timers-browserify": { - "version": "2.0.12", - "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.12.tgz", - "integrity": "sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ==", - "dev": true, - "requires": { - "setimmediate": "^1.0.4" - } - }, - "to-regex-range": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", - "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", - "dev": true, - "requires": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" - } - }, - "util": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/util/-/util-0.11.1.tgz", - "integrity": "sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", + "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", "dev": true, "requires": { - "inherits": "2.0.3" - }, - "dependencies": { - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true - } + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" } - }, - "vm-browserify": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz", - "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==", - "dev": true - } - } - }, - "webpack-dev-middleware": { - "version": "3.7.3", - "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-3.7.3.tgz", - "integrity": "sha512-djelc/zGiz9nZj/U7PTBi2ViorGJXEWo/3ltkPbDyxCXhhEXkW0ce99falaok4TPj+AsxLiXJR0EBOb0zh9fKQ==", - "dev": true, - "requires": { - "memory-fs": "^0.4.1", - "mime": "^2.4.4", - "mkdirp": "^0.5.1", - "range-parser": "^1.2.1", - "webpack-log": "^2.0.0" - }, - "dependencies": { - "mime": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.5.2.tgz", - "integrity": "sha512-tqkh47FzKeCPD2PUiPB6pkbMzsCasjxAfC62/Wap5qrUWcb+sFasXUC5I3gYM5iBM8v/Qpn4UK0x+j0iHyFPDg==", - "dev": true } } }, - "webpack-log": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/webpack-log/-/webpack-log-2.0.0.tgz", - "integrity": "sha512-cX8G2vR/85UYG59FgkoMamwHUIkSSlV3bBMRsbxVXVUk2j6NleCKjQ/WE9eYg9WY4w25O9w8wKP4rzNZFmUcUg==", + "webpack-merge": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-4.2.2.tgz", + "integrity": "sha512-TUE1UGoTX2Cd42j3krGYqObZbOD+xF7u28WB7tfUordytSjbWTIjK/8V0amkBfTYN4/pB/GIDlJZZ657BGG19g==", "dev": true, "requires": { - "ansi-colors": "^3.0.0", - "uuid": "^3.3.2" - }, - "dependencies": { - "uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", - "dev": true - } + "lodash": "^4.17.15" } }, "webpack-sources": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.4.3.tgz", - "integrity": "sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ==", - "dev": true, - "requires": { - "source-list-map": "^2.0.0", - "source-map": "~0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", + "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", + "dev": true }, "websocket-driver": { "version": "0.7.4", @@ -9679,15 +8062,6 @@ "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", "dev": true }, - "worker-farm": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.7.0.tgz", - "integrity": "sha512-rvw3QTZc8lAxyVrqcSGVm5yP/IJ2UcB3U0graE3LCFoZ0Yn2x4EoVSqJKdB/T5M+FLcRPjz4TDacRf3OCfNUzw==", - "dev": true, - "requires": { - "errno": "~0.1.7" - } - }, "workerpool": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", diff --git a/package.json b/package.json index 55da9850e..9c74e62e5 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,7 @@ "source-map": "^0.5.7" }, "devDependencies": { + "@babel/core": "^7.22.11", "babel-core": "^6.26.3", "babel-eslint": "^10.0.3", "babel-loader": "^8.0.4", @@ -41,17 +42,17 @@ "grunt": "^1.1.0", "grunt-bumpup": "^0.6.3", "grunt-cli": "^1.3.2", - "grunt-contrib-concat": "~0.3.0", + "grunt-contrib-concat": "^2.1.0", "grunt-contrib-connect": "^2.1.0", - "grunt-contrib-copy": "~0.5.0", + "grunt-contrib-copy": "^1.0.0", "grunt-contrib-jshint": "^2.1.0", "grunt-contrib-uglify": "^4.0.0", "grunt-contrib-watch": "^1.1.0", - "grunt-karma": "^3.0.2", + "grunt-karma": "^4.0.2", "grunt-parallel": "^0.5.1", "grunt-text-replace": "^0.4.0", "grunt-vows": "^0.4.2", - "grunt-webpack": "^3.1.3", + "grunt-webpack": "^5.0.0", "istanbul-instrumenter-loader": "^3.0.1", "jade": "~0.27.7", "jasmine-core": "^2.3.4", @@ -70,7 +71,7 @@ "karma-safari-launcher": "^0.1.1", "karma-sinon": "^1.0.4", "karma-sourcemap-loader": "^0.3.5", - "karma-webpack": "^4.0.2", + "karma-webpack": "^5.0.0", "mocha": "^10.2.0", "natives": "^1.1.6", "nock": "^11.9.1", @@ -83,7 +84,7 @@ "strict-loader": "^1.2.0", "time-grunt": "^1.0.0", "vows": "^0.8.3", - "webpack": "^4.46.0" + "webpack": "^5.88.2" }, "optionalDependencies": { "decache": "^3.0.5" From 9c062e390420a0c0a42f15e12cdf00f3b0e6f380 Mon Sep 17 00:00:00 2001 From: Matthew LaForest Date: Thu, 24 Aug 2023 17:49:24 -0400 Subject: [PATCH 64/81] chore(deps): bump karma version --- package-lock.json | 740 +++++++++++++++++++++------------------------- package.json | 2 +- 2 files changed, 339 insertions(+), 403 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1dbe894f2..f657103d1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -778,6 +778,12 @@ } } }, + "@colors/colors": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", + "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==", + "dev": true + }, "@jridgewell/gen-mapping": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", @@ -863,6 +869,27 @@ "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==", "dev": true }, + "@socket.io/component-emitter": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz", + "integrity": "sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg==", + "dev": true + }, + "@types/cookie": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.4.1.tgz", + "integrity": "sha512-XW/Aa8APYr6jSVVA1y/DEIZX0/GMKLEVekNG727R8cs56ahETkRAy/3DR7+fJyh7oUgGwNQaRfXCun0+KbWY7Q==", + "dev": true + }, + "@types/cors": { + "version": "2.8.13", + "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.13.tgz", + "integrity": "sha512-RG8AStHlUiV5ysZQKq97copd2UmVYw3/pRMLefISZ3S1hK104Cwm7iLQ3fTKx+lsUH2CE8FlLaYeEA2LSeqYUA==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, "@types/eslint": { "version": "8.44.2", "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.44.2.tgz", @@ -1099,12 +1126,6 @@ "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true }, - "after": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/after/-/after-0.8.2.tgz", - "integrity": "sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8=", - "dev": true - }, "agent-base": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.3.0.tgz", @@ -1198,12 +1219,6 @@ "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==", "dev": true }, - "arraybuffer.slice": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz", - "integrity": "sha512-wGUIVQXuehL5TCqQun8OW81jGzAWycqzFF8lFp+GOM5BXLYj3bKNsYC4daB7n6XjCqxQA/qgTJ+8ANR3acjrog==", - "dev": true - }, "asn1": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", @@ -1441,24 +1456,12 @@ "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", "dev": true }, - "backo2": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz", - "integrity": "sha1-MasayLEpNjRj41s+u2n038+6eUc=", - "dev": true - }, "balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, - "base64-arraybuffer": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.4.tgz", - "integrity": "sha1-mBjHngWbE1X5fgQooBfIOOkLqBI=", - "dev": true - }, "base64-js": { "version": "0.0.8", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-0.0.8.tgz", @@ -1507,12 +1510,6 @@ "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", "dev": true }, - "blob": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/blob/-/blob-0.0.5.tgz", - "integrity": "sha512-gaqbzQPqOoamawKg0LGVd7SzLgXS+JH61oWprSLH+P+abTczqJbhTR8CmJ2u9/bUYNmHTGJx/UEmn6doAvvuig==", - "dev": true - }, "bluebird": { "version": "3.7.2", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", @@ -1556,27 +1553,90 @@ } }, "body-parser": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", - "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", + "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", "dev": true, "requires": { - "bytes": "3.1.0", - "content-type": "~1.0.4", + "bytes": "3.1.2", + "content-type": "~1.0.5", "debug": "2.6.9", - "depd": "~1.1.2", - "http-errors": "1.7.2", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", "iconv-lite": "0.4.24", - "on-finished": "~2.3.0", - "qs": "6.7.0", - "raw-body": "2.4.0", - "type-is": "~1.6.17" + "on-finished": "2.4.1", + "qs": "6.11.0", + "raw-body": "2.5.2", + "type-is": "~1.6.18", + "unpipe": "1.0.0" }, "dependencies": { + "content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "dev": true + }, + "depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "dev": true + }, + "destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "dev": true + }, + "http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "dev": true, + "requires": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + } + }, + "on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "dev": true, + "requires": { + "ee-first": "1.1.1" + } + }, "qs": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", - "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==", + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "dev": true, + "requires": { + "side-channel": "^1.0.4" + } + }, + "setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "dev": true + }, + "statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "dev": true + }, + "toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", "dev": true } } @@ -1709,9 +1769,9 @@ "dev": true }, "bytes": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", - "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", "dev": true }, "call-bind": { @@ -1730,12 +1790,6 @@ "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true }, - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true - }, "caniuse-lite": { "version": "1.0.30001522", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001522.tgz", @@ -1788,9 +1842,9 @@ "dev": true }, "chokidar": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz", - "integrity": "sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", "dev": true, "requires": { "anymatch": "~3.1.2", @@ -1851,14 +1905,14 @@ "dev": true }, "cliui": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", - "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", "dev": true, "requires": { "string-width": "^4.2.0", "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" + "wrap-ansi": "^7.0.0" }, "dependencies": { "ansi-regex": { @@ -1932,24 +1986,6 @@ "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", "dev": true }, - "component-bind": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz", - "integrity": "sha1-AMYIq33Nk4l8AAllGx06jh5zu9E=", - "dev": true - }, - "component-emitter": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", - "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", - "dev": true - }, - "component-inherit": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/component-inherit/-/component-inherit-0.0.3.tgz", - "integrity": "sha1-ZF/ErfWLcrZJ1crmUTVhnbJv8UM=", - "dev": true - }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -2056,6 +2092,16 @@ "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", "dev": true }, + "cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "dev": true, + "requires": { + "object-assign": "^4", + "vary": "^1" + } + }, "cross-spawn": { "version": "6.0.5", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", @@ -2091,7 +2137,7 @@ "custom-event": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/custom-event/-/custom-event-1.0.1.tgz", - "integrity": "sha1-XQKkaFCt8bSjF5RqOSj8y1v9BCU=", + "integrity": "sha512-GAj5FOq0Hd+RsCGVJxZuKaIDXDf3h6GQoNEjFgbLLI/trgtavwUbSnZ5pVfg27DVCaWjIohryS0JFwIJyT2cMg==", "dev": true }, "dashdash": { @@ -2103,6 +2149,12 @@ "assert-plus": "^1.0.0" } }, + "date-format": { + "version": "4.0.14", + "resolved": "https://registry.npmjs.org/date-format/-/date-format-4.0.14.tgz", + "integrity": "sha512-39BOQLs9ZjKh0/patS9nrT8wc3ioX3/eA/zgbKNopnF2wCqJEoxywwwElATYvRsXdnOxA/OQeQoFZ3rFjVajhg==", + "dev": true + }, "date-now": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", @@ -2142,12 +2194,6 @@ "find": "^0.2.4" } }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "dev": true - }, "deep-eql": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", @@ -2208,7 +2254,7 @@ "di": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/di/-/di-0.0.1.tgz", - "integrity": "sha1-gGZJMmzqp8qjMG112YXqJ0i6kTw=", + "integrity": "sha512-uJaamHkagcZtHPqCIHZxnFrXlunQXgBOsZSUOWwFw31QJCAbyTBoHMW75YOTur5ZNx8pIeAKgf6GWIgaqqiLhA==", "dev": true }, "diff": { @@ -2229,7 +2275,7 @@ "dom-serialize": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/dom-serialize/-/dom-serialize-2.2.1.tgz", - "integrity": "sha1-ViromZ9Evl6jB29UGdzVnrQ6yVs=", + "integrity": "sha512-Yra4DbvoW7/Z6LBN560ZwXMjoNOSAN2wRsKFGc4iBeso+mpIA6qj1vfdf9HpMaKAqG6wXTy+1SYEzmNpKXOSsQ==", "dev": true, "requires": { "custom-event": "~1.0.0", @@ -2360,54 +2406,58 @@ "once": "^1.4.0" } }, - "engine.io-client": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-3.5.2.tgz", - "integrity": "sha512-QEqIp+gJ/kMHeUun7f5Vv3bteRHppHH/FMBQX/esFj/fuYfjyUKWGMo3VCvIP/V8bE9KcjHmRZrhIz2Z9oNsDA==", - "dev": true, - "requires": { - "component-emitter": "~1.3.0", - "component-inherit": "0.0.3", - "debug": "~3.1.0", - "engine.io-parser": "~2.2.0", - "has-cors": "1.1.0", - "indexof": "0.0.1", - "parseqs": "0.0.6", - "parseuri": "0.0.6", - "ws": "~7.4.2", - "xmlhttprequest-ssl": "~1.6.2", - "yeast": "0.1.2" + "engine.io": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.5.2.tgz", + "integrity": "sha512-IXsMcGpw/xRfjra46sVZVHiSWo/nJ/3g1337q9KNXtS6YRzbW5yIzTCb9DjhrBe7r3GZQR0I4+nq+4ODk5g/cA==", + "dev": true, + "requires": { + "@types/cookie": "^0.4.1", + "@types/cors": "^2.8.12", + "@types/node": ">=10.0.0", + "accepts": "~1.3.4", + "base64id": "2.0.0", + "cookie": "~0.4.1", + "cors": "~2.8.5", + "debug": "~4.3.1", + "engine.io-parser": "~5.2.1", + "ws": "~8.11.0" }, "dependencies": { + "cookie": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", + "integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==", + "dev": true + }, "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "requires": { - "ms": "2.0.0" + "ms": "2.1.2" } }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, "ws": { - "version": "7.4.6", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", - "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==", + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz", + "integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==", "dev": true } } }, "engine.io-parser": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-2.2.1.tgz", - "integrity": "sha512-x+dN/fBH8Ro8TFwJ+rkB2AmuVw9Yu2mockR/p3W8f8YtExwFgDvBDi0GWyb4ZLkpahtDGZgtr3zLovanJghPqg==", - "dev": true, - "requires": { - "after": "0.8.2", - "arraybuffer.slice": "~0.0.7", - "base64-arraybuffer": "0.1.4", - "blob": "0.0.5", - "has-binary2": "~1.0.2" - } + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.2.1.tgz", + "integrity": "sha512-9JktcM3u18nU9N2Lz3bWeBgxVgOKpw7yhRaoxQA3FUDZzzw+9WlA6p4G4u0RixNkg14fH7EfEc/RhpurtiROTQ==", + "dev": true }, "enhanced-resolve": { "version": "5.15.0", @@ -2422,7 +2472,7 @@ "ent": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/ent/-/ent-2.2.0.tgz", - "integrity": "sha1-6WQhkyWiHQX0RGai9obtbOX13R0=", + "integrity": "sha512-GHrMyVZQWvTIdDtpiEXdHZnFQKzeO09apj8Cbl4pKWy4i0Oprcq17usfDt5aO63swf0JOeMWjWQE/LzgSRuWpA==", "dev": true }, "entities": { @@ -3950,29 +4000,6 @@ "ansi-regex": "^2.0.0" } }, - "has-binary2": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-binary2/-/has-binary2-1.0.3.tgz", - "integrity": "sha512-G1LWKhDSvhGeAQ8mPVQlqNcOB2sJdwATtZKl2pDKKHfpf/rYj24lkinxf69blJbnsvtqqNU+L3SL50vzZhXOnw==", - "dev": true, - "requires": { - "isarray": "2.0.1" - }, - "dependencies": { - "isarray": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz", - "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=", - "dev": true - } - } - }, - "has-cors": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/has-cors/-/has-cors-1.1.0.tgz", - "integrity": "sha1-XkdHk/fqmEPRu5nCPu9J/xJv/zk=", - "dev": true - }, "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", @@ -4460,9 +4487,9 @@ "dev": true }, "isbinaryfile": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-4.0.8.tgz", - "integrity": "sha512-53h6XFniq77YdW+spoRrebh0mnmTxRPTlcuIArO57lmMdq4uBKFKaeTjnb92oYWrSn/LVL+LT+Hap2tFQj8V+w==", + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-4.0.10.tgz", + "integrity": "sha512-iHrqe5shvBUcFbmZq9zOQHBoeOhZJu6RQGrDpBgenUm/Am+F3JM2MgQj+rK3Z601fzrL5gLZWtAPH2OBaSVcyw==", "dev": true }, "isexe": { @@ -4753,60 +4780,55 @@ "dev": true }, "karma": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/karma/-/karma-5.2.3.tgz", - "integrity": "sha512-tHdyFADhVVPBorIKCX8A37iLHxc6RBRphkSoQ+MLKdAtFn1k97tD8WUGi1KlEtDZKL3hui0qhsY9HXUfSNDYPQ==", + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/karma/-/karma-6.4.2.tgz", + "integrity": "sha512-C6SU/53LB31BEgRg+omznBEMY4SjHU3ricV6zBcAe1EeILKkeScr+fZXtaI5WyDbkVowJxxAI6h73NcFPmXolQ==", "dev": true, "requires": { + "@colors/colors": "1.5.0", "body-parser": "^1.19.0", "braces": "^3.0.2", - "chokidar": "^3.4.2", - "colors": "^1.4.0", + "chokidar": "^3.5.1", "connect": "^3.7.0", "di": "^0.0.1", "dom-serialize": "^2.2.1", - "glob": "^7.1.6", - "graceful-fs": "^4.2.4", + "glob": "^7.1.7", + "graceful-fs": "^4.2.6", "http-proxy": "^1.18.1", - "isbinaryfile": "^4.0.6", - "lodash": "^4.17.19", - "log4js": "^6.2.1", - "mime": "^2.4.5", + "isbinaryfile": "^4.0.8", + "lodash": "^4.17.21", + "log4js": "^6.4.1", + "mime": "^2.5.2", "minimatch": "^3.0.4", + "mkdirp": "^0.5.5", "qjobs": "^1.2.0", "range-parser": "^1.2.1", "rimraf": "^3.0.2", - "socket.io": "^2.3.0", + "socket.io": "^4.4.1", "source-map": "^0.6.1", - "tmp": "0.2.1", - "ua-parser-js": "0.7.22", - "yargs": "^15.3.1" + "tmp": "^0.2.1", + "ua-parser-js": "^0.7.30", + "yargs": "^16.1.1" }, "dependencies": { - "colors": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", - "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", - "dev": true - }, "glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "dev": true, "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", - "minimatch": "^3.0.4", + "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" } }, "mime": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.5.2.tgz", - "integrity": "sha512-tqkh47FzKeCPD2PUiPB6pkbMzsCasjxAfC62/Wap5qrUWcb+sFasXUC5I3gYM5iBM8v/Qpn4UK0x+j0iHyFPDg==", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.6.0.tgz", + "integrity": "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==", "dev": true }, "rimraf": { @@ -5226,12 +5248,6 @@ "streamroller": "^3.1.5" }, "dependencies": { - "date-format": { - "version": "4.0.14", - "resolved": "https://registry.npmjs.org/date-format/-/date-format-4.0.14.tgz", - "integrity": "sha512-39BOQLs9ZjKh0/patS9nrT8wc3ioX3/eA/zgbKNopnF2wCqJEoxywwwElATYvRsXdnOxA/OQeQoFZ3rFjVajhg==", - "dev": true - }, "debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -5252,17 +5268,6 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true - }, - "streamroller": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-3.1.5.tgz", - "integrity": "sha512-KFxaM7XT+irxvdqSP1LGLgNWbYN7ay5owZ3r/8t77p+EtSUAfUgtl7be3xtqtOmGUl9K9YPO2ca8133RlTjvKw==", - "dev": true, - "requires": { - "date-format": "^4.0.14", - "debug": "^4.3.4", - "fs-extra": "^8.1.0" - } } } }, @@ -6248,18 +6253,6 @@ "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=", "dev": true }, - "parseqs": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/parseqs/-/parseqs-0.0.6.tgz", - "integrity": "sha512-jeAGzMDbfSHHA091hr0r31eYfTig+29g3GKKE/PPbEQ65X0lmMwlEoqmhzu0iztID5uJpZsFlUPDP8ThPL7M8w==", - "dev": true - }, - "parseuri": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/parseuri/-/parseuri-0.0.6.tgz", - "integrity": "sha512-AUjen8sAkGgao7UyCX6Ahv0gIK2fABKmYjvP4xmy5JaKvcbTRueIqIPHLAfq30xJddqSE033IOMUSOMCcK3Sow==", - "dev": true - }, "parseurl": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", @@ -6540,15 +6533,54 @@ "dev": true }, "raw-body": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", - "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", "dev": true, "requires": { - "bytes": "3.1.0", - "http-errors": "1.7.2", + "bytes": "3.1.2", + "http-errors": "2.0.0", "iconv-lite": "0.4.24", "unpipe": "1.0.0" + }, + "dependencies": { + "depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "dev": true + }, + "http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "dev": true, + "requires": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + } + }, + "setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "dev": true + }, + "statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "dev": true + }, + "toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "dev": true + } } }, "raw-loader": { @@ -6658,12 +6690,6 @@ "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", "dev": true }, - "require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "dev": true - }, "requirejs": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/requirejs/-/requirejs-2.3.6.tgz", @@ -6673,7 +6699,7 @@ "requires-port": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", - "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=", + "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", "dev": true }, "resolve": { @@ -6899,12 +6925,6 @@ "send": "0.17.1" } }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true - }, "setimmediate": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", @@ -7034,157 +7054,77 @@ } }, "socket.io": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-2.5.0.tgz", - "integrity": "sha512-gGunfS0od3VpwDBpGwVkzSZx6Aqo9uOcf1afJj2cKnKFAoyl16fvhpsUhmUFd4Ldbvl5JvRQed6eQw6oQp6n8w==", + "version": "4.7.2", + "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.7.2.tgz", + "integrity": "sha512-bvKVS29/I5fl2FGLNHuXlQaUH/BlzX1IN6S+NKLNZpBsPZIDH+90eQmCs2Railn4YUiww4SzUedJ6+uzwFnKLw==", "dev": true, "requires": { - "debug": "~4.1.0", - "engine.io": "~3.6.0", - "has-binary2": "~1.0.2", - "socket.io-adapter": "~1.1.0", - "socket.io-client": "2.5.0", - "socket.io-parser": "~3.4.0" + "accepts": "~1.3.4", + "base64id": "~2.0.0", + "cors": "~2.8.5", + "debug": "~4.3.2", + "engine.io": "~6.5.2", + "socket.io-adapter": "~2.5.2", + "socket.io-parser": "~4.2.4" }, "dependencies": { - "cookie": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", - "integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==", - "dev": true - }, "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "engine.io": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-3.6.1.tgz", - "integrity": "sha512-dfs8EVg/i7QjFsXxn7cCRQ+Wai1G1TlEvHhdYEi80fxn5R1vZ2K661O6v/rezj1FP234SZ14r9CmJke99iYDGg==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "requires": { - "accepts": "~1.3.4", - "base64id": "2.0.0", - "cookie": "~0.4.1", - "debug": "~4.1.0", - "engine.io-parser": "~2.2.0", - "ws": "~7.4.2" + "ms": "2.1.2" } }, - "isarray": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz", - "integrity": "sha512-c2cu3UxbI+b6kR3fy0nRnAhodsvR9dx7U5+znCOzdj6IfP3upFURTr0Xl5BlQZNKZjEtxrmVyfSdeE3O57smoQ==", - "dev": true - }, "ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, - "socket.io-client": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-2.5.0.tgz", - "integrity": "sha512-lOO9clmdgssDykiOmVQQitwBAF3I6mYcQAo7hQ7AM6Ny5X7fp8hIJ3HcQs3Rjz4SoggoxA1OgrQyY8EgTbcPYw==", - "dev": true, - "requires": { - "backo2": "1.0.2", - "component-bind": "1.0.0", - "component-emitter": "~1.3.0", - "debug": "~3.1.0", - "engine.io-client": "~3.5.0", - "has-binary2": "~1.0.2", - "indexof": "0.0.1", - "parseqs": "0.0.6", - "parseuri": "0.0.6", - "socket.io-parser": "~3.3.0", - "to-array": "0.1.4" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "socket.io-parser": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.3.3.tgz", - "integrity": "sha512-qOg87q1PMWWTeO01768Yh9ogn7chB9zkKtQnya41Y355S0UmpXgpcrFwAgjYJxu9BdKug5r5e9YtVSeWhKBUZg==", - "dev": true, - "requires": { - "component-emitter": "~1.3.0", - "debug": "~3.1.0", - "isarray": "2.0.1" - } - } - } - }, - "ws": { - "version": "7.4.6", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", - "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true } } }, "socket.io-adapter": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-1.1.2.tgz", - "integrity": "sha512-WzZRUj1kUjrTIrUKpZLEzFZ1OLj5FwLlAFQs9kuZJzJi5DKdU7FsWc36SNmA8iDOtwBQyT8FkrriRM8vXLYz8g==", - "dev": true + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.5.2.tgz", + "integrity": "sha512-87C3LO/NOMc+eMcpcxUBebGjkpMDkNBS9tf7KJqcDsmL936EChtVva71Dw2q4tQcuVC+hAUy4an2NO/sYXmwRA==", + "dev": true, + "requires": { + "ws": "~8.11.0" + }, + "dependencies": { + "ws": { + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz", + "integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==", + "dev": true + } + } }, "socket.io-parser": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.4.3.tgz", - "integrity": "sha512-1rE4dZN3kCI/E5wixd393hmbqa78vVpkKmnEJhLeWoS/C5hbFYAbcSfnWoaVH43u9ToUVtzKjguxEZq+1XZfCQ==", + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.4.tgz", + "integrity": "sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew==", "dev": true, "requires": { - "component-emitter": "1.2.1", - "debug": "~4.1.0", - "isarray": "2.0.1" + "@socket.io/component-emitter": "~3.1.0", + "debug": "~4.3.1" }, "dependencies": { - "component-emitter": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", - "integrity": "sha512-jPatnhd33viNplKjqXKRkGU345p263OIWzDL2wH3LGIGp5Kojo+uXizHmOADRvhGFFTnJqX3jBAKP6vvmSDKcA==", - "dev": true - }, "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "requires": { - "ms": "^2.1.1" + "ms": "2.1.2" } }, - "isarray": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz", - "integrity": "sha512-c2cu3UxbI+b6kR3fy0nRnAhodsvR9dx7U5+znCOzdj6IfP3upFURTr0Xl5BlQZNKZjEtxrmVyfSdeE3O57smoQ==", - "dev": true - }, "ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true } } @@ -7272,6 +7212,34 @@ "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==", "dev": true }, + "streamroller": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-3.1.5.tgz", + "integrity": "sha512-KFxaM7XT+irxvdqSP1LGLgNWbYN7ay5owZ3r/8t77p+EtSUAfUgtl7be3xtqtOmGUl9K9YPO2ca8133RlTjvKw==", + "dev": true, + "requires": { + "date-format": "^4.0.14", + "debug": "^4.3.4", + "fs-extra": "^8.1.0" + }, + "dependencies": { + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } + } + }, "strict-loader": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/strict-loader/-/strict-loader-1.2.0.tgz", @@ -7609,12 +7577,6 @@ "os-tmpdir": "~1.0.2" } }, - "to-array": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/to-array/-/to-array-0.1.4.tgz", - "integrity": "sha1-F+bBH3PdTz10zaek/zI46a2b+JA=", - "dev": true - }, "to-fast-properties": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", @@ -7717,9 +7679,9 @@ } }, "ua-parser-js": { - "version": "0.7.22", - "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.22.tgz", - "integrity": "sha512-YUxzMjJ5T71w6a8WWVcMGM6YWOTX27rCoIQgLXiWaxqXSx9D7DNjiGWn1aJIRSQ5qr0xuhra77bSIh6voR/46Q==", + "version": "0.7.35", + "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.35.tgz", + "integrity": "sha512-veRf7dawaj9xaWEu9HoTVn5Pggtc/qj+kqTOFvNiN1l0YdxwC1kvel57UCjThjGa3BHBihE8/UJAHI+uQHmd/g==", "dev": true }, "uglify-js": { @@ -7886,7 +7848,7 @@ "void-elements": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-2.0.1.tgz", - "integrity": "sha1-wGavtYK7HLQSjWDqkjkulNXp2+w=", + "integrity": "sha512-qZKX4RnBzH2ugr8Lxa7x+0V6XD9Sb/ouARtiasEQCHB1EVU4NXtmHsDDrx1dO4ne5fc3J6EW05BP1Dl0z0iung==", "dev": true }, "vows": { @@ -8050,12 +8012,6 @@ "isexe": "^2.0.0" } }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", - "dev": true - }, "word-wrap": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", @@ -8069,9 +8025,9 @@ "dev": true }, "wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, "requires": { "ansi-styles": "^4.0.0", @@ -8146,12 +8102,6 @@ "ultron": "~1.1.0" } }, - "xmlhttprequest-ssl": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.6.3.tgz", - "integrity": "sha512-3XfeQE/wNkvrIktn2Kf0869fC0BN6UpydVasGIeSm2B1Llihf7/0UfZM+eCkOw3P7bP4+qPgqhm7ZoxuJtFU0Q==", - "dev": true - }, "xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", @@ -8159,9 +8109,9 @@ "dev": true }, "y18n": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "dev": true }, "yallist": { @@ -8171,33 +8121,25 @@ "dev": true }, "yargs": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", - "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", "dev": true, "requires": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.2" + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" } }, "yargs-parser": { - "version": "18.1.3", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", - "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true }, "yargs-unparser": { "version": "2.0.0", @@ -8225,12 +8167,6 @@ } } }, - "yeast": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/yeast/-/yeast-0.1.2.tgz", - "integrity": "sha1-AI4G2AlDIMNy28L47XagymyKxBk=", - "dev": true - }, "yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", diff --git a/package.json b/package.json index 9c74e62e5..0428f1ffb 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "jade": "~0.27.7", "jasmine-core": "^2.3.4", "jquery-mockjax": "^2.5.0", - "karma": "^5.0.4", + "karma": "^6.4.2", "karma-browserstack-launcher": "^1.5.1", "karma-chai": "^0.1.0", "karma-chrome-launcher": "^2.2.0", From c94b60b2753b2deb575531db6bf1671931508e10 Mon Sep 17 00:00:00 2001 From: Matthew LaForest Date: Thu, 24 Aug 2023 18:14:27 -0400 Subject: [PATCH 65/81] chore(deps): remove old babel-core (renamed to @babel/core) --- package-lock.json | 89 ----------------------------------------------- package.json | 1 - 2 files changed, 90 deletions(-) diff --git a/package-lock.json b/package-lock.json index f657103d1..290be76c8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1295,33 +1295,6 @@ "js-tokens": "^3.0.2" } }, - "babel-core": { - "version": "6.26.3", - "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.3.tgz", - "integrity": "sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA==", - "dev": true, - "requires": { - "babel-code-frame": "^6.26.0", - "babel-generator": "^6.26.0", - "babel-helpers": "^6.24.1", - "babel-messages": "^6.23.0", - "babel-register": "^6.26.0", - "babel-runtime": "^6.26.0", - "babel-template": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "convert-source-map": "^1.5.1", - "debug": "^2.6.9", - "json5": "^0.5.1", - "lodash": "^4.17.4", - "minimatch": "^3.0.4", - "path-is-absolute": "^1.0.1", - "private": "^0.1.8", - "slash": "^1.0.0", - "source-map": "^0.5.7" - } - }, "babel-eslint": { "version": "10.1.0", "resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-10.1.0.tgz", @@ -1352,16 +1325,6 @@ "trim-right": "^1.0.1" } }, - "babel-helpers": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz", - "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" - } - }, "babel-loader": { "version": "8.2.3", "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.2.3.tgz", @@ -1383,21 +1346,6 @@ "babel-runtime": "^6.22.0" } }, - "babel-register": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz", - "integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=", - "dev": true, - "requires": { - "babel-core": "^6.26.0", - "babel-runtime": "^6.26.0", - "core-js": "^2.5.0", - "home-or-tmp": "^2.0.0", - "lodash": "^4.17.4", - "mkdirp": "^0.5.1", - "source-map-support": "^0.4.15" - } - }, "babel-runtime": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", @@ -4018,16 +3966,6 @@ "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", "dev": true }, - "home-or-tmp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", - "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=", - "dev": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.1" - } - }, "homedir-polyfill": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", @@ -4738,12 +4676,6 @@ "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" }, - "json5": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", - "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", - "dev": true - }, "jsonfile": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", @@ -6426,12 +6358,6 @@ "plur": "^1.0.0" } }, - "private": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", - "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==", - "dev": true - }, "process": { "version": "0.11.10", "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", @@ -7019,12 +6945,6 @@ } } }, - "slash": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", - "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", - "dev": true - }, "slice-ansi": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", @@ -7134,15 +7054,6 @@ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" }, - "source-map-support": { - "version": "0.4.18", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", - "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", - "dev": true, - "requires": { - "source-map": "^0.5.6" - } - }, "split": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/split/-/split-0.3.3.tgz", diff --git a/package.json b/package.json index 0428f1ffb..50a217c40 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,6 @@ }, "devDependencies": { "@babel/core": "^7.22.11", - "babel-core": "^6.26.3", "babel-eslint": "^10.0.3", "babel-loader": "^8.0.4", "bluebird": "^3.3.5", From e56f09b799c2f0011417110e938d48d78fef583b Mon Sep 17 00:00:00 2001 From: Matthew LaForest Date: Thu, 24 Aug 2023 18:21:11 -0400 Subject: [PATCH 66/81] chore(config): remove sourceMap option to terser, has been removed If I am reading this correctly it shouldn't be necessary any longer as it should be respecting the devtool setting --- webpack.config.js | 1 - 1 file changed, 1 deletion(-) diff --git a/webpack.config.js b/webpack.config.js index 89a5495b7..8674b5f70 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -8,7 +8,6 @@ var outputPath = path.resolve(__dirname, 'dist'); var defaultsPlugin = new webpack.DefinePlugin(defaults); var uglifyPlugin = new TerserPlugin({ - sourceMap: true, parallel: true }); From 1a3e342fa7c0899b55040b9cf59cb230e02a3188 Mon Sep 17 00:00:00 2001 From: Matthew LaForest Date: Mon, 28 Aug 2023 10:23:28 -0400 Subject: [PATCH 67/81] chore(tests): remove unused browserstack config --- Gruntfile.js | 36 +- browserstack.browsers.js | 153 -- browserstack.browsers.json | 4384 ------------------------------------ karma.conf.js | 20 +- 4 files changed, 4 insertions(+), 4589 deletions(-) delete mode 100644 browserstack.browsers.js delete mode 100644 browserstack.browsers.json diff --git a/Gruntfile.js b/Gruntfile.js index e16571600..d64ca5660 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1,9 +1,5 @@ /** * Build and test rollbar.js - * - * Test with browserstack: - * $> BROWSER_STACK_USERNAME=username BROWSER_STACK_ACCESS_KEY=12345asdf grunt test --browsers=bs_ie_latest - * */ @@ -15,7 +11,6 @@ var pkg = require('./package.json'); var fs = require('fs'); var webpackConfig = require('./webpack.config.js'); -var browserStackBrowsers = require('./browserstack.browsers'); function findTests(context) { @@ -33,7 +28,7 @@ function findTests(context) { return mapping; } -function buildGruntKarmaConfig(singleRun, browsers, tests, reporters) { +function buildGruntKarmaConfig(singleRun, tests, reporters) { var config = { options: { configFile: './karma.conf.js', @@ -71,10 +66,6 @@ function buildGruntKarmaConfig(singleRun, browsers, tests, reporters) { }, }; - if (browsers && browsers.length) { - config.options.browsers = browsers; - } - if (reporters && reporters.length) { config.options.reporters = reporters; } @@ -112,27 +103,6 @@ module.exports = function(grunt) { require('time-grunt')(grunt); var browserTests = findTests('browser'); - var browsers = grunt.option('browsers'); - if (browsers) { - browsers = browsers.split(','); - - var browserStackAliases = []; - var nonBrowserStackAliases = []; - browsers.forEach(function(browserName) { - if (browserName.slice(0, 3) === 'bs_') { - browserStackAliases.push(browserName); - } else { - nonBrowserStackAliases.push(browserName); - } - }); - - var expandedBrowsers = browserStackBrowsers.filter.apply(null, browserStackAliases); - var expandedBrowserNames = []; - expandedBrowsers.forEach(function(browser) { - expandedBrowserNames.push(browser._alias); - }); - browsers = nonBrowserStackAliases.concat(expandedBrowserNames); - } var singleRun = grunt.option('singleRun'); if (singleRun === undefined) { @@ -165,7 +135,7 @@ module.exports = function(grunt) { } }, - karma: buildGruntKarmaConfig(singleRun, browsers, browserTests, reporters), + karma: buildGruntKarmaConfig(singleRun, browserTests, reporters), replace: { snippets: { @@ -188,7 +158,7 @@ module.exports = function(grunt) { return captures.join('\n'); } }, - // README travis link + // README CI link { from: new RegExp('(https://github\\.com/rollbar/rollbar\\.js/workflows/Rollbar\\.js%20CI/badge\\.svg\\?branch=v)([0-9a-zA-Z.-]+)'), to: function(match, index, fullText, captures) { diff --git a/browserstack.browsers.js b/browserstack.browsers.js deleted file mode 100644 index 6d50c84ea..000000000 --- a/browserstack.browsers.js +++ /dev/null @@ -1,153 +0,0 @@ -var request = require('request'); - -var BROWSERSTACK_BROWSERS_ENDPOINT = 'https://www.browserstack.com/automate/browsers.json' - - -function annotate(browserList) { - return browserList.map(function(browser) { - browser.base = 'BrowserStack'; - browser._alias = 'bs_' + browser.browser; - browser._version = parseFloat(browser.browser_version || '0'); - browser._id = [ - browser.browser, - browser.browser_version, - browser.device, - browser.os, - browser.os_version - ].join('-').replace(/\s/g, '_'); - - return browser; - }); -} - - -function versionAliases(browserList) { - var ret = []; - browserList.forEach(function(browser) { - if (browser._version) { - var copy = simpleCopy(browser); - copy._alias = 'bs_' + browser.browser + '_' + browser._version; - ret.push(copy); - } - }); - return ret; -} - - -var browsers = []; -var sortedByBrowser = {}; -try { - loadBrowsers(require('./browserstack.browsers.json')); -} catch (e) { - console.error('Could not read ./browserstack.browsers.json. Ignoring.', e); // eslint-disable-line no-console -} - - -function simpleCopy(obj) { - return JSON.parse(JSON.stringify(obj)); -} - - -function loadBrowsers(browserListFromBrowserStack) { - browsers = annotate(browserListFromBrowserStack); - browsers = browsers.concat(versionAliases(browsers)); - - sortedByBrowser = {}; - - browsers.forEach(function(browser) { - var browserList = sortedByBrowser[browser._alias] = sortedByBrowser[browser._alias] || []; - browserList.push(browser); - }); - - // Sort all of the browsers by browser, _version - for (var browser in sortedByBrowser) { - var browserList = sortedByBrowser[browser]; - var numBrowsers = browserList.length; - browserList.sort(function(a, b) { - return a._version - b._version; - }); - - // Store a reference in the global browsers array to the oldest, previous and latest of - // each browser. - if (numBrowsers > 0) { - var browserName = browser; - var oldest = simpleCopy(browserList[0]); - var latest = simpleCopy(browserList[browserList.length - 1]); - var previous; - - oldest._alias = browserName + '_oldest'; - latest._alias = browserName + '_latest'; - - browsers.push(oldest); - browsers.push(latest); - - if (numBrowsers > 1) { - previous = simpleCopy(browserList[browserList.length - 2]); - previous._alias = browserName + '_previous'; - browsers.push(previous); - } - } - } -} - - -function download(username, accessKey, callback) { - var auth = 'Basic ' + new Buffer(username + ':' + accessKey).toString('base64'); - var req = { - url: BROWSERSTACK_BROWSERS_ENDPOINT, - headers: { - Authorization: auth - }, - json: true - }; - - request.get(req, function(err, resp, body) { - if (err || resp.statusCode != 200) { - return callback(err || new Error('Received non 200 response from BrowserStack: ' + resp.statusCode)); - } - - // Save the downloaded browsers in memory - loadBrowsers(body); - - // TODO: Fix? fs is not defined here. - // fs.writeFile('./browserstack.browsers.json', JSON.stringify(body, null, ' '), callback); - }); -} - - -/** - * Returns an array of Objects that match the requested filters. - * If no arguments are provided, an empty array is returned. - * - * E.g. - * - * filter('bs_latest') - Will return the latest browser Objects for each browser. - * filter('bs_latest', 'bs_previous') - Will return the latest and previous browser Objects for each browser. - * filter('bs_ie_latest', 'bs_oldest') - Will return the latest IE browser and all of the oldest browsers. - * filter('bs_all') - Will return the all of the browser Objects. - * - * @returns {Array} - */ -function filter() { - var ret = []; - var labels = Array.prototype.slice.call(arguments); - - labels.forEach(function(label) { - browsers.forEach(function(browser) { - if (label === 'bs_all') { - ret.push(browser); - } else if (browser._alias.match(new RegExp(label.slice(2) + '$'))) { - ret.push(browser); - } - }); - }); - - return ret; -} - - -module.exports = { - _browsers: browsers, - download: download, - filter: filter, -}; diff --git a/browserstack.browsers.json b/browserstack.browsers.json deleted file mode 100644 index 25447fbc9..000000000 --- a/browserstack.browsers.json +++ /dev/null @@ -1,4384 +0,0 @@ -[ - { - "browser": "chrome", - "device": null, - "browser_version": "22.0", - "os": "Windows", - "os_version": "8.1" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "23.0", - "os": "Windows", - "os_version": "8.1" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "24.0", - "os": "Windows", - "os_version": "8.1" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "25.0", - "os": "Windows", - "os_version": "8.1" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "26.0", - "os": "Windows", - "os_version": "8.1" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "27.0", - "os": "Windows", - "os_version": "8.1" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "28.0", - "os": "Windows", - "os_version": "8.1" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "29.0", - "os": "Windows", - "os_version": "8.1" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "30.0", - "os": "Windows", - "os_version": "8.1" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "31.0", - "os": "Windows", - "os_version": "8.1" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "32.0", - "os": "Windows", - "os_version": "8.1" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "33.0", - "os": "Windows", - "os_version": "8.1" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "34.0", - "os": "Windows", - "os_version": "8.1" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "35.0", - "os": "Windows", - "os_version": "8.1" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "36.0", - "os": "Windows", - "os_version": "8.1" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "37.0", - "os": "Windows", - "os_version": "8.1" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "38.0", - "os": "Windows", - "os_version": "8.1" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "39.0", - "os": "Windows", - "os_version": "8.1" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "40.0", - "os": "Windows", - "os_version": "8.1" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "41.0", - "os": "Windows", - "os_version": "8.1" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "42.0", - "os": "Windows", - "os_version": "8.1" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "43.0", - "os": "Windows", - "os_version": "8.1" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "44.0", - "os": "Windows", - "os_version": "8.1" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "16.0", - "os": "Windows", - "os_version": "8.1" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "17.0", - "os": "Windows", - "os_version": "8.1" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "18.0", - "os": "Windows", - "os_version": "8.1" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "19.0", - "os": "Windows", - "os_version": "8.1" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "20.0", - "os": "Windows", - "os_version": "8.1" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "21.0", - "os": "Windows", - "os_version": "8.1" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "22.0", - "os": "Windows", - "os_version": "8.1" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "23.0", - "os": "Windows", - "os_version": "8.1" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "24.0", - "os": "Windows", - "os_version": "8.1" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "25.0", - "os": "Windows", - "os_version": "8.1" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "26.0", - "os": "Windows", - "os_version": "8.1" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "27.0", - "os": "Windows", - "os_version": "8.1" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "28.0", - "os": "Windows", - "os_version": "8.1" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "29.0", - "os": "Windows", - "os_version": "8.1" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "30.0", - "os": "Windows", - "os_version": "8.1" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "31.0", - "os": "Windows", - "os_version": "8.1" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "32.0", - "os": "Windows", - "os_version": "8.1" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "33.0", - "os": "Windows", - "os_version": "8.1" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "34.0", - "os": "Windows", - "os_version": "8.1" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "35.0", - "os": "Windows", - "os_version": "8.1" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "36.0", - "os": "Windows", - "os_version": "8.1" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "37.0", - "os": "Windows", - "os_version": "8.1" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "38.0", - "os": "Windows", - "os_version": "8.1" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "39.0", - "os": "Windows", - "os_version": "8.1" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "40.0", - "os": "Windows", - "os_version": "8.1" - }, - { - "browser": "opera", - "device": null, - "browser_version": "12.15", - "os": "Windows", - "os_version": "8.1" - }, - { - "browser": "opera", - "device": null, - "browser_version": "12.16", - "os": "Windows", - "os_version": "8.1" - }, - { - "browser": "safari", - "device": null, - "browser_version": "5.1", - "os": "Windows", - "os_version": "8.1" - }, - { - "browser": "ie", - "device": null, - "browser_version": "11.0", - "os": "Windows", - "os_version": "8.1" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "16.0", - "os": "Windows", - "os_version": "8" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "17.0", - "os": "Windows", - "os_version": "8" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "18.0", - "os": "Windows", - "os_version": "8" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "19.0", - "os": "Windows", - "os_version": "8" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "20.0", - "os": "Windows", - "os_version": "8" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "21.0", - "os": "Windows", - "os_version": "8" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "22.0", - "os": "Windows", - "os_version": "8" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "23.0", - "os": "Windows", - "os_version": "8" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "24.0", - "os": "Windows", - "os_version": "8" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "25.0", - "os": "Windows", - "os_version": "8" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "26.0", - "os": "Windows", - "os_version": "8" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "27.0", - "os": "Windows", - "os_version": "8" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "28.0", - "os": "Windows", - "os_version": "8" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "29.0", - "os": "Windows", - "os_version": "8" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "30.0", - "os": "Windows", - "os_version": "8" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "31.0", - "os": "Windows", - "os_version": "8" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "32.0", - "os": "Windows", - "os_version": "8" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "33.0", - "os": "Windows", - "os_version": "8" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "34.0", - "os": "Windows", - "os_version": "8" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "35.0", - "os": "Windows", - "os_version": "8" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "36.0", - "os": "Windows", - "os_version": "8" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "37.0", - "os": "Windows", - "os_version": "8" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "38.0", - "os": "Windows", - "os_version": "8" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "39.0", - "os": "Windows", - "os_version": "8" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "40.0", - "os": "Windows", - "os_version": "8" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "22.0", - "os": "Windows", - "os_version": "8" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "23.0", - "os": "Windows", - "os_version": "8" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "24.0", - "os": "Windows", - "os_version": "8" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "25.0", - "os": "Windows", - "os_version": "8" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "26.0", - "os": "Windows", - "os_version": "8" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "27.0", - "os": "Windows", - "os_version": "8" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "28.0", - "os": "Windows", - "os_version": "8" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "29.0", - "os": "Windows", - "os_version": "8" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "30.0", - "os": "Windows", - "os_version": "8" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "31.0", - "os": "Windows", - "os_version": "8" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "32.0", - "os": "Windows", - "os_version": "8" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "33.0", - "os": "Windows", - "os_version": "8" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "34.0", - "os": "Windows", - "os_version": "8" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "35.0", - "os": "Windows", - "os_version": "8" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "36.0", - "os": "Windows", - "os_version": "8" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "37.0", - "os": "Windows", - "os_version": "8" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "38.0", - "os": "Windows", - "os_version": "8" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "39.0", - "os": "Windows", - "os_version": "8" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "40.0", - "os": "Windows", - "os_version": "8" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "41.0", - "os": "Windows", - "os_version": "8" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "42.0", - "os": "Windows", - "os_version": "8" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "43.0", - "os": "Windows", - "os_version": "8" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "44.0", - "os": "Windows", - "os_version": "8" - }, - { - "browser": "opera", - "device": null, - "browser_version": "12.15", - "os": "Windows", - "os_version": "8" - }, - { - "browser": "opera", - "device": null, - "browser_version": "12.16", - "os": "Windows", - "os_version": "8" - }, - { - "browser": "safari", - "device": null, - "browser_version": "5.1", - "os": "Windows", - "os_version": "8" - }, - { - "browser": "ie", - "device": null, - "browser_version": "10.0", - "os": "Windows", - "os_version": "8" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "14.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "15.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "16.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "17.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "18.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "19.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "20.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "21.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "22.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "23.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "24.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "25.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "26.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "27.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "28.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "29.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "30.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "31.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "32.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "33.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "34.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "35.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "36.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "37.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "38.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "39.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "40.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "41.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "42.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "43.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "44.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "3.6", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "4.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "5.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "6.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "7.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "8.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "9.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "10.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "11.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "12.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "13.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "14.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "15.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "16.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "17.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "18.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "19.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "20.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "21.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "22.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "23.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "24.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "25.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "26.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "27.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "28.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "29.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "30.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "31.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "32.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "33.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "34.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "35.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "36.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "37.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "38.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "39.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "40.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "opera", - "device": null, - "browser_version": "12.15", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "opera", - "device": null, - "browser_version": "12.16", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "safari", - "device": null, - "browser_version": "5.1", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "ie", - "device": null, - "browser_version": "8.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "ie", - "device": null, - "browser_version": "9.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "ie", - "device": null, - "browser_version": "10.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "ie", - "device": null, - "browser_version": "11.0", - "os": "Windows", - "os_version": "7" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "14.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "15.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "16.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "17.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "18.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "19.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "20.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "21.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "22.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "23.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "24.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "25.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "26.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "27.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "28.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "29.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "30.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "31.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "32.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "33.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "34.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "35.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "36.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "37.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "38.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "39.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "40.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "41.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "42.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "43.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "44.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "3.6", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "4.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "5.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "6.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "7.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "8.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "9.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "10.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "11.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "12.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "13.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "14.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "15.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "16.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "17.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "18.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "19.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "20.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "21.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "22.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "23.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "24.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "25.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "26.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "27.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "28.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "29.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "30.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "31.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "32.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "33.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "34.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "35.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "36.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "37.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "38.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "40.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "opera", - "device": null, - "browser_version": "12.15", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "opera", - "device": null, - "browser_version": "12.16", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "safari", - "device": null, - "browser_version": "5.1", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "ie", - "device": null, - "browser_version": "6.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "ie", - "device": null, - "browser_version": "7.0", - "os": "Windows", - "os_version": "XP" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "14.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "16.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "17.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "18.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "19.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "20.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "21.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "22.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "23.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "24.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "25.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "26.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "27.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "28.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "29.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "30.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "31.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "32.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "33.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "34.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "35.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "36.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "37.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "38.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "39.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "40.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "41.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "42.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "43.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "44.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "3.6", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "4.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "5.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "6.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "7.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "8.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "9.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "10.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "11.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "12.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "13.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "14.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "15.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "16.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "17.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "18.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "19.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "20.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "21.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "22.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "23.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "24.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "25.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "26.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "27.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "28.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "29.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "30.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "31.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "32.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "33.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "34.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "35.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "36.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "37.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "38.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "39.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "40.0", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "opera", - "device": null, - "browser_version": "12.15", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "safari", - "device": null, - "browser_version": "7.1", - "os": "OS X", - "os_version": "Mavericks" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "14.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "16.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "17.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "18.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "19.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "20.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "21.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "22.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "23.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "24.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "25.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "26.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "27.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "28.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "29.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "30.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "31.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "32.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "33.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "34.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "35.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "36.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "37.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "38.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "39.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "40.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "41.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "42.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "43.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "44.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "3.6", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "4.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "5.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "6.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "7.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "8.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "9.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "10.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "11.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "12.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "13.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "14.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "15.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "16.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "17.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "18.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "19.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "20.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "21.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "22.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "23.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "24.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "25.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "26.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "27.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "28.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "29.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "30.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "31.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "32.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "33.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "34.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "35.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "36.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "37.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "38.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "39.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "40.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "opera", - "device": null, - "browser_version": "12.15", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "safari", - "device": null, - "browser_version": "8.0", - "os": "OS X", - "os_version": "Yosemite" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "3.6", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "4.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "5.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "6.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "7.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "8.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "9.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "10.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "11.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "12.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "13.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "14.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "15.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "16.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "17.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "18.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "19.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "20.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "21.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "22.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "23.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "24.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "25.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "26.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "27.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "28.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "29.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "30.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "31.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "32.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "33.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "34.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "35.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "36.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "37.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "38.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "40.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "14.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "16.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "17.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "18.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "19.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "20.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "21.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "22.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "23.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "24.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "25.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "26.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "27.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "28.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "29.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "30.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "31.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "32.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "33.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "34.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "35.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "36.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "37.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "39.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "40.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "41.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "42.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "43.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "44.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "opera", - "device": null, - "browser_version": "12.15", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "safari", - "device": null, - "browser_version": "6.0", - "os": "OS X", - "os_version": "Lion" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "14.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "16.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "17.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "18.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "19.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "20.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "21.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "22.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "23.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "24.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "25.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "26.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "27.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "28.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "29.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "30.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "31.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "32.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "33.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "34.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "35.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "36.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "37.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "38.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "39.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "40.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "41.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "42.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "43.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "44.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "3.6", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "4.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "5.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "6.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "7.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "8.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "9.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "10.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "11.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "12.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "13.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "14.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "15.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "16.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "17.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "18.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "19.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "20.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "21.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "22.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "23.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "24.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "25.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "26.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "27.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "28.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "29.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "30.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "31.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "32.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "33.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "34.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "35.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "36.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "37.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "38.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "39.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "40.0", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "opera", - "device": null, - "browser_version": "12.15", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "safari", - "device": null, - "browser_version": "6.2", - "os": "OS X", - "os_version": "Mountain Lion" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "4.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "5.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "6.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "7.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "8.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "9.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "10.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "11.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "12.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "13.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "14.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "15.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "16.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "17.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "18.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "19.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "20.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "21.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "22.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "23.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "24.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "25.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "26.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "27.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "28.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "29.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "30.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "31.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "32.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "33.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "34.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "35.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "36.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "37.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "38.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "39.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "firefox", - "device": null, - "browser_version": "40.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "14.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "16.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "17.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "18.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "19.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "20.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "21.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "22.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "23.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "24.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "25.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "26.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "27.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "28.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "29.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "30.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "31.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "32.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "33.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "34.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "35.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "36.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "37.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "38.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "39.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "40.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "41.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "42.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "43.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "chrome", - "device": null, - "browser_version": "44.0", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "opera", - "device": null, - "browser_version": "12.15", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "safari", - "device": null, - "browser_version": "5.1", - "os": "OS X", - "os_version": "Snow Leopard" - }, - { - "browser": "android", - "device": "Google Nexus 4", - "browser_version": null, - "os": "android", - "os_version": "4.2" - }, - { - "browser": "android", - "device": "HTC One X", - "browser_version": null, - "os": "android", - "os_version": "4.0" - }, - { - "browser": "android", - "device": "Motorola Razr", - "browser_version": null, - "os": "android", - "os_version": "4.0" - }, - { - "browser": "android", - "device": "Sony Xperia Tipo", - "browser_version": null, - "os": "android", - "os_version": "4.0" - }, - { - "browser": "android", - "device": "Google Nexus", - "browser_version": null, - "os": "android", - "os_version": "4.0" - }, - { - "browser": "android", - "device": "Amazon Kindle Fire 2", - "browser_version": null, - "os": "android", - "os_version": "4.0" - }, - { - "browser": "android", - "device": "Amazon Kindle Fire HD 8.9", - "browser_version": null, - "os": "android", - "os_version": "4.0" - }, - { - "browser": "android", - "device": "Samsung Galaxy Note 10.1", - "browser_version": null, - "os": "android", - "os_version": "4.0" - }, - { - "browser": "android", - "device": "Samsung Galaxy S3", - "browser_version": null, - "os": "android", - "os_version": "4.1" - }, - { - "browser": "android", - "device": "Samsung Galaxy Note 2", - "browser_version": null, - "os": "android", - "os_version": "4.1" - }, - { - "browser": "android", - "device": "Motorola Razr Maxx HD", - "browser_version": null, - "os": "android", - "os_version": "4.1" - }, - { - "browser": "android", - "device": "Google Nexus 7", - "browser_version": null, - "os": "android", - "os_version": "4.1" - }, - { - "browser": "android", - "device": "Samsung Galaxy S4", - "browser_version": null, - "os": "android", - "os_version": "4.3" - }, - { - "browser": "android", - "device": "Samsung Galaxy Note 3", - "browser_version": null, - "os": "android", - "os_version": "4.3" - }, - { - "browser": "android", - "device": "Amazon Kindle Fire HDX 7", - "browser_version": null, - "os": "android", - "os_version": "4.3" - }, - { - "browser": "android", - "device": "Samsung Galaxy S5", - "browser_version": null, - "os": "android", - "os_version": "4.4" - }, - { - "browser": "android", - "device": "Samsung Galaxy S5 Mini", - "browser_version": null, - "os": "android", - "os_version": "4.4" - }, - { - "browser": "android", - "device": "HTC One M8", - "browser_version": null, - "os": "android", - "os_version": "4.4" - }, - { - "browser": "android", - "device": "Samsung Galaxy Tab 4 10.1", - "browser_version": null, - "os": "android", - "os_version": "4.4" - }, - { - "browser": "android", - "device": "Google Nexus 5", - "browser_version": null, - "os": "android", - "os_version": "5.0" - }, - { - "browser": "iphone", - "device": "iPhone 5C", - "browser_version": null, - "os": "ios", - "os_version": "7.0" - }, - { - "browser": "iphone", - "device": "iPhone 5S", - "browser_version": null, - "os": "ios", - "os_version": "7.0" - }, - { - "browser": "ipad", - "device": "iPad 4th Gen", - "browser_version": null, - "os": "ios", - "os_version": "7.0" - }, - { - "browser": "ipad", - "device": "iPad Air", - "browser_version": null, - "os": "ios", - "os_version": "7.0" - }, - { - "browser": "ipad", - "device": "iPad mini Retina", - "browser_version": null, - "os": "ios", - "os_version": "7.0" - }, - { - "browser": "iphone", - "device": "iPhone 5", - "browser_version": null, - "os": "ios", - "os_version": "6.1" - } -] \ No newline at end of file diff --git a/karma.conf.js b/karma.conf.js index a38c86b5e..74d475644 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -1,27 +1,12 @@ var path = require('path'); var webpack = require('webpack'); var defaults = require('./defaults'); -var browserStackBrowsers = require('./browserstack.browsers'); var defaultsPlugin = new webpack.DefinePlugin(defaults); -var allBrowsers = browserStackBrowsers.filter('bs_all'); -var allBrowsersByBrowser = { - // Travis needs the --no-sandbox option, - // so add as a custom launcher to be used as the default browser. - ChromeNoSandbox: { - base: 'ChromeHeadless', - flags: ['--no-sandbox'] - } -}; -allBrowsers.forEach(function(browser) { - allBrowsersByBrowser[browser._alias] = browser; -}); - - module.exports = function (config) { config.set({ - browsers: ['ChromeNoSandbox'], + browsers: ['ChromeHeadless'], // The Travis environment has these specified. // To run BrowserStack tests locally, specify the environment variables: @@ -35,9 +20,6 @@ module.exports = function (config) { captureConsole: true }, - // Used for testing on BrowserStack - customLaunchers: allBrowsersByBrowser, - // Files are specified in the grunt-karma configuration in Gruntfile.js //files: [] From a9d7ca9c2c9d4b6e16e4268973c569c6e4a5b408 Mon Sep 17 00:00:00 2001 From: Matthew LaForest Date: Mon, 28 Aug 2023 10:45:19 -0400 Subject: [PATCH 68/81] chore(deps): remove unused deps from browserstack --- package-lock.json | 521 ---------------------------------------------- package.json | 3 - 2 files changed, 524 deletions(-) diff --git a/package-lock.json b/package-lock.json index 290be76c8..44b3fa74b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1126,15 +1126,6 @@ "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true }, - "agent-base": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.3.0.tgz", - "integrity": "sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg==", - "dev": true, - "requires": { - "es6-promisify": "^5.0.0" - } - }, "ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", @@ -1219,15 +1210,6 @@ "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==", "dev": true }, - "asn1": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", - "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", - "dev": true, - "requires": { - "safer-buffer": "~2.1.0" - } - }, "assert": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz", @@ -1237,12 +1219,6 @@ "util": "0.10.3" } }, - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true - }, "assertion-error": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", @@ -1266,24 +1242,6 @@ "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==", "dev": true }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", - "dev": true - }, - "aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", - "dev": true - }, - "aws4": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", - "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", - "dev": true - }, "babel-code-frame": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", @@ -1437,15 +1395,6 @@ "integrity": "sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY=", "dev": true }, - "bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", - "dev": true, - "requires": { - "tweetnacl": "^0.14.3" - } - }, "big.js": { "version": "5.2.2", "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", @@ -1635,70 +1584,6 @@ "update-browserslist-db": "^1.0.11" } }, - "browserstack": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/browserstack/-/browserstack-1.5.3.tgz", - "integrity": "sha512-AO+mECXsW4QcqC9bxwM29O7qWa7bJT94uBFzeb5brylIQwawuEziwq20dPYbins95GlWzOawgyDNdjYAo32EKg==", - "dev": true, - "requires": { - "https-proxy-agent": "^2.2.1" - } - }, - "browserstack-api": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/browserstack-api/-/browserstack-api-0.0.5.tgz", - "integrity": "sha1-8pxCLOJygMVUyOtSoH/fTWTQ6Tw=", - "dev": true, - "requires": { - "q": "^1.0.1", - "request": "^2.47.0" - } - }, - "browserstack-local": { - "version": "1.4.8", - "resolved": "https://registry.npmjs.org/browserstack-local/-/browserstack-local-1.4.8.tgz", - "integrity": "sha512-s+mc3gTOJwELdLWi4qFVKtGwMbb5JWsR+JxKlMaJkRJxoZ0gg3WREgPxAN0bm6iU5+S4Bi0sz0oxBRZT8BiNsQ==", - "dev": true, - "requires": { - "https-proxy-agent": "^4.0.0", - "is-running": "^2.1.0", - "ps-tree": "=1.2.0", - "temp-fs": "^0.9.9" - }, - "dependencies": { - "agent-base": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-5.1.1.tgz", - "integrity": "sha512-TMeqbNl2fMW0nMjTEPOwe3J/PRFP4vqeoNuQMG0HlMrtm5QxKqdvAkZ1pRBQ/ulIyDD5Yq0nJ7YbdD8ey0TO3g==", - "dev": true - }, - "debug": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", - "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, - "https-proxy-agent": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-4.0.0.tgz", - "integrity": "sha512-zoDhWrkR3of1l9QAL8/scJZyLu8j/gBkcwcaQOZh7Gyh/+uJQzGVETdgT30akuwkpL8HTRfssqI3BZuV18teDg==", - "dev": true, - "requires": { - "agent-base": "5", - "debug": "4" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - } - } - }, "buffer": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/buffer/-/buffer-3.6.2.tgz", @@ -1744,12 +1629,6 @@ "integrity": "sha512-TKiyTVZxJGhsTszLuzb+6vUZSjVOAhClszBr2Ta2k9IwtNBT/4dzmL6aywt0HCgEZlmwJzXJd8yNiob6HgwTRg==", "dev": true }, - "caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", - "dev": true - }, "chai": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.4.tgz", @@ -1913,15 +1792,6 @@ "integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=", "dev": true }, - "combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dev": true, - "requires": { - "delayed-stream": "~1.0.0" - } - }, "commander": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/commander/-/commander-0.6.1.tgz", @@ -2088,15 +1958,6 @@ "integrity": "sha512-GAj5FOq0Hd+RsCGVJxZuKaIDXDf3h6GQoNEjFgbLLI/trgtavwUbSnZ5pVfg27DVCaWjIohryS0JFwIJyT2cMg==", "dev": true }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0" - } - }, "date-format": { "version": "4.0.14", "resolved": "https://registry.npmjs.org/date-format/-/date-format-4.0.14.tgz", @@ -2166,12 +2027,6 @@ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", - "dev": true - }, "depd": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", @@ -2305,16 +2160,6 @@ "stream-shift": "^1.0.0" } }, - "ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", - "dev": true, - "requires": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, "ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", @@ -2459,21 +2304,6 @@ "integrity": "sha512-vZK7T0N2CBmBOixhmjdqx2gWVbFZ4DXZ/NyRMZVlJXPa7CyFS+/a4QQsDGDQy9ZfEzxFuNEsMLeQJnKP2p5/JA==", "dev": true }, - "es6-promise": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", - "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==", - "dev": true - }, - "es6-promisify": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", - "integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=", - "dev": true, - "requires": { - "es6-promise": "^4.0.3" - } - }, "escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -2714,21 +2544,6 @@ "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", "dev": true }, - "event-stream": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz", - "integrity": "sha1-SrTJoPWlTbkzi0w02Gv86PSzVXE=", - "dev": true, - "requires": { - "duplexer": "~0.1.1", - "from": "~0", - "map-stream": "~0.1.0", - "pause-stream": "0.0.11", - "split": "0.3", - "stream-combiner": "~0.0.4", - "through": "~2.3.1" - } - }, "eventemitter2": { "version": "0.4.14", "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.14.tgz", @@ -3016,12 +2831,6 @@ "tmp": "^0.0.33" } }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", - "dev": true - }, "eyes": { "version": "0.1.8", "resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz", @@ -3205,23 +3014,6 @@ "for-in": "^1.0.1" } }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", - "dev": true - }, - "form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "dev": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - } - }, "forwarded": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", @@ -3234,12 +3026,6 @@ "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", "dev": true }, - "from": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz", - "integrity": "sha1-g8YK/Fi5xWmXAH7Rp2izqzA6RP4=", - "dev": true - }, "fs-access": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/fs-access/-/fs-access-1.0.1.tgz", @@ -3329,15 +3115,6 @@ "integrity": "sha512-2zblDBaFcb3rB4rF77XVnuINOE2h2k/OnqXAiy0IrTxUfV1iFp3la33oAQVY9pCpWU268WFYVt2t71hlMuLsOg==", "dev": true }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0" - } - }, "glob": { "version": "5.0.15", "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", @@ -3914,22 +3691,6 @@ "duplexer": "^0.1.1" } }, - "har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", - "dev": true - }, - "har-validator": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", - "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", - "dev": true, - "requires": { - "ajv": "^6.12.3", - "har-schema": "^2.0.0" - } - }, "has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -4068,50 +3829,12 @@ "requires-port": "^1.0.0" } }, - "http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - } - }, "https-browserify": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-0.0.1.tgz", "integrity": "sha1-P5E2XKvmC3ftDruiS0VOPgnZWoI=", "dev": true }, - "https-proxy-agent": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz", - "integrity": "sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg==", - "dev": true, - "requires": { - "agent-base": "^4.3.0", - "debug": "^3.1.0" - }, - "dependencies": { - "debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - } - } - }, "iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", @@ -4379,18 +4102,6 @@ "is-unc-path": "^1.0.0" } }, - "is-running": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-running/-/is-running-2.1.0.tgz", - "integrity": "sha1-MKc/9cw4VOT8JUkICen1q/jeCeA=", - "dev": true - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "dev": true - }, "is-unc-path": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", @@ -4442,12 +4153,6 @@ "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", "dev": true }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", - "dev": true - }, "istanbul-instrumenter-loader": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/istanbul-instrumenter-loader/-/istanbul-instrumenter-loader-3.0.1.tgz", @@ -4608,12 +4313,6 @@ "esprima": "^4.0.0" } }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "dev": true - }, "jsesc": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", @@ -4685,26 +4384,6 @@ "graceful-fs": "^4.1.6" } }, - "jsprim": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", - "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", - "dev": true, - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.4.0", - "verror": "1.10.0" - }, - "dependencies": { - "json-schema": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", - "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", - "dev": true - } - } - }, "just-extend": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.2.1.tgz", @@ -4789,17 +4468,6 @@ } } }, - "karma-browserstack-launcher": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/karma-browserstack-launcher/-/karma-browserstack-launcher-1.6.0.tgz", - "integrity": "sha512-Y/UWPdHZkHIVH2To4GWHCTzmrsB6H7PBWy6pw+TWz5sr4HW2mcE+Uj6qWgoVNxvQU1Pfn5LQQzI6EQ65p8QbiQ==", - "dev": true, - "requires": { - "browserstack": "~1.5.1", - "browserstack-local": "^1.3.7", - "q": "~1.5.0" - } - }, "karma-chai": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/karma-chai/-/karma-chai-0.1.0.tgz", @@ -5256,12 +4924,6 @@ "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", "dev": true }, - "map-stream": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz", - "integrity": "sha1-5WqpTEyAVaFkBKBnS3jyFffI4ZQ=", - "dev": true - }, "maxmin": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/maxmin/-/maxmin-2.1.0.tgz", @@ -5984,12 +5646,6 @@ "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", "dev": true }, - "oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", - "dev": true - }, "object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", @@ -6248,27 +5904,12 @@ "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", "dev": true }, - "pause-stream": { - "version": "0.0.11", - "resolved": "https://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz", - "integrity": "sha1-/lo0sMvOErWqaitAPuLnO2AvFEU=", - "dev": true, - "requires": { - "through": "~2.3" - } - }, "pbkdf2-compat": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/pbkdf2-compat/-/pbkdf2-compat-2.0.1.tgz", "integrity": "sha1-tuDI+plJTZTgURV1gCpZpcFC8og=", "dev": true }, - "performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", - "dev": true - }, "picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", @@ -6392,33 +6033,12 @@ "ipaddr.js": "1.9.1" } }, - "ps-tree": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/ps-tree/-/ps-tree-1.2.0.tgz", - "integrity": "sha512-0VnamPPYHl4uaU/nSFeZZpR21QAWRz+sRv4iW9+v/GS/J5U5iZB5BNN6J0RMoOvdx2gWM2+ZFMIm58q24e4UYA==", - "dev": true, - "requires": { - "event-stream": "=3.3.4" - } - }, - "psl": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", - "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", - "dev": true - }, "punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true }, - "q": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", - "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=", - "dev": true - }, "qjobs": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/qjobs/-/qjobs-1.2.0.tgz", @@ -6569,42 +6189,6 @@ "is-finite": "^1.0.0" } }, - "request": { - "version": "2.88.2", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", - "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", - "dev": true, - "requires": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - }, - "dependencies": { - "uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", - "dev": true - } - } - }, "request-ip": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/request-ip/-/request-ip-3.3.0.tgz", @@ -7054,38 +6638,12 @@ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" }, - "split": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/split/-/split-0.3.3.tgz", - "integrity": "sha1-zQ7qXmOiEd//frDwkcQTPi0N0o8=", - "dev": true, - "requires": { - "through": "2" - } - }, "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", "dev": true }, - "sshpk": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", - "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", - "dev": true, - "requires": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - } - }, "stackframe": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/stackframe/-/stackframe-0.2.2.tgz", @@ -7108,15 +6666,6 @@ "readable-stream": "^2.0.2" } }, - "stream-combiner": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz", - "integrity": "sha1-TV5DPBhSYd3mI8o/RMWGvPXErRQ=", - "dev": true, - "requires": { - "duplexer": "~0.1.1" - } - }, "stream-shift": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz", @@ -7292,40 +6841,6 @@ "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", "dev": true }, - "temp-fs": { - "version": "0.9.9", - "resolved": "https://registry.npmjs.org/temp-fs/-/temp-fs-0.9.9.tgz", - "integrity": "sha1-gHFzBDeHByDpQxUy/igUNk+IA9c=", - "dev": true, - "requires": { - "rimraf": "~2.5.2" - }, - "dependencies": { - "glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "rimraf": { - "version": "2.5.4", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.5.4.tgz", - "integrity": "sha1-loAAk8vxoMhr2VtGJUZ1NcKd+gQ=", - "dev": true, - "requires": { - "glob": "^7.0.5" - } - } - } - }, "terser": { "version": "5.19.2", "resolved": "https://registry.npmjs.org/terser/-/terser-5.19.2.tgz", @@ -7509,16 +7024,6 @@ "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==", "dev": true }, - "tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", - "dev": true, - "requires": { - "psl": "^1.1.28", - "punycode": "^2.1.1" - } - }, "traverse-chain": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/traverse-chain/-/traverse-chain-0.1.0.tgz", @@ -7543,21 +7048,6 @@ "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=", "dev": true }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "dev": true, - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", - "dev": true - }, "type-check": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", @@ -7736,17 +7226,6 @@ "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", "dev": true }, - "verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - } - }, "vm-browserify": { "version": "0.0.4", "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", diff --git a/package.json b/package.json index 50a217c40..1494b1e9c 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,6 @@ "babel-eslint": "^10.0.3", "babel-loader": "^8.0.4", "bluebird": "^3.3.5", - "browserstack-api": "0.0.5", "chai": "^4.2.0", "chalk": "^1.1.1", "eslint": "^6.8.0", @@ -57,7 +56,6 @@ "jasmine-core": "^2.3.4", "jquery-mockjax": "^2.5.0", "karma": "^6.4.2", - "karma-browserstack-launcher": "^1.5.1", "karma-chai": "^0.1.0", "karma-chrome-launcher": "^2.2.0", "karma-expect": "^1.1.0", @@ -75,7 +73,6 @@ "natives": "^1.1.6", "nock": "^11.9.1", "node-libs-browser": "^0.5.2", - "request": "^2.88.0", "requirejs": "^2.1.20", "script-loader": "0.6.1", "sinon": "^8.1.1", From 7561d2ead6ab691db82bcd113204129128bcf5ec Mon Sep 17 00:00:00 2001 From: Matthew LaForest Date: Mon, 28 Aug 2023 11:05:32 -0400 Subject: [PATCH 69/81] chore(deps): bump grunt-contrib-jshint, remove vulnerability --- package-lock.json | 105 ++++++++++++++++++++++++++-------------------- package.json | 2 +- 2 files changed, 60 insertions(+), 47 deletions(-) diff --git a/package-lock.json b/package-lock.json index 44b3fa74b..a5667fa93 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1693,7 +1693,7 @@ "cli": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/cli/-/cli-1.0.1.tgz", - "integrity": "sha1-IoF1NPJL+klQw01TLUjsvGIbjBQ=", + "integrity": "sha512-41U72MB56TfUMGndAKK8vJ78eooOD4Z5NOL4xEfjc0c23s+6EYKXlXsmACBVclLP1yOfWCgEganVzddVrSNoTg==", "dev": true, "requires": { "exit": "0.1.2", @@ -1701,15 +1701,15 @@ }, "dependencies": { "glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "dev": true, "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", - "minimatch": "^3.0.4", + "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" } @@ -2098,9 +2098,9 @@ }, "dependencies": { "domelementtype": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz", - "integrity": "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", "dev": true }, "entities": { @@ -2126,7 +2126,7 @@ "domhandler": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.3.0.tgz", - "integrity": "sha1-LeWaCCLVAn+r/28DLCsloqir5zg=", + "integrity": "sha512-q9bUwjfp7Eif8jWxxxPSykdRZAb6GkguBGSgvvCrhI9wB71W2K/Kvv4E61CF/mcCfnVJDeDWx/Vb/uAqbDj6UQ==", "dev": true, "requires": { "domelementtype": "1" @@ -2135,7 +2135,7 @@ "domutils": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", - "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", + "integrity": "sha512-gSu5Oi/I+3wDENBsOWBiRK1eoGxcywYSqg3rR960/+EfY0CF4EX1VPkgHOZ3WiS/Jg2DtliF6BhWcHlfpYUcGw==", "dev": true, "requires": { "dom-serializer": "0", @@ -2271,7 +2271,7 @@ "entities": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/entities/-/entities-1.0.0.tgz", - "integrity": "sha1-sph6o4ITR/zeZCsk/fyeT7cSvyY=", + "integrity": "sha512-LbLqfXgJMmy81t+7c14mnulFHJ170cM6E+0vMXR9k/ZiZwgX8i5pNgjTCX3SO4VeUsFLV+8InixoretwU+MjBQ==", "dev": true }, "error": { @@ -3421,43 +3421,63 @@ } }, "grunt-contrib-jshint": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/grunt-contrib-jshint/-/grunt-contrib-jshint-2.1.0.tgz", - "integrity": "sha512-65S2/C/6RfjY/umTxfwXXn+wVvaYmykHkHSsW6Q6rhkbv3oudTEgqnFFZvWzWCoHUb+3GMZLbP3oSrNyvshmIQ==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/grunt-contrib-jshint/-/grunt-contrib-jshint-3.2.0.tgz", + "integrity": "sha512-pcXWCSZWfoMSvcV4BwH21TUtLtcX0Ms8IGuOPIcLeXK3fud9KclY7iqMKY94jFx8TxZzh028YYtpR+io8DiEaQ==", "dev": true, "requires": { - "chalk": "^2.4.2", + "chalk": "~4.1.2", "hooker": "^0.2.3", - "jshint": "~2.10.2" + "jshint": "~2.13.4" }, "dependencies": { "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { - "color-convert": "^1.9.0" + "color-convert": "^2.0.1" } }, "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" } }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { - "has-flag": "^3.0.0" + "has-flag": "^4.0.0" } } } @@ -3745,7 +3765,7 @@ "htmlparser2": { "version": "3.8.3", "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.8.3.tgz", - "integrity": "sha1-mWwosZFRaovoZQGn15dX5ccMEGg=", + "integrity": "sha512-hBxEg3CYXe+rPIua8ETe7tmG3XDn9B0edOE/e9wH2nLczxzgdu0m0aNHY+5wFZiviLWLdANPJTssa92dMcXQ5Q==", "dev": true, "requires": { "domelementtype": "1", @@ -3758,13 +3778,13 @@ "isarray": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", "dev": true }, "readable-stream": { "version": "1.1.14", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "integrity": "sha512-+MeVjFf4L44XUkhM1eYbD8fyEsxcV81pqMSR5gblfcLCHfZvbrqy4/qYHE+/R5HoBUT11WV5O08Cr1n3YXkWVQ==", "dev": true, "requires": { "core-util-is": "~1.0.0", @@ -3776,7 +3796,7 @@ "string_decoder": { "version": "0.10.31", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==", "dev": true } } @@ -4320,18 +4340,17 @@ "dev": true }, "jshint": { - "version": "2.10.3", - "resolved": "https://registry.npmjs.org/jshint/-/jshint-2.10.3.tgz", - "integrity": "sha512-d8AoXcNNYzmm7cdmulQ3dQApbrPYArtVBO6n4xOICe4QsXGNHCAKDcFORzqP52LhK61KX0VhY39yYzCsNq+bxQ==", + "version": "2.13.6", + "resolved": "https://registry.npmjs.org/jshint/-/jshint-2.13.6.tgz", + "integrity": "sha512-IVdB4G0NTTeQZrBoM8C5JFVLjV2KtZ9APgybDA1MK73xb09qFs0jCXyQLnCOp1cSZZZbvhq/6mfXHUTaDkffuQ==", "dev": true, "requires": { "cli": "~1.0.0", "console-browserify": "1.1.x", "exit": "0.1.x", "htmlparser2": "3.8.x", - "lodash": "~4.17.11", + "lodash": "~4.17.21", "minimatch": "~3.0.2", - "shelljs": "0.3.x", "strip-json-comments": "1.0.x" }, "dependencies": { @@ -4347,7 +4366,7 @@ "strip-json-comments": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz", - "integrity": "sha1-HhX7ysl9Pumb8tc7TGVrCCu6+5E=", + "integrity": "sha512-AOPG8EBc5wAikaG1/7uFCNFJwnKOuQwFTpYBdTW6OvWHeZBQBrAA/amefHGrEiOnCPcLFZK6FUPtWVKpQVIRgg==", "dev": true } } @@ -6468,12 +6487,6 @@ "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", "dev": true }, - "shelljs": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.3.0.tgz", - "integrity": "sha1-NZbmMHp4FUT1kfN9phg2DzHbV7E=", - "dev": true - }, "side-channel": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", diff --git a/package.json b/package.json index 1494b1e9c..9d0a8f759 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "grunt-contrib-concat": "^2.1.0", "grunt-contrib-connect": "^2.1.0", "grunt-contrib-copy": "^1.0.0", - "grunt-contrib-jshint": "^2.1.0", + "grunt-contrib-jshint": "^3.2.0", "grunt-contrib-uglify": "^4.0.0", "grunt-contrib-watch": "^1.1.0", "grunt-karma": "^4.0.2", From ca540c98ce01c4990ef49fcb07c3b16ea37f3b1b Mon Sep 17 00:00:00 2001 From: John Plaisted Date: Wed, 13 Sep 2023 09:36:34 -0700 Subject: [PATCH 70/81] fix: remove is_js dependency (#1121) --- package-lock.json | 77 ++++++++++++++++++++++++++--------------------- package.json | 8 ++++- 2 files changed, 49 insertions(+), 36 deletions(-) diff --git a/package-lock.json b/package-lock.json index d8e76bcba..ede6e5958 100644 --- a/package-lock.json +++ b/package-lock.json @@ -428,12 +428,6 @@ "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", "dev": true }, - "Base64": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/Base64/-/Base64-0.2.1.tgz", - "integrity": "sha1-ujpCMHCOGGcFBl5mur3Uw1z2ACg=", - "dev": true - }, "abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", @@ -460,7 +454,8 @@ "version": "5.3.2", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true + "dev": true, + "requires": {} }, "after": { "version": "0.8.2", @@ -493,13 +488,15 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-1.0.1.tgz", "integrity": "sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==", - "dev": true + "dev": true, + "requires": {} }, "ajv-keywords": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true + "dev": true, + "requires": {} }, "ansi-colors": { "version": "3.2.4", @@ -952,6 +949,12 @@ } } }, + "Base64": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/Base64/-/Base64-0.2.1.tgz", + "integrity": "sha1-ujpCMHCOGGcFBl5mur3Uw1z2ACg=", + "dev": true + }, "base64-arraybuffer": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.4.tgz", @@ -2349,7 +2352,8 @@ "version": "7.4.6", "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==", - "dev": true + "dev": true, + "requires": {} } } }, @@ -2385,7 +2389,8 @@ "version": "7.4.6", "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==", - "dev": true + "dev": true, + "requires": {} } } }, @@ -3595,7 +3600,8 @@ "version": "0.3.0", "resolved": "https://registry.npmjs.org/grunt-contrib-concat/-/grunt-contrib-concat-0.3.0.tgz", "integrity": "sha1-SPoNQzbSm2U62CJaa9b4VrRIPjI=", - "dev": true + "dev": true, + "requires": {} }, "grunt-contrib-connect": { "version": "2.1.0", @@ -3629,7 +3635,8 @@ "version": "0.5.0", "resolved": "https://registry.npmjs.org/grunt-contrib-copy/-/grunt-contrib-copy-0.5.0.tgz", "integrity": "sha1-QQB1rEWlhWuhkbHMclclRQ1KAhU=", - "dev": true + "dev": true, + "requires": {} }, "grunt-contrib-jshint": { "version": "2.1.0", @@ -4749,11 +4756,6 @@ "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=", "dev": true }, - "is_js": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/is_js/-/is_js-0.9.0.tgz", - "integrity": "sha1-CrlFQFArp6+iTIVqqYVWFmnpxS0=" - }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", @@ -5112,7 +5114,8 @@ "version": "0.1.0", "resolved": "https://registry.npmjs.org/karma-chai/-/karma-chai-0.1.0.tgz", "integrity": "sha1-vuWtQEAFF4Ea40u5RfdikJEIt5o=", - "dev": true + "dev": true, + "requires": {} }, "karma-chrome-launcher": { "version": "2.2.0", @@ -5143,13 +5146,15 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/karma-html2js-preprocessor/-/karma-html2js-preprocessor-1.1.0.tgz", "integrity": "sha1-/Ant8Eu+K7bu6boZaPgmtziAIL0=", - "dev": true + "dev": true, + "requires": {} }, "karma-jquery": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/karma-jquery/-/karma-jquery-0.1.0.tgz", "integrity": "sha1-fcRzfY2kKNfTxkVcQgER3MAhf7Y=", - "dev": true + "dev": true, + "requires": {} }, "karma-mocha": { "version": "2.0.1", @@ -5221,19 +5226,22 @@ "version": "0.2.6", "resolved": "https://registry.npmjs.org/karma-requirejs/-/karma-requirejs-0.2.6.tgz", "integrity": "sha1-GncMZPkBMgo4nGW0lEdGMmNy3vg=", - "dev": true + "dev": true, + "requires": {} }, "karma-safari-launcher": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/karma-safari-launcher/-/karma-safari-launcher-0.1.1.tgz", "integrity": "sha1-pjgKzKtgpYP91iT0G5o/EP30EAg=", - "dev": true + "dev": true, + "requires": {} }, "karma-sinon": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/karma-sinon/-/karma-sinon-1.0.5.tgz", "integrity": "sha1-TjRD8oMP3s/2JNN0cWPxIX2qKpo=", - "dev": true + "dev": true, + "requires": {} }, "karma-sourcemap-loader": { "version": "0.3.8", @@ -7259,8 +7267,7 @@ "request-ip": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/request-ip/-/request-ip-3.3.0.tgz", - "integrity": "sha512-cA6Xh6e0fDBBBwH77SLJaJPBmD3nWVAcF9/XAcsrIHdjhFzFiB5aNQFytdjCGPezU3ROwrR11IddKAM08vohxA==", - "dev": true + "integrity": "sha512-cA6Xh6e0fDBBBwH77SLJaJPBmD3nWVAcF9/XAcsrIHdjhFzFiB5aNQFytdjCGPezU3ROwrR11IddKAM08vohxA==" }, "require-directory": { "version": "2.1.1", @@ -8165,6 +8172,15 @@ } } }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, "string-template": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/string-template/-/string-template-0.2.1.tgz", @@ -8219,15 +8235,6 @@ "define-properties": "^1.1.3" } }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, "strip-ansi": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", diff --git a/package.json b/package.json index f141b8d75..0e955512a 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,13 @@ "url": "http://github.com/rollbar/rollbar.js" }, "description": "Effortlessly track and debug errors in your JavaScript applications with Rollbar. This package includes advanced error tracking features and an intuitive interface to help you identify and fix issues more quickly.", - "keywords": ["error", "tracking", "logging", "debugging", "javascript"], + "keywords": [ + "error", + "tracking", + "logging", + "debugging", + "javascript" + ], "license": "MIT", "main": "src/server/rollbar.js", "browser": "dist/rollbar.umd.min.js", From f4cbd015c333d733ecc5d3c7b1374ec848942b7f Mon Sep 17 00:00:00 2001 From: Walt Jones Date: Thu, 15 Feb 2024 11:41:05 -0500 Subject: [PATCH 71/81] Release 2.26.3 (#1130) --- dist/rollbar.js | 15 +++++++++++---- dist/rollbar.js.map | 2 +- dist/rollbar.min.js | 2 +- dist/rollbar.named-amd.js | 15 +++++++++++---- dist/rollbar.named-amd.js.map | 2 +- dist/rollbar.named-amd.min.js | 3 +-- dist/rollbar.noconflict.umd.js | 15 +++++++++++---- dist/rollbar.noconflict.umd.js.map | 2 +- dist/rollbar.noconflict.umd.min.js | 3 +-- dist/rollbar.snippet.js | 2 +- dist/rollbar.umd.js | 15 +++++++++++---- dist/rollbar.umd.js.map | 2 +- dist/rollbar.umd.min.js | 3 +-- examples/browser_extension_v2/background.js | 2 +- examples/itemsPerMinute.html | 2 +- examples/no-conflict/test.html | 2 +- examples/snippet.html | 2 +- examples/test.html | 2 +- .../test-with-non-default-options.html | 2 +- examples/universal-browser/test.html | 2 +- package-lock.json | 2 +- package.json | 2 +- src/defaults.js | 2 +- 23 files changed, 63 insertions(+), 38 deletions(-) diff --git a/dist/rollbar.js b/dist/rollbar.js index 8725cabaa..e02bdbe77 100644 --- a/dist/rollbar.js +++ b/dist/rollbar.js @@ -4688,7 +4688,7 @@ module.exports = { module.exports = { - version: '2.26.2', + version: '2.26.3', endpoint: 'api.rollbar.com/api/1/item/', logLevel: 'debug', reportLevel: 'debug', @@ -5140,7 +5140,9 @@ Instrumenter.prototype.instrumentNetwork = function() { var xhrp = this._window.XMLHttpRequest.prototype; replace(xhrp, 'open', function(orig) { return function(method, url) { - if (_.isType(url, 'string')) { + var isUrlObject = _isUrlObject(url) + if (_.isType(url, 'string') || isUrlObject) { + url = isUrlObject ? url.toString() : url; if (this.__rollbar_xhr) { this.__rollbar_xhr.method = method; this.__rollbar_xhr.url = url; @@ -5303,8 +5305,9 @@ Instrumenter.prototype.instrumentNetwork = function() { var input = args[0]; var method = 'GET'; var url; - if (_.isType(input, 'string')) { - url = input; + var isUrlObject = _isUrlObject(input) + if (_.isType(input, 'string') || isUrlObject) { + url = isUrlObject ? input.toString() : input; } else if (input) { url = input.url; if (input.method) { @@ -5731,6 +5734,10 @@ Instrumenter.prototype.removeListeners = function(section) { } }; +function _isUrlObject(input) { + return typeof URL !== 'undefined' && input instanceof URL +} + module.exports = Instrumenter; diff --git a/dist/rollbar.js.map b/dist/rollbar.js.map index 14568ed40..82cb57774 100644 --- a/dist/rollbar.js.map +++ b/dist/rollbar.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/utility.js","webpack:///./src/browser/logger.js","webpack:///./src/browser/url.js","webpack:///./src/errorParser.js","webpack:///./src/scrub.js","webpack:///./src/utility/traverse.js","webpack:///./src/browser/bundles/rollbar.js","webpack:///./src/browser/rollbar.js","webpack:///./src/browser/core.js","webpack:///./src/rollbar.js","webpack:///./src/rateLimiter.js","webpack:///./src/merge.js","webpack:///./src/queue.js","webpack:///./src/notifier.js","webpack:///./src/api.js","webpack:///./src/apiUtility.js","webpack:///./node_modules/console-polyfill/index.js","webpack:///./src/browser/detection.js","webpack:///./src/browser/globalSetup.js","webpack:///./src/browser/transport.js","webpack:///./src/browser/transport/fetch.js","webpack:///./src/browser/transport/xhr.js","webpack:///./src/browser/transforms.js","webpack:///./node_modules/error-stack-parser/error-stack-parser.js","webpack:///./node_modules/error-stack-parser/node_modules/stackframe/stackframe.js","webpack:///./src/transforms.js","webpack:///./src/browser/predicates.js","webpack:///./src/predicates.js","webpack:///./src/defaults.js","webpack:///./src/browser/defaults/scrubFields.js","webpack:///./src/telemetry.js","webpack:///./src/browser/telemetry.js","webpack:///./src/utility/headers.js","webpack:///./src/browser/domUtility.js","webpack:///./src/utility/polyfillJSON.js","webpack:///./vendor/JSON-js/json3.js","webpack:///./src/browser/wrapGlobals.js","webpack:///./src/truncation.js"],"names":[],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;AClFa;;AAEb,YAAY,mBAAO,CAAC,EAAS;;AAE7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,OAAO;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,EAAE;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,mCAAmC,OAAO;AAC1C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,iBAAiB,YAAY;AAC7B;AACA,qBAAqB;AACrB;AACA,KAAK,wBAAwB;AAC7B;AACA,KAAK,yBAAyB;AAC9B;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kCAAkC,OAAO;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,SAAS;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,kCAAkC,OAAO;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,SAAS,UAAU,YAAY,GAAG;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,aAAa;AAChC;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5wBa;;AAEb;AACA,mBAAO,CAAC,EAAkB;AAC1B,gBAAgB,mBAAO,CAAC,EAAa;AACrC,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;AC3Ca;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;AChFa;;AAEb,uBAAuB,mBAAO,CAAC,EAAoB;;AAEnD;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;;AAEA,sBAAsB,wBAAwB;AAC9C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,eAAe;AACf;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7Ha;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,eAAe,mBAAO,CAAC,CAAoB;;AAE3C;AACA;;AAEA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,WAAW;AAC9B;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC9Fa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,kBAAkB;;AAElB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,eAAe,gBAAgB;AAC/B;AACA;AACA;;AAEA,yBAAyB;AACzB;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACtDa;;AAEb,cAAc,mBAAO,CAAC,CAAY;;AAElC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA;AACA;;AAEA;;;;;;;;ACvBa;;AAEb,cAAc,mBAAO,CAAC,CAAQ;AAC9B,gBAAgB,mBAAO,CAAC,EAAc;AACtC,mBAAmB,mBAAO,CAAC,EAAa;AACxC,mBAAmB,mBAAO,CAAC,EAAyB;AACpD,kBAAkB,mBAAO,CAAC,EAAe;AACzC,YAAY,mBAAO,CAAC,CAAU;AAC9B,iBAAiB,mBAAO,CAAC,EAAe;;AAExC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;;;;;;;ACnBa;;AAEb,aAAa,mBAAO,CAAC,CAAY;AACjC,QAAQ,mBAAO,CAAC,CAAY;AAC5B,UAAU,mBAAO,CAAC,EAAQ;AAC1B,aAAa,mBAAO,CAAC,CAAU;AAC/B,cAAc,mBAAO,CAAC,EAAe;;AAErC,gBAAgB,mBAAO,CAAC,EAAa;AACrC,aAAa,mBAAO,CAAC,CAAO;;AAE5B,iBAAiB,mBAAO,CAAC,EAAc;AACvC,uBAAuB,mBAAO,CAAC,EAAe;AAC9C,iBAAiB,mBAAO,CAAC,EAAc;AACvC,uBAAuB,mBAAO,CAAC,EAAe;AAC9C,kBAAkB,mBAAO,CAAC,CAAgB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,0BAA0B,sBAAsB;AAChD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,oCAAoC,SAAS;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,eAAe,mBAAO,CAAC,EAAa;AACpC,kBAAkB,mBAAO,CAAC,EAAwB;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACxjBa;;AAEb,kBAAkB,mBAAO,CAAC,EAAe;AACzC,YAAY,mBAAO,CAAC,EAAS;AAC7B,eAAe,mBAAO,CAAC,EAAY;AACnC,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,6EAA6E,UAAU;AACvF,yFAAyF,UAAU;;AAEnG;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,6BAA6B;AAC7B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACnRa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AChJa;;AAEb;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA,WAAW,YAAY;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACvDa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wDAAwD,WAAW;AACnE;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,QAAQ;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,aAAa,8BAA8B;AAC3C;AACA;AACA;AACA;AACA,+CAA+C,SAAS;AACxD;AACA;AACA,cAAc;AACd;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,SAAS;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,+BAA+B;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC7Qa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACxHa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,cAAc,mBAAO,CAAC,EAAc;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;AC5Ga;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACzGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;AClBY;;AAEb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;AC/Ba;;AAEb;AACA,gBAAgB,QAAQ;AACxB;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;;AAEA;AACA,gBAAgB,QAAQ;;AAExB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;;;;;;;AClGa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,uBAAuB,mBAAO,CAAC,EAAmB;AAClD,qBAAqB,mBAAO,CAAC,EAAiB;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC/Ha;;AAEb,aAAa,mBAAO,CAAC,CAAW;AAChC,QAAQ,mBAAO,CAAC,CAAe;;AAE/B;AACA;AACA;;AAEA;AACA;AACA,wCAAwC,mBAAmB;AAC3D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;;AAEA;;;;;;;;ACpCa;;AAEb;;AAEA,QAAQ,mBAAO,CAAC,CAAe;AAC/B,aAAa,mBAAO,CAAC,CAAW;;AAEhC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AChKa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,kBAAkB,mBAAO,CAAC,CAAgB;AAC1C,aAAa,mBAAO,CAAC,CAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,OAAO;AAC7C;AACA,oBAAoB,6CAA6C;AACjE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,4BAA4B,gBAAgB;AAC5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,sBAAsB;AACvC;AACA;AACA;;AAEA,4BAA4B,oBAAoB;AAChD;AACA;;AAEA;AACA;;AAEA;AACA;AACA,8BAA8B,aAAa;AAC3C;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,kBAAkB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACnVA;AACA;AACA;;AAEA;AACA,QAAQ,IAA0C;AAClD,QAAQ,iCAA6B,CAAC,uBAAY,CAAC,oCAAE,OAAO;AAAA;AAAA;AAAA,oGAAC;AAC7D,KAAK,MAAM,EAIN;AACL,CAAC;AACD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,MAAM;AACzB,oBAAoB,MAAM;AAC1B;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA,CAAC;;;;;;;ACzMD;AACA;AACA;;AAEA;AACA,QAAQ,IAA0C;AAClD,QAAQ,iCAAqB,EAAE,oCAAE,OAAO;AAAA;AAAA;AAAA,oGAAC;AACzC,KAAK,MAAM,EAIN;AACL,CAAC;AACD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,wBAAwB;AAC3C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA,CAAC;;;;;;;;AC9IY;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,sBAAsB;AAC1D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,8BAA8B;AAC9B;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5Ja;;AAEb,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;ACba;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe;;AAEf;;AAEA,uCAAuC,eAAe;;AAEtD;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA;;AAEA,wCAAwC,eAAe;;AAEvD,mBAAmB,gBAAgB;AACnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,SAAS;AAC1B;;AAEA,mBAAmB,qBAAqB;AACxC;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClMa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACVa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5Da;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qCAAqC,mBAAmB;AACxD;;AAEA;AACA,qCAAqC,4BAA4B;AACjE;AACA;AACA,8BAA8B,4BAA4B;AAC1D;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD;AACA;AACA,8BAA8B,gBAAgB;AAC9C;AACA;;AAEA;AACA,8BAA8B,aAAa;AAC3C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AClLa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,cAAc,mBAAO,CAAC,EAAoB;AAC1C,YAAY,mBAAO,CAAC,CAAU;AAC9B,gBAAgB,mBAAO,CAAC,CAAO;AAC/B,cAAc,mBAAO,CAAC,EAAc;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gDAAgD,aAAa;AAC7D;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B,mBAAmB,qBAAqB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,6BAA6B,0BAA0B;AACvD;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA,iBAAiB;AACjB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,eAAe,0BAA0B;AACzC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB;;AAEjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,SAAS;AAC9C;AACA;AACA,GAAG;AACH,yCAAyC;AACzC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,gDAAgD,QAAQ;;AAExD;AACA;;AAEA;AACA,gDAAgD,QAAQ;;AAExD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACtwBa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;AC/Fa;;AAEb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,6BAA6B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,4BAA4B,QAAQ;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,4BAA4B;AAC7C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,uBAAuB;AACpC;AACA;AACA;AACA,2BAA2B,sBAAsB;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnIa;;AAEb,mBAAmB,mBAAO,CAAC,EAA4B;;AAEvD;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB;AACpB;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,yCAAyC,iBAAiB;AAC1D,8BAA8B,kBAAkB;;AAEhD,yCAAyC,iBAAiB;AAC1D,sCAAsC,6BAA6B;;AAEnE;AACA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,wBAAwB;AACxB,+CAA+C,EAAE;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;;AAGA;;AAEA;;AAEA,UAAU;AACV,UAAU;AACV,UAAU;AACV;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA,qBAAqB,YAAY;AACjC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,qBAAqB,YAAY;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,eAAe;AACf;AACA,cAAc,wDAAwD;AACtE,cAAc,0BAA0B;AACxC;AACA;AACA;AACA;;AAEA;;AAEA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,mBAAmB,WAAW;AAC9B;AACA;;AAEA;;AAEA,OAAO;AACP;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,sBAAsB,UAAU;AAChC;AACA;;;AAGA;;AAEA;AACA;;AAEA;AACA;;AAEA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB,oBAAoB;AACpB,cAAc;AACd,gBAAgB;AAChB,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,UAAU;AACV;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,WAAW;AACX;AACA,wBAAwB,gDAAgD;AACxE;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,SAAS;AACT,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,WAAW;AACX;AACA,wBAAwB,gDAAgD;AACxE;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,sCAAsC,EAAE;AACxC;AACA;AACA;AACA,SAAS;AACT;;AAEA;;AAEA;AACA;;AAEA;AACA,+CAA+C,yGAAyG,EAAE;;AAE1J;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,SAAS;AACT;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE,UAAU;AACvB;AACA;AACA,KAAK;AACL;AACA;;AAEA;;;;;;;;AC1vBa;;AAEb;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,aAAa,oBAAoB;AACjC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC1Ca;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,eAAe,mBAAO,CAAC,CAAoB;;AAE3C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA","file":"rollbar.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n","'use strict';\n\nvar merge = require('./merge');\n\nvar RollbarJSON = {};\nfunction setupJSON(polyfillJSON) {\n if (isFunction(RollbarJSON.stringify) && isFunction(RollbarJSON.parse)) {\n return;\n }\n\n if (isDefined(JSON)) {\n // If polyfill is provided, prefer it over existing non-native shims.\n if(polyfillJSON) {\n if (isNativeFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isNativeFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n } else { // else accept any interface that is present.\n if (isFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n }\n }\n if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {\n polyfillJSON && polyfillJSON(RollbarJSON);\n }\n}\n\n/*\n * isType - Given a Javascript value and a string, returns true if the type of the value matches the\n * given string.\n *\n * @param x - any value\n * @param t - a lowercase string containing one of the following type names:\n * - undefined\n * - null\n * - error\n * - number\n * - boolean\n * - string\n * - symbol\n * - function\n * - object\n * - array\n * @returns true if x is of type t, otherwise false\n */\nfunction isType(x, t) {\n return t === typeName(x);\n}\n\n/*\n * typeName - Given a Javascript value, returns the type of the object as a string\n */\nfunction typeName(x) {\n var name = typeof x;\n if (name !== 'object') {\n return name;\n }\n if (!x) {\n return 'null';\n }\n if (x instanceof Error) {\n return 'error';\n }\n return ({}).toString.call(x).match(/\\s([a-zA-Z]+)/)[1].toLowerCase();\n}\n\n/* isFunction - a convenience function for checking if a value is a function\n *\n * @param f - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isFunction(f) {\n return isType(f, 'function');\n}\n\n/* isNativeFunction - a convenience function for checking if a value is a native JS function\n *\n * @param f - any value\n * @returns true if f is a native JS function, otherwise false\n */\nfunction isNativeFunction(f) {\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n var funcMatchString = Function.prototype.toString.call(Object.prototype.hasOwnProperty)\n .replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?');\n var reIsNative = RegExp('^' + funcMatchString + '$');\n return isObject(f) && reIsNative.test(f);\n}\n\n/* isObject - Checks if the argument is an object\n *\n * @param value - any value\n * @returns true is value is an object function is an object)\n*/\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/* isString - Checks if the argument is a string\n *\n * @param value - any value\n * @returns true if value is a string\n*/\nfunction isString(value) {\n return typeof value === 'string' || value instanceof String\n}\n\n/**\n * isFiniteNumber - determines whether the passed value is a finite number\n *\n * @param {*} n - any value\n * @returns true if value is a finite number\n */\n function isFiniteNumber(n) {\n return Number.isFinite(n);\n}\n\n/*\n * isDefined - a convenience function for checking if a value is not equal to undefined\n *\n * @param u - any value\n * @returns true if u is anything other than undefined\n */\nfunction isDefined(u) {\n return !isType(u, 'undefined');\n}\n\n/*\n * isIterable - convenience function for checking if a value can be iterated, essentially\n * whether it is an object or an array.\n *\n * @param i - any value\n * @returns true if i is an object or an array as determined by `typeName`\n */\nfunction isIterable(i) {\n var type = typeName(i);\n return (type === 'object' || type === 'array');\n}\n\n/*\n * isError - convenience function for checking if a value is of an error type\n *\n * @param e - any value\n * @returns true if e is an error\n */\nfunction isError(e) {\n // Detect both Error and Firefox Exception type\n return isType(e, 'error') || isType(e, 'exception');\n}\n\n/* isPromise - a convenience function for checking if a value is a promise\n *\n * @param p - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isPromise(p) {\n return isObject(p) && isType(p.then, 'function');\n}\n\nfunction redact() {\n return '********';\n}\n\n// from http://stackoverflow.com/a/8809472/1138191\nfunction uuid4() {\n var d = now();\n var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n var r = (d + Math.random() * 16) % 16 | 0;\n d = Math.floor(d / 16);\n return (c === 'x' ? r : (r & 0x7 | 0x8)).toString(16);\n });\n return uuid;\n}\n\nvar LEVELS = {\n debug: 0,\n info: 1,\n warning: 2,\n error: 3,\n critical: 4\n};\n\nfunction sanitizeUrl(url) {\n var baseUrlParts = parseUri(url);\n if (!baseUrlParts) {\n return '(unknown)';\n }\n\n // remove a trailing # if there is no anchor\n if (baseUrlParts.anchor === '') {\n baseUrlParts.source = baseUrlParts.source.replace('#', '');\n }\n\n url = baseUrlParts.source.replace('?' + baseUrlParts.query, '');\n return url;\n}\n\nvar parseUriOptions = {\n strictMode: false,\n key: [\n 'source',\n 'protocol',\n 'authority',\n 'userInfo',\n 'user',\n 'password',\n 'host',\n 'port',\n 'relative',\n 'path',\n 'directory',\n 'file',\n 'query',\n 'anchor'\n ],\n q: {\n name: 'queryKey',\n parser: /(?:^|&)([^&=]*)=?([^&]*)/g\n },\n parser: {\n strict: /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n loose: /^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/\n }\n};\n\nfunction parseUri(str) {\n if (!isType(str, 'string')) {\n return undefined;\n }\n\n var o = parseUriOptions;\n var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);\n var uri = {};\n\n for (var i = 0, l = o.key.length; i < l; ++i) {\n uri[o.key[i]] = m[i] || '';\n }\n\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) {\n uri[o.q.name][$1] = $2;\n }\n });\n\n return uri;\n}\n\nfunction addParamsAndAccessTokenToPath(accessToken, options, params) {\n params = params || {};\n params.access_token = accessToken;\n var paramsArray = [];\n var k;\n for (k in params) {\n if (Object.prototype.hasOwnProperty.call(params, k)) {\n paramsArray.push([k, params[k]].join('='));\n }\n }\n var query = '?' + paramsArray.sort().join('&');\n\n options = options || {};\n options.path = options.path || '';\n var qs = options.path.indexOf('?');\n var h = options.path.indexOf('#');\n var p;\n if (qs !== -1 && (h === -1 || h > qs)) {\n p = options.path;\n options.path = p.substring(0,qs) + query + '&' + p.substring(qs+1);\n } else {\n if (h !== -1) {\n p = options.path;\n options.path = p.substring(0,h) + query + p.substring(h);\n } else {\n options.path = options.path + query;\n }\n }\n}\n\nfunction formatUrl(u, protocol) {\n protocol = protocol || u.protocol;\n if (!protocol && u.port) {\n if (u.port === 80) {\n protocol = 'http:';\n } else if (u.port === 443) {\n protocol = 'https:';\n }\n }\n protocol = protocol || 'https:';\n\n if (!u.hostname) {\n return null;\n }\n var result = protocol + '//' + u.hostname;\n if (u.port) {\n result = result + ':' + u.port;\n }\n if (u.path) {\n result = result + u.path;\n }\n return result;\n}\n\nfunction stringify(obj, backup) {\n var value, error;\n try {\n value = RollbarJSON.stringify(obj);\n } catch (jsonError) {\n if (backup && isFunction(backup)) {\n try {\n value = backup(obj);\n } catch (backupError) {\n error = backupError;\n }\n } else {\n error = jsonError;\n }\n }\n return {error: error, value: value};\n}\n\nfunction maxByteSize(string) {\n // The transport will use utf-8, so assume utf-8 encoding.\n //\n // This minimal implementation will accurately count bytes for all UCS-2 and\n // single code point UTF-16. If presented with multi code point UTF-16,\n // which should be rare, it will safely overcount, not undercount.\n //\n // While robust utf-8 encoders exist, this is far smaller and far more performant.\n // For quickly counting payload size for truncation, smaller is better.\n\n var count = 0;\n var length = string.length;\n\n for (var i = 0; i < length; i++) {\n var code = string.charCodeAt(i);\n if (code < 128) { // up to 7 bits\n count = count + 1;\n } else if (code < 2048) { // up to 11 bits\n count = count + 2;\n } else if (code < 65536) { // up to 16 bits\n count = count + 3;\n }\n }\n\n return count;\n}\n\nfunction jsonParse(s) {\n var value, error;\n try {\n value = RollbarJSON.parse(s);\n } catch (e) {\n error = e;\n }\n return {error: error, value: value};\n}\n\nfunction makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n mode,\n backupMessage,\n errorParser\n) {\n var location = {\n url: url || '',\n line: lineno,\n column: colno\n };\n location.func = errorParser.guessFunctionName(location.url, location.line);\n location.context = errorParser.gatherContext(location.url, location.line);\n var href = typeof document !== 'undefined' && document && document.location && document.location.href;\n var useragent = typeof window !== 'undefined' && window && window.navigator && window.navigator.userAgent;\n return {\n 'mode': mode,\n 'message': error ? String(error) : (message || backupMessage),\n 'url': href,\n 'stack': [location],\n 'useragent': useragent\n };\n}\n\nfunction wrapCallback(logger, f) {\n return function(err, resp) {\n try {\n f(err, resp);\n } catch (e) {\n logger.error(e);\n }\n };\n}\n\nfunction nonCircularClone(obj) {\n var seen = [obj];\n\n function clone(obj, seen) {\n var value, name, newSeen, result = {};\n\n try {\n for (name in obj) {\n value = obj[name];\n\n if (value && (isType(value, 'object') || isType(value, 'array'))) {\n if (seen.includes(value)) {\n result[name] = 'Removed circular reference: ' + typeName(value);\n } else {\n newSeen = seen.slice();\n newSeen.push(value);\n result[name] = clone(value, newSeen);\n }\n continue;\n }\n\n result[name] = value;\n }\n } catch (e) {\n result = 'Failed cloning custom data: ' + e.message;\n }\n return result;\n }\n return clone(obj, seen);\n}\n\nfunction createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\n var diagnostic = {};\n var argTypes = [];\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n argTypes.push(typ);\n switch (typ) {\n case 'undefined':\n break;\n case 'string':\n message ? extraArgs.push(arg) : message = arg;\n break;\n case 'function':\n callback = wrapCallback(logger, arg);\n break;\n case 'date':\n extraArgs.push(arg);\n break;\n case 'error':\n case 'domexception':\n case 'exception': // Firefox Exception type\n err ? extraArgs.push(arg) : err = arg;\n break;\n case 'object':\n case 'array':\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n if (requestKeys && typ === 'object' && !request) {\n for (var j = 0, len = requestKeys.length; j < len; ++j) {\n if (arg[requestKeys[j]] !== undefined) {\n request = arg;\n break;\n }\n }\n if (request) {\n break;\n }\n }\n custom ? extraArgs.push(arg) : custom = arg;\n break;\n default:\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n extraArgs.push(arg);\n }\n }\n\n // if custom is an array this turns it into an object with integer keys\n if (custom) custom = nonCircularClone(custom);\n\n if (extraArgs.length > 0) {\n if (!custom) custom = nonCircularClone({});\n custom.extraArgs = nonCircularClone(extraArgs);\n }\n\n var item = {\n message: message,\n err: err,\n custom: custom,\n timestamp: now(),\n callback: callback,\n notifier: notifier,\n diagnostic: diagnostic,\n uuid: uuid4()\n };\n\n setCustomItemKeys(item, custom);\n\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n item.diagnostic.original_arg_types = argTypes;\n return item;\n}\n\nfunction setCustomItemKeys(item, custom) {\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (custom && custom.skipFrames !== undefined) {\n item.skipFrames = custom.skipFrames;\n delete custom.skipFrames;\n }\n}\n\nfunction addErrorContext(item, errors) {\n var custom = item.data.custom || {};\n var contextAdded = false;\n\n try {\n for (var i = 0; i < errors.length; ++i) {\n if (errors[i].hasOwnProperty('rollbarContext')) {\n custom = merge(custom, nonCircularClone(errors[i].rollbarContext));\n contextAdded = true;\n }\n }\n\n // Avoid adding an empty object to the data.\n if (contextAdded) {\n item.data.custom = custom;\n }\n } catch (e) {\n item.diagnostic.error_context = 'Failed: ' + e.message;\n }\n}\n\nvar TELEMETRY_TYPES = ['log', 'network', 'dom', 'navigation', 'error', 'manual'];\nvar TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];\n\nfunction arrayIncludes(arr, val) {\n for (var k = 0; k < arr.length; ++k) {\n if (arr[k] === val) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction createTelemetryEvent(args) {\n var type, metadata, level;\n var arg;\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n switch (typ) {\n case 'string':\n if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {\n type = arg;\n } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {\n level = arg;\n }\n break;\n case 'object':\n metadata = arg;\n break;\n default:\n break;\n }\n }\n var event = {\n type: type || 'manual',\n metadata: metadata || {},\n level: level\n };\n\n return event;\n}\n\n/*\n * get - given an obj/array and a keypath, return the value at that keypath or\n * undefined if not possible.\n *\n * @param obj - an object or array\n * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'\n * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`\n */\nfunction get(obj, path) {\n if (!obj) {\n return undefined;\n }\n var keys = path.split('.');\n var result = obj;\n try {\n for (var i = 0, len = keys.length; i < len; ++i) {\n result = result[keys[i]];\n }\n } catch (e) {\n result = undefined;\n }\n return result;\n}\n\nfunction set(obj, path, value) {\n if (!obj) {\n return;\n }\n var keys = path.split('.');\n var len = keys.length;\n if (len < 1) {\n return;\n }\n if (len === 1) {\n obj[keys[0]] = value;\n return;\n }\n try {\n var temp = obj[keys[0]] || {};\n var replacement = temp;\n for (var i = 1; i < len - 1; ++i) {\n temp[keys[i]] = temp[keys[i]] || {};\n temp = temp[keys[i]];\n }\n temp[keys[len-1]] = value;\n obj[keys[0]] = replacement;\n } catch (e) {\n return;\n }\n}\n\nfunction formatArgsAsString(args) {\n var i, len, arg;\n var result = [];\n for (i = 0, len = args.length; i < len; ++i) {\n arg = args[i];\n switch (typeName(arg)) {\n case 'object':\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500) {\n arg = arg.substr(0, 497) + '...';\n }\n break;\n case 'null':\n arg = 'null';\n break;\n case 'undefined':\n arg = 'undefined';\n break;\n case 'symbol':\n arg = arg.toString();\n break;\n }\n result.push(arg);\n }\n return result.join(' ');\n}\n\nfunction now() {\n if (Date.now) {\n return +Date.now();\n }\n return +new Date();\n}\n\nfunction filterIp(requestData, captureIp) {\n if (!requestData || !requestData['user_ip'] || captureIp === true) {\n return;\n }\n var newIp = requestData['user_ip'];\n if (!captureIp) {\n newIp = null;\n } else {\n try {\n var parts;\n if (newIp.indexOf('.') !== -1) {\n parts = newIp.split('.');\n parts.pop();\n parts.push('0');\n newIp = parts.join('.');\n } else if (newIp.indexOf(':') !== -1) {\n parts = newIp.split(':');\n if (parts.length > 2) {\n var beginning = parts.slice(0, 3);\n var slashIdx = beginning[2].indexOf('/');\n if (slashIdx !== -1) {\n beginning[2] = beginning[2].substring(0, slashIdx);\n }\n var terminal = '0000:0000:0000:0000:0000';\n newIp = beginning.concat(terminal).join(':');\n }\n } else {\n newIp = null;\n }\n } catch (e) {\n newIp = null;\n }\n }\n requestData['user_ip'] = newIp;\n}\n\nfunction handleOptions(current, input, payload, logger) {\n var result = merge(current, input, payload);\n result = updateDeprecatedOptions(result, logger);\n if (!input || input.overwriteScrubFields) {\n return result;\n }\n if (input.scrubFields) {\n result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);\n }\n return result;\n}\n\nfunction updateDeprecatedOptions(options, logger) {\n if(options.hostWhiteList && !options.hostSafeList) {\n options.hostSafeList = options.hostWhiteList;\n options.hostWhiteList = undefined;\n logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');\n }\n if(options.hostBlackList && !options.hostBlockList) {\n options.hostBlockList = options.hostBlackList;\n options.hostBlackList = undefined;\n logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');\n }\n return options;\n}\n\nmodule.exports = {\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n createItem: createItem,\n addErrorContext: addErrorContext,\n createTelemetryEvent: createTelemetryEvent,\n filterIp: filterIp,\n formatArgsAsString: formatArgsAsString,\n formatUrl: formatUrl,\n get: get,\n handleOptions: handleOptions,\n isError: isError,\n isFiniteNumber: isFiniteNumber,\n isFunction: isFunction,\n isIterable: isIterable,\n isNativeFunction: isNativeFunction,\n isObject: isObject,\n isString: isString,\n isType: isType,\n isPromise: isPromise,\n jsonParse: jsonParse,\n LEVELS: LEVELS,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n merge: merge,\n now: now,\n redact: redact,\n RollbarJSON: RollbarJSON,\n sanitizeUrl: sanitizeUrl,\n set: set,\n setupJSON: setupJSON,\n stringify: stringify,\n maxByteSize: maxByteSize,\n typeName: typeName,\n uuid4: uuid4\n};\n","'use strict';\n\n/* eslint-disable no-console */\nrequire('console-polyfill');\nvar detection = require('./detection');\nvar _ = require('../utility');\n\nfunction error() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.error(_.formatArgsAsString(args));\n } else {\n console.error.apply(console, args);\n }\n}\n\nfunction info() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.info(_.formatArgsAsString(args));\n } else {\n console.info.apply(console, args);\n }\n}\n\nfunction log() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.log(_.formatArgsAsString(args));\n } else {\n console.log.apply(console, args);\n }\n}\n\n/* eslint-enable no-console */\n\nmodule.exports = {\n error: error,\n info: info,\n log: log\n};\n","'use strict';\n\n// See https://nodejs.org/docs/latest/api/url.html\nfunction parse(url) {\n var result = {\n protocol: null, auth: null, host: null, path: null,\n hash: null, href: url, hostname: null, port: null,\n pathname: null, search: null, query: null\n };\n\n var i, last;\n i = url.indexOf('//');\n if (i !== -1) {\n result.protocol = url.substring(0,i);\n last = i+2;\n } else {\n last = 0;\n }\n \n i = url.indexOf('@', last);\n if (i !== -1) {\n result.auth = url.substring(last, i);\n last = i+1;\n }\n\n i = url.indexOf('/', last);\n if (i === -1) {\n i = url.indexOf('?', last);\n if (i === -1) {\n i = url.indexOf('#', last);\n if (i === -1) {\n result.host = url.substring(last);\n } else {\n result.host = url.substring(last, i);\n result.hash = url.substring(i);\n }\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n return result;\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n\n i = url.indexOf('#', last);\n if (i === -1) {\n result.path = url.substring(last);\n } else {\n result.path = url.substring(last, i);\n result.hash = url.substring(i);\n }\n\n if (result.path) {\n var pathParts = result.path.split('?');\n result.pathname = pathParts[0];\n result.query = pathParts[1];\n result.search = result.query ? '?' + result.query : null;\n }\n return result;\n}\n\nmodule.exports = {\n parse: parse\n};\n","'use strict';\n\nvar ErrorStackParser = require('error-stack-parser');\n\nvar UNKNOWN_FUNCTION = '?';\nvar ERR_CLASS_REGEXP = new RegExp('^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ');\n\nfunction guessFunctionName() {\n return UNKNOWN_FUNCTION;\n}\n\n\nfunction gatherContext() {\n return null;\n}\n\n\nfunction Frame(stackFrame) {\n var data = {};\n\n data._stackFrame = stackFrame;\n\n data.url = stackFrame.fileName;\n data.line = stackFrame.lineNumber;\n data.func = stackFrame.functionName;\n data.column = stackFrame.columnNumber;\n data.args = stackFrame.args;\n\n data.context = gatherContext();\n\n return data;\n}\n\n\nfunction Stack(exception, skip) {\n function getStack() {\n var parserStack = [];\n\n skip = skip || 0;\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch(e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = skip; i < parserStack.length; i++) {\n stack.push(new Frame(parserStack[i]));\n }\n\n return stack;\n }\n\n return {\n stack: getStack(),\n message: exception.message,\n name: _mostSpecificErrorName(exception),\n rawStack: exception.stack,\n rawException: exception\n };\n}\n\n\nfunction parse(e, skip) {\n var err = e;\n\n if (err.nested || err.cause) {\n var traceChain = [];\n while (err) {\n traceChain.push(new Stack(err, skip));\n err = err.nested || err.cause;\n\n skip = 0; // Only apply skip value to primary error\n }\n\n // Return primary error with full trace chain attached.\n traceChain[0].traceChain = traceChain;\n return traceChain[0];\n } else {\n return new Stack(err, skip);\n }\n}\n\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg || !errMsg.match) {\n return ['Unknown error. There was no error message to display.', ''];\n }\n var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);\n var errClass = '(unknown)';\n\n if (errClassMatch) {\n errClass = errClassMatch[errClassMatch.length - 1];\n errMsg = errMsg.replace((errClassMatch[errClassMatch.length - 2] || '') + errClass + ':', '');\n errMsg = errMsg.replace(/(^[\\s]+|[\\s]+$)/g, '');\n }\n return [errClass, errMsg];\n}\n\n// * Prefers any value over an empty string\n// * Prefers any value over 'Error' where possible\n// * Prefers name over constructor.name when both are more specific than 'Error'\nfunction _mostSpecificErrorName(error) {\n var name = error.name && error.name.length && error.name;\n var constructorName = error.constructor.name && error.constructor.name.length && error.constructor.name;\n\n if (!name || !constructorName) {\n return name || constructorName;\n }\n\n if (name === 'Error') {\n return constructorName;\n }\n return name;\n}\n\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame\n};\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction scrub(data, scrubFields, scrubPaths) {\n scrubFields = scrubFields || [];\n\n if (scrubPaths) {\n for (var i = 0; i < scrubPaths.length; ++i) {\n scrubPath(data, scrubPaths[i]);\n }\n }\n\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart) {\n return paramPart + _.redact();\n }\n\n function paramScrubber(v) {\n var i;\n if (_.isType(v, 'string')) {\n for (i = 0; i < queryRes.length; ++i) {\n v = v.replace(queryRes[i], redactQueryParam);\n }\n }\n return v;\n }\n\n function valScrubber(k, v) {\n var i;\n for (i = 0; i < paramRes.length; ++i) {\n if (paramRes[i].test(k)) {\n v = _.redact();\n break;\n }\n }\n return v;\n }\n\n function scrubber(k, v, seen) {\n var tmpV = valScrubber(k, v);\n if (tmpV === v) {\n if (_.isType(v, 'object') || _.isType(v, 'array')) {\n return traverse(v, scrubber, seen);\n }\n return paramScrubber(tmpV);\n } else {\n return tmpV;\n }\n }\n\n return traverse(data, scrubber);\n}\n\nfunction scrubPath(obj, path) {\n var keys = path.split('.');\n var last = keys.length - 1;\n try {\n for (var i = 0; i <= last; ++i) {\n if (i < last) {\n obj = obj[keys[i]];\n } else {\n obj[keys[i]] = _.redact();\n }\n }\n } catch (e) {\n // Missing key is OK;\n }\n}\n\nfunction _getScrubFieldRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '^\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?$';\n ret.push(new RegExp(pat, 'i'));\n }\n return ret;\n}\n\n\nfunction _getScrubQueryParamRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?';\n ret.push(new RegExp('(' + pat + '=)([^&\\\\n]+)', 'igm'));\n }\n return ret;\n}\n\nmodule.exports = scrub;\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction traverse(obj, func, seen) {\n var k, v, i;\n var isObj = _.isType(obj, 'object');\n var isArray = _.isType(obj, 'array');\n var keys = [];\n var seenIndex;\n\n // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.\n seen = seen || { obj: [], mapped: []};\n\n if (isObj) {\n seenIndex = seen.obj.indexOf(obj);\n\n if (isObj && seenIndex !== -1) {\n // Prefer the mapped object if there is one.\n return seen.mapped[seenIndex] || seen.obj[seenIndex];\n }\n\n seen.obj.push(obj);\n seenIndex = seen.obj.length - 1;\n }\n\n if (isObj) {\n for (k in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, k)) {\n keys.push(k);\n }\n }\n } else if (isArray) {\n for (i = 0; i < obj.length; ++i) {\n keys.push(i);\n }\n }\n\n var result = isObj ? {} : [];\n var same = true;\n for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n result[k] = func(k, v, seen);\n same = same && result[k] === obj[k];\n }\n\n if (isObj && !same) {\n seen.mapped[seenIndex] = result;\n }\n\n return !same ? result : obj;\n}\n\nmodule.exports = traverse;\n","'use strict';\n\nvar rollbar = require('../rollbar');\n\nvar options = (typeof window !== 'undefined') && window._rollbarConfig;\nvar alias = options && options.globalAlias || 'Rollbar';\nvar shimRunning = (typeof window !== 'undefined') && window[alias] && typeof window[alias].shimId === 'function' && window[alias].shimId() !== undefined;\n\nif ((typeof window !== 'undefined') && !window._rollbarStartTime) {\n window._rollbarStartTime = (new Date()).getTime();\n}\n\nif (!shimRunning && options) {\n var Rollbar = new rollbar(options);\n window[alias] = Rollbar;\n} else if (typeof window !== 'undefined') {\n window.rollbar = rollbar;\n window._rollbarDidLoad = true;\n} else if (typeof self !== 'undefined') {\n self.rollbar = rollbar;\n self._rollbarDidLoad = true;\n}\n\nmodule.exports = rollbar;\n","'use strict';\n\nvar Rollbar = require('./core');\nvar telemeter = require('../telemetry');\nvar instrumenter = require('./telemetry');\nvar polyfillJSON = require('../utility/polyfillJSON');\nvar wrapGlobals = require('./wrapGlobals');\nvar scrub = require('../scrub');\nvar truncation = require('../truncation');\n\nRollbar.setComponents({\n telemeter: telemeter,\n instrumenter: instrumenter,\n polyfillJSON: polyfillJSON,\n wrapGlobals: wrapGlobals,\n scrub: scrub,\n truncation: truncation\n});\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar Client = require('../rollbar');\nvar _ = require('../utility');\nvar API = require('../api');\nvar logger = require('./logger');\nvar globals = require('./globalSetup');\n\nvar Transport = require('./transport');\nvar urllib = require('./url');\n\nvar transforms = require('./transforms');\nvar sharedTransforms = require('../transforms');\nvar predicates = require('./predicates');\nvar sharedPredicates = require('../predicates');\nvar errorParser = require('../errorParser');\n\nfunction Rollbar(options, client) {\n this.options = _.handleOptions(defaultOptions, options, null, logger);\n this.options._configuredOptions = options;\n var Telemeter = this.components.telemeter;\n var Instrumenter = this.components.instrumenter;\n var polyfillJSON = this.components.polyfillJSON;\n this.wrapGlobals = this.components.wrapGlobals;\n this.scrub = this.components.scrub;\n var truncation = this.components.truncation;\n\n var transport = new Transport(truncation);\n var api = new API(this.options, transport, urllib, truncation);\n if (Telemeter) {\n this.telemeter = new Telemeter(this.options);\n }\n this.client = client || new Client(this.options, api, logger, this.telemeter, 'browser');\n var gWindow = _gWindow();\n var gDocument = (typeof document != 'undefined') && document;\n this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers\n this.anonymousErrorsPending = 0;\n addTransformsToNotifier(this.client.notifier, this, gWindow);\n addPredicatesToQueue(this.client.queue);\n this.setupUnhandledCapture();\n if (Instrumenter) {\n this.instrumenter = new Instrumenter(this.options, this.client.telemeter, this, gWindow, gDocument);\n this.instrumenter.instrument();\n }\n _.setupJSON(polyfillJSON);\n\n // Used with rollbar-react for rollbar-react-native compatibility.\n this.rollbar = this;\n}\n\nvar _instance = null;\nRollbar.init = function(options, client) {\n if (_instance) {\n return _instance.global(options).configure(options);\n }\n _instance = new Rollbar(options, client);\n return _instance;\n};\n\nRollbar.prototype.components = {};\n\nRollbar.setComponents = function(components) {\n Rollbar.prototype.components = components;\n}\n\nfunction handleUninitialized(maybeCallback) {\n var message = 'Rollbar is not initialized';\n logger.error(message);\n if (maybeCallback) {\n maybeCallback(new Error(message));\n }\n}\n\nRollbar.prototype.global = function(options) {\n this.client.global(options);\n return this;\n};\nRollbar.global = function(options) {\n if (_instance) {\n return _instance.global(options);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.configure = function(options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = {payload: payloadData};\n }\n this.options = _.handleOptions(oldOptions, options, payload, logger);\n this.options._configuredOptions = _.handleOptions(oldOptions._configuredOptions, options, payload);\n this.client.configure(this.options, payloadData);\n this.instrumenter && this.instrumenter.configure(this.options);\n this.setupUnhandledCapture();\n return this;\n};\nRollbar.configure = function(options, payloadData) {\n if (_instance) {\n return _instance.configure(options, payloadData);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.lastError = function() {\n return this.client.lastError;\n};\nRollbar.lastError = function() {\n if (_instance) {\n return _instance.lastError();\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.log = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.log(item);\n return {uuid: uuid};\n};\nRollbar.log = function() {\n if (_instance) {\n return _instance.log.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.debug = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.debug(item);\n return {uuid: uuid};\n};\nRollbar.debug = function() {\n if (_instance) {\n return _instance.debug.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.info = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.info(item);\n return {uuid: uuid};\n};\nRollbar.info = function() {\n if (_instance) {\n return _instance.info.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warn = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warn(item);\n return {uuid: uuid};\n};\nRollbar.warn = function() {\n if (_instance) {\n return _instance.warn.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warning = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warning(item);\n return {uuid: uuid};\n};\nRollbar.warning = function() {\n if (_instance) {\n return _instance.warning.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.error = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.error(item);\n return {uuid: uuid};\n};\nRollbar.error = function() {\n if (_instance) {\n return _instance.error.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.critical = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.critical(item);\n return {uuid: uuid};\n};\nRollbar.critical = function() {\n if (_instance) {\n return _instance.critical.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.buildJsonPayload = function(item) {\n return this.client.buildJsonPayload(item);\n};\nRollbar.buildJsonPayload = function() {\n if (_instance) {\n return _instance.buildJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.sendJsonPayload = function(jsonPayload) {\n return this.client.sendJsonPayload(jsonPayload);\n};\nRollbar.sendJsonPayload = function() {\n if (_instance) {\n return _instance.sendJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.setupUnhandledCapture = function() {\n var gWindow = _gWindow();\n\n if (!this.unhandledExceptionsInitialized) {\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(gWindow, this);\n if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {\n this.wrapGlobals(gWindow, this);\n }\n this.unhandledExceptionsInitialized = true;\n }\n }\n if (!this.unhandledRejectionsInitialized) {\n if (this.options.captureUnhandledRejections || this.options.handleUnhandledRejections) {\n globals.captureUnhandledRejections(gWindow, this);\n this.unhandledRejectionsInitialized = true;\n }\n }\n};\n\nRollbar.prototype.handleUncaughtException = function(message, url, lineno, colno, error, context) {\n if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {\n return;\n }\n\n // Chrome will always send 5+ arguments and error will be valid or null, not undefined.\n // If error is undefined, we have a different caller.\n // Chrome also sends errors from web workers with null error, but does not invoke\n // prepareStackTrace() for these. Test for empty url to skip them.\n if (this.options.inspectAnonymousErrors && this.isChrome && error === null && url === '') {\n return 'anonymous';\n }\n\n var item;\n var stackInfo = _.makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n 'onerror',\n 'uncaught exception',\n errorParser\n );\n if (_.isError(error)) {\n item = this._createItem([message, error, context]);\n item._unhandledStackInfo = stackInfo;\n } else if (_.isError(url)) {\n item = this._createItem([message, url, context]);\n item._unhandledStackInfo = stackInfo;\n } else {\n item = this._createItem([message, context]);\n item.stackInfo = stackInfo;\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n this.client.log(item);\n};\n\n/**\n * Chrome only. Other browsers will ignore.\n *\n * Use Error.prepareStackTrace to extract information about errors that\n * do not have a valid error object in onerror().\n *\n * In tested version of Chrome, onerror is called first but has no way\n * to communicate with prepareStackTrace. Use a counter to let this\n * handler know which errors to send to Rollbar.\n *\n * In config options, set inspectAnonymousErrors to enable.\n */\nRollbar.prototype.handleAnonymousErrors = function() {\n if (!this.options.inspectAnonymousErrors || !this.isChrome) {\n return;\n }\n\n var r = this;\n function prepareStackTrace(error, _stack) { // eslint-disable-line no-unused-vars\n if (r.options.inspectAnonymousErrors) {\n if (r.anonymousErrorsPending) {\n // This is the only known way to detect that onerror saw an anonymous error.\n // It depends on onerror reliably being called before Error.prepareStackTrace,\n // which so far holds true on tested versions of Chrome. If versions of Chrome\n // are tested that behave differently, this logic will need to be updated\n // accordingly.\n r.anonymousErrorsPending -= 1;\n\n if (!error) {\n // Not likely to get here, but calling handleUncaughtException from here\n // without an error object would throw off the anonymousErrorsPending counter,\n // so return now.\n return;\n }\n\n // Allow this to be tracked later.\n error._isAnonymous = true;\n\n // url, lineno, colno shouldn't be needed for these errors.\n // If that changes, update this accordingly, using the unused\n // _stack param as needed (rather than parse error.toString()).\n r.handleUncaughtException(error.message, null, null, null, error);\n }\n }\n\n // Workaround to ensure stack is preserved for normal errors.\n return error.stack;\n }\n\n // https://v8.dev/docs/stack-trace-api\n try {\n Error.prepareStackTrace = prepareStackTrace;\n } catch (e) {\n this.options.inspectAnonymousErrors = false;\n this.error('anonymous error handler failed', e);\n }\n}\n\nRollbar.prototype.handleUnhandledRejection = function(reason, promise) {\n if (!this.options.captureUnhandledRejections && !this.options.handleUnhandledRejections) {\n return;\n }\n\n var message = 'unhandled rejection was null or undefined!';\n if (reason) {\n if (reason.message) {\n message = reason.message;\n } else {\n var reasonResult = _.stringify(reason);\n if (reasonResult.value) {\n message = reasonResult.value;\n }\n }\n }\n var context = (reason && reason._rollbarContext) || (promise && promise._rollbarContext);\n\n var item;\n if (_.isError(reason)) {\n item = this._createItem([message, reason, context]);\n } else {\n item = this._createItem([message, reason, context]);\n item.stackInfo = _.makeUnhandledStackInfo(\n message,\n '',\n 0,\n 0,\n null,\n 'unhandledrejection',\n '',\n errorParser\n );\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n item._originalArgs = item._originalArgs || [];\n item._originalArgs.push(promise);\n this.client.log(item);\n};\n\nRollbar.prototype.wrap = function(f, context, _before) {\n try {\n var ctxFn;\n if(_.isFunction(context)) {\n ctxFn = context;\n } else {\n ctxFn = function() { return context || {}; };\n }\n\n if (!_.isFunction(f)) {\n return f;\n }\n\n if (f._isWrap) {\n return f;\n }\n\n if (!f._rollbar_wrapped) {\n f._rollbar_wrapped = function () {\n if (_before && _.isFunction(_before)) {\n _before.apply(this, arguments);\n }\n try {\n return f.apply(this, arguments);\n } catch(exc) {\n var e = exc;\n if (e && window._rollbarWrappedError !== e) {\n if (_.isType(e, 'string')) {\n e = new String(e);\n }\n e._rollbarContext = ctxFn() || {};\n e._rollbarContext._wrappedSource = f.toString();\n\n window._rollbarWrappedError = e;\n }\n throw e;\n }\n };\n\n f._rollbar_wrapped._isWrap = true;\n\n if (f.hasOwnProperty) {\n for (var prop in f) {\n if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {\n f._rollbar_wrapped[prop] = f[prop];\n }\n }\n }\n }\n\n return f._rollbar_wrapped;\n } catch (e) {\n // Return the original function if the wrap fails.\n return f;\n }\n};\nRollbar.wrap = function(f, context) {\n if (_instance) {\n return _instance.wrap(f, context);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.captureEvent = function() {\n var event = _.createTelemetryEvent(arguments);\n return this.client.captureEvent(event.type, event.metadata, event.level);\n};\nRollbar.captureEvent = function() {\n if (_instance) {\n return _instance.captureEvent.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\n// The following two methods are used internally and are not meant for public use\nRollbar.prototype.captureDomContentLoaded = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureLoad(ts);\n};\n\n/* Internal */\n\nfunction addTransformsToNotifier(notifier, rollbar, gWindow) {\n notifier\n .addTransform(transforms.handleDomException)\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(gWindow))\n .addTransform(transforms.addClientInfo(gWindow))\n .addTransform(transforms.addPluginInfo(gWindow))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(sharedTransforms.addConfigToPayload)\n .addTransform(transforms.addScrubber(rollbar.scrub))\n .addTransform(sharedTransforms.addPayloadOptions)\n .addTransform(sharedTransforms.userTransform(logger))\n .addTransform(sharedTransforms.addConfiguredOptions)\n .addTransform(sharedTransforms.addDiagnosticKeys)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(sharedPredicates.checkLevel)\n .addPredicate(predicates.checkIgnore)\n .addPredicate(sharedPredicates.userCheckIgnore(logger))\n .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))\n .addPredicate(sharedPredicates.urlIsSafeListed(logger))\n .addPredicate(sharedPredicates.messageIsIgnored(logger));\n}\n\nRollbar.prototype.loadFull = function() {\n logger.info('Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.');\n};\n\nRollbar.prototype._createItem = function(args) {\n return _.createItem(args, logger, this);\n};\n\nfunction _getFirstFunction(args) {\n for (var i = 0, len = args.length; i < len; ++i) {\n if (_.isFunction(args[i])) {\n return args[i];\n }\n }\n return undefined;\n}\n\nfunction _gWindow() {\n return ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n}\n\nvar defaults = require('../defaults');\nvar scrubFields = require('./defaults/scrubFields');\n\nvar defaultOptions = {\n version: defaults.version,\n scrubFields: scrubFields.scrubFields,\n logLevel: defaults.logLevel,\n reportLevel: defaults.reportLevel,\n uncaughtErrorLevel: defaults.uncaughtErrorLevel,\n endpoint: defaults.endpoint,\n verbose: false,\n enabled: true,\n transmit: true,\n sendConfig: false,\n includeItemsInTelemetry: true,\n captureIp: true,\n inspectAnonymousErrors: true,\n ignoreDuplicateErrors: true,\n wrapGlobalEventHandlers: false\n};\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar _ = require('./utility');\n\n/*\n * Rollbar - the interface to Rollbar\n *\n * @param options\n * @param api\n * @param logger\n */\nfunction Rollbar(options, api, logger, telemeter, platform) {\n this.options = _.merge(options);\n this.logger = logger;\n Rollbar.rateLimiter.configureGlobal(this.options);\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.api = api;\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n\n // This must happen before the Notifier is created\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = telemeter;\n setStackTraceLimit(options);\n this.lastError = null;\n this.lastErrorHash = 'none';\n}\n\nvar defaultOptions = {\n maxItems: 0,\n itemsPerMinute: 60\n};\n\nRollbar.rateLimiter = new RateLimiter(defaultOptions);\n\nRollbar.prototype.global = function (options) {\n Rollbar.rateLimiter.configureGlobal(options);\n return this;\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n\n this.options = _.merge(oldOptions, options, payload);\n\n // This must happen before the Notifier is configured\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier && this.notifier.configure(this.options);\n this.telemeter && this.telemeter.configure(this.options);\n setStackTraceLimit(options);\n this.global(this.options);\n\n if (validateTracer(options.tracer)) {\n this.tracer = options.tracer\n }\n\n return this;\n};\n\nRollbar.prototype.log = function (item) {\n var level = this._defaultLogLevel();\n return this._log(level, item);\n};\n\nRollbar.prototype.debug = function (item) {\n this._log('debug', item);\n};\n\nRollbar.prototype.info = function (item) {\n this._log('info', item);\n};\n\nRollbar.prototype.warn = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.warning = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.error = function (item) {\n this._log('error', item);\n};\n\nRollbar.prototype.critical = function (item) {\n this._log('critical', item);\n};\n\nRollbar.prototype.wait = function (callback) {\n this.queue.wait(callback);\n};\n\nRollbar.prototype.captureEvent = function (type, metadata, level) {\n return this.telemeter && this.telemeter.captureEvent(type, metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function (ts) {\n return this.telemeter && this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (ts) {\n return this.telemeter && this.telemeter.captureLoad(ts);\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.api.buildJsonPayload(item);\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n this.api.postJsonPayload(jsonPayload);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function (defaultLevel, item) {\n var callback;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {\n if (callback) {\n var error = new Error('ignored identical item');\n error.item = item;\n callback(error);\n }\n return;\n }\n try {\n this._addTracingInfo(item);\n item.level = item.level || defaultLevel;\n this.telemeter && this.telemeter._captureRollbarItem(item);\n item.telemetryEvents = (this.telemeter && this.telemeter.copyEvents()) || [];\n this.notifier.log(item, callback);\n } catch (e) {\n if (callback) {\n callback(e);\n }\n this.logger.error(e);\n }\n};\n\nRollbar.prototype._defaultLogLevel = function () {\n return this.options.logLevel || 'debug';\n};\n\nRollbar.prototype._sameAsLastError = function (item) {\n if (!item._isUncaught) {\n return false;\n }\n var itemHash = generateItemHash(item);\n if (this.lastErrorHash === itemHash) {\n return true;\n }\n this.lastError = item.err;\n this.lastErrorHash = itemHash;\n return false;\n};\n\nRollbar.prototype._addTracingInfo = function (item) {\n // Tracer validation occurs in the constructor\n // or in the Rollbar.prototype.configure methods\n if (this.tracer) {\n // add rollbar occurrence uuid to span\n var span = this.tracer.scope().active();\n\n if (validateSpan(span)) {\n span.setTag('rollbar.error_uuid', item.uuid);\n span.setTag('rollbar.has_error', true);\n span.setTag('error', true);\n span.setTag('rollbar.item_url', `https://rollbar.com/item/uuid/?uuid=${item.uuid}`);\n span.setTag('rollbar.occurrence_url', `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`);\n\n // add span ID & trace ID to occurrence\n var opentracingSpanId = span.context().toSpanId();\n var opentracingTraceId = span.context().toTraceId();\n\n if (item.custom) {\n item.custom.opentracing_span_id = opentracingSpanId;\n item.custom.opentracing_trace_id = opentracingTraceId;\n } else {\n item.custom = {\n opentracing_span_id: opentracingSpanId,\n opentracing_trace_id: opentracingTraceId\n };\n }\n }\n }\n}\n\nfunction generateItemHash(item) {\n var message = item.message || '';\n var stack = (item.err || {}).stack || String(item.err);\n return message + '::' + stack;\n}\n\n// Node.js, Chrome, Safari, and some other browsers support this property\n// which globally sets the number of stack frames returned in an Error object.\n// If a browser can't use it, no harm done.\nfunction setStackTraceLimit(options) {\n if (options.stackTraceLimit) {\n Error.stackTraceLimit = options.stackTraceLimit;\n }\n}\n\n/**\n * Validate the Tracer object provided to the Client\n * is valid for our Opentracing use case.\n * @param {opentracer.Tracer} tracer\n */\nfunction validateTracer(tracer) {\n if (!tracer) {\n return false;\n }\n\n if (!tracer.scope || typeof tracer.scope !== 'function') {\n return false;\n }\n\n var scope = tracer.scope();\n\n if (!scope || !scope.active || typeof scope.active !== 'function') {\n return false;\n }\n\n return true;\n}\n\n/**\n * Validate the Span object provided\n * @param {opentracer.Span} span\n */\nfunction validateSpan(span) {\n if (!span || !span.context || typeof span.context !== 'function') {\n return false;\n }\n\n var spanContext = span.context();\n\n if (!spanContext\n || !spanContext.toSpanId\n || !spanContext.toTraceId\n || typeof spanContext.toSpanId !== 'function'\n || typeof spanContext.toTraceId !== 'function') {\n return false\n }\n\n return true;\n}\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar\n *\n * @param options - the same options that are accepted by configureGlobal offered as a convenience\n */\nfunction RateLimiter(options) {\n this.startTime = _.now();\n this.counter = 0;\n this.perMinCounter = 0;\n this.platform = null;\n this.platformOptions = {};\n this.configureGlobal(options);\n}\n\nRateLimiter.globalSettings = {\n startTime: _.now(),\n maxItems: undefined,\n itemsPerMinute: undefined\n};\n\n/*\n * configureGlobal - set the global rate limiter options\n *\n * @param options - Only the following values are recognized:\n * startTime: a timestamp of the form returned by (new Date()).getTime()\n * maxItems: the maximum items\n * itemsPerMinute: the max number of items to send in a given minute\n */\nRateLimiter.prototype.configureGlobal = function(options) {\n if (options.startTime !== undefined) {\n RateLimiter.globalSettings.startTime = options.startTime;\n }\n if (options.maxItems !== undefined) {\n RateLimiter.globalSettings.maxItems = options.maxItems;\n }\n if (options.itemsPerMinute !== undefined) {\n RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;\n }\n};\n\n/*\n * shouldSend - determine if we should send a given item based on rate limit settings\n *\n * @param item - the item we are about to send\n * @returns An object with the following structure:\n * error: (Error|null)\n * shouldSend: bool\n * payload: (Object|null)\n * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and\n * exactly one of error or payload will be non-null. If error is non-null, the returned Error will\n * describe the situation, but it means that we were already over a rate limit (either globally or\n * per minute) when this item was checked. If error is null, and therefore payload is non-null, it\n * means this item put us over the global rate limit and the payload should be sent to Rollbar in\n * place of the passed in item.\n */\nRateLimiter.prototype.shouldSend = function(item, now) {\n now = now || _.now();\n var elapsedTime = now - this.startTime;\n if (elapsedTime < 0 || elapsedTime >= 60000) {\n this.startTime = now;\n this.perMinCounter = 0;\n }\n\n var globalRateLimit = RateLimiter.globalSettings.maxItems;\n var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;\n\n if (checkRate(item, globalRateLimit, this.counter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimit + ' max items reached', false);\n } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimitPerMin + ' items per minute reached', false);\n }\n this.counter++;\n this.perMinCounter++;\n\n var shouldSend = !checkRate(item, globalRateLimit, this.counter);\n var perMinute = shouldSend;\n shouldSend = shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);\n return shouldSendValue(this.platform, this.platformOptions, null, shouldSend, globalRateLimit, globalRateLimitPerMin, perMinute);\n};\n\nRateLimiter.prototype.setPlatformOptions = function(platform, options) {\n this.platform = platform;\n this.platformOptions = options;\n};\n\n/* Helpers */\n\nfunction checkRate(item, limit, counter) {\n return !item.ignoreRateLimit && limit >= 1 && counter > limit;\n}\n\nfunction shouldSendValue(platform, options, error, shouldSend, globalRateLimit, limitPerMin, perMinute) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute);\n }\n return {error: error, shouldSend: shouldSend, payload: payload};\n}\n\nfunction rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute) {\n var environment = options.environment || (options.payload && options.payload.environment);\n var msg;\n if (perMinute) {\n msg = 'item per minute limit reached, ignoring errors until timeout';\n } else {\n msg = 'maxItems has been hit, ignoring errors until reset.';\n }\n var item = {\n body: {\n message: {\n body: msg,\n extra: {\n maxItems: globalRateLimit,\n itemsPerMinute: limitPerMin\n }\n }\n },\n language: 'javascript',\n environment: environment,\n notifier: {\n version: (options.notifier && options.notifier.version) || options.version\n }\n };\n if (platform === 'browser') {\n item.platform = 'browser';\n item.framework = 'browser-js';\n item.notifier.name = 'rollbar-browser-js';\n } else if (platform === 'server') {\n item.framework = options.framework || 'node-js';\n item.notifier.name = options.notifier.name;\n } else if (platform === 'react-native') {\n item.framework = options.framework || 'react-native';\n item.notifier.name = options.notifier.name;\n }\n return item;\n}\n\nmodule.exports = RateLimiter;\n","'use strict';\n\n'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isPlainObject = function isPlainObject(obj) {\n\tif (!obj || toStr.call(obj) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tvar hasOwnConstructor = hasOwn.call(obj, 'constructor');\n\tvar hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n\t// Not own constructor property must be Object\n\tif (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n\t\treturn false;\n\t}\n\n\t// Own properties are enumerated firstly, so to speed up,\n\t// if last one is own, then all properties are own.\n\tvar key;\n\tfor (key in obj) {/**/}\n\n\treturn typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\nfunction merge() {\n var i, src, copy, clone, name,\n result = {},\n current = null,\n length = arguments.length;\n\n for (i=0; i < length; i++) {\n current = arguments[i];\n if (current == null) {\n continue;\n }\n\n for (name in current) {\n src = result[name];\n copy = current[name];\n if (result !== copy) {\n if (copy && isPlainObject(copy)) {\n clone = src && isPlainObject(src) ? src : {};\n result[name] = merge(clone, copy);\n } else if (typeof copy !== 'undefined') {\n result[name] = copy;\n }\n }\n }\n }\n return result;\n}\n\nmodule.exports = merge;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Queue - an object which handles which handles a queue of items to be sent to Rollbar.\n * This object handles rate limiting via a passed in rate limiter, retries based on connection\n * errors, and filtering of items based on a set of configurable predicates. The communication to\n * the backend is performed via a given API object.\n *\n * @param rateLimiter - An object which conforms to the interface\n * rateLimiter.shouldSend(item) -> bool\n * @param api - An object which conforms to the interface\n * api.postItem(payload, function(err, response))\n * @param logger - An object used to log verbose messages if desired\n * @param options - see Queue.prototype.configure\n */\nfunction Queue(rateLimiter, api, logger, options) {\n this.rateLimiter = rateLimiter;\n this.api = api;\n this.logger = logger;\n this.options = options;\n this.predicates = [];\n this.pendingItems = [];\n this.pendingRequests = [];\n this.retryQueue = [];\n this.retryHandle = null;\n this.waitCallback = null;\n this.waitIntervalID = null;\n}\n\n/*\n * configure - updates the options this queue uses\n *\n * @param options\n */\nQueue.prototype.configure = function(options) {\n this.api && this.api.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addPredicate - adds a predicate to the end of the list of predicates for this queue\n *\n * @param predicate - function(item, options) -> (bool|{err: Error})\n * Returning true means that this predicate passes and the item is okay to go on the queue\n * Returning false means do not add the item to the queue, but it is not an error\n * Returning {err: Error} means do not add the item to the queue, and the given error explains why\n * Returning {err: undefined} is equivalent to returning true but don't do that\n */\nQueue.prototype.addPredicate = function(predicate) {\n if (_.isFunction(predicate)) {\n this.predicates.push(predicate);\n }\n return this;\n};\n\nQueue.prototype.addPendingItem = function(item) {\n this.pendingItems.push(item);\n};\n\nQueue.prototype.removePendingItem = function(item) {\n var idx = this.pendingItems.indexOf(item);\n if (idx !== -1) {\n this.pendingItems.splice(idx, 1);\n }\n};\n\n/*\n * addItem - Send an item to the Rollbar API if all of the predicates are satisfied\n *\n * @param item - The payload to send to the backend\n * @param callback - function(error, repsonse) which will be called with the response from the API\n * in the case of a success, otherwise response will be null and error will have a value. If both\n * error and response are null then the item was stopped by a predicate which did not consider this\n * to be an error condition, but nonetheless did not send the item to the API.\n * @param originalError - The original error before any transformations that is to be logged if any\n */\nQueue.prototype.addItem = function(item, callback, originalError, originalItem) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() { return; };\n }\n var predicateResult = this._applyPredicates(item);\n if (predicateResult.stop) {\n this.removePendingItem(originalItem);\n callback(predicateResult.err);\n return;\n }\n this._maybeLog(item, originalError);\n this.removePendingItem(originalItem);\n if (!this.options.transmit) {\n callback(new Error('Transmit disabled'));\n return;\n }\n this.pendingRequests.push(item);\n try {\n this._makeApiRequest(item, function(err, resp) {\n this._dequeuePendingRequest(item);\n callback(err, resp);\n }.bind(this));\n } catch (e) {\n this._dequeuePendingRequest(item);\n callback(e);\n }\n};\n\n/*\n * wait - Stop any further errors from being added to the queue, and get called back when all items\n * currently processing have finished sending to the backend.\n *\n * @param callback - function() called when all pending items have been sent\n */\nQueue.prototype.wait = function(callback) {\n if (!_.isFunction(callback)) {\n return;\n }\n this.waitCallback = callback;\n if (this._maybeCallWait()) {\n return;\n }\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitIntervalID = setInterval(function() {\n this._maybeCallWait();\n }.bind(this), 500);\n};\n\n/* _applyPredicates - Sequentially applies the predicates that have been added to the queue to the\n * given item with the currently configured options.\n *\n * @param item - An item in the queue\n * @returns {stop: bool, err: (Error|null)} - stop being true means do not add item to the queue,\n * the error value should be passed up to a callbak if we are stopping.\n */\nQueue.prototype._applyPredicates = function(item) {\n var p = null;\n for (var i = 0, len = this.predicates.length; i < len; i++) {\n p = this.predicates[i](item, this.options);\n if (!p || p.err !== undefined) {\n return {stop: true, err: p.err};\n }\n }\n return {stop: false, err: null};\n};\n\n/*\n * _makeApiRequest - Send an item to Rollbar, callback when done, if there is an error make an\n * effort to retry if we are configured to do so.\n *\n * @param item - an item ready to send to the backend\n * @param callback - function(err, response)\n */\nQueue.prototype._makeApiRequest = function(item, callback) {\n var rateLimitResponse = this.rateLimiter.shouldSend(item);\n if (rateLimitResponse.shouldSend) {\n this.api.postItem(item, function(err, resp) {\n if (err) {\n this._maybeRetry(err, item, callback);\n } else {\n callback(err, resp);\n }\n }.bind(this));\n } else if (rateLimitResponse.error) {\n callback(rateLimitResponse.error);\n } else {\n this.api.postItem(rateLimitResponse.payload, callback);\n }\n};\n\n// These are errors basically mean there is no internet connection\nvar RETRIABLE_ERRORS = ['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED', 'EHOSTUNREACH', 'EPIPE', 'EAI_AGAIN'];\n\n/*\n * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback\n * with the error.\n *\n * @param err - an error returned by the API transport\n * @param item - the item that was trying to be sent when this error occured\n * @param callback - function(err, response)\n */\nQueue.prototype._maybeRetry = function(err, item, callback) {\n var shouldRetry = false;\n if (this.options.retryInterval) {\n for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {\n if (err.code === RETRIABLE_ERRORS[i]) {\n shouldRetry = true;\n break;\n }\n }\n if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {\n item.retries = item.retries ? item.retries + 1 : 1;\n if (item.retries > this.options.maxRetries) {\n shouldRetry = false;\n }\n }\n }\n if (shouldRetry) {\n this._retryApiRequest(item, callback);\n } else {\n callback(err);\n }\n};\n\n/*\n * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process\n * that queue based on the retryInterval in the options for this queue.\n *\n * @param item - an item that failed to send due to an error we deem retriable\n * @param callback - function(err, response)\n */\nQueue.prototype._retryApiRequest = function(item, callback) {\n this.retryQueue.push({item: item, callback: callback});\n\n if (!this.retryHandle) {\n this.retryHandle = setInterval(function() {\n while (this.retryQueue.length) {\n var retryObject = this.retryQueue.shift();\n this._makeApiRequest(retryObject.item, retryObject.callback);\n }\n }.bind(this), this.options.retryInterval);\n }\n};\n\n/*\n * _dequeuePendingRequest - Removes the item from the pending request queue, this queue is used to\n * enable to functionality of providing a callback that clients can pass to `wait` to be notified\n * when the pending request queue has been emptied. This must be called when the API finishes\n * processing this item. If a `wait` callback is configured, it is called by this function.\n *\n * @param item - the item previously added to the pending request queue\n */\nQueue.prototype._dequeuePendingRequest = function(item) {\n var idx = this.pendingRequests.indexOf(item);\n if (idx !== -1) {\n this.pendingRequests.splice(idx, 1);\n this._maybeCallWait();\n }\n};\n\nQueue.prototype._maybeLog = function(data, originalError) {\n if (this.logger && this.options.verbose) {\n var message = originalError;\n message = message || _.get(data, 'body.trace.exception.message');\n message = message || _.get(data, 'body.trace_chain.0.exception.message');\n if (message) {\n this.logger.error(message);\n return;\n }\n message = _.get(data, 'body.message.body');\n if (message) {\n this.logger.log(message);\n }\n }\n};\n\nQueue.prototype._maybeCallWait = function() {\n if (_.isFunction(this.waitCallback) && this.pendingItems.length === 0 && this.pendingRequests.length === 0) {\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitCallback();\n return true;\n }\n return false;\n};\n\nmodule.exports = Queue;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Notifier - the internal object responsible for delegating between the client exposed API, the\n * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the\n * queue which handles the communcation with the Rollbar API servers.\n *\n * @param queue - an object that conforms to the interface: addItem(item, callback)\n * @param options - an object representing the options to be set for this notifier, this should have\n * any defaults already set by the caller\n */\nfunction Notifier(queue, options) {\n this.queue = queue;\n this.options = options;\n this.transforms = [];\n this.diagnostic = {};\n}\n\n/*\n * configure - updates the options for this notifier with the passed in object\n *\n * @param options - an object which gets merged with the current options set on this notifier\n * @returns this\n */\nNotifier.prototype.configure = function(options) {\n this.queue && this.queue.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addTransform - adds a transform onto the end of the queue of transforms for this notifier\n *\n * @param transform - a function which takes three arguments:\n * * item: An Object representing the data to eventually be sent to Rollbar\n * * options: The current value of the options for this notifier\n * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this\n * callback with a null value for error if it wants the processing chain to continue, otherwise\n * with an error to terminate the processing. The item should be the updated item after this\n * transform is finished modifying it.\n */\nNotifier.prototype.addTransform = function(transform) {\n if (_.isFunction(transform)) {\n this.transforms.push(transform);\n }\n return this;\n};\n\n/*\n * log - the internal log function which applies the configured transforms and then pushes onto the\n * queue to be sent to the backend.\n *\n * @param item - An object with the following structure:\n * message [String] - An optional string to be sent to rollbar\n * error [Error] - An optional error\n *\n * @param callback - A function of type function(err, resp) which will be called with exactly one\n * null argument and one non-null argument. The callback will be called once, either during the\n * transform stage if an error occurs inside a transform, or in response to the communication with\n * the backend. The second argument will be the response from the backend in case of success.\n */\nNotifier.prototype.log = function(item, callback) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!this.options.enabled) {\n return callback(new Error('Rollbar is not enabled'));\n }\n\n this.queue.addPendingItem(item);\n var originalError = item.err;\n this._applyTransforms(item, function(err, i) {\n if (err) {\n this.queue.removePendingItem(item);\n return callback(err, null);\n }\n this.queue.addItem(i, callback, originalError, item);\n }.bind(this));\n};\n\n/* Internal */\n\n/*\n * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See\n * `addTransform` for more information.\n *\n * @param item - An item to be transformed\n * @param callback - A function of type function(err, item) which will be called with a non-null\n * error and a null item in the case of a transform failure, or a null error and non-null item after\n * all transforms have been applied.\n */\nNotifier.prototype._applyTransforms = function(item, callback) {\n var transformIndex = -1;\n var transformsLength = this.transforms.length;\n var transforms = this.transforms;\n var options = this.options;\n\n var cb = function(err, i) {\n if (err) {\n callback(err, null);\n return;\n }\n\n transformIndex++;\n\n if (transformIndex === transformsLength) {\n callback(null, i);\n return;\n }\n\n transforms[transformIndex](i, options, cb);\n };\n\n cb(null, item);\n};\n\nmodule.exports = Notifier;\n","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1/item/',\n search: null,\n version: '1',\n protocol: 'https:',\n port: 443\n};\n\n/**\n * Api is an object that encapsulates methods of communicating with\n * the Rollbar API. It is a standard interface with some parts implemented\n * differently for server or browser contexts. It is an object that should\n * be instantiated when used so it can contain non-global options that may\n * be different for another instance of RollbarApi.\n *\n * @param options {\n * accessToken: the accessToken to use for posting items to rollbar\n * endpoint: an alternative endpoint to send errors to\n * must be a valid, fully qualified URL.\n * The default is: https://api.rollbar.com/api/1/item\n * proxy: if you wish to proxy requests provide an object\n * with the following keys:\n * host or hostname (required): foo.example.com\n * port (optional): 123\n * protocol (optional): https\n * }\n */\nfunction Api(options, transport, urllib, truncation, jsonBackup) {\n this.options = options;\n this.transport = transport;\n this.url = urllib;\n this.truncation = truncation;\n this.jsonBackup = jsonBackup;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, urllib);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function(data, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n var self = this;\n\n // ensure the network request is scheduled after the current tick.\n setTimeout(function() {\n self.transport.post(self.accessToken, transportOptions, payload, callback);\n }, 0);\n};\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.buildJsonPayload = function(data, callback) {\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n\n if (stringifyResult.error) {\n if (callback) {\n callback(stringifyResult.error);\n }\n return null;\n }\n\n return stringifyResult.value;\n};\n\n/**\n *\n * @param jsonPayload\n * @param callback\n */\nApi.prototype.postJsonPayload = function(jsonPayload, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n this.transport.postJsonPayload(this.accessToken, transportOptions, jsonPayload, callback);\n};\n\nApi.prototype.configure = function(options) {\n var oldOptions = this.oldOptions;\n this.options = _.merge(oldOptions, options);\n this.transportOptions = _getTransport(this.options, this.url);\n if (this.options.accessToken !== undefined) {\n this.accessToken = this.options.accessToken;\n }\n return this;\n};\n\nfunction _getTransport(options, url) {\n return helpers.getTransportFromOptions(options, defaultOptions, url);\n}\n\nmodule.exports = Api;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (!_.isType(data.context, 'string')) {\n var contextResult = _.stringify(data.context, jsonBackup);\n if (contextResult.error) {\n data.context = 'Error: could not serialize \\'context\\'';\n } else {\n data.context = contextResult.value || '';\n }\n if (data.context.length > 255) {\n data.context = data.context.substr(0, 255);\n }\n }\n return {\n access_token: accessToken,\n data: data\n };\n}\n\nfunction getTransportFromOptions(options, defaults, url) {\n var hostname = defaults.hostname;\n var protocol = defaults.protocol;\n var port = defaults.port;\n var path = defaults.path;\n var search = defaults.search;\n var timeout = options.timeout;\n var transport = detectTransport(options)\n\n var proxy = options.proxy;\n if (options.endpoint) {\n var opts = url.parse(options.endpoint);\n hostname = opts.hostname;\n protocol = opts.protocol;\n port = opts.port;\n path = opts.pathname;\n search = opts.search;\n }\n return {\n timeout: timeout,\n hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy,\n transport: transport\n };\n}\n\nfunction detectTransport(options) {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var transport = options.defaultTransport || 'xhr';\n if (typeof gWindow.fetch === 'undefined') transport = 'xhr';\n if (typeof gWindow.XMLHttpRequest === 'undefined') transport = 'fetch';\n return transport;\n}\n\nfunction transportOptions(transport, method) {\n var protocol = transport.protocol || 'https:';\n var port = transport.port || (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);\n var hostname = transport.hostname;\n var path = transport.path;\n var timeout = transport.timeout;\n var transportAPI = transport.transport;\n if (transport.search) {\n path = path + transport.search;\n }\n if (transport.proxy) {\n path = protocol + '//' + hostname + path;\n hostname = transport.proxy.host || transport.proxy.hostname;\n port = transport.proxy.port;\n protocol = transport.proxy.protocol || protocol;\n }\n return {\n timeout: timeout,\n protocol: protocol,\n hostname: hostname,\n path: path,\n port: port,\n method: method,\n transport: transportAPI\n };\n}\n\nfunction appendPathToPath(base, path) {\n var baseTrailingSlash = /\\/$/.test(base);\n var pathBeginningSlash = /^\\//.test(path);\n\n if (baseTrailingSlash && pathBeginningSlash) {\n path = path.substring(1);\n } else if (!baseTrailingSlash && !pathBeginningSlash) {\n path = '/' + path;\n }\n\n return base + path;\n}\n\nmodule.exports = {\n buildPayload: buildPayload,\n getTransportFromOptions: getTransportFromOptions,\n transportOptions: transportOptions,\n appendPathToPath: appendPathToPath\n};\n","// Console-polyfill. MIT license.\n// https://github.com/paulmillr/console-polyfill\n// Make it safe to do console.log() always.\n(function(global) {\n 'use strict';\n if (!global.console) {\n global.console = {};\n }\n var con = global.console;\n var prop, method;\n var dummy = function() {};\n var properties = ['memory'];\n var methods = ('assert,clear,count,debug,dir,dirxml,error,exception,group,' +\n 'groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,' +\n 'show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn').split(',');\n while (prop = properties.pop()) if (!con[prop]) con[prop] = {};\n while (method = methods.pop()) if (!con[method]) con[method] = dummy;\n // Using `this` for web workers & supports Browserify / Webpack.\n})(typeof window === 'undefined' ? this : window);\n","'use strict';\n\n// This detection.js module is used to encapsulate any ugly browser/feature\n// detection we may need to do.\n\n// Figure out which version of IE we're using, if any.\n// This is gleaned from http://stackoverflow.com/questions/5574842/best-way-to-check-for-ie-less-than-9-in-javascript-without-library\n// Will return an integer on IE (i.e. 8)\n// Will return undefined otherwise\nfunction getIEVersion() {\n\tvar undef;\n\tif (typeof document === 'undefined') {\n\t\treturn undef;\n\t}\n\n var v = 3,\n div = document.createElement('div'),\n all = div.getElementsByTagName('i');\n\n while (\n div.innerHTML = '',\n all[0]\n );\n\n return v > 4 ? v : undef;\n}\n\nvar Detection = {\n ieVersion: getIEVersion\n};\n\nmodule.exports = Detection;\n","'use strict';\n\nfunction captureUncaughtExceptions(window, handler, shim) {\n if (!window) { return; }\n var oldOnError;\n\n if (typeof handler._rollbarOldOnError === 'function') {\n oldOnError = handler._rollbarOldOnError;\n } else if (window.onerror) {\n oldOnError = window.onerror;\n while (oldOnError._rollbarOldOnError) {\n oldOnError = oldOnError._rollbarOldOnError;\n }\n handler._rollbarOldOnError = oldOnError;\n }\n\n handler.handleAnonymousErrors();\n\n var fn = function() {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n if (shim) {\n fn._rollbarOldOnError = oldOnError;\n }\n window.onerror = fn;\n}\n\nfunction _rollbarWindowOnError(window, r, old, args) {\n if (window._rollbarWrappedError) {\n if (!args[4]) {\n args[4] = window._rollbarWrappedError;\n }\n if (!args[5]) {\n args[5] = window._rollbarWrappedError._rollbarContext;\n }\n window._rollbarWrappedError = null;\n }\n\n var ret = r.handleUncaughtException.apply(r, args);\n\n if (old) {\n old.apply(window, args);\n }\n\n // Let other chained onerror handlers above run before setting this.\n // If an error is thrown and caught within a chained onerror handler,\n // Error.prepareStackTrace() will see that one before the one we want.\n if (ret === 'anonymous') {\n r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()\n }\n}\n\nfunction captureUnhandledRejections(window, handler, shim) {\n if (!window) { return; }\n\n if (typeof window._rollbarURH === 'function' && window._rollbarURH.belongsToShim) {\n window.removeEventListener('unhandledrejection', window._rollbarURH);\n }\n\n var rejectionHandler = function (evt) {\n var reason, promise, detail;\n try {\n reason = evt.reason;\n } catch (e) {\n reason = undefined;\n }\n try {\n promise = evt.promise;\n } catch (e) {\n promise = '[unhandledrejection] error getting `promise` from event';\n }\n try {\n detail = evt.detail;\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\n }\n } catch (e) {\n // Ignore\n }\n if (!reason) {\n reason = '[unhandledrejection] error getting `reason` from event';\n }\n\n if (handler && handler.handleUnhandledRejection) {\n handler.handleUnhandledRejection(reason, promise);\n }\n };\n rejectionHandler.belongsToShim = shim;\n window._rollbarURH = rejectionHandler;\n window.addEventListener('unhandledrejection', rejectionHandler);\n}\n\n\nmodule.exports = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections\n};\n","'use strict';\n\nvar _ = require('../utility');\nvar makeFetchRequest = require('./transport/fetch');\nvar makeXhrRequest = require('./transport/xhr');\n\n/*\n * accessToken may be embedded in payload but that should not\n * be assumed\n *\n * options: {\n * hostname\n * protocol\n * path\n * port\n * method\n * transport ('xhr' | 'fetch')\n * }\n *\n * params is an object containing key/value pairs. These\n * will be appended to the path as 'key=value&key=value'\n *\n * payload is an unserialized object\n */\nfunction Transport(truncation) {\n this.truncation = truncation;\n}\n\nTransport.prototype.get = function(accessToken, options, params, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n _.addParamsAndAccessTokenToPath(accessToken, options, params);\n\n var method = 'GET';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken, url, method, null, callback, requestFactory, options.timeout, options.transport\n );\n}\n\nTransport.prototype.post = function(accessToken, options, payload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!payload) {\n return callback(new Error('Cannot send empty request'));\n }\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n if (stringifyResult.error) {\n return callback(stringifyResult.error);\n }\n\n var writeData = stringifyResult.value;\n var method = 'POST';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken, url, method, writeData, callback, requestFactory, options.timeout, options.transport\n );\n}\n\nTransport.prototype.postJsonPayload = function (accessToken, options, jsonPayload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n var method = 'POST';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken, url, method, jsonPayload, callback, requestFactory, options.timeout, options.transport\n );\n}\n\n\n// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope\n// so Angular change detection isn't triggered on each API call.\n// This is the equivalent of runOutsideAngular().\n//\nTransport.prototype._makeZoneRequest = function () {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;\n var args = Array.prototype.slice.call(arguments);\n\n if (currentZone && currentZone._name === 'angular') {\n var rootZone = currentZone._parent;\n var self = this;\n rootZone.run(function () {\n self._makeRequest.apply(undefined, args);\n });\n } else {\n this._makeRequest.apply(undefined, args);\n }\n}\n\nTransport.prototype._makeRequest = function (\n accessToken, url, method, data, callback, requestFactory, timeout, transport\n) {\n if (typeof RollbarProxy !== 'undefined') {\n return _proxyRequest(data, callback);\n }\n\n if (transport === 'fetch') {\n makeFetchRequest(accessToken, url, method, data, callback, timeout)\n } else {\n makeXhrRequest(accessToken, url, method, data, callback, requestFactory, timeout)\n }\n}\n\n/* global RollbarProxy */\nfunction _proxyRequest(json, callback) {\n var rollbarProxy = new RollbarProxy();\n rollbarProxy.sendJsonPayload(\n json,\n function(_msg) { /* do nothing */ }, // eslint-disable-line no-unused-vars\n function(err) {\n callback(new Error(err));\n }\n );\n}\n\nmodule.exports = Transport;\n","'use strict';\n\nvar logger = require('../logger');\nvar _ = require('../../utility');\n\nfunction makeFetchRequest(accessToken, url, method, data, callback, timeout) {\n var controller;\n var timeoutId;\n\n if(_.isFiniteNumber(timeout)) {\n controller = new AbortController();\n timeoutId = setTimeout(function () {controller.abort()}, timeout);\n }\n\n fetch(url, {\n method: method,\n headers: {\n 'Content-Type': 'application/json',\n 'X-Rollbar-Access-Token': accessToken,\n signal: controller && controller.signal\n },\n body: data,\n })\n .then(function (response) {\n if (timeoutId) clearTimeout(timeoutId);\n return response.json();\n })\n .then(function (data) {\n callback(null, data);\n })\n .catch(function (error) {\n logger.error(error.message);\n callback(error);\n });\n}\n\nmodule.exports = makeFetchRequest;\n","'use strict';\n\n/*global XDomainRequest*/\n\nvar _ = require('../../utility');\nvar logger = require('../logger');\n\nfunction makeXhrRequest(accessToken, url, method, data, callback, requestFactory, timeout) {\n var request;\n if (requestFactory) {\n request = requestFactory();\n } else {\n request = _createXMLHTTPObject();\n }\n if (!request) {\n // Give up, no way to send requests\n return callback(new Error('No way to send a request'));\n }\n try {\n try {\n var onreadystatechange = function() {\n try {\n if (onreadystatechange && request.readyState === 4) {\n onreadystatechange = undefined;\n\n var parseResponse = _.jsonParse(request.responseText);\n if (_isSuccess(request)) {\n callback(parseResponse.error, parseResponse.value);\n return;\n } else if (_isNormalFailure(request)) {\n if (request.status === 403) {\n // likely caused by using a server access token\n var message = parseResponse.value && parseResponse.value.message;\n logger.error(message);\n }\n // return valid http status codes\n callback(new Error(String(request.status)));\n } else {\n // IE will return a status 12000+ on some sort of connection failure,\n // so we return a blank error\n // http://msdn.microsoft.com/en-us/library/aa383770%28VS.85%29.aspx\n var msg = 'XHR response had no status code (likely connection failure)';\n callback(_newRetriableError(msg));\n }\n }\n } catch (ex) {\n //jquery source mentions firefox may error out while accessing the\n //request members if there is a network error\n //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111\n var exc;\n if (ex && ex.stack) {\n exc = ex;\n } else {\n exc = new Error(ex);\n }\n callback(exc);\n }\n };\n\n request.open(method, url, true);\n if (request.setRequestHeader) {\n request.setRequestHeader('Content-Type', 'application/json');\n request.setRequestHeader('X-Rollbar-Access-Token', accessToken);\n }\n\n if(_.isFiniteNumber(timeout)) {\n request.timeout = timeout;\n }\n\n request.onreadystatechange = onreadystatechange;\n request.send(data);\n } catch (e1) {\n // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest\n if (typeof XDomainRequest !== 'undefined') {\n\n // Assume we are in a really old browser which has a bunch of limitations:\n // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx\n\n // Extreme paranoia: if we have XDomainRequest then we have a window, but just in case\n if (!window || !window.location) {\n return callback(new Error('No window available during request, unknown environment'));\n }\n\n // If the current page is http, try and send over http\n if (window.location.href.substring(0, 5) === 'http:' && url.substring(0, 5) === 'https') {\n url = 'http' + url.substring(5);\n }\n\n var xdomainrequest = new XDomainRequest();\n xdomainrequest.onprogress = function() {};\n xdomainrequest.ontimeout = function() {\n var msg = 'Request timed out';\n var code = 'ETIMEDOUT';\n callback(_newRetriableError(msg, code));\n };\n xdomainrequest.onerror = function() {\n callback(new Error('Error during request'));\n };\n xdomainrequest.onload = function() {\n var parseResponse = _.jsonParse(xdomainrequest.responseText);\n callback(parseResponse.error, parseResponse.value);\n };\n xdomainrequest.open(method, url, true);\n xdomainrequest.send(data);\n } else {\n callback(new Error('Cannot find a method to transport a request'));\n }\n }\n } catch (e2) {\n callback(e2);\n }\n}\n\nfunction _createXMLHTTPObject() {\n /* global ActiveXObject:false */\n\n var factories = [\n function () {\n return new XMLHttpRequest();\n },\n function () {\n return new ActiveXObject('Msxml2.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Msxml3.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Microsoft.XMLHTTP');\n }\n ];\n var xmlhttp;\n var i;\n var numFactories = factories.length;\n for (i = 0; i < numFactories; i++) {\n /* eslint-disable no-empty */\n try {\n xmlhttp = factories[i]();\n break;\n } catch (e) {\n // pass\n }\n /* eslint-enable no-empty */\n }\n return xmlhttp;\n}\n\nfunction _isSuccess(r) {\n return r && r.status && r.status === 200;\n}\n\nfunction _isNormalFailure(r) {\n return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;\n}\n\nfunction _newRetriableError(message, code) {\n var err = new Error(message);\n err.code = code || 'ENOTFOUND';\n return err;\n}\n\nmodule.exports = makeXhrRequest;\n","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('../errorParser');\nvar logger = require('./logger');\n\nfunction handleDomException(item, options, callback) {\n if(item.err && errorParser.Stack(item.err).name === 'DOMException') {\n var originalError = new Error();\n originalError.name = item.err.name;\n originalError.message = item.err.message;\n originalError.stack = item.err.stack;\n originalError.nested = item.err;\n item.err = originalError;\n }\n callback(null, item);\n}\n\nfunction handleItemWithError(item, options, callback) {\n item.data = item.data || {};\n if (item.err) {\n try {\n item.stackInfo = item.err._savedStackTrace || errorParser.parse(item.err, item.skipFrames);\n\n if (options.addErrorContext) {\n addErrorContext(item);\n }\n } catch (e) {\n logger.error('Error while parsing the error object.', e);\n try {\n item.message = item.err.message || item.err.description || item.message || String(item.err);\n } catch (e2) {\n item.message = String(item.err) || String(e2);\n }\n delete item.err;\n }\n }\n callback(null, item);\n}\n\nfunction addErrorContext(item) {\n var chain = [];\n var err = item.err;\n\n chain.push(err);\n\n while (err.nested || err.cause) {\n err = err.nested || err.cause;\n chain.push(err);\n }\n\n _.addErrorContext(item, chain);\n}\n\nfunction ensureItemHasSomethingToSay(item, options, callback) {\n if (!item.message && !item.stackInfo && !item.custom) {\n callback(new Error('No message, stack info, or custom data'), null);\n }\n callback(null, item);\n}\n\nfunction addBaseInfo(item, options, callback) {\n var environment = (options.payload && options.payload.environment) || options.environment;\n item.data = _.merge(item.data, {\n environment: environment,\n level: item.level,\n endpoint: options.endpoint,\n platform: 'browser',\n framework: 'browser-js',\n language: 'javascript',\n server: {},\n uuid: item.uuid,\n notifier: {\n name: 'rollbar-browser-js',\n version: options.version\n },\n custom: item.custom\n });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function(item, options, callback) {\n var requestInfo = {};\n\n if (window && window.location) {\n requestInfo.url = window.location.href;\n requestInfo.query_string = window.location.search;\n }\n\n var remoteString = '$remote_ip';\n if (!options.captureIp) {\n remoteString = null;\n } else if (options.captureIp !== true) {\n remoteString += '_anonymize';\n }\n if (remoteString) requestInfo.user_ip = remoteString;\n\n if (Object.keys(requestInfo).length > 0) {\n _.set(item, 'data.request', requestInfo);\n }\n\n callback(null, item);\n };\n}\n\nfunction addClientInfo(window) {\n return function(item, options, callback) {\n if (!window) {\n return callback(null, item);\n }\n var nav = window.navigator || {};\n var scr = window.screen || {};\n _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: nav.userAgent,\n language: nav.language,\n cookie_enabled: nav.cookieEnabled,\n screen: {\n width: scr.width,\n height: scr.height\n }\n }\n });\n callback(null, item);\n };\n}\n\nfunction addPluginInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.navigator) {\n return callback(null, item);\n }\n var plugins = [];\n var navPlugins = window.navigator.plugins || [];\n var cur;\n for (var i=0, l=navPlugins.length; i < l; ++i) {\n cur = navPlugins[i];\n plugins.push({name: cur.name, description: cur.description});\n }\n _.set(item, 'data.client.javascript.plugins', plugins);\n callback(null, item);\n };\n}\n\nfunction addBody(item, options, callback) {\n if (item.stackInfo) {\n if (item.stackInfo.traceChain) {\n addBodyTraceChain(item, options, callback);\n } else {\n addBodyTrace(item, options, callback);\n }\n } else {\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction addBodyMessage(item, options, callback) {\n var message = item.message;\n var custom = item.custom;\n\n if (!message) {\n message = 'Item sent with null or missing arguments.';\n }\n var result = {\n body: message\n };\n\n if (custom) {\n result.extra = _.merge(custom);\n }\n\n _.set(item, 'data.body', {message: result});\n callback(null, item);\n}\n\nfunction stackFromItem(item) {\n // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = item.stackInfo.stack;\n if (stack && stack.length === 0 && item._unhandledStackInfo && item._unhandledStackInfo.stack) {\n stack = item._unhandledStackInfo.stack;\n }\n return stack;\n}\n\nfunction addBodyTraceChain(item, options, callback) {\n var traceChain = item.stackInfo.traceChain;\n var traces = [];\n\n var traceChainLength = traceChain.length;\n for (var i = 0; i < traceChainLength; i++) {\n var trace = buildTrace(item, traceChain[i], options);\n traces.push(trace);\n }\n\n _.set(item, 'data.body', {trace_chain: traces});\n callback(null, item);\n}\n\nfunction addBodyTrace(item, options, callback) {\n var stack = stackFromItem(item);\n\n if (stack) {\n var trace = buildTrace(item, item.stackInfo, options);\n _.set(item, 'data.body', {trace: trace});\n callback(null, item);\n } else {\n var stackInfo = item.stackInfo;\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction buildTrace(item, stackInfo, options) {\n var description = item && item.data.description;\n var custom = item && item.custom;\n var stack = stackFromItem(item);\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n var trace = {\n exception: {\n 'class': className,\n message: message\n }\n };\n\n if (description) {\n trace.exception.description = description;\n }\n\n if (stack) {\n if (stack.length === 0) {\n trace.exception.stack = stackInfo.rawStack;\n trace.exception.raw = String(stackInfo.rawException);\n }\n var stackFrame;\n var frame;\n var code;\n var pre;\n var post;\n var contextLength;\n var i, mid;\n\n trace.frames = [];\n for (i = 0; i < stack.length; ++i) {\n stackFrame = stack[i];\n frame = {\n filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',\n lineno: stackFrame.line || null,\n method: (!stackFrame.func || stackFrame.func === '?') ? '[anonymous]' : stackFrame.func,\n colno: stackFrame.column\n };\n if (options.sendFrameUrl) {\n frame.url = stackFrame.url;\n }\n if (frame.method && frame.method.endsWith && frame.method.endsWith('_rollbar_wrapped')) {\n continue;\n }\n\n code = pre = post = null;\n contextLength = stackFrame.context ? stackFrame.context.length : 0;\n if (contextLength) {\n mid = Math.floor(contextLength / 2);\n pre = stackFrame.context.slice(0, mid);\n code = stackFrame.context[mid];\n post = stackFrame.context.slice(mid);\n }\n\n if (code) {\n frame.code = code;\n }\n\n if (pre || post) {\n frame.context = {};\n if (pre && pre.length) {\n frame.context.pre = pre;\n }\n if (post && post.length) {\n frame.context.post = post;\n }\n }\n\n if (stackFrame.args) {\n frame.args = stackFrame.args;\n }\n\n trace.frames.push(frame);\n }\n\n // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last\n trace.frames.reverse();\n\n if (custom) {\n trace.extra = _.merge(custom);\n }\n }\n\n return trace;\n}\n\nfunction errorClass(stackInfo, guess, options) {\n if (stackInfo.name) {\n return stackInfo.name;\n } else if (options.guessErrorClass) {\n return guess;\n } else {\n return '(unknown)';\n }\n}\n\nfunction addScrubber(scrubFn) {\n return function (item, options, callback) {\n if (scrubFn) {\n var scrubFields = options.scrubFields || [];\n var scrubPaths = options.scrubPaths || [];\n item.data = scrubFn(item.data, scrubFields, scrubPaths);\n }\n callback(null, item);\n }\n}\n\nmodule.exports = {\n handleDomException: handleDomException,\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n addScrubber: addScrubber\n};\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('error-stack-parser', ['stackframe'], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory(require('stackframe'));\n } else {\n root.ErrorStackParser = factory(root.StackFrame);\n }\n}(this, function ErrorStackParser(StackFrame) {\n 'use strict';\n\n var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\\S+:\\d+/;\n var CHROME_IE_STACK_REGEXP = /^\\s*at .*(\\S+:\\d+|\\(native\\))/m;\n var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\\[native code])?$/;\n\n return {\n /**\n * Given an Error object, extract the most information from it.\n *\n * @param {Error} error object\n * @return {Array} of StackFrames\n */\n parse: function ErrorStackParser$$parse(error) {\n if (typeof error.stacktrace !== 'undefined' || typeof error['opera#sourceloc'] !== 'undefined') {\n return this.parseOpera(error);\n } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {\n return this.parseV8OrIE(error);\n } else if (error.stack) {\n return this.parseFFOrSafari(error);\n } else {\n throw new Error('Cannot parse given Error object');\n }\n },\n\n // Separate line and column numbers from a string of the form: (URI:Line:Column)\n extractLocation: function ErrorStackParser$$extractLocation(urlLike) {\n // Fail-fast but return locations like \"(native)\"\n if (urlLike.indexOf(':') === -1) {\n return [urlLike];\n }\n\n var regExp = /(.+?)(?::(\\d+))?(?::(\\d+))?$/;\n var parts = regExp.exec(urlLike.replace(/[()]/g, ''));\n return [parts[1], parts[2] || undefined, parts[3] || undefined];\n },\n\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(CHROME_IE_STACK_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n if (line.indexOf('(eval ') > -1) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n line = line.replace(/eval code/g, 'eval').replace(/(\\(eval at [^()]*)|(,.*$)/g, '');\n }\n var sanitizedLine = line.replace(/^\\s+/, '').replace(/\\(eval code/g, '(').replace(/^.*?\\s+/, '');\n\n // capture and preseve the parenthesized location \"(/foo/my bar.js:12:87)\" in\n // case it has spaces in it, as the string is split on \\s+ later on\n var location = sanitizedLine.match(/ (\\(.+\\)$)/);\n\n // remove the parenthesized location from the line, if it was matched\n sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;\n\n // if a location was matched, pass it to extractLocation() otherwise pass all sanitizedLine\n // because this line doesn't have function name\n var locationParts = this.extractLocation(location ? location[1] : sanitizedLine);\n var functionName = location && sanitizedLine || undefined;\n var fileName = ['eval', ''].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];\n\n return new StackFrame({\n functionName: functionName,\n fileName: fileName,\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n },\n\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n if (line.indexOf(' > eval') > -1) {\n line = line.replace(/ line (\\d+)(?: > eval line \\d+)* > eval:\\d+:\\d+/g, ':$1');\n }\n\n if (line.indexOf('@') === -1 && line.indexOf(':') === -1) {\n // Safari eval frames only have function names and nothing else\n return new StackFrame({\n functionName: line\n });\n } else {\n var functionNameRegex = /((.*\".+\"[^@]*)?[^@]*)(?:@)/;\n var matches = line.match(functionNameRegex);\n var functionName = matches && matches[1] ? matches[1] : undefined;\n var locationParts = this.extractLocation(line.replace(functionNameRegex, ''));\n\n return new StackFrame({\n functionName: functionName,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }\n }, this);\n },\n\n parseOpera: function ErrorStackParser$$parseOpera(e) {\n if (!e.stacktrace || (e.message.indexOf('\\n') > -1 &&\n e.message.split('\\n').length > e.stacktrace.split('\\n').length)) {\n return this.parseOpera9(e);\n } else if (!e.stack) {\n return this.parseOpera10(e);\n } else {\n return this.parseOpera11(e);\n }\n },\n\n parseOpera9: function ErrorStackParser$$parseOpera9(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)/i;\n var lines = e.message.split('\\n');\n var result = [];\n\n for (var i = 2, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(new StackFrame({\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n }));\n }\n }\n\n return result;\n },\n\n parseOpera10: function ErrorStackParser$$parseOpera10(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)(?:: In function (\\S+))?$/i;\n var lines = e.stacktrace.split('\\n');\n var result = [];\n\n for (var i = 0, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(\n new StackFrame({\n functionName: match[3] || undefined,\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n })\n );\n }\n }\n\n return result;\n },\n\n // Opera 10.65+ Error.stack very similar to FF/Safari\n parseOpera11: function ErrorStackParser$$parseOpera11(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);\n }, this);\n\n return filtered.map(function(line) {\n var tokens = line.split('@');\n var locationParts = this.extractLocation(tokens.pop());\n var functionCall = (tokens.shift() || '');\n var functionName = functionCall\n .replace(//, '$2')\n .replace(/\\([^)]*\\)/g, '') || undefined;\n var argsRaw;\n if (functionCall.match(/\\(([^)]*)\\)/)) {\n argsRaw = functionCall.replace(/^[^(]+\\(([^)]*)\\)$/, '$1');\n }\n var args = (argsRaw === undefined || argsRaw === '[arguments not available]') ?\n undefined : argsRaw.split(',');\n\n return new StackFrame({\n functionName: functionName,\n args: args,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n }\n };\n}));\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('stackframe', [], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.StackFrame = factory();\n }\n}(this, function() {\n 'use strict';\n function _isNumber(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n }\n\n function _capitalize(str) {\n return str.charAt(0).toUpperCase() + str.substring(1);\n }\n\n function _getter(p) {\n return function() {\n return this[p];\n };\n }\n\n var booleanProps = ['isConstructor', 'isEval', 'isNative', 'isToplevel'];\n var numericProps = ['columnNumber', 'lineNumber'];\n var stringProps = ['fileName', 'functionName', 'source'];\n var arrayProps = ['args'];\n var objectProps = ['evalOrigin'];\n\n var props = booleanProps.concat(numericProps, stringProps, arrayProps, objectProps);\n\n function StackFrame(obj) {\n if (!obj) return;\n for (var i = 0; i < props.length; i++) {\n if (obj[props[i]] !== undefined) {\n this['set' + _capitalize(props[i])](obj[props[i]]);\n }\n }\n }\n\n StackFrame.prototype = {\n getArgs: function() {\n return this.args;\n },\n setArgs: function(v) {\n if (Object.prototype.toString.call(v) !== '[object Array]') {\n throw new TypeError('Args must be an Array');\n }\n this.args = v;\n },\n\n getEvalOrigin: function() {\n return this.evalOrigin;\n },\n setEvalOrigin: function(v) {\n if (v instanceof StackFrame) {\n this.evalOrigin = v;\n } else if (v instanceof Object) {\n this.evalOrigin = new StackFrame(v);\n } else {\n throw new TypeError('Eval Origin must be an Object or StackFrame');\n }\n },\n\n toString: function() {\n var fileName = this.getFileName() || '';\n var lineNumber = this.getLineNumber() || '';\n var columnNumber = this.getColumnNumber() || '';\n var functionName = this.getFunctionName() || '';\n if (this.getIsEval()) {\n if (fileName) {\n return '[eval] (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return '[eval]:' + lineNumber + ':' + columnNumber;\n }\n if (functionName) {\n return functionName + ' (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return fileName + ':' + lineNumber + ':' + columnNumber;\n }\n };\n\n StackFrame.fromString = function StackFrame$$fromString(str) {\n var argsStartIndex = str.indexOf('(');\n var argsEndIndex = str.lastIndexOf(')');\n\n var functionName = str.substring(0, argsStartIndex);\n var args = str.substring(argsStartIndex + 1, argsEndIndex).split(',');\n var locationString = str.substring(argsEndIndex + 1);\n\n if (locationString.indexOf('@') === 0) {\n var parts = /@(.+?)(?::(\\d+))?(?::(\\d+))?$/.exec(locationString, '');\n var fileName = parts[1];\n var lineNumber = parts[2];\n var columnNumber = parts[3];\n }\n\n return new StackFrame({\n functionName: functionName,\n args: args || undefined,\n fileName: fileName,\n lineNumber: lineNumber || undefined,\n columnNumber: columnNumber || undefined\n });\n };\n\n for (var i = 0; i < booleanProps.length; i++) {\n StackFrame.prototype['get' + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);\n StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function(p) {\n return function(v) {\n this[p] = Boolean(v);\n };\n })(booleanProps[i]);\n }\n\n for (var j = 0; j < numericProps.length; j++) {\n StackFrame.prototype['get' + _capitalize(numericProps[j])] = _getter(numericProps[j]);\n StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function(p) {\n return function(v) {\n if (!_isNumber(v)) {\n throw new TypeError(p + ' must be a Number');\n }\n this[p] = Number(v);\n };\n })(numericProps[j]);\n }\n\n for (var k = 0; k < stringProps.length; k++) {\n StackFrame.prototype['get' + _capitalize(stringProps[k])] = _getter(stringProps[k]);\n StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function(p) {\n return function(v) {\n this[p] = String(v);\n };\n })(stringProps[k]);\n }\n\n return StackFrame;\n}));\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction itemToPayload(item, options, callback) {\n var data = item.data;\n\n if (item._isUncaught) {\n data._isUncaught = true;\n }\n if (item._originalArgs) {\n data._originalArgs = item._originalArgs;\n }\n callback(null, data);\n}\n\nfunction addPayloadOptions(item, options, callback) {\n var payloadOptions = options.payload || {};\n if (payloadOptions.body) {\n delete payloadOptions.body;\n }\n\n item.data = _.merge(item.data, payloadOptions);\n callback(null, item);\n}\n\nfunction addTelemetryData(item, options, callback) {\n if (item.telemetryEvents) {\n _.set(item, 'data.body.telemetry', item.telemetryEvents);\n }\n callback(null, item);\n}\n\nfunction addMessageWithError(item, options, callback) {\n if (!item.message) {\n callback(null, item);\n return;\n }\n var tracePath = 'data.body.trace_chain.0';\n var trace = _.get(item, tracePath);\n if (!trace) {\n tracePath = 'data.body.trace';\n trace = _.get(item, tracePath);\n }\n if (trace) {\n if (!(trace.exception && trace.exception.description)) {\n _.set(item, tracePath+'.exception.description', item.message);\n callback(null, item);\n return;\n }\n var extra = _.get(item, tracePath+'.extra') || {};\n var newExtra = _.merge(extra, {message: item.message});\n _.set(item, tracePath+'.extra', newExtra);\n }\n callback(null, item);\n}\n\nfunction userTransform(logger) {\n return function(item, options, callback) {\n var newItem = _.merge(item);\n var response = null;\n try {\n if (_.isFunction(options.transform)) {\n response = options.transform(newItem.data, item);\n }\n } catch (e) {\n options.transform = null;\n logger.error('Error while calling custom transform() function. Removing custom transform().', e);\n callback(null, item);\n return;\n }\n if(_.isPromise(response)) {\n response.then(function (promisedItem) {\n if(promisedItem) {\n newItem.data = promisedItem;\n }\n callback(null, newItem);\n }, function (error) {\n callback(error, item);\n });\n } else {\n callback(null, newItem);\n }\n }\n}\n\nfunction addConfigToPayload(item, options, callback) {\n if (!options.sendConfig) {\n return callback(null, item);\n }\n var configKey = '_rollbarConfig';\n var custom = _.get(item, 'data.custom') || {};\n custom[configKey] = options;\n item.data.custom = custom;\n callback(null, item);\n}\n\nfunction addFunctionOption(options, name) {\n if(_.isFunction(options[name])) {\n options[name] = options[name].toString();\n }\n}\n\nfunction addConfiguredOptions(item, options, callback) {\n var configuredOptions = options._configuredOptions;\n\n // These must be stringified or they'll get dropped during serialization.\n addFunctionOption(configuredOptions, 'transform');\n addFunctionOption(configuredOptions, 'checkIgnore');\n addFunctionOption(configuredOptions, 'onSendCallback');\n\n delete configuredOptions.accessToken;\n item.data.notifier.configured_options = configuredOptions;\n callback(null, item);\n}\n\nfunction addDiagnosticKeys(item, options, callback) {\n var diagnostic = _.merge(item.notifier.client.notifier.diagnostic, item.diagnostic);\n\n if (_.get(item, 'err._isAnonymous')) {\n diagnostic.is_anonymous = true;\n }\n\n if (item._isUncaught) {\n diagnostic.is_uncaught = item._isUncaught;\n }\n\n if (item.err) {\n try {\n diagnostic.raw_error = {\n message: item.err.message,\n name: item.err.name,\n constructor_name: item.err.constructor && item.err.constructor.name,\n filename: item.err.fileName,\n line: item.err.lineNumber,\n column: item.err.columnNumber,\n stack: item.err.stack\n };\n } catch (e) {\n diagnostic.raw_error = { failed: String(e) };\n }\n }\n\n item.data.notifier.diagnostic = _.merge(item.data.notifier.diagnostic, diagnostic);\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addPayloadOptions: addPayloadOptions,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError,\n userTransform: userTransform,\n addConfigToPayload: addConfigToPayload,\n addConfiguredOptions: addConfiguredOptions,\n addDiagnosticKeys: addDiagnosticKeys\n};\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction checkIgnore(item, settings) {\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore\n};\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction checkLevel(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = settings.reportLevel;\n var reportLevelVal = _.LEVELS[reportLevel] || 0;\n\n if (levelVal < reportLevelVal) {\n return false;\n }\n return true;\n}\n\nfunction userCheckIgnore(logger) {\n return function(item, settings) {\n var isUncaught = !!item._isUncaught;\n delete item._isUncaught;\n var args = item._originalArgs;\n delete item._originalArgs;\n try {\n if (_.isFunction(settings.onSendCallback)) {\n settings.onSendCallback(isUncaught, args, item);\n }\n } catch (e) {\n settings.onSendCallback = null;\n logger.error('Error while calling onSendCallback, removing', e);\n }\n try {\n if (_.isFunction(settings.checkIgnore) && settings.checkIgnore(isUncaught, args, item)) {\n return false;\n }\n } catch (e) {\n settings.checkIgnore = null;\n logger.error('Error while calling custom checkIgnore(), removing', e);\n }\n return true;\n }\n}\n\nfunction urlIsNotBlockListed(logger) {\n return function(item, settings) {\n return !urlIsOnAList(item, settings, 'blocklist', logger);\n }\n}\n\nfunction urlIsSafeListed(logger) {\n return function(item, settings) {\n return urlIsOnAList(item, settings, 'safelist', logger);\n }\n}\n\nfunction matchFrames(trace, list, block) {\n if (!trace) { return !block }\n\n var frames = trace.frames;\n\n if (!frames || frames.length === 0) { return !block; }\n\n var frame, filename, url, urlRegex;\n var listLength = list.length;\n var frameLength = frames.length;\n for (var i = 0; i < frameLength; i++) {\n frame = frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) { return !block; }\n\n for (var j = 0; j < listLength; j++) {\n url = list[j];\n urlRegex = new RegExp(url);\n\n if (urlRegex.test(filename)) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction urlIsOnAList(item, settings, safeOrBlock, logger) {\n // safelist is the default\n var block = false;\n if (safeOrBlock === 'blocklist') {\n block = true;\n }\n\n var list, traces;\n try {\n list = block ? settings.hostBlockList : settings.hostSafeList;\n traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];\n\n // These two checks are important to come first as they are defaults\n // in case the list is missing or the trace is missing or not well-formed\n if (!list || list.length === 0) {\n return !block;\n }\n if (traces.length === 0 || !traces[0]) {\n return !block;\n }\n\n var tracesLength = traces.length;\n for (var i = 0; i < tracesLength; i++) {\n if(matchFrames(traces[i], list, block)) {\n return true;\n }\n }\n } catch (e)\n /* istanbul ignore next */\n {\n if (block) {\n settings.hostBlockList = null;\n } else {\n settings.hostSafeList = null;\n }\n var listName = block ? 'hostBlockList' : 'hostSafeList';\n logger.error('Error while reading your configuration\\'s ' + listName + ' option. Removing custom ' + listName + '.', e);\n return !block;\n }\n return false;\n}\n\nfunction messageIsIgnored(logger) {\n return function(item, settings) {\n var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n messages = messagesFromItem(item);\n\n if (messages.length === 0){\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n\n for (j = 0; j < messages.length; j++) {\n messageIsIgnored = rIgnoredMessage.test(messages[j]);\n\n if (messageIsIgnored) {\n return false;\n }\n }\n }\n } catch(e)\n /* istanbul ignore next */\n {\n settings.ignoredMessages = null;\n logger.error('Error while reading your configuration\\'s ignoredMessages option. Removing custom ignoredMessages.');\n }\n\n return true;\n }\n}\n\nfunction messagesFromItem(item) {\n var body = item.body;\n var messages = [];\n\n // The payload schema only allows one of trace_chain, message, or trace.\n // However, existing test cases are based on having both trace and message present.\n // So here we preserve the ability to collect strings from any combination of these keys.\n if (body.trace_chain) {\n var traceChain = body.trace_chain;\n for (var i = 0; i < traceChain.length; i++) {\n var trace = traceChain[i];\n messages.push(_.get(trace, 'exception.message'));\n }\n }\n if (body.trace) {\n messages.push(_.get(body, 'trace.exception.message'));\n }\n if (body.message) {\n messages.push(_.get(body, 'message.body'));\n }\n return messages;\n}\n\nmodule.exports = {\n checkLevel: checkLevel,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlockListed: urlIsNotBlockListed,\n urlIsSafeListed: urlIsSafeListed,\n messageIsIgnored: messageIsIgnored\n};\n","'use strict';\n\nmodule.exports = {\n version: '2.26.2',\n endpoint: 'api.rollbar.com/api/1/item/',\n logLevel: 'debug',\n reportLevel: 'debug',\n uncaughtErrorLevel: 'error',\n maxItems: 0,\n itemsPerMin: 60\n}\n","'use strict';\n\nmodule.exports = {\n scrubFields: [\n 'pw',\n 'pass',\n 'passwd',\n 'password',\n 'secret',\n 'confirm_password',\n 'confirmPassword',\n 'password_confirmation',\n 'passwordConfirmation',\n 'access_token',\n 'accessToken',\n 'X-Rollbar-Access-Token',\n 'secret_key',\n 'secretKey',\n 'secretToken',\n 'cc-number',\n 'card number',\n 'cardnumber',\n 'cardnum',\n 'ccnum',\n 'ccnumber',\n 'cc num',\n 'creditcardnumber',\n 'credit card number',\n 'newcreditcardnumber',\n 'new credit card',\n 'creditcardno',\n 'credit card no',\n 'card#',\n 'card #',\n 'cc-csc',\n 'cvc',\n 'cvc2',\n 'cvv2',\n 'ccv2',\n 'security code',\n 'card verification',\n 'name on credit card',\n 'name on card',\n 'nameoncard',\n 'cardholder',\n 'card holder',\n 'name des karteninhabers',\n 'ccname',\n 'card type',\n 'cardtype',\n 'cc type',\n 'cctype',\n 'payment type',\n 'expiration date',\n 'expirationdate',\n 'expdate',\n 'cc-exp',\n 'ccmonth',\n 'ccyear'\n ]\n}\n","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.merge(options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n}\n\nTelemeter.prototype.configure = function(options) {\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n var deleteCount = 0;\n if (this.queue.length > newMaxEvents) {\n deleteCount = this.queue.length - newMaxEvents;\n }\n this.maxQueueSize = newMaxEvents;\n this.queue.splice(0, deleteCount);\n};\n\nTelemeter.prototype.copyEvents = function() {\n var events = Array.prototype.slice.call(this.queue, 0);\n if (_.isFunction(this.options.filterTelemetry)) {\n try {\n var i = events.length;\n while (i--) {\n if (this.options.filterTelemetry(events[i])) {\n events.splice(i, 1);\n }\n }\n } catch (e) {\n this.options.filterTelemetry = null;\n }\n }\n return events;\n};\n\nTelemeter.prototype.capture = function(type, metadata, level, rollbarUUID, timestamp) {\n var e = {\n level: getLevel(type, level),\n type: type,\n timestamp_ms: timestamp || _.now(),\n body: metadata,\n source: 'client'\n };\n if (rollbarUUID) {\n e.uuid = rollbarUUID;\n }\n\n try {\n if (_.isFunction(this.options.filterTelemetry) && this.options.filterTelemetry(e)) {\n return false;\n }\n } catch (exc) {\n this.options.filterTelemetry = null;\n }\n\n this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function(type, metadata, level, rollbarUUID) {\n return this.capture(type, metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.captureError = function(err, level, rollbarUUID, timestamp) {\n var metadata = {\n message: err.message || String(err)\n };\n if (err.stack) {\n metadata.stack = err.stack;\n }\n return this.capture('error', metadata, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureLog = function(message, level, rollbarUUID, timestamp) {\n return this.capture('log', {\n message: message\n }, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID, requestData) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\n if (requestData) {\n metadata.request = requestData;\n }\n var level = this.levelFromStatus(metadata.status_code);\n return this.capture('network', metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.levelFromStatus = function(statusCode) {\n if (statusCode >= 200 && statusCode < 400) {\n return 'info';\n }\n if (statusCode === 0 || statusCode >= 400) {\n return 'error';\n }\n return 'info';\n};\n\nTelemeter.prototype.captureDom = function(subtype, element, value, checked, rollbarUUID) {\n var metadata = {\n subtype: subtype,\n element: element\n };\n if (value !== undefined) {\n metadata.value = value;\n }\n if (checked !== undefined) {\n metadata.checked = checked;\n }\n return this.capture('dom', metadata, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureNavigation = function(from, to, rollbarUUID) {\n return this.capture('navigation', {from: from, to: to}, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureDomContentLoaded = function(ts) {\n return this.capture('navigation', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n */\n};\nTelemeter.prototype.captureLoad = function(ts) {\n return this.capture('navigation', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n */\n};\n\nTelemeter.prototype.captureConnectivityChange = function(type, rollbarUUID) {\n return this.captureNetwork({change: type}, 'connectivity', rollbarUUID);\n};\n\n// Only intended to be used internally by the notifier\nTelemeter.prototype._captureRollbarItem = function(item) {\n if (!this.options.includeItemsInTelemetry) {\n return;\n }\n if (item.err) {\n return this.captureError(item.err, item.level, item.uuid, item.timestamp);\n }\n if (item.message) {\n return this.captureLog(item.message, item.level, item.uuid, item.timestamp);\n }\n if (item.custom) {\n return this.capture('log', item.custom, item.level, item.uuid, item.timestamp);\n }\n};\n\nTelemeter.prototype.push = function(e) {\n this.queue.push(e);\n if (this.queue.length > this.maxQueueSize) {\n this.queue.shift();\n }\n};\n\nfunction getLevel(type, level) {\n if (level) {\n return level;\n }\n var defaultLevel = {\n error: 'error',\n manual: 'info'\n };\n return defaultLevel[type] || 'info';\n}\n\nmodule.exports = Telemeter;\n","'use strict';\n\nvar _ = require('../utility');\nvar headers = require('../utility/headers');\nvar scrub = require('../scrub');\nvar urlparser = require('./url');\nvar domUtil = require('./domUtility');\n\nvar defaults = {\n network: true,\n networkResponseHeaders: false,\n networkResponseBody: false,\n networkRequestHeaders: false,\n networkRequestBody: false,\n networkErrorOnHttp5xx: false,\n networkErrorOnHttp4xx: false,\n networkErrorOnHttp0: false,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true,\n contentSecurityPolicy: true,\n errorOnContentSecurityPolicy: false\n};\n\nfunction replace(obj, name, replacement, replacements, type) {\n var orig = obj[name];\n obj[name] = replacement(orig);\n if (replacements) {\n replacements[type].push([obj, name, orig]);\n }\n}\n\nfunction restore(replacements, type) {\n var b;\n while (replacements[type].length) {\n b = replacements[type].shift();\n b[0][b[1]] = b[2];\n }\n}\n\nfunction nameFromDescription(description) {\n if (!description || !description.attributes) { return null; }\n var attrs = description.attributes;\n for (var a = 0; a < attrs.length; ++a) {\n if (attrs[a].key === 'name') {\n return attrs[a].value;\n }\n }\n return null;\n}\n\nfunction defaultValueScrubber(scrubFields) {\n var patterns = [];\n for (var i = 0; i < scrubFields.length; ++i) {\n patterns.push(new RegExp(scrubFields[i], 'i'));\n }\n return function(description) {\n var name = nameFromDescription(description);\n if (!name) { return false; }\n for (var i = 0; i < patterns.length; ++i) {\n if (patterns[i].test(name)) {\n return true;\n }\n }\n return false;\n };\n}\n\nfunction Instrumenter(options, telemeter, rollbar, _window, _document) {\n this.options = options;\n var autoInstrument = options.autoInstrument;\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);\n this.telemeter = telemeter;\n this.rollbar = rollbar;\n this.diagnostic = rollbar.client.notifier.diagnostic;\n this._window = _window || {};\n this._document = _document || {};\n this.replacements = {\n network: [],\n log: [],\n navigation: [],\n connectivity: []\n };\n this.eventRemovers = {\n dom: [],\n connectivity: [],\n contentsecuritypolicy: []\n };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function(options) {\n this.options = _.merge(this.options, options);\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.merge(this.autoInstrument);\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n if (options.scrubTelemetryInputs !== undefined) {\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n }\n if (options.telemetryScrubber !== undefined) {\n this.telemetryScrubber = options.telemetryScrubber;\n }\n};\n\n// eslint-disable-next-line complexity\nInstrumenter.prototype.instrument = function(oldSettings) {\n if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {\n this.instrumentNetwork();\n } else if (!this.autoInstrument.network && oldSettings && oldSettings.network) {\n this.deinstrumentNetwork();\n }\n\n if (this.autoInstrument.log && !(oldSettings && oldSettings.log)) {\n this.instrumentConsole();\n } else if (!this.autoInstrument.log && oldSettings && oldSettings.log) {\n this.deinstrumentConsole();\n }\n\n if (this.autoInstrument.dom && !(oldSettings && oldSettings.dom)) {\n this.instrumentDom();\n } else if (!this.autoInstrument.dom && oldSettings && oldSettings.dom) {\n this.deinstrumentDom();\n }\n\n if (this.autoInstrument.navigation && !(oldSettings && oldSettings.navigation)) {\n this.instrumentNavigation();\n } else if (!this.autoInstrument.navigation && oldSettings && oldSettings.navigation) {\n this.deinstrumentNavigation();\n }\n\n if (this.autoInstrument.connectivity && !(oldSettings && oldSettings.connectivity)) {\n this.instrumentConnectivity();\n } else if (!this.autoInstrument.connectivity && oldSettings && oldSettings.connectivity) {\n this.deinstrumentConnectivity();\n }\n\n if (this.autoInstrument.contentSecurityPolicy && !(oldSettings && oldSettings.contentSecurityPolicy)) {\n this.instrumentContentSecurityPolicy();\n } else if (!this.autoInstrument.contentSecurityPolicy && oldSettings && oldSettings.contentSecurityPolicy) {\n this.deinstrumentContentSecurityPolicy();\n }\n};\n\nInstrumenter.prototype.deinstrumentNetwork = function() {\n restore(this.replacements, 'network');\n};\n\nInstrumenter.prototype.instrumentNetwork = function() {\n var self = this;\n\n function wrapProp(prop, xhr) {\n if (prop in xhr && _.isFunction(xhr[prop])) {\n replace(xhr, prop, function(orig) {\n return self.rollbar.wrap(orig);\n });\n }\n }\n\n if ('XMLHttpRequest' in this._window) {\n var xhrp = this._window.XMLHttpRequest.prototype;\n replace(xhrp, 'open', function(orig) {\n return function(method, url) {\n if (_.isType(url, 'string')) {\n if (this.__rollbar_xhr) {\n this.__rollbar_xhr.method = method;\n this.__rollbar_xhr.url = url;\n this.__rollbar_xhr.status_code = null;\n this.__rollbar_xhr.start_time_ms = _.now();\n this.__rollbar_xhr.end_time_ms = null;\n } else {\n this.__rollbar_xhr = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'setRequestHeader', function(orig) {\n return function(header, value) {\n // If xhr.open is async, __rollbar_xhr may not be initialized yet.\n if (!this.__rollbar_xhr) {\n this.__rollbar_xhr = {};\n }\n if (_.isType(header, 'string') && _.isType(value, 'string')) {\n if (self.autoInstrument.networkRequestHeaders) {\n if (!this.__rollbar_xhr.request_headers) {\n this.__rollbar_xhr.request_headers = {};\n }\n this.__rollbar_xhr.request_headers[header] = value;\n }\n // We want the content type even if request header telemetry is off.\n if (header.toLowerCase() === 'content-type') {\n this.__rollbar_xhr.request_content_type = value;\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'send', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(data) {\n /* eslint-enable no-unused-vars */\n var xhr = this;\n\n function onreadystatechangeHandler() {\n if (xhr.__rollbar_xhr) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n if (self.autoInstrument.networkRequestBody) {\n xhr.__rollbar_xhr.request = data;\n }\n xhr.__rollbar_event = self.captureNetwork(xhr.__rollbar_xhr, 'xhr', undefined);\n }\n if (xhr.readyState < 2) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n }\n if (xhr.readyState > 3) {\n xhr.__rollbar_xhr.end_time_ms = _.now();\n\n var headers = null;\n xhr.__rollbar_xhr.response_content_type = xhr.getResponseHeader('Content-Type');\n if (self.autoInstrument.networkResponseHeaders) {\n var headersConfig = self.autoInstrument.networkResponseHeaders;\n headers = {};\n try {\n var header, i;\n if (headersConfig === true) {\n var allHeaders = xhr.getAllResponseHeaders();\n if (allHeaders) {\n var arr = allHeaders.trim().split(/[\\r\\n]+/);\n var parts, value;\n for (i=0; i < arr.length; i++) {\n parts = arr[i].split(': ');\n header = parts.shift();\n value = parts.join(': ');\n headers[header] = value;\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n header = headersConfig[i];\n headers[header] = xhr.getResponseHeader(header);\n }\n }\n } catch (e) {\n /* we ignore the errors here that could come from different\n * browser issues with the xhr methods */\n }\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n try {\n body = xhr.responseText;\n } catch (e) {\n /* ignore errors from reading responseText */\n }\n }\n var response = null;\n if (body || headers) {\n response = {};\n if (body) {\n if (self.isJsonContentType(xhr.__rollbar_xhr.response_content_type)) {\n response.body = self.scrubJson(body);\n } else {\n response.body = body;\n }\n }\n if (headers) {\n response.headers = headers;\n }\n }\n if (response) {\n xhr.__rollbar_xhr.response = response;\n }\n try {\n var code = xhr.status;\n code = code === 1223 ? 204 : code;\n xhr.__rollbar_xhr.status_code = code;\n xhr.__rollbar_event.level = self.telemeter.levelFromStatus(code);\n self.errorOnHttpStatus(xhr.__rollbar_xhr);\n } catch (e) {\n /* ignore possible exception from xhr.status */\n }\n }\n }\n }\n\n wrapProp('onload', xhr);\n wrapProp('onerror', xhr);\n wrapProp('onprogress', xhr);\n\n if ('onreadystatechange' in xhr && _.isFunction(xhr.onreadystatechange)) {\n replace(xhr, 'onreadystatechange', function(orig) {\n return self.rollbar.wrap(orig, undefined, onreadystatechangeHandler);\n });\n } else {\n xhr.onreadystatechange = onreadystatechangeHandler;\n }\n if (xhr.__rollbar_xhr && self.trackHttpErrors()) {\n xhr.__rollbar_xhr.stack = (new Error()).stack;\n }\n return orig.apply(this, arguments);\n }\n }, this.replacements, 'network');\n }\n\n if ('fetch' in this._window) {\n replace(this._window, 'fetch', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(fn, t) {\n /* eslint-enable no-unused-vars */\n var args = new Array(arguments.length);\n for (var i=0, len=args.length; i < len; i++) {\n args[i] = arguments[i];\n }\n var input = args[0];\n var method = 'GET';\n var url;\n if (_.isType(input, 'string')) {\n url = input;\n } else if (input) {\n url = input.url;\n if (input.method) {\n method = input.method;\n }\n }\n if (args[1] && args[1].method) {\n method = args[1].method;\n }\n var metadata = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n if (args[1] && args[1].headers) {\n // Argument may be a Headers object, or plain object. Ensure here that\n // we are working with a Headers object with case-insensitive keys.\n var reqHeaders = headers(args[1].headers);\n\n metadata.request_content_type = reqHeaders.get('Content-Type');\n\n if (self.autoInstrument.networkRequestHeaders) {\n metadata.request_headers = self.fetchHeaders(reqHeaders, self.autoInstrument.networkRequestHeaders)\n }\n }\n\n if (self.autoInstrument.networkRequestBody) {\n if (args[1] && args[1].body) {\n metadata.request = args[1].body;\n } else if (args[0] && !_.isType(args[0], 'string') && args[0].body) {\n metadata.request = args[0].body;\n }\n }\n self.captureNetwork(metadata, 'fetch', undefined);\n if (self.trackHttpErrors()) {\n metadata.stack = (new Error()).stack;\n }\n\n // Start our handler before returning the promise. This allows resp.clone()\n // to execute before other handlers touch the response.\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n metadata.response_content_type = resp.headers.get('Content-Type');\n var headers = null;\n if (self.autoInstrument.networkResponseHeaders) {\n headers = self.fetchHeaders(resp.headers, self.autoInstrument.networkResponseHeaders);\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n if (typeof resp.text === 'function') { // Response.text() is not implemented on some platforms\n // The response must be cloned to prevent reading (and locking) the original stream.\n // This must be done before other handlers touch the response.\n body = resp.clone().text(); //returns a Promise\n }\n }\n if (headers || body) {\n metadata.response = {};\n if (body) {\n // Test to ensure body is a Promise, which it should always be.\n if (typeof body.then === 'function') {\n body.then(function (text) {\n if (text && self.isJsonContentType(metadata.response_content_type)) {\n metadata.response.body = self.scrubJson(text);\n } else {\n metadata.response.body = text;\n }\n });\n } else {\n metadata.response.body = body;\n }\n }\n if (headers) {\n metadata.response.headers = headers;\n }\n }\n self.errorOnHttpStatus(metadata);\n return resp;\n });\n };\n }, this.replacements, 'network');\n }\n};\n\nInstrumenter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID) {\n if (metadata.request && this.isJsonContentType(metadata.request_content_type)) {\n metadata.request = this.scrubJson(metadata.request);\n }\n return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);\n};\n\nInstrumenter.prototype.isJsonContentType = function(contentType) {\n return (contentType && _.isType(contentType, 'string') && contentType.toLowerCase().includes('json')) ? true : false;\n}\n\nInstrumenter.prototype.scrubJson = function(json) {\n return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));\n}\n\nInstrumenter.prototype.fetchHeaders = function(inHeaders, headersConfig) {\n var outHeaders = {};\n try {\n var i;\n if (headersConfig === true) {\n if (typeof inHeaders.entries === 'function') { // Headers.entries() is not implemented in IE\n var allHeaders = inHeaders.entries();\n var currentHeader = allHeaders.next();\n while (!currentHeader.done) {\n outHeaders[currentHeader.value[0]] = currentHeader.value[1];\n currentHeader = allHeaders.next();\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n var header = headersConfig[i];\n outHeaders[header] = inHeaders.get(header);\n }\n }\n } catch (e) {\n /* ignore probable IE errors */\n }\n return outHeaders;\n}\n\nInstrumenter.prototype.trackHttpErrors = function() {\n return this.autoInstrument.networkErrorOnHttp5xx ||\n this.autoInstrument.networkErrorOnHttp4xx ||\n this.autoInstrument.networkErrorOnHttp0;\n}\n\nInstrumenter.prototype.errorOnHttpStatus = function(metadata) {\n var status = metadata.status_code;\n\n if ((status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||\n (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||\n (status === 0 && this.autoInstrument.networkErrorOnHttp0)) {\n var error = new Error('HTTP request failed with Status ' + status);\n error.stack = metadata.stack;\n this.rollbar.error(error, { skipFrames: 1 });\n }\n}\n\nInstrumenter.prototype.deinstrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n var b;\n while (this.replacements['log'].length) {\n b = this.replacements['log'].shift();\n this._window.console[b[0]] = b[1];\n }\n};\n\nInstrumenter.prototype.instrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n\n var self = this;\n var c = this._window.console;\n\n function wrapConsole(method) {\n 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778\n\n var orig = c[method];\n var origConsole = c;\n var level = method === 'warn' ? 'warning' : method;\n c[method] = function() {\n var args = Array.prototype.slice.call(arguments);\n var message = _.formatArgsAsString(args);\n self.telemeter.captureLog(message, level);\n if (orig) {\n Function.prototype.apply.call(orig, origConsole, args);\n }\n };\n self.replacements['log'].push([method, orig]);\n }\n var methods = ['debug','info','warn','error','log'];\n try {\n for (var i=0, len=methods.length; i < len; i++) {\n wrapConsole(methods[i]);\n }\n } catch (e) {\n this.diagnostic.instrumentConsole = { error: e.message };\n }\n};\n\nInstrumenter.prototype.deinstrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n this.removeListeners('dom');\n};\n\nInstrumenter.prototype.instrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n var clickHandler = this.handleClick.bind(this);\n var blurHandler = this.handleBlur.bind(this);\n this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);\n this.addListener('dom', this._window, 'blur', 'onfocusout', blurHandler, true);\n};\n\nInstrumenter.prototype.handleClick = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n var hasTag = e && e.tagName;\n var anchorOrButton = domUtil.isDescribedElement(e, 'a') || domUtil.isDescribedElement(e, 'button');\n if (hasTag && (anchorOrButton || domUtil.isDescribedElement(e, 'input', ['button', 'submit']))) {\n this.captureDomEvent('click', e);\n } else if (domUtil.isDescribedElement(e, 'input', ['checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value, e.checked);\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleBlur = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n if (e && e.tagName) {\n if (domUtil.isDescribedElement(e, 'textarea')) {\n this.captureDomEvent('input', e, e.value);\n } else if (domUtil.isDescribedElement(e, 'select') && e.options && e.options.length) {\n this.handleSelectInputChanged(e);\n } else if (domUtil.isDescribedElement(e, 'input') && !domUtil.isDescribedElement(e, 'input', ['button', 'submit', 'hidden', 'checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value);\n }\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleSelectInputChanged = function(elem) {\n if (elem.multiple) {\n for (var i = 0; i < elem.options.length; i++) {\n if (elem.options[i].selected) {\n this.captureDomEvent('input', elem, elem.options[i].value);\n }\n }\n } else if (elem.selectedIndex >= 0 && elem.options[elem.selectedIndex]) {\n this.captureDomEvent('input', elem, elem.options[elem.selectedIndex].value);\n }\n};\n\nInstrumenter.prototype.captureDomEvent = function(subtype, element, value, isChecked) {\n if (value !== undefined) {\n if (this.scrubTelemetryInputs || (domUtil.getElementType(element) === 'password')) {\n value = '[scrubbed]';\n } else {\n var description = domUtil.describeElement(element);\n if (this.telemetryScrubber) {\n if (this.telemetryScrubber(description)) {\n value = '[scrubbed]';\n }\n } else if (this.defaultValueScrubber(description)) {\n value = '[scrubbed]';\n }\n }\n }\n var elementString = domUtil.elementArrayToString(domUtil.treeToArray(element));\n this.telemeter.captureDom(subtype, elementString, value, isChecked);\n};\n\nInstrumenter.prototype.deinstrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n restore(this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.instrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n var self = this;\n replace(this._window, 'onpopstate', function(orig) {\n return function() {\n var current = self._location.href;\n self.handleUrlChange(self._lastHref, current);\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n }, this.replacements, 'navigation');\n\n replace(this._window.history, 'pushState', function(orig) {\n return function() {\n var url = arguments.length > 2 ? arguments[2] : undefined;\n if (url) {\n self.handleUrlChange(self._lastHref, url + '');\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.handleUrlChange = function(from, to) {\n var parsedHref = urlparser.parse(this._location.href);\n var parsedTo = urlparser.parse(to);\n var parsedFrom = urlparser.parse(from);\n this._lastHref = to;\n if (parsedHref.protocol === parsedTo.protocol && parsedHref.host === parsedTo.host) {\n to = parsedTo.path + (parsedTo.hash || '');\n }\n if (parsedHref.protocol === parsedFrom.protocol && parsedHref.host === parsedFrom.host) {\n from = parsedFrom.path + (parsedFrom.hash || '');\n }\n this.telemeter.captureNavigation(from, to);\n};\n\nInstrumenter.prototype.deinstrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.removeListeners('connectivity');\n } else {\n restore(this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.instrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.addListener('connectivity', this._window, 'online', undefined, function() {\n this.telemeter.captureConnectivityChange('online');\n }.bind(this), true);\n this.addListener('connectivity', this._window, 'offline', undefined, function() {\n this.telemeter.captureConnectivityChange('offline');\n }.bind(this), true);\n } else {\n var self = this;\n replace(this._document.body, 'ononline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('online');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n replace(this._document.body, 'onoffline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('offline');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.handleCspEvent = function(cspEvent) {\n var message = 'Security Policy Violation: ' +\n 'blockedURI: ' + cspEvent.blockedURI + ', ' +\n 'violatedDirective: ' + cspEvent.violatedDirective + ', ' +\n 'effectiveDirective: ' + cspEvent.effectiveDirective + ', ';\n\n if (cspEvent.sourceFile) {\n message += 'location: ' + cspEvent.sourceFile + ', ' +\n 'line: ' + cspEvent.lineNumber + ', ' +\n 'col: ' + cspEvent.columnNumber + ', ';\n }\n\n message += 'originalPolicy: ' + cspEvent.originalPolicy;\n\n this.telemeter.captureLog(message, 'error');\n this.handleCspError(message);\n}\n\nInstrumenter.prototype.handleCspError = function(message) {\n if (this.autoInstrument.errorOnContentSecurityPolicy) {\n this.rollbar.error(message);\n }\n}\n\nInstrumenter.prototype.deinstrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._document)) { return; }\n\n this.removeListeners('contentsecuritypolicy');\n};\n\nInstrumenter.prototype.instrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._document)) { return; }\n\n var cspHandler = this.handleCspEvent.bind(this);\n this.addListener('contentsecuritypolicy', this._document, 'securitypolicyviolation', null, cspHandler, false);\n};\n\nInstrumenter.prototype.addListener = function(section, obj, type, altType, handler, capture) {\n if (obj.addEventListener) {\n obj.addEventListener(type, handler, capture);\n this.eventRemovers[section].push(function() {\n obj.removeEventListener(type, handler, capture);\n });\n } else if (altType) {\n obj.attachEvent(altType, handler);\n this.eventRemovers[section].push(function() {\n obj.detachEvent(altType, handler);\n });\n }\n};\n\nInstrumenter.prototype.removeListeners = function(section) {\n var r;\n while (this.eventRemovers[section].length) {\n r = this.eventRemovers[section].shift();\n r();\n }\n};\n\nmodule.exports = Instrumenter;\n","'use strict';\n\n/*\n * headers - Detect when fetch Headers are undefined and use a partial polyfill.\n *\n * A full polyfill is not used in order to keep package size as small as possible.\n * Since this is only used internally and is not added to the window object,\n * the full interface doesn't need to be supported.\n *\n * This implementation is modified from whatwg-fetch:\n * https://github.com/github/fetch\n */\nfunction headers(headers) {\n if (typeof Headers === 'undefined') {\n return new FetchHeaders(headers);\n }\n\n return new Headers(headers);\n}\n\nfunction normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name)\n }\n return name.toLowerCase()\n}\n\nfunction normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value)\n }\n return value\n}\n\nfunction iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n return iterator\n}\n\nfunction FetchHeaders(headers) {\n this.map = {}\n\n if (headers instanceof FetchHeaders) {\n headers.forEach(function(value, name) {\n this.append(name, value)\n }, this)\n } else if (Array.isArray(headers)) {\n headers.forEach(function(header) {\n this.append(header[0], header[1])\n }, this)\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function(name) {\n this.append(name, headers[name])\n }, this)\n }\n}\n\nFetchHeaders.prototype.append = function(name, value) {\n name = normalizeName(name)\n value = normalizeValue(value)\n var oldValue = this.map[name]\n this.map[name] = oldValue ? oldValue + ', ' + value : value\n}\n\nFetchHeaders.prototype.get = function(name) {\n name = normalizeName(name)\n return this.has(name) ? this.map[name] : null\n}\n\nFetchHeaders.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n}\n\nFetchHeaders.prototype.forEach = function(callback, thisArg) {\n for (var name in this.map) {\n if (this.map.hasOwnProperty(name)) {\n callback.call(thisArg, this.map[name], name, this)\n }\n }\n}\n\nFetchHeaders.prototype.entries = function() {\n var items = []\n this.forEach(function(value, name) {\n items.push([name, value])\n })\n return iteratorFor(items)\n}\n\nmodule.exports = headers;\n","'use strict';\n\nfunction getElementType(e) {\n return (e.getAttribute('type') || '').toLowerCase();\n}\n\nfunction isDescribedElement(element, type, subtypes) {\n if (element.tagName.toLowerCase() !== type.toLowerCase()) {\n return false;\n }\n if (!subtypes) {\n return true;\n }\n element = getElementType(element);\n for (var i = 0; i < subtypes.length; i++) {\n if (subtypes[i] === element) {\n return true;\n }\n }\n return false;\n}\n\nfunction getElementFromEvent(evt, doc) {\n if (evt.target) {\n return evt.target;\n }\n if (doc && doc.elementFromPoint) {\n return doc.elementFromPoint(evt.clientX, evt.clientY);\n }\n return undefined;\n}\n\nfunction treeToArray(elem) {\n var MAX_HEIGHT = 5;\n var out = [];\n var nextDescription;\n for (var height = 0; elem && height < MAX_HEIGHT; height++) {\n nextDescription = describeElement(elem);\n if (nextDescription.tagName === 'html') {\n break;\n }\n out.unshift(nextDescription);\n elem = elem.parentNode;\n }\n return out;\n}\n\nfunction elementArrayToString(a) {\n var MAX_LENGTH = 80;\n var separator = ' > ', separatorLength = separator.length;\n var out = [], len = 0, nextStr, totalLength;\n\n for (var i = a.length - 1; i >= 0; i--) {\n nextStr = descriptionToString(a[i]);\n totalLength = len + (out.length * separatorLength) + nextStr.length;\n if (i < a.length - 1 && totalLength >= MAX_LENGTH + 3) {\n out.unshift('...');\n break;\n }\n out.unshift(nextStr);\n len += nextStr.length;\n }\n return out.join(separator);\n}\n\nfunction descriptionToString(desc) {\n if (!desc || !desc.tagName) {\n return '';\n }\n var out = [desc.tagName];\n if (desc.id) {\n out.push('#' + desc.id);\n }\n if (desc.classes) {\n out.push('.' + desc.classes.join('.'));\n }\n for (var i = 0; i < desc.attributes.length; i++) {\n out.push('[' + desc.attributes[i].key + '=\"' + desc.attributes[i].value + '\"]');\n }\n\n return out.join('');\n}\n\n/**\n * Input: a dom element\n * Output: null if tagName is falsey or input is falsey, else\n * {\n * tagName: String,\n * id: String | undefined,\n * classes: [String] | undefined,\n * attributes: [\n * {\n * key: OneOf(type, name, title, alt),\n * value: String\n * }\n * ]\n * }\n */\nfunction describeElement(elem) {\n if (!elem || !elem.tagName) {\n return null;\n }\n var out = {}, className, key, attr, i;\n out.tagName = elem.tagName.toLowerCase();\n if (elem.id) {\n out.id = elem.id;\n }\n className = elem.className;\n if (className && (typeof className === 'string')) {\n out.classes = className.split(/\\s+/);\n }\n var attributes = ['type', 'name', 'title', 'alt'];\n out.attributes = [];\n for (i = 0; i < attributes.length; i++) {\n key = attributes[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.attributes.push({key: key, value: attr});\n }\n }\n return out;\n}\n\nmodule.exports = {\n describeElement: describeElement,\n descriptionToString: descriptionToString,\n elementArrayToString: elementArrayToString,\n treeToArray: treeToArray,\n getElementFromEvent: getElementFromEvent,\n isDescribedElement: isDescribedElement,\n getElementType: getElementType\n};\n","'use strict';\n\nvar polyfillJSON = require('../../vendor/JSON-js/json3');\n\nmodule.exports = polyfillJSON;\n","// json3.js\n// 2017-02-21\n// Public Domain.\n// NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.\n// See http://www.JSON.org/js.html\n// This code should be minified before deployment.\n// See http://javascript.crockford.com/jsmin.html\n\n// USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO\n// NOT CONTROL.\n\n// This file creates a global JSON object containing two methods: stringify\n// and parse. This file provides the ES5 JSON capability to ES3 systems.\n// If a project might run on IE8 or earlier, then this file should be included.\n// This file does nothing on ES5 systems.\n\n// JSON.stringify(value, replacer, space)\n// value any JavaScript value, usually an object or array.\n// replacer an optional parameter that determines how object\n// values are stringified for objects. It can be a\n// function or an array of strings.\n// space an optional parameter that specifies the indentation\n// of nested structures. If it is omitted, the text will\n// be packed without extra whitespace. If it is a number,\n// it will specify the number of spaces to indent at each\n// level. If it is a string (such as \"\\t\" or \" \"),\n// it contains the characters used to indent at each level.\n// This method produces a JSON text from a JavaScript value.\n// When an object value is found, if the object contains a toJSON\n// method, its toJSON method will be called and the result will be\n// stringified. A toJSON method does not serialize: it returns the\n// value represented by the name/value pair that should be serialized,\n// or undefined if nothing should be serialized. The toJSON method\n// will be passed the key associated with the value, and this will be\n// bound to the value.\n\n// For example, this would serialize Dates as ISO strings.\n\n// Date.prototype.toJSON = function (key) {\n// function f(n) {\n// // Format integers to have at least two digits.\n// return (n < 10)\n// ? \"0\" + n\n// : n;\n// }\n// return this.getUTCFullYear() + \"-\" +\n// f(this.getUTCMonth() + 1) + \"-\" +\n// f(this.getUTCDate()) + \"T\" +\n// f(this.getUTCHours()) + \":\" +\n// f(this.getUTCMinutes()) + \":\" +\n// f(this.getUTCSeconds()) + \"Z\";\n// };\n\n// You can provide an optional replacer method. It will be passed the\n// key and value of each member, with this bound to the containing\n// object. The value that is returned from your method will be\n// serialized. If your method returns undefined, then the member will\n// be excluded from the serialization.\n\n// If the replacer parameter is an array of strings, then it will be\n// used to select the members to be serialized. It filters the results\n// such that only members with keys listed in the replacer array are\n// stringified.\n\n// Values that do not have JSON representations, such as undefined or\n// functions, will not be serialized. Such values in objects will be\n// dropped; in arrays they will be replaced with null. You can use\n// a replacer function to replace those with JSON values.\n\n// JSON.stringify(undefined) returns undefined.\n\n// The optional space parameter produces a stringification of the\n// value that is filled with line breaks and indentation to make it\n// easier to read.\n\n// If the space parameter is a non-empty string, then that string will\n// be used for indentation. If the space parameter is a number, then\n// the indentation will be that many spaces.\n\n// Example:\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}]);\n// // text is '[\"e\",{\"pluribus\":\"unum\"}]'\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}], null, \"\\t\");\n// // text is '[\\n\\t\"e\",\\n\\t{\\n\\t\\t\"pluribus\": \"unum\"\\n\\t}\\n]'\n\n// text = JSON.stringify([new Date()], function (key, value) {\n// return this[key] instanceof Date\n// ? \"Date(\" + this[key] + \")\"\n// : value;\n// });\n// // text is '[\"Date(---current time---)\"]'\n\n// JSON.parse(text, reviver)\n// This method parses a JSON text to produce an object or array.\n// It can throw a SyntaxError exception.\n// This has been modified to use JSON-js/json_parse_state.js as the\n// parser instead of the one built around eval found in JSON-js/json2.js\n\n// The optional reviver parameter is a function that can filter and\n// transform the results. It receives each of the keys and values,\n// and its return value is used instead of the original value.\n// If it returns what it received, then the structure is not modified.\n// If it returns undefined then the member is deleted.\n\n// Example:\n\n// // Parse the text. Values that look like ISO date strings will\n// // be converted to Date objects.\n\n// myData = JSON.parse(text, function (key, value) {\n// var a;\n// if (typeof value === \"string\") {\n// a =\n// /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2}(?:\\.\\d*)?)Z$/.exec(value);\n// if (a) {\n// return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],\n// +a[5], +a[6]));\n// }\n// }\n// return value;\n// });\n\n// myData = JSON.parse('[\"Date(09/09/2001)\"]', function (key, value) {\n// var d;\n// if (typeof value === \"string\" &&\n// value.slice(0, 5) === \"Date(\" &&\n// value.slice(-1) === \")\") {\n// d = new Date(value.slice(5, -1));\n// if (d) {\n// return d;\n// }\n// }\n// return value;\n// });\n\n// This is a reference implementation. You are free to copy, modify, or\n// redistribute.\n\n/*jslint\n for, this\n */\n\n/*property\n JSON, apply, call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,\n getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,\n lastIndex, length, parse, prototype, push, replace, slice, stringify,\n test, toJSON, toString, valueOf\n */\n\nvar setupCustomJSON = function(JSON) {\n\n var rx_one = /^[\\],:{}\\s]*$/;\n var rx_two = /\\\\(?:[\"\\\\\\/bfnrt]|u[0-9a-fA-F]{4})/g;\n var rx_three = /\"[^\"\\\\\\n\\r]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g;\n var rx_four = /(?:^|:|,)(?:\\s*\\[)+/g;\n var rx_escapable = /[\\\\\"\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n var rx_dangerous = /[\\u0000\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n\n function f(n) {\n // Format integers to have at least two digits.\n return n < 10\n ? \"0\" + n\n : n;\n }\n\n function this_value() {\n return this.valueOf();\n }\n\n if (typeof Date.prototype.toJSON !== \"function\") {\n\n Date.prototype.toJSON = function () {\n\n return isFinite(this.valueOf())\n ? this.getUTCFullYear() + \"-\" +\n f(this.getUTCMonth() + 1) + \"-\" +\n f(this.getUTCDate()) + \"T\" +\n f(this.getUTCHours()) + \":\" +\n f(this.getUTCMinutes()) + \":\" +\n f(this.getUTCSeconds()) + \"Z\"\n : null;\n };\n\n Boolean.prototype.toJSON = this_value;\n Number.prototype.toJSON = this_value;\n String.prototype.toJSON = this_value;\n }\n\n var gap;\n var indent;\n var meta;\n var rep;\n\n\n function quote(string) {\n\n // If the string contains no control characters, no quote characters, and no\n // backslash characters, then we can safely slap some quotes around it.\n // Otherwise we must also replace the offending characters with safe escape\n // sequences.\n\n rx_escapable.lastIndex = 0;\n return rx_escapable.test(string)\n ? \"\\\"\" + string.replace(rx_escapable, function (a) {\n var c = meta[a];\n return typeof c === \"string\"\n ? c\n : \"\\\\u\" + (\"0000\" + a.charCodeAt(0).toString(16)).slice(-4);\n }) + \"\\\"\"\n : \"\\\"\" + string + \"\\\"\";\n }\n\n\n function str(key, holder) {\n\n // Produce a string from holder[key].\n\n var i; // The loop counter.\n var k; // The member key.\n var v; // The member value.\n var length;\n var mind = gap;\n var partial;\n var value = holder[key];\n\n // If the value has a toJSON method, call it to obtain a replacement value.\n\n if (value && typeof value === \"object\" &&\n typeof value.toJSON === \"function\") {\n value = value.toJSON(key);\n }\n\n // If we were called with a replacer function, then call the replacer to\n // obtain a replacement value.\n\n if (typeof rep === \"function\") {\n value = rep.call(holder, key, value);\n }\n\n // What happens next depends on the value's type.\n\n switch (typeof value) {\n case \"string\":\n return quote(value);\n\n case \"number\":\n\n // JSON numbers must be finite. Encode non-finite numbers as null.\n\n return isFinite(value)\n ? String(value)\n : \"null\";\n\n case \"boolean\":\n case \"null\":\n\n // If the value is a boolean or null, convert it to a string. Note:\n // typeof null does not produce \"null\". The case is included here in\n // the remote chance that this gets fixed someday.\n\n return String(value);\n\n // If the type is \"object\", we might be dealing with an object or an array or\n // null.\n\n case \"object\":\n\n // Due to a specification blunder in ECMAScript, typeof null is \"object\",\n // so watch out for that case.\n\n if (!value) {\n return \"null\";\n }\n\n // Make an array to hold the partial results of stringifying this object value.\n\n gap += indent;\n partial = [];\n\n // Is the value an array?\n\n if (Object.prototype.toString.apply(value) === \"[object Array]\") {\n\n // The value is an array. Stringify every element. Use null as a placeholder\n // for non-JSON values.\n\n length = value.length;\n for (i = 0; i < length; i += 1) {\n partial[i] = str(i, value) || \"null\";\n }\n\n // Join all of the elements together, separated with commas, and wrap them in\n // brackets.\n\n v = partial.length === 0\n ? \"[]\"\n : gap\n ? \"[\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"]\"\n : \"[\" + partial.join(\",\") + \"]\";\n gap = mind;\n return v;\n }\n\n // If the replacer is an array, use it to select the members to be stringified.\n\n if (rep && typeof rep === \"object\") {\n length = rep.length;\n for (i = 0; i < length; i += 1) {\n if (typeof rep[i] === \"string\") {\n k = rep[i];\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n } else {\n\n // Otherwise, iterate through all of the keys in the object.\n\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(value, k)) {\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n }\n\n // Join all of the member texts together, separated with commas,\n // and wrap them in braces.\n\n v = partial.length === 0\n ? \"{}\"\n : gap\n ? \"{\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"}\"\n : \"{\" + partial.join(\",\") + \"}\";\n gap = mind;\n return v;\n }\n }\n\n // If the JSON object does not yet have a stringify method, give it one.\n\n if (typeof JSON.stringify !== \"function\") {\n meta = { // table of character substitutions\n \"\\b\": \"\\\\b\",\n \"\\t\": \"\\\\t\",\n \"\\n\": \"\\\\n\",\n \"\\f\": \"\\\\f\",\n \"\\r\": \"\\\\r\",\n \"\\\"\": \"\\\\\\\"\",\n \"\\\\\": \"\\\\\\\\\"\n };\n JSON.stringify = function (value, replacer, space) {\n\n // The stringify method takes a value and an optional replacer, and an optional\n // space parameter, and returns a JSON text. The replacer can be a function\n // that can replace values, or an array of strings that will select the keys.\n // A default replacer method can be provided. Use of the space parameter can\n // produce text that is more easily readable.\n\n var i;\n gap = \"\";\n indent = \"\";\n\n // If the space parameter is a number, make an indent string containing that\n // many spaces.\n\n if (typeof space === \"number\") {\n for (i = 0; i < space; i += 1) {\n indent += \" \";\n }\n\n // If the space parameter is a string, it will be used as the indent string.\n\n } else if (typeof space === \"string\") {\n indent = space;\n }\n\n // If there is a replacer, it must be a function or an array.\n // Otherwise, throw an error.\n\n rep = replacer;\n if (replacer && typeof replacer !== \"function\" &&\n (typeof replacer !== \"object\" ||\n typeof replacer.length !== \"number\")) {\n throw new Error(\"JSON.stringify\");\n }\n\n // Make a fake root object containing our value under the key of \"\".\n // Return the result of stringifying the value.\n\n return str(\"\", {\"\": value});\n };\n }\n\n\n // If the JSON object does not yet have a parse method, give it one.\n\n if (typeof JSON.parse !== \"function\") {\n JSON.parse = (function () {\n\n // This function creates a JSON parse function that uses a state machine rather\n // than the dangerous eval function to parse a JSON text.\n\n var state; // The state of the parser, one of\n // 'go' The starting state\n // 'ok' The final, accepting state\n // 'firstokey' Ready for the first key of the object or\n // the closing of an empty object\n // 'okey' Ready for the next key of the object\n // 'colon' Ready for the colon\n // 'ovalue' Ready for the value half of a key/value pair\n // 'ocomma' Ready for a comma or closing }\n // 'firstavalue' Ready for the first value of an array or\n // an empty array\n // 'avalue' Ready for the next value of an array\n // 'acomma' Ready for a comma or closing ]\n var stack; // The stack, for controlling nesting.\n var container; // The current container object or array\n var key; // The current key\n var value; // The current value\n var escapes = { // Escapement translation table\n \"\\\\\": \"\\\\\",\n \"\\\"\": \"\\\"\",\n \"/\": \"/\",\n \"t\": \"\\t\",\n \"n\": \"\\n\",\n \"r\": \"\\r\",\n \"f\": \"\\f\",\n \"b\": \"\\b\"\n };\n var string = { // The actions for string tokens\n go: function () {\n state = \"ok\";\n },\n firstokey: function () {\n key = value;\n state = \"colon\";\n },\n okey: function () {\n key = value;\n state = \"colon\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var number = { // The actions for number tokens\n go: function () {\n state = \"ok\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var action = {\n\n // The action table describes the behavior of the machine. It contains an\n // object for each token. Each object contains a method that is called when\n // a token is matched in a state. An object will lack a method for illegal\n // states.\n\n \"{\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = {};\n state = \"firstokey\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = {};\n state = \"firstokey\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n }\n },\n \"}\": {\n firstokey: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n ocomma: function () {\n var pop = stack.pop();\n container[key] = value;\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \"[\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = [];\n state = \"firstavalue\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = [];\n state = \"firstavalue\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n }\n },\n \"]\": {\n firstavalue: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n acomma: function () {\n var pop = stack.pop();\n container.push(value);\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \":\": {\n colon: function () {\n if (Object.hasOwnProperty.call(container, key)) {\n throw new SyntaxError(\"Duplicate key '\" + key + \"\\\"\");\n }\n state = \"ovalue\";\n }\n },\n \",\": {\n ocomma: function () {\n container[key] = value;\n state = \"okey\";\n },\n acomma: function () {\n container.push(value);\n state = \"avalue\";\n }\n },\n \"true\": {\n go: function () {\n value = true;\n state = \"ok\";\n },\n ovalue: function () {\n value = true;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = true;\n state = \"acomma\";\n },\n avalue: function () {\n value = true;\n state = \"acomma\";\n }\n },\n \"false\": {\n go: function () {\n value = false;\n state = \"ok\";\n },\n ovalue: function () {\n value = false;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = false;\n state = \"acomma\";\n },\n avalue: function () {\n value = false;\n state = \"acomma\";\n }\n },\n \"null\": {\n go: function () {\n value = null;\n state = \"ok\";\n },\n ovalue: function () {\n value = null;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = null;\n state = \"acomma\";\n },\n avalue: function () {\n value = null;\n state = \"acomma\";\n }\n }\n };\n\n function debackslashify(text) {\n\n // Remove and replace any backslash escapement.\n\n return text.replace(/\\\\(?:u(.{4})|([^u]))/g, function (ignore, b, c) {\n return b\n ? String.fromCharCode(parseInt(b, 16))\n : escapes[c];\n });\n }\n\n return function (source, reviver) {\n\n // A regular expression is used to extract tokens from the JSON text.\n // The extraction process is cautious.\n\n var result;\n var tx = /^[\\u0020\\t\\n\\r]*(?:([,:\\[\\]{}]|true|false|null)|(-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?)|\"((?:[^\\r\\n\\t\\\\\\\"]|\\\\(?:[\"\\\\\\/trnfb]|u[0-9a-fA-F]{4}))*)\")/;\n\n // Set the starting state.\n\n state = \"go\";\n\n // The stack records the container, key, and state for each object or array\n // that contains another object or array while processing nested structures.\n\n stack = [];\n\n // If any error occurs, we will catch it and ultimately throw a syntax error.\n\n try {\n\n // For each token...\n\n while (true) {\n result = tx.exec(source);\n if (!result) {\n break;\n }\n\n // result is the result array from matching the tokenizing regular expression.\n // result[0] contains everything that matched, including any initial whitespace.\n // result[1] contains any punctuation that was matched, or true, false, or null.\n // result[2] contains a matched number, still in string form.\n // result[3] contains a matched string, without quotes but with escapement.\n\n if (result[1]) {\n\n // Token: Execute the action for this state and token.\n\n action[result[1]][state]();\n\n } else if (result[2]) {\n\n // Number token: Convert the number string into a number value and execute\n // the action for this state and number.\n\n value = +result[2];\n number[state]();\n } else {\n\n // String token: Replace the escapement sequences and execute the action for\n // this state and string.\n\n value = debackslashify(result[3]);\n string[state]();\n }\n\n // Remove the token from the string. The loop will continue as long as there\n // are tokens. This is a slow process, but it allows the use of ^ matching,\n // which assures that no illegal tokens slip through.\n\n source = source.slice(result[0].length);\n }\n\n // If we find a state/token combination that is illegal, then the action will\n // cause an error. We handle the error by simply changing the state.\n\n } catch (e) {\n state = e;\n }\n\n // The parsing is finished. If we are not in the final \"ok\" state, or if the\n // remaining source contains anything except whitespace, then we did not have\n //a well-formed JSON text.\n\n if (state !== \"ok\" || (/[^\\u0020\\t\\n\\r]/.test(source))) {\n throw (state instanceof SyntaxError)\n ? state\n : new SyntaxError(\"JSON\");\n }\n\n // If there is a reviver function, we recursively walk the new structure,\n // passing each name/value pair to the reviver function for possible\n // transformation, starting with a temporary root object that holds the current\n // value in an empty key. If there is not a reviver function, we simply return\n // that value.\n\n return (typeof reviver === \"function\")\n ? (function walk(holder, key) {\n var k;\n var v;\n var val = holder[key];\n if (val && typeof val === \"object\") {\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(val, k)) {\n v = walk(val, k);\n if (v !== undefined) {\n val[k] = v;\n } else {\n delete val[k];\n }\n }\n }\n }\n return reviver.call(holder, key, val);\n }({\"\": value}, \"\"))\n : value;\n };\n }());\n }\n}\n\nmodule.exports = setupCustomJSON;\n","'use strict';\n\nfunction wrapGlobals(window, handler, shim) {\n if (!window) { return; }\n // Adapted from https://github.com/bugsnag/bugsnag-js\n var globals = 'EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload'.split(',');\n var i, global;\n for (i = 0; i < globals.length; ++i) {\n global = globals[i];\n\n if (window[global] && window[global].prototype) {\n _extendListenerPrototype(handler, window[global].prototype, shim);\n }\n }\n}\n\nfunction _extendListenerPrototype(handler, prototype, shim) {\n if (prototype.hasOwnProperty && prototype.hasOwnProperty('addEventListener')) {\n var oldAddEventListener = prototype.addEventListener;\n while (oldAddEventListener._rollbarOldAdd && oldAddEventListener.belongsToShim) {\n oldAddEventListener = oldAddEventListener._rollbarOldAdd;\n }\n var addFn = function(event, callback, bubble) {\n oldAddEventListener.call(this, event, handler.wrap(callback), bubble);\n };\n addFn._rollbarOldAdd = oldAddEventListener;\n addFn.belongsToShim = shim;\n prototype.addEventListener = addFn;\n\n var oldRemoveEventListener = prototype.removeEventListener;\n while (oldRemoveEventListener._rollbarOldRemove && oldRemoveEventListener.belongsToShim) {\n oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;\n }\n var removeFn = function(event, callback, bubble) {\n oldRemoveEventListener.call(this, event, callback && callback._rollbar_wrapped || callback, bubble);\n };\n removeFn._rollbarOldRemove = oldRemoveEventListener;\n removeFn.belongsToShim = shim;\n prototype.removeEventListener = removeFn;\n }\n}\n\nmodule.exports = wrapGlobals;\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction raw(payload, jsonBackup) {\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction selectFrames(frames, range) {\n var len = frames.length;\n if (len > range * 2) {\n return frames.slice(0, range).concat(frames.slice(len - range));\n }\n return frames;\n}\n\nfunction truncateFrames(payload, jsonBackup, range) {\n range = (typeof range === 'undefined') ? 30 : range;\n var body = payload.data.body;\n var frames;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n frames = chain[i].frames;\n frames = selectFrames(frames, range);\n chain[i].frames = frames;\n }\n } else if (body.trace) {\n frames = body.trace.frames;\n frames = selectFrames(frames, range);\n body.trace.frames = frames;\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction maybeTruncateValue(len, val) {\n if (!val) {\n return val;\n }\n if (val.length > len) {\n return val.slice(0, len - 3).concat('...');\n }\n return val;\n}\n\nfunction truncateStrings(len, payload, jsonBackup) {\n function truncator(k, v, seen) {\n switch (_.typeName(v)) {\n case 'string':\n return maybeTruncateValue(len, v);\n case 'object':\n case 'array':\n return traverse(v, truncator, seen);\n default:\n return v;\n }\n }\n payload = traverse(payload, truncator);\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction truncateTraceData(traceData) {\n if (traceData.exception) {\n delete traceData.exception.description;\n traceData.exception.message = maybeTruncateValue(255, traceData.exception.message);\n }\n traceData.frames = selectFrames(traceData.frames, 1);\n return traceData;\n}\n\nfunction minBody(payload, jsonBackup) {\n var body = payload.data.body;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n chain[i] = truncateTraceData(chain[i]);\n }\n } else if (body.trace) {\n body.trace = truncateTraceData(body.trace);\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction needsTruncation(payload, maxSize) {\n return _.maxByteSize(payload) > maxSize;\n}\n\nfunction truncate(payload, jsonBackup, maxSize) {\n maxSize = (typeof maxSize === 'undefined') ? (512 * 1024) : maxSize;\n var strategies = [\n raw,\n truncateFrames,\n truncateStrings.bind(null, 1024),\n truncateStrings.bind(null, 512),\n truncateStrings.bind(null, 256),\n minBody\n ];\n var strategy, results, result;\n\n while ((strategy = strategies.shift())) {\n results = strategy(payload, jsonBackup);\n payload = results[0];\n result = results[1];\n if (result.error || !needsTruncation(result.value, maxSize)) {\n return result;\n }\n }\n return result;\n}\n\nmodule.exports = {\n truncate: truncate,\n\n /* for testing */\n raw: raw,\n truncateFrames: truncateFrames,\n truncateStrings: truncateStrings,\n maybeTruncateValue: maybeTruncateValue\n};\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/utility.js","webpack:///./src/browser/logger.js","webpack:///./src/browser/url.js","webpack:///./src/errorParser.js","webpack:///./src/scrub.js","webpack:///./src/utility/traverse.js","webpack:///./src/browser/bundles/rollbar.js","webpack:///./src/browser/rollbar.js","webpack:///./src/browser/core.js","webpack:///./src/rollbar.js","webpack:///./src/rateLimiter.js","webpack:///./src/merge.js","webpack:///./src/queue.js","webpack:///./src/notifier.js","webpack:///./src/api.js","webpack:///./src/apiUtility.js","webpack:///./node_modules/console-polyfill/index.js","webpack:///./src/browser/detection.js","webpack:///./src/browser/globalSetup.js","webpack:///./src/browser/transport.js","webpack:///./src/browser/transport/fetch.js","webpack:///./src/browser/transport/xhr.js","webpack:///./src/browser/transforms.js","webpack:///./node_modules/error-stack-parser/error-stack-parser.js","webpack:///./node_modules/error-stack-parser/node_modules/stackframe/stackframe.js","webpack:///./src/transforms.js","webpack:///./src/browser/predicates.js","webpack:///./src/predicates.js","webpack:///./src/defaults.js","webpack:///./src/browser/defaults/scrubFields.js","webpack:///./src/telemetry.js","webpack:///./src/browser/telemetry.js","webpack:///./src/utility/headers.js","webpack:///./src/browser/domUtility.js","webpack:///./src/utility/polyfillJSON.js","webpack:///./vendor/JSON-js/json3.js","webpack:///./src/browser/wrapGlobals.js","webpack:///./src/truncation.js"],"names":[],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;AClFa;;AAEb,YAAY,mBAAO,CAAC,EAAS;;AAE7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,OAAO;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,EAAE;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,mCAAmC,OAAO;AAC1C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,iBAAiB,YAAY;AAC7B;AACA,qBAAqB;AACrB;AACA,KAAK,wBAAwB;AAC7B;AACA,KAAK,yBAAyB;AAC9B;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kCAAkC,OAAO;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,SAAS;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,kCAAkC,OAAO;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,SAAS,UAAU,YAAY,GAAG;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,aAAa;AAChC;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5wBa;;AAEb;AACA,mBAAO,CAAC,EAAkB;AAC1B,gBAAgB,mBAAO,CAAC,EAAa;AACrC,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;AC3Ca;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;AChFa;;AAEb,uBAAuB,mBAAO,CAAC,EAAoB;;AAEnD;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;;AAEA,sBAAsB,wBAAwB;AAC9C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,eAAe;AACf;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7Ha;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,eAAe,mBAAO,CAAC,CAAoB;;AAE3C;AACA;;AAEA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,WAAW;AAC9B;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC9Fa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,kBAAkB;;AAElB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,eAAe,gBAAgB;AAC/B;AACA;AACA;;AAEA,yBAAyB;AACzB;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACtDa;;AAEb,cAAc,mBAAO,CAAC,CAAY;;AAElC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA;AACA;;AAEA;;;;;;;;ACvBa;;AAEb,cAAc,mBAAO,CAAC,CAAQ;AAC9B,gBAAgB,mBAAO,CAAC,EAAc;AACtC,mBAAmB,mBAAO,CAAC,EAAa;AACxC,mBAAmB,mBAAO,CAAC,EAAyB;AACpD,kBAAkB,mBAAO,CAAC,EAAe;AACzC,YAAY,mBAAO,CAAC,CAAU;AAC9B,iBAAiB,mBAAO,CAAC,EAAe;;AAExC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;;;;;;;ACnBa;;AAEb,aAAa,mBAAO,CAAC,CAAY;AACjC,QAAQ,mBAAO,CAAC,CAAY;AAC5B,UAAU,mBAAO,CAAC,EAAQ;AAC1B,aAAa,mBAAO,CAAC,CAAU;AAC/B,cAAc,mBAAO,CAAC,EAAe;;AAErC,gBAAgB,mBAAO,CAAC,EAAa;AACrC,aAAa,mBAAO,CAAC,CAAO;;AAE5B,iBAAiB,mBAAO,CAAC,EAAc;AACvC,uBAAuB,mBAAO,CAAC,EAAe;AAC9C,iBAAiB,mBAAO,CAAC,EAAc;AACvC,uBAAuB,mBAAO,CAAC,EAAe;AAC9C,kBAAkB,mBAAO,CAAC,CAAgB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,0BAA0B,sBAAsB;AAChD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,oCAAoC,SAAS;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,eAAe,mBAAO,CAAC,EAAa;AACpC,kBAAkB,mBAAO,CAAC,EAAwB;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACxjBa;;AAEb,kBAAkB,mBAAO,CAAC,EAAe;AACzC,YAAY,mBAAO,CAAC,EAAS;AAC7B,eAAe,mBAAO,CAAC,EAAY;AACnC,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,6EAA6E,UAAU;AACvF,yFAAyF,UAAU;;AAEnG;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,6BAA6B;AAC7B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACnRa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AChJa;;AAEb;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA,WAAW,YAAY;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACvDa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wDAAwD,WAAW;AACnE;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,QAAQ;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,aAAa,8BAA8B;AAC3C;AACA;AACA;AACA;AACA,+CAA+C,SAAS;AACxD;AACA;AACA,cAAc;AACd;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,SAAS;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,+BAA+B;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC7Qa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACxHa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,cAAc,mBAAO,CAAC,EAAc;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;AC5Ga;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACzGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;AClBY;;AAEb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;AC/Ba;;AAEb;AACA,gBAAgB,QAAQ;AACxB;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;;AAEA;AACA,gBAAgB,QAAQ;;AAExB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;;;;;;;AClGa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,uBAAuB,mBAAO,CAAC,EAAmB;AAClD,qBAAqB,mBAAO,CAAC,EAAiB;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC/Ha;;AAEb,aAAa,mBAAO,CAAC,CAAW;AAChC,QAAQ,mBAAO,CAAC,CAAe;;AAE/B;AACA;AACA;;AAEA;AACA;AACA,wCAAwC,mBAAmB;AAC3D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;;AAEA;;;;;;;;ACpCa;;AAEb;;AAEA,QAAQ,mBAAO,CAAC,CAAe;AAC/B,aAAa,mBAAO,CAAC,CAAW;;AAEhC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AChKa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,kBAAkB,mBAAO,CAAC,CAAgB;AAC1C,aAAa,mBAAO,CAAC,CAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,OAAO;AAC7C;AACA,oBAAoB,6CAA6C;AACjE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,4BAA4B,gBAAgB;AAC5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,sBAAsB;AACvC;AACA;AACA;;AAEA,4BAA4B,oBAAoB;AAChD;AACA;;AAEA;AACA;;AAEA;AACA;AACA,8BAA8B,aAAa;AAC3C;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,kBAAkB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACnVA;AACA;AACA;;AAEA;AACA,QAAQ,IAA0C;AAClD,QAAQ,iCAA6B,CAAC,uBAAY,CAAC,oCAAE,OAAO;AAAA;AAAA;AAAA,oGAAC;AAC7D,KAAK,MAAM,EAIN;AACL,CAAC;AACD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,MAAM;AACzB,oBAAoB,MAAM;AAC1B;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA,CAAC;;;;;;;ACzMD;AACA;AACA;;AAEA;AACA,QAAQ,IAA0C;AAClD,QAAQ,iCAAqB,EAAE,oCAAE,OAAO;AAAA;AAAA;AAAA,oGAAC;AACzC,KAAK,MAAM,EAIN;AACL,CAAC;AACD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,wBAAwB;AAC3C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA,CAAC;;;;;;;;AC9IY;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,sBAAsB;AAC1D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,8BAA8B;AAC9B;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5Ja;;AAEb,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;ACba;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe;;AAEf;;AAEA,uCAAuC,eAAe;;AAEtD;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA;;AAEA,wCAAwC,eAAe;;AAEvD,mBAAmB,gBAAgB;AACnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,SAAS;AAC1B;;AAEA,mBAAmB,qBAAqB;AACxC;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClMa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACVa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5Da;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qCAAqC,mBAAmB;AACxD;;AAEA;AACA,qCAAqC,4BAA4B;AACjE;AACA;AACA,8BAA8B,4BAA4B;AAC1D;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD;AACA;AACA,8BAA8B,gBAAgB;AAC9C;AACA;;AAEA;AACA,8BAA8B,aAAa;AAC3C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AClLa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,cAAc,mBAAO,CAAC,EAAoB;AAC1C,YAAY,mBAAO,CAAC,CAAU;AAC9B,gBAAgB,mBAAO,CAAC,CAAO;AAC/B,cAAc,mBAAO,CAAC,EAAc;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gDAAgD,aAAa;AAC7D;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B,mBAAmB,qBAAqB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,6BAA6B,0BAA0B;AACvD;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA,iBAAiB;AACjB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,eAAe,0BAA0B;AACzC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB;;AAEjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,SAAS;AAC9C;AACA;AACA,GAAG;AACH,yCAAyC;AACzC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,gDAAgD,QAAQ;;AAExD;AACA;;AAEA;AACA,gDAAgD,QAAQ;;AAExD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;AC7wBa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;AC/Fa;;AAEb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,6BAA6B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,4BAA4B,QAAQ;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,4BAA4B;AAC7C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,uBAAuB;AACpC;AACA;AACA;AACA,2BAA2B,sBAAsB;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnIa;;AAEb,mBAAmB,mBAAO,CAAC,EAA4B;;AAEvD;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB;AACpB;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,yCAAyC,iBAAiB;AAC1D,8BAA8B,kBAAkB;;AAEhD,yCAAyC,iBAAiB;AAC1D,sCAAsC,6BAA6B;;AAEnE;AACA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,wBAAwB;AACxB,+CAA+C,EAAE;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;;AAGA;;AAEA;;AAEA,UAAU;AACV,UAAU;AACV,UAAU;AACV;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA,qBAAqB,YAAY;AACjC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,qBAAqB,YAAY;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,eAAe;AACf;AACA,cAAc,wDAAwD;AACtE,cAAc,0BAA0B;AACxC;AACA;AACA;AACA;;AAEA;;AAEA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,mBAAmB,WAAW;AAC9B;AACA;;AAEA;;AAEA,OAAO;AACP;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,sBAAsB,UAAU;AAChC;AACA;;;AAGA;;AAEA;AACA;;AAEA;AACA;;AAEA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB,oBAAoB;AACpB,cAAc;AACd,gBAAgB;AAChB,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,UAAU;AACV;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,WAAW;AACX;AACA,wBAAwB,gDAAgD;AACxE;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,SAAS;AACT,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,WAAW;AACX;AACA,wBAAwB,gDAAgD;AACxE;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,sCAAsC,EAAE;AACxC;AACA;AACA;AACA,SAAS;AACT;;AAEA;;AAEA;AACA;;AAEA;AACA,+CAA+C,yGAAyG,EAAE;;AAE1J;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,SAAS;AACT;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE,UAAU;AACvB;AACA;AACA,KAAK;AACL;AACA;;AAEA;;;;;;;;AC1vBa;;AAEb;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,aAAa,oBAAoB;AACjC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC1Ca;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,eAAe,mBAAO,CAAC,CAAoB;;AAE3C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA","file":"rollbar.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n","'use strict';\n\nvar merge = require('./merge');\n\nvar RollbarJSON = {};\nfunction setupJSON(polyfillJSON) {\n if (isFunction(RollbarJSON.stringify) && isFunction(RollbarJSON.parse)) {\n return;\n }\n\n if (isDefined(JSON)) {\n // If polyfill is provided, prefer it over existing non-native shims.\n if(polyfillJSON) {\n if (isNativeFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isNativeFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n } else { // else accept any interface that is present.\n if (isFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n }\n }\n if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {\n polyfillJSON && polyfillJSON(RollbarJSON);\n }\n}\n\n/*\n * isType - Given a Javascript value and a string, returns true if the type of the value matches the\n * given string.\n *\n * @param x - any value\n * @param t - a lowercase string containing one of the following type names:\n * - undefined\n * - null\n * - error\n * - number\n * - boolean\n * - string\n * - symbol\n * - function\n * - object\n * - array\n * @returns true if x is of type t, otherwise false\n */\nfunction isType(x, t) {\n return t === typeName(x);\n}\n\n/*\n * typeName - Given a Javascript value, returns the type of the object as a string\n */\nfunction typeName(x) {\n var name = typeof x;\n if (name !== 'object') {\n return name;\n }\n if (!x) {\n return 'null';\n }\n if (x instanceof Error) {\n return 'error';\n }\n return ({}).toString.call(x).match(/\\s([a-zA-Z]+)/)[1].toLowerCase();\n}\n\n/* isFunction - a convenience function for checking if a value is a function\n *\n * @param f - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isFunction(f) {\n return isType(f, 'function');\n}\n\n/* isNativeFunction - a convenience function for checking if a value is a native JS function\n *\n * @param f - any value\n * @returns true if f is a native JS function, otherwise false\n */\nfunction isNativeFunction(f) {\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n var funcMatchString = Function.prototype.toString.call(Object.prototype.hasOwnProperty)\n .replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?');\n var reIsNative = RegExp('^' + funcMatchString + '$');\n return isObject(f) && reIsNative.test(f);\n}\n\n/* isObject - Checks if the argument is an object\n *\n * @param value - any value\n * @returns true is value is an object function is an object)\n*/\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/* isString - Checks if the argument is a string\n *\n * @param value - any value\n * @returns true if value is a string\n*/\nfunction isString(value) {\n return typeof value === 'string' || value instanceof String\n}\n\n/**\n * isFiniteNumber - determines whether the passed value is a finite number\n *\n * @param {*} n - any value\n * @returns true if value is a finite number\n */\n function isFiniteNumber(n) {\n return Number.isFinite(n);\n}\n\n/*\n * isDefined - a convenience function for checking if a value is not equal to undefined\n *\n * @param u - any value\n * @returns true if u is anything other than undefined\n */\nfunction isDefined(u) {\n return !isType(u, 'undefined');\n}\n\n/*\n * isIterable - convenience function for checking if a value can be iterated, essentially\n * whether it is an object or an array.\n *\n * @param i - any value\n * @returns true if i is an object or an array as determined by `typeName`\n */\nfunction isIterable(i) {\n var type = typeName(i);\n return (type === 'object' || type === 'array');\n}\n\n/*\n * isError - convenience function for checking if a value is of an error type\n *\n * @param e - any value\n * @returns true if e is an error\n */\nfunction isError(e) {\n // Detect both Error and Firefox Exception type\n return isType(e, 'error') || isType(e, 'exception');\n}\n\n/* isPromise - a convenience function for checking if a value is a promise\n *\n * @param p - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isPromise(p) {\n return isObject(p) && isType(p.then, 'function');\n}\n\nfunction redact() {\n return '********';\n}\n\n// from http://stackoverflow.com/a/8809472/1138191\nfunction uuid4() {\n var d = now();\n var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n var r = (d + Math.random() * 16) % 16 | 0;\n d = Math.floor(d / 16);\n return (c === 'x' ? r : (r & 0x7 | 0x8)).toString(16);\n });\n return uuid;\n}\n\nvar LEVELS = {\n debug: 0,\n info: 1,\n warning: 2,\n error: 3,\n critical: 4\n};\n\nfunction sanitizeUrl(url) {\n var baseUrlParts = parseUri(url);\n if (!baseUrlParts) {\n return '(unknown)';\n }\n\n // remove a trailing # if there is no anchor\n if (baseUrlParts.anchor === '') {\n baseUrlParts.source = baseUrlParts.source.replace('#', '');\n }\n\n url = baseUrlParts.source.replace('?' + baseUrlParts.query, '');\n return url;\n}\n\nvar parseUriOptions = {\n strictMode: false,\n key: [\n 'source',\n 'protocol',\n 'authority',\n 'userInfo',\n 'user',\n 'password',\n 'host',\n 'port',\n 'relative',\n 'path',\n 'directory',\n 'file',\n 'query',\n 'anchor'\n ],\n q: {\n name: 'queryKey',\n parser: /(?:^|&)([^&=]*)=?([^&]*)/g\n },\n parser: {\n strict: /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n loose: /^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/\n }\n};\n\nfunction parseUri(str) {\n if (!isType(str, 'string')) {\n return undefined;\n }\n\n var o = parseUriOptions;\n var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);\n var uri = {};\n\n for (var i = 0, l = o.key.length; i < l; ++i) {\n uri[o.key[i]] = m[i] || '';\n }\n\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) {\n uri[o.q.name][$1] = $2;\n }\n });\n\n return uri;\n}\n\nfunction addParamsAndAccessTokenToPath(accessToken, options, params) {\n params = params || {};\n params.access_token = accessToken;\n var paramsArray = [];\n var k;\n for (k in params) {\n if (Object.prototype.hasOwnProperty.call(params, k)) {\n paramsArray.push([k, params[k]].join('='));\n }\n }\n var query = '?' + paramsArray.sort().join('&');\n\n options = options || {};\n options.path = options.path || '';\n var qs = options.path.indexOf('?');\n var h = options.path.indexOf('#');\n var p;\n if (qs !== -1 && (h === -1 || h > qs)) {\n p = options.path;\n options.path = p.substring(0,qs) + query + '&' + p.substring(qs+1);\n } else {\n if (h !== -1) {\n p = options.path;\n options.path = p.substring(0,h) + query + p.substring(h);\n } else {\n options.path = options.path + query;\n }\n }\n}\n\nfunction formatUrl(u, protocol) {\n protocol = protocol || u.protocol;\n if (!protocol && u.port) {\n if (u.port === 80) {\n protocol = 'http:';\n } else if (u.port === 443) {\n protocol = 'https:';\n }\n }\n protocol = protocol || 'https:';\n\n if (!u.hostname) {\n return null;\n }\n var result = protocol + '//' + u.hostname;\n if (u.port) {\n result = result + ':' + u.port;\n }\n if (u.path) {\n result = result + u.path;\n }\n return result;\n}\n\nfunction stringify(obj, backup) {\n var value, error;\n try {\n value = RollbarJSON.stringify(obj);\n } catch (jsonError) {\n if (backup && isFunction(backup)) {\n try {\n value = backup(obj);\n } catch (backupError) {\n error = backupError;\n }\n } else {\n error = jsonError;\n }\n }\n return {error: error, value: value};\n}\n\nfunction maxByteSize(string) {\n // The transport will use utf-8, so assume utf-8 encoding.\n //\n // This minimal implementation will accurately count bytes for all UCS-2 and\n // single code point UTF-16. If presented with multi code point UTF-16,\n // which should be rare, it will safely overcount, not undercount.\n //\n // While robust utf-8 encoders exist, this is far smaller and far more performant.\n // For quickly counting payload size for truncation, smaller is better.\n\n var count = 0;\n var length = string.length;\n\n for (var i = 0; i < length; i++) {\n var code = string.charCodeAt(i);\n if (code < 128) { // up to 7 bits\n count = count + 1;\n } else if (code < 2048) { // up to 11 bits\n count = count + 2;\n } else if (code < 65536) { // up to 16 bits\n count = count + 3;\n }\n }\n\n return count;\n}\n\nfunction jsonParse(s) {\n var value, error;\n try {\n value = RollbarJSON.parse(s);\n } catch (e) {\n error = e;\n }\n return {error: error, value: value};\n}\n\nfunction makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n mode,\n backupMessage,\n errorParser\n) {\n var location = {\n url: url || '',\n line: lineno,\n column: colno\n };\n location.func = errorParser.guessFunctionName(location.url, location.line);\n location.context = errorParser.gatherContext(location.url, location.line);\n var href = typeof document !== 'undefined' && document && document.location && document.location.href;\n var useragent = typeof window !== 'undefined' && window && window.navigator && window.navigator.userAgent;\n return {\n 'mode': mode,\n 'message': error ? String(error) : (message || backupMessage),\n 'url': href,\n 'stack': [location],\n 'useragent': useragent\n };\n}\n\nfunction wrapCallback(logger, f) {\n return function(err, resp) {\n try {\n f(err, resp);\n } catch (e) {\n logger.error(e);\n }\n };\n}\n\nfunction nonCircularClone(obj) {\n var seen = [obj];\n\n function clone(obj, seen) {\n var value, name, newSeen, result = {};\n\n try {\n for (name in obj) {\n value = obj[name];\n\n if (value && (isType(value, 'object') || isType(value, 'array'))) {\n if (seen.includes(value)) {\n result[name] = 'Removed circular reference: ' + typeName(value);\n } else {\n newSeen = seen.slice();\n newSeen.push(value);\n result[name] = clone(value, newSeen);\n }\n continue;\n }\n\n result[name] = value;\n }\n } catch (e) {\n result = 'Failed cloning custom data: ' + e.message;\n }\n return result;\n }\n return clone(obj, seen);\n}\n\nfunction createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\n var diagnostic = {};\n var argTypes = [];\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n argTypes.push(typ);\n switch (typ) {\n case 'undefined':\n break;\n case 'string':\n message ? extraArgs.push(arg) : message = arg;\n break;\n case 'function':\n callback = wrapCallback(logger, arg);\n break;\n case 'date':\n extraArgs.push(arg);\n break;\n case 'error':\n case 'domexception':\n case 'exception': // Firefox Exception type\n err ? extraArgs.push(arg) : err = arg;\n break;\n case 'object':\n case 'array':\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n if (requestKeys && typ === 'object' && !request) {\n for (var j = 0, len = requestKeys.length; j < len; ++j) {\n if (arg[requestKeys[j]] !== undefined) {\n request = arg;\n break;\n }\n }\n if (request) {\n break;\n }\n }\n custom ? extraArgs.push(arg) : custom = arg;\n break;\n default:\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n extraArgs.push(arg);\n }\n }\n\n // if custom is an array this turns it into an object with integer keys\n if (custom) custom = nonCircularClone(custom);\n\n if (extraArgs.length > 0) {\n if (!custom) custom = nonCircularClone({});\n custom.extraArgs = nonCircularClone(extraArgs);\n }\n\n var item = {\n message: message,\n err: err,\n custom: custom,\n timestamp: now(),\n callback: callback,\n notifier: notifier,\n diagnostic: diagnostic,\n uuid: uuid4()\n };\n\n setCustomItemKeys(item, custom);\n\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n item.diagnostic.original_arg_types = argTypes;\n return item;\n}\n\nfunction setCustomItemKeys(item, custom) {\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (custom && custom.skipFrames !== undefined) {\n item.skipFrames = custom.skipFrames;\n delete custom.skipFrames;\n }\n}\n\nfunction addErrorContext(item, errors) {\n var custom = item.data.custom || {};\n var contextAdded = false;\n\n try {\n for (var i = 0; i < errors.length; ++i) {\n if (errors[i].hasOwnProperty('rollbarContext')) {\n custom = merge(custom, nonCircularClone(errors[i].rollbarContext));\n contextAdded = true;\n }\n }\n\n // Avoid adding an empty object to the data.\n if (contextAdded) {\n item.data.custom = custom;\n }\n } catch (e) {\n item.diagnostic.error_context = 'Failed: ' + e.message;\n }\n}\n\nvar TELEMETRY_TYPES = ['log', 'network', 'dom', 'navigation', 'error', 'manual'];\nvar TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];\n\nfunction arrayIncludes(arr, val) {\n for (var k = 0; k < arr.length; ++k) {\n if (arr[k] === val) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction createTelemetryEvent(args) {\n var type, metadata, level;\n var arg;\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n switch (typ) {\n case 'string':\n if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {\n type = arg;\n } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {\n level = arg;\n }\n break;\n case 'object':\n metadata = arg;\n break;\n default:\n break;\n }\n }\n var event = {\n type: type || 'manual',\n metadata: metadata || {},\n level: level\n };\n\n return event;\n}\n\n/*\n * get - given an obj/array and a keypath, return the value at that keypath or\n * undefined if not possible.\n *\n * @param obj - an object or array\n * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'\n * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`\n */\nfunction get(obj, path) {\n if (!obj) {\n return undefined;\n }\n var keys = path.split('.');\n var result = obj;\n try {\n for (var i = 0, len = keys.length; i < len; ++i) {\n result = result[keys[i]];\n }\n } catch (e) {\n result = undefined;\n }\n return result;\n}\n\nfunction set(obj, path, value) {\n if (!obj) {\n return;\n }\n var keys = path.split('.');\n var len = keys.length;\n if (len < 1) {\n return;\n }\n if (len === 1) {\n obj[keys[0]] = value;\n return;\n }\n try {\n var temp = obj[keys[0]] || {};\n var replacement = temp;\n for (var i = 1; i < len - 1; ++i) {\n temp[keys[i]] = temp[keys[i]] || {};\n temp = temp[keys[i]];\n }\n temp[keys[len-1]] = value;\n obj[keys[0]] = replacement;\n } catch (e) {\n return;\n }\n}\n\nfunction formatArgsAsString(args) {\n var i, len, arg;\n var result = [];\n for (i = 0, len = args.length; i < len; ++i) {\n arg = args[i];\n switch (typeName(arg)) {\n case 'object':\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500) {\n arg = arg.substr(0, 497) + '...';\n }\n break;\n case 'null':\n arg = 'null';\n break;\n case 'undefined':\n arg = 'undefined';\n break;\n case 'symbol':\n arg = arg.toString();\n break;\n }\n result.push(arg);\n }\n return result.join(' ');\n}\n\nfunction now() {\n if (Date.now) {\n return +Date.now();\n }\n return +new Date();\n}\n\nfunction filterIp(requestData, captureIp) {\n if (!requestData || !requestData['user_ip'] || captureIp === true) {\n return;\n }\n var newIp = requestData['user_ip'];\n if (!captureIp) {\n newIp = null;\n } else {\n try {\n var parts;\n if (newIp.indexOf('.') !== -1) {\n parts = newIp.split('.');\n parts.pop();\n parts.push('0');\n newIp = parts.join('.');\n } else if (newIp.indexOf(':') !== -1) {\n parts = newIp.split(':');\n if (parts.length > 2) {\n var beginning = parts.slice(0, 3);\n var slashIdx = beginning[2].indexOf('/');\n if (slashIdx !== -1) {\n beginning[2] = beginning[2].substring(0, slashIdx);\n }\n var terminal = '0000:0000:0000:0000:0000';\n newIp = beginning.concat(terminal).join(':');\n }\n } else {\n newIp = null;\n }\n } catch (e) {\n newIp = null;\n }\n }\n requestData['user_ip'] = newIp;\n}\n\nfunction handleOptions(current, input, payload, logger) {\n var result = merge(current, input, payload);\n result = updateDeprecatedOptions(result, logger);\n if (!input || input.overwriteScrubFields) {\n return result;\n }\n if (input.scrubFields) {\n result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);\n }\n return result;\n}\n\nfunction updateDeprecatedOptions(options, logger) {\n if(options.hostWhiteList && !options.hostSafeList) {\n options.hostSafeList = options.hostWhiteList;\n options.hostWhiteList = undefined;\n logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');\n }\n if(options.hostBlackList && !options.hostBlockList) {\n options.hostBlockList = options.hostBlackList;\n options.hostBlackList = undefined;\n logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');\n }\n return options;\n}\n\nmodule.exports = {\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n createItem: createItem,\n addErrorContext: addErrorContext,\n createTelemetryEvent: createTelemetryEvent,\n filterIp: filterIp,\n formatArgsAsString: formatArgsAsString,\n formatUrl: formatUrl,\n get: get,\n handleOptions: handleOptions,\n isError: isError,\n isFiniteNumber: isFiniteNumber,\n isFunction: isFunction,\n isIterable: isIterable,\n isNativeFunction: isNativeFunction,\n isObject: isObject,\n isString: isString,\n isType: isType,\n isPromise: isPromise,\n jsonParse: jsonParse,\n LEVELS: LEVELS,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n merge: merge,\n now: now,\n redact: redact,\n RollbarJSON: RollbarJSON,\n sanitizeUrl: sanitizeUrl,\n set: set,\n setupJSON: setupJSON,\n stringify: stringify,\n maxByteSize: maxByteSize,\n typeName: typeName,\n uuid4: uuid4\n};\n","'use strict';\n\n/* eslint-disable no-console */\nrequire('console-polyfill');\nvar detection = require('./detection');\nvar _ = require('../utility');\n\nfunction error() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.error(_.formatArgsAsString(args));\n } else {\n console.error.apply(console, args);\n }\n}\n\nfunction info() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.info(_.formatArgsAsString(args));\n } else {\n console.info.apply(console, args);\n }\n}\n\nfunction log() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.log(_.formatArgsAsString(args));\n } else {\n console.log.apply(console, args);\n }\n}\n\n/* eslint-enable no-console */\n\nmodule.exports = {\n error: error,\n info: info,\n log: log\n};\n","'use strict';\n\n// See https://nodejs.org/docs/latest/api/url.html\nfunction parse(url) {\n var result = {\n protocol: null, auth: null, host: null, path: null,\n hash: null, href: url, hostname: null, port: null,\n pathname: null, search: null, query: null\n };\n\n var i, last;\n i = url.indexOf('//');\n if (i !== -1) {\n result.protocol = url.substring(0,i);\n last = i+2;\n } else {\n last = 0;\n }\n \n i = url.indexOf('@', last);\n if (i !== -1) {\n result.auth = url.substring(last, i);\n last = i+1;\n }\n\n i = url.indexOf('/', last);\n if (i === -1) {\n i = url.indexOf('?', last);\n if (i === -1) {\n i = url.indexOf('#', last);\n if (i === -1) {\n result.host = url.substring(last);\n } else {\n result.host = url.substring(last, i);\n result.hash = url.substring(i);\n }\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n return result;\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n\n i = url.indexOf('#', last);\n if (i === -1) {\n result.path = url.substring(last);\n } else {\n result.path = url.substring(last, i);\n result.hash = url.substring(i);\n }\n\n if (result.path) {\n var pathParts = result.path.split('?');\n result.pathname = pathParts[0];\n result.query = pathParts[1];\n result.search = result.query ? '?' + result.query : null;\n }\n return result;\n}\n\nmodule.exports = {\n parse: parse\n};\n","'use strict';\n\nvar ErrorStackParser = require('error-stack-parser');\n\nvar UNKNOWN_FUNCTION = '?';\nvar ERR_CLASS_REGEXP = new RegExp('^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ');\n\nfunction guessFunctionName() {\n return UNKNOWN_FUNCTION;\n}\n\n\nfunction gatherContext() {\n return null;\n}\n\n\nfunction Frame(stackFrame) {\n var data = {};\n\n data._stackFrame = stackFrame;\n\n data.url = stackFrame.fileName;\n data.line = stackFrame.lineNumber;\n data.func = stackFrame.functionName;\n data.column = stackFrame.columnNumber;\n data.args = stackFrame.args;\n\n data.context = gatherContext();\n\n return data;\n}\n\n\nfunction Stack(exception, skip) {\n function getStack() {\n var parserStack = [];\n\n skip = skip || 0;\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch(e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = skip; i < parserStack.length; i++) {\n stack.push(new Frame(parserStack[i]));\n }\n\n return stack;\n }\n\n return {\n stack: getStack(),\n message: exception.message,\n name: _mostSpecificErrorName(exception),\n rawStack: exception.stack,\n rawException: exception\n };\n}\n\n\nfunction parse(e, skip) {\n var err = e;\n\n if (err.nested || err.cause) {\n var traceChain = [];\n while (err) {\n traceChain.push(new Stack(err, skip));\n err = err.nested || err.cause;\n\n skip = 0; // Only apply skip value to primary error\n }\n\n // Return primary error with full trace chain attached.\n traceChain[0].traceChain = traceChain;\n return traceChain[0];\n } else {\n return new Stack(err, skip);\n }\n}\n\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg || !errMsg.match) {\n return ['Unknown error. There was no error message to display.', ''];\n }\n var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);\n var errClass = '(unknown)';\n\n if (errClassMatch) {\n errClass = errClassMatch[errClassMatch.length - 1];\n errMsg = errMsg.replace((errClassMatch[errClassMatch.length - 2] || '') + errClass + ':', '');\n errMsg = errMsg.replace(/(^[\\s]+|[\\s]+$)/g, '');\n }\n return [errClass, errMsg];\n}\n\n// * Prefers any value over an empty string\n// * Prefers any value over 'Error' where possible\n// * Prefers name over constructor.name when both are more specific than 'Error'\nfunction _mostSpecificErrorName(error) {\n var name = error.name && error.name.length && error.name;\n var constructorName = error.constructor.name && error.constructor.name.length && error.constructor.name;\n\n if (!name || !constructorName) {\n return name || constructorName;\n }\n\n if (name === 'Error') {\n return constructorName;\n }\n return name;\n}\n\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame\n};\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction scrub(data, scrubFields, scrubPaths) {\n scrubFields = scrubFields || [];\n\n if (scrubPaths) {\n for (var i = 0; i < scrubPaths.length; ++i) {\n scrubPath(data, scrubPaths[i]);\n }\n }\n\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart) {\n return paramPart + _.redact();\n }\n\n function paramScrubber(v) {\n var i;\n if (_.isType(v, 'string')) {\n for (i = 0; i < queryRes.length; ++i) {\n v = v.replace(queryRes[i], redactQueryParam);\n }\n }\n return v;\n }\n\n function valScrubber(k, v) {\n var i;\n for (i = 0; i < paramRes.length; ++i) {\n if (paramRes[i].test(k)) {\n v = _.redact();\n break;\n }\n }\n return v;\n }\n\n function scrubber(k, v, seen) {\n var tmpV = valScrubber(k, v);\n if (tmpV === v) {\n if (_.isType(v, 'object') || _.isType(v, 'array')) {\n return traverse(v, scrubber, seen);\n }\n return paramScrubber(tmpV);\n } else {\n return tmpV;\n }\n }\n\n return traverse(data, scrubber);\n}\n\nfunction scrubPath(obj, path) {\n var keys = path.split('.');\n var last = keys.length - 1;\n try {\n for (var i = 0; i <= last; ++i) {\n if (i < last) {\n obj = obj[keys[i]];\n } else {\n obj[keys[i]] = _.redact();\n }\n }\n } catch (e) {\n // Missing key is OK;\n }\n}\n\nfunction _getScrubFieldRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '^\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?$';\n ret.push(new RegExp(pat, 'i'));\n }\n return ret;\n}\n\n\nfunction _getScrubQueryParamRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?';\n ret.push(new RegExp('(' + pat + '=)([^&\\\\n]+)', 'igm'));\n }\n return ret;\n}\n\nmodule.exports = scrub;\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction traverse(obj, func, seen) {\n var k, v, i;\n var isObj = _.isType(obj, 'object');\n var isArray = _.isType(obj, 'array');\n var keys = [];\n var seenIndex;\n\n // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.\n seen = seen || { obj: [], mapped: []};\n\n if (isObj) {\n seenIndex = seen.obj.indexOf(obj);\n\n if (isObj && seenIndex !== -1) {\n // Prefer the mapped object if there is one.\n return seen.mapped[seenIndex] || seen.obj[seenIndex];\n }\n\n seen.obj.push(obj);\n seenIndex = seen.obj.length - 1;\n }\n\n if (isObj) {\n for (k in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, k)) {\n keys.push(k);\n }\n }\n } else if (isArray) {\n for (i = 0; i < obj.length; ++i) {\n keys.push(i);\n }\n }\n\n var result = isObj ? {} : [];\n var same = true;\n for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n result[k] = func(k, v, seen);\n same = same && result[k] === obj[k];\n }\n\n if (isObj && !same) {\n seen.mapped[seenIndex] = result;\n }\n\n return !same ? result : obj;\n}\n\nmodule.exports = traverse;\n","'use strict';\n\nvar rollbar = require('../rollbar');\n\nvar options = (typeof window !== 'undefined') && window._rollbarConfig;\nvar alias = options && options.globalAlias || 'Rollbar';\nvar shimRunning = (typeof window !== 'undefined') && window[alias] && typeof window[alias].shimId === 'function' && window[alias].shimId() !== undefined;\n\nif ((typeof window !== 'undefined') && !window._rollbarStartTime) {\n window._rollbarStartTime = (new Date()).getTime();\n}\n\nif (!shimRunning && options) {\n var Rollbar = new rollbar(options);\n window[alias] = Rollbar;\n} else if (typeof window !== 'undefined') {\n window.rollbar = rollbar;\n window._rollbarDidLoad = true;\n} else if (typeof self !== 'undefined') {\n self.rollbar = rollbar;\n self._rollbarDidLoad = true;\n}\n\nmodule.exports = rollbar;\n","'use strict';\n\nvar Rollbar = require('./core');\nvar telemeter = require('../telemetry');\nvar instrumenter = require('./telemetry');\nvar polyfillJSON = require('../utility/polyfillJSON');\nvar wrapGlobals = require('./wrapGlobals');\nvar scrub = require('../scrub');\nvar truncation = require('../truncation');\n\nRollbar.setComponents({\n telemeter: telemeter,\n instrumenter: instrumenter,\n polyfillJSON: polyfillJSON,\n wrapGlobals: wrapGlobals,\n scrub: scrub,\n truncation: truncation\n});\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar Client = require('../rollbar');\nvar _ = require('../utility');\nvar API = require('../api');\nvar logger = require('./logger');\nvar globals = require('./globalSetup');\n\nvar Transport = require('./transport');\nvar urllib = require('./url');\n\nvar transforms = require('./transforms');\nvar sharedTransforms = require('../transforms');\nvar predicates = require('./predicates');\nvar sharedPredicates = require('../predicates');\nvar errorParser = require('../errorParser');\n\nfunction Rollbar(options, client) {\n this.options = _.handleOptions(defaultOptions, options, null, logger);\n this.options._configuredOptions = options;\n var Telemeter = this.components.telemeter;\n var Instrumenter = this.components.instrumenter;\n var polyfillJSON = this.components.polyfillJSON;\n this.wrapGlobals = this.components.wrapGlobals;\n this.scrub = this.components.scrub;\n var truncation = this.components.truncation;\n\n var transport = new Transport(truncation);\n var api = new API(this.options, transport, urllib, truncation);\n if (Telemeter) {\n this.telemeter = new Telemeter(this.options);\n }\n this.client = client || new Client(this.options, api, logger, this.telemeter, 'browser');\n var gWindow = _gWindow();\n var gDocument = (typeof document != 'undefined') && document;\n this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers\n this.anonymousErrorsPending = 0;\n addTransformsToNotifier(this.client.notifier, this, gWindow);\n addPredicatesToQueue(this.client.queue);\n this.setupUnhandledCapture();\n if (Instrumenter) {\n this.instrumenter = new Instrumenter(this.options, this.client.telemeter, this, gWindow, gDocument);\n this.instrumenter.instrument();\n }\n _.setupJSON(polyfillJSON);\n\n // Used with rollbar-react for rollbar-react-native compatibility.\n this.rollbar = this;\n}\n\nvar _instance = null;\nRollbar.init = function(options, client) {\n if (_instance) {\n return _instance.global(options).configure(options);\n }\n _instance = new Rollbar(options, client);\n return _instance;\n};\n\nRollbar.prototype.components = {};\n\nRollbar.setComponents = function(components) {\n Rollbar.prototype.components = components;\n}\n\nfunction handleUninitialized(maybeCallback) {\n var message = 'Rollbar is not initialized';\n logger.error(message);\n if (maybeCallback) {\n maybeCallback(new Error(message));\n }\n}\n\nRollbar.prototype.global = function(options) {\n this.client.global(options);\n return this;\n};\nRollbar.global = function(options) {\n if (_instance) {\n return _instance.global(options);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.configure = function(options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = {payload: payloadData};\n }\n this.options = _.handleOptions(oldOptions, options, payload, logger);\n this.options._configuredOptions = _.handleOptions(oldOptions._configuredOptions, options, payload);\n this.client.configure(this.options, payloadData);\n this.instrumenter && this.instrumenter.configure(this.options);\n this.setupUnhandledCapture();\n return this;\n};\nRollbar.configure = function(options, payloadData) {\n if (_instance) {\n return _instance.configure(options, payloadData);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.lastError = function() {\n return this.client.lastError;\n};\nRollbar.lastError = function() {\n if (_instance) {\n return _instance.lastError();\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.log = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.log(item);\n return {uuid: uuid};\n};\nRollbar.log = function() {\n if (_instance) {\n return _instance.log.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.debug = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.debug(item);\n return {uuid: uuid};\n};\nRollbar.debug = function() {\n if (_instance) {\n return _instance.debug.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.info = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.info(item);\n return {uuid: uuid};\n};\nRollbar.info = function() {\n if (_instance) {\n return _instance.info.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warn = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warn(item);\n return {uuid: uuid};\n};\nRollbar.warn = function() {\n if (_instance) {\n return _instance.warn.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warning = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warning(item);\n return {uuid: uuid};\n};\nRollbar.warning = function() {\n if (_instance) {\n return _instance.warning.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.error = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.error(item);\n return {uuid: uuid};\n};\nRollbar.error = function() {\n if (_instance) {\n return _instance.error.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.critical = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.critical(item);\n return {uuid: uuid};\n};\nRollbar.critical = function() {\n if (_instance) {\n return _instance.critical.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.buildJsonPayload = function(item) {\n return this.client.buildJsonPayload(item);\n};\nRollbar.buildJsonPayload = function() {\n if (_instance) {\n return _instance.buildJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.sendJsonPayload = function(jsonPayload) {\n return this.client.sendJsonPayload(jsonPayload);\n};\nRollbar.sendJsonPayload = function() {\n if (_instance) {\n return _instance.sendJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.setupUnhandledCapture = function() {\n var gWindow = _gWindow();\n\n if (!this.unhandledExceptionsInitialized) {\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(gWindow, this);\n if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {\n this.wrapGlobals(gWindow, this);\n }\n this.unhandledExceptionsInitialized = true;\n }\n }\n if (!this.unhandledRejectionsInitialized) {\n if (this.options.captureUnhandledRejections || this.options.handleUnhandledRejections) {\n globals.captureUnhandledRejections(gWindow, this);\n this.unhandledRejectionsInitialized = true;\n }\n }\n};\n\nRollbar.prototype.handleUncaughtException = function(message, url, lineno, colno, error, context) {\n if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {\n return;\n }\n\n // Chrome will always send 5+ arguments and error will be valid or null, not undefined.\n // If error is undefined, we have a different caller.\n // Chrome also sends errors from web workers with null error, but does not invoke\n // prepareStackTrace() for these. Test for empty url to skip them.\n if (this.options.inspectAnonymousErrors && this.isChrome && error === null && url === '') {\n return 'anonymous';\n }\n\n var item;\n var stackInfo = _.makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n 'onerror',\n 'uncaught exception',\n errorParser\n );\n if (_.isError(error)) {\n item = this._createItem([message, error, context]);\n item._unhandledStackInfo = stackInfo;\n } else if (_.isError(url)) {\n item = this._createItem([message, url, context]);\n item._unhandledStackInfo = stackInfo;\n } else {\n item = this._createItem([message, context]);\n item.stackInfo = stackInfo;\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n this.client.log(item);\n};\n\n/**\n * Chrome only. Other browsers will ignore.\n *\n * Use Error.prepareStackTrace to extract information about errors that\n * do not have a valid error object in onerror().\n *\n * In tested version of Chrome, onerror is called first but has no way\n * to communicate with prepareStackTrace. Use a counter to let this\n * handler know which errors to send to Rollbar.\n *\n * In config options, set inspectAnonymousErrors to enable.\n */\nRollbar.prototype.handleAnonymousErrors = function() {\n if (!this.options.inspectAnonymousErrors || !this.isChrome) {\n return;\n }\n\n var r = this;\n function prepareStackTrace(error, _stack) { // eslint-disable-line no-unused-vars\n if (r.options.inspectAnonymousErrors) {\n if (r.anonymousErrorsPending) {\n // This is the only known way to detect that onerror saw an anonymous error.\n // It depends on onerror reliably being called before Error.prepareStackTrace,\n // which so far holds true on tested versions of Chrome. If versions of Chrome\n // are tested that behave differently, this logic will need to be updated\n // accordingly.\n r.anonymousErrorsPending -= 1;\n\n if (!error) {\n // Not likely to get here, but calling handleUncaughtException from here\n // without an error object would throw off the anonymousErrorsPending counter,\n // so return now.\n return;\n }\n\n // Allow this to be tracked later.\n error._isAnonymous = true;\n\n // url, lineno, colno shouldn't be needed for these errors.\n // If that changes, update this accordingly, using the unused\n // _stack param as needed (rather than parse error.toString()).\n r.handleUncaughtException(error.message, null, null, null, error);\n }\n }\n\n // Workaround to ensure stack is preserved for normal errors.\n return error.stack;\n }\n\n // https://v8.dev/docs/stack-trace-api\n try {\n Error.prepareStackTrace = prepareStackTrace;\n } catch (e) {\n this.options.inspectAnonymousErrors = false;\n this.error('anonymous error handler failed', e);\n }\n}\n\nRollbar.prototype.handleUnhandledRejection = function(reason, promise) {\n if (!this.options.captureUnhandledRejections && !this.options.handleUnhandledRejections) {\n return;\n }\n\n var message = 'unhandled rejection was null or undefined!';\n if (reason) {\n if (reason.message) {\n message = reason.message;\n } else {\n var reasonResult = _.stringify(reason);\n if (reasonResult.value) {\n message = reasonResult.value;\n }\n }\n }\n var context = (reason && reason._rollbarContext) || (promise && promise._rollbarContext);\n\n var item;\n if (_.isError(reason)) {\n item = this._createItem([message, reason, context]);\n } else {\n item = this._createItem([message, reason, context]);\n item.stackInfo = _.makeUnhandledStackInfo(\n message,\n '',\n 0,\n 0,\n null,\n 'unhandledrejection',\n '',\n errorParser\n );\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n item._originalArgs = item._originalArgs || [];\n item._originalArgs.push(promise);\n this.client.log(item);\n};\n\nRollbar.prototype.wrap = function(f, context, _before) {\n try {\n var ctxFn;\n if(_.isFunction(context)) {\n ctxFn = context;\n } else {\n ctxFn = function() { return context || {}; };\n }\n\n if (!_.isFunction(f)) {\n return f;\n }\n\n if (f._isWrap) {\n return f;\n }\n\n if (!f._rollbar_wrapped) {\n f._rollbar_wrapped = function () {\n if (_before && _.isFunction(_before)) {\n _before.apply(this, arguments);\n }\n try {\n return f.apply(this, arguments);\n } catch(exc) {\n var e = exc;\n if (e && window._rollbarWrappedError !== e) {\n if (_.isType(e, 'string')) {\n e = new String(e);\n }\n e._rollbarContext = ctxFn() || {};\n e._rollbarContext._wrappedSource = f.toString();\n\n window._rollbarWrappedError = e;\n }\n throw e;\n }\n };\n\n f._rollbar_wrapped._isWrap = true;\n\n if (f.hasOwnProperty) {\n for (var prop in f) {\n if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {\n f._rollbar_wrapped[prop] = f[prop];\n }\n }\n }\n }\n\n return f._rollbar_wrapped;\n } catch (e) {\n // Return the original function if the wrap fails.\n return f;\n }\n};\nRollbar.wrap = function(f, context) {\n if (_instance) {\n return _instance.wrap(f, context);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.captureEvent = function() {\n var event = _.createTelemetryEvent(arguments);\n return this.client.captureEvent(event.type, event.metadata, event.level);\n};\nRollbar.captureEvent = function() {\n if (_instance) {\n return _instance.captureEvent.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\n// The following two methods are used internally and are not meant for public use\nRollbar.prototype.captureDomContentLoaded = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureLoad(ts);\n};\n\n/* Internal */\n\nfunction addTransformsToNotifier(notifier, rollbar, gWindow) {\n notifier\n .addTransform(transforms.handleDomException)\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(gWindow))\n .addTransform(transforms.addClientInfo(gWindow))\n .addTransform(transforms.addPluginInfo(gWindow))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(sharedTransforms.addConfigToPayload)\n .addTransform(transforms.addScrubber(rollbar.scrub))\n .addTransform(sharedTransforms.addPayloadOptions)\n .addTransform(sharedTransforms.userTransform(logger))\n .addTransform(sharedTransforms.addConfiguredOptions)\n .addTransform(sharedTransforms.addDiagnosticKeys)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(sharedPredicates.checkLevel)\n .addPredicate(predicates.checkIgnore)\n .addPredicate(sharedPredicates.userCheckIgnore(logger))\n .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))\n .addPredicate(sharedPredicates.urlIsSafeListed(logger))\n .addPredicate(sharedPredicates.messageIsIgnored(logger));\n}\n\nRollbar.prototype.loadFull = function() {\n logger.info('Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.');\n};\n\nRollbar.prototype._createItem = function(args) {\n return _.createItem(args, logger, this);\n};\n\nfunction _getFirstFunction(args) {\n for (var i = 0, len = args.length; i < len; ++i) {\n if (_.isFunction(args[i])) {\n return args[i];\n }\n }\n return undefined;\n}\n\nfunction _gWindow() {\n return ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n}\n\nvar defaults = require('../defaults');\nvar scrubFields = require('./defaults/scrubFields');\n\nvar defaultOptions = {\n version: defaults.version,\n scrubFields: scrubFields.scrubFields,\n logLevel: defaults.logLevel,\n reportLevel: defaults.reportLevel,\n uncaughtErrorLevel: defaults.uncaughtErrorLevel,\n endpoint: defaults.endpoint,\n verbose: false,\n enabled: true,\n transmit: true,\n sendConfig: false,\n includeItemsInTelemetry: true,\n captureIp: true,\n inspectAnonymousErrors: true,\n ignoreDuplicateErrors: true,\n wrapGlobalEventHandlers: false\n};\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar _ = require('./utility');\n\n/*\n * Rollbar - the interface to Rollbar\n *\n * @param options\n * @param api\n * @param logger\n */\nfunction Rollbar(options, api, logger, telemeter, platform) {\n this.options = _.merge(options);\n this.logger = logger;\n Rollbar.rateLimiter.configureGlobal(this.options);\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.api = api;\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n\n // This must happen before the Notifier is created\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = telemeter;\n setStackTraceLimit(options);\n this.lastError = null;\n this.lastErrorHash = 'none';\n}\n\nvar defaultOptions = {\n maxItems: 0,\n itemsPerMinute: 60\n};\n\nRollbar.rateLimiter = new RateLimiter(defaultOptions);\n\nRollbar.prototype.global = function (options) {\n Rollbar.rateLimiter.configureGlobal(options);\n return this;\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n\n this.options = _.merge(oldOptions, options, payload);\n\n // This must happen before the Notifier is configured\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier && this.notifier.configure(this.options);\n this.telemeter && this.telemeter.configure(this.options);\n setStackTraceLimit(options);\n this.global(this.options);\n\n if (validateTracer(options.tracer)) {\n this.tracer = options.tracer\n }\n\n return this;\n};\n\nRollbar.prototype.log = function (item) {\n var level = this._defaultLogLevel();\n return this._log(level, item);\n};\n\nRollbar.prototype.debug = function (item) {\n this._log('debug', item);\n};\n\nRollbar.prototype.info = function (item) {\n this._log('info', item);\n};\n\nRollbar.prototype.warn = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.warning = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.error = function (item) {\n this._log('error', item);\n};\n\nRollbar.prototype.critical = function (item) {\n this._log('critical', item);\n};\n\nRollbar.prototype.wait = function (callback) {\n this.queue.wait(callback);\n};\n\nRollbar.prototype.captureEvent = function (type, metadata, level) {\n return this.telemeter && this.telemeter.captureEvent(type, metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function (ts) {\n return this.telemeter && this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (ts) {\n return this.telemeter && this.telemeter.captureLoad(ts);\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.api.buildJsonPayload(item);\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n this.api.postJsonPayload(jsonPayload);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function (defaultLevel, item) {\n var callback;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {\n if (callback) {\n var error = new Error('ignored identical item');\n error.item = item;\n callback(error);\n }\n return;\n }\n try {\n this._addTracingInfo(item);\n item.level = item.level || defaultLevel;\n this.telemeter && this.telemeter._captureRollbarItem(item);\n item.telemetryEvents = (this.telemeter && this.telemeter.copyEvents()) || [];\n this.notifier.log(item, callback);\n } catch (e) {\n if (callback) {\n callback(e);\n }\n this.logger.error(e);\n }\n};\n\nRollbar.prototype._defaultLogLevel = function () {\n return this.options.logLevel || 'debug';\n};\n\nRollbar.prototype._sameAsLastError = function (item) {\n if (!item._isUncaught) {\n return false;\n }\n var itemHash = generateItemHash(item);\n if (this.lastErrorHash === itemHash) {\n return true;\n }\n this.lastError = item.err;\n this.lastErrorHash = itemHash;\n return false;\n};\n\nRollbar.prototype._addTracingInfo = function (item) {\n // Tracer validation occurs in the constructor\n // or in the Rollbar.prototype.configure methods\n if (this.tracer) {\n // add rollbar occurrence uuid to span\n var span = this.tracer.scope().active();\n\n if (validateSpan(span)) {\n span.setTag('rollbar.error_uuid', item.uuid);\n span.setTag('rollbar.has_error', true);\n span.setTag('error', true);\n span.setTag('rollbar.item_url', `https://rollbar.com/item/uuid/?uuid=${item.uuid}`);\n span.setTag('rollbar.occurrence_url', `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`);\n\n // add span ID & trace ID to occurrence\n var opentracingSpanId = span.context().toSpanId();\n var opentracingTraceId = span.context().toTraceId();\n\n if (item.custom) {\n item.custom.opentracing_span_id = opentracingSpanId;\n item.custom.opentracing_trace_id = opentracingTraceId;\n } else {\n item.custom = {\n opentracing_span_id: opentracingSpanId,\n opentracing_trace_id: opentracingTraceId\n };\n }\n }\n }\n}\n\nfunction generateItemHash(item) {\n var message = item.message || '';\n var stack = (item.err || {}).stack || String(item.err);\n return message + '::' + stack;\n}\n\n// Node.js, Chrome, Safari, and some other browsers support this property\n// which globally sets the number of stack frames returned in an Error object.\n// If a browser can't use it, no harm done.\nfunction setStackTraceLimit(options) {\n if (options.stackTraceLimit) {\n Error.stackTraceLimit = options.stackTraceLimit;\n }\n}\n\n/**\n * Validate the Tracer object provided to the Client\n * is valid for our Opentracing use case.\n * @param {opentracer.Tracer} tracer\n */\nfunction validateTracer(tracer) {\n if (!tracer) {\n return false;\n }\n\n if (!tracer.scope || typeof tracer.scope !== 'function') {\n return false;\n }\n\n var scope = tracer.scope();\n\n if (!scope || !scope.active || typeof scope.active !== 'function') {\n return false;\n }\n\n return true;\n}\n\n/**\n * Validate the Span object provided\n * @param {opentracer.Span} span\n */\nfunction validateSpan(span) {\n if (!span || !span.context || typeof span.context !== 'function') {\n return false;\n }\n\n var spanContext = span.context();\n\n if (!spanContext\n || !spanContext.toSpanId\n || !spanContext.toTraceId\n || typeof spanContext.toSpanId !== 'function'\n || typeof spanContext.toTraceId !== 'function') {\n return false\n }\n\n return true;\n}\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar\n *\n * @param options - the same options that are accepted by configureGlobal offered as a convenience\n */\nfunction RateLimiter(options) {\n this.startTime = _.now();\n this.counter = 0;\n this.perMinCounter = 0;\n this.platform = null;\n this.platformOptions = {};\n this.configureGlobal(options);\n}\n\nRateLimiter.globalSettings = {\n startTime: _.now(),\n maxItems: undefined,\n itemsPerMinute: undefined\n};\n\n/*\n * configureGlobal - set the global rate limiter options\n *\n * @param options - Only the following values are recognized:\n * startTime: a timestamp of the form returned by (new Date()).getTime()\n * maxItems: the maximum items\n * itemsPerMinute: the max number of items to send in a given minute\n */\nRateLimiter.prototype.configureGlobal = function(options) {\n if (options.startTime !== undefined) {\n RateLimiter.globalSettings.startTime = options.startTime;\n }\n if (options.maxItems !== undefined) {\n RateLimiter.globalSettings.maxItems = options.maxItems;\n }\n if (options.itemsPerMinute !== undefined) {\n RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;\n }\n};\n\n/*\n * shouldSend - determine if we should send a given item based on rate limit settings\n *\n * @param item - the item we are about to send\n * @returns An object with the following structure:\n * error: (Error|null)\n * shouldSend: bool\n * payload: (Object|null)\n * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and\n * exactly one of error or payload will be non-null. If error is non-null, the returned Error will\n * describe the situation, but it means that we were already over a rate limit (either globally or\n * per minute) when this item was checked. If error is null, and therefore payload is non-null, it\n * means this item put us over the global rate limit and the payload should be sent to Rollbar in\n * place of the passed in item.\n */\nRateLimiter.prototype.shouldSend = function(item, now) {\n now = now || _.now();\n var elapsedTime = now - this.startTime;\n if (elapsedTime < 0 || elapsedTime >= 60000) {\n this.startTime = now;\n this.perMinCounter = 0;\n }\n\n var globalRateLimit = RateLimiter.globalSettings.maxItems;\n var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;\n\n if (checkRate(item, globalRateLimit, this.counter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimit + ' max items reached', false);\n } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimitPerMin + ' items per minute reached', false);\n }\n this.counter++;\n this.perMinCounter++;\n\n var shouldSend = !checkRate(item, globalRateLimit, this.counter);\n var perMinute = shouldSend;\n shouldSend = shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);\n return shouldSendValue(this.platform, this.platformOptions, null, shouldSend, globalRateLimit, globalRateLimitPerMin, perMinute);\n};\n\nRateLimiter.prototype.setPlatformOptions = function(platform, options) {\n this.platform = platform;\n this.platformOptions = options;\n};\n\n/* Helpers */\n\nfunction checkRate(item, limit, counter) {\n return !item.ignoreRateLimit && limit >= 1 && counter > limit;\n}\n\nfunction shouldSendValue(platform, options, error, shouldSend, globalRateLimit, limitPerMin, perMinute) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute);\n }\n return {error: error, shouldSend: shouldSend, payload: payload};\n}\n\nfunction rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute) {\n var environment = options.environment || (options.payload && options.payload.environment);\n var msg;\n if (perMinute) {\n msg = 'item per minute limit reached, ignoring errors until timeout';\n } else {\n msg = 'maxItems has been hit, ignoring errors until reset.';\n }\n var item = {\n body: {\n message: {\n body: msg,\n extra: {\n maxItems: globalRateLimit,\n itemsPerMinute: limitPerMin\n }\n }\n },\n language: 'javascript',\n environment: environment,\n notifier: {\n version: (options.notifier && options.notifier.version) || options.version\n }\n };\n if (platform === 'browser') {\n item.platform = 'browser';\n item.framework = 'browser-js';\n item.notifier.name = 'rollbar-browser-js';\n } else if (platform === 'server') {\n item.framework = options.framework || 'node-js';\n item.notifier.name = options.notifier.name;\n } else if (platform === 'react-native') {\n item.framework = options.framework || 'react-native';\n item.notifier.name = options.notifier.name;\n }\n return item;\n}\n\nmodule.exports = RateLimiter;\n","'use strict';\n\n'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isPlainObject = function isPlainObject(obj) {\n\tif (!obj || toStr.call(obj) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tvar hasOwnConstructor = hasOwn.call(obj, 'constructor');\n\tvar hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n\t// Not own constructor property must be Object\n\tif (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n\t\treturn false;\n\t}\n\n\t// Own properties are enumerated firstly, so to speed up,\n\t// if last one is own, then all properties are own.\n\tvar key;\n\tfor (key in obj) {/**/}\n\n\treturn typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\nfunction merge() {\n var i, src, copy, clone, name,\n result = {},\n current = null,\n length = arguments.length;\n\n for (i=0; i < length; i++) {\n current = arguments[i];\n if (current == null) {\n continue;\n }\n\n for (name in current) {\n src = result[name];\n copy = current[name];\n if (result !== copy) {\n if (copy && isPlainObject(copy)) {\n clone = src && isPlainObject(src) ? src : {};\n result[name] = merge(clone, copy);\n } else if (typeof copy !== 'undefined') {\n result[name] = copy;\n }\n }\n }\n }\n return result;\n}\n\nmodule.exports = merge;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Queue - an object which handles which handles a queue of items to be sent to Rollbar.\n * This object handles rate limiting via a passed in rate limiter, retries based on connection\n * errors, and filtering of items based on a set of configurable predicates. The communication to\n * the backend is performed via a given API object.\n *\n * @param rateLimiter - An object which conforms to the interface\n * rateLimiter.shouldSend(item) -> bool\n * @param api - An object which conforms to the interface\n * api.postItem(payload, function(err, response))\n * @param logger - An object used to log verbose messages if desired\n * @param options - see Queue.prototype.configure\n */\nfunction Queue(rateLimiter, api, logger, options) {\n this.rateLimiter = rateLimiter;\n this.api = api;\n this.logger = logger;\n this.options = options;\n this.predicates = [];\n this.pendingItems = [];\n this.pendingRequests = [];\n this.retryQueue = [];\n this.retryHandle = null;\n this.waitCallback = null;\n this.waitIntervalID = null;\n}\n\n/*\n * configure - updates the options this queue uses\n *\n * @param options\n */\nQueue.prototype.configure = function(options) {\n this.api && this.api.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addPredicate - adds a predicate to the end of the list of predicates for this queue\n *\n * @param predicate - function(item, options) -> (bool|{err: Error})\n * Returning true means that this predicate passes and the item is okay to go on the queue\n * Returning false means do not add the item to the queue, but it is not an error\n * Returning {err: Error} means do not add the item to the queue, and the given error explains why\n * Returning {err: undefined} is equivalent to returning true but don't do that\n */\nQueue.prototype.addPredicate = function(predicate) {\n if (_.isFunction(predicate)) {\n this.predicates.push(predicate);\n }\n return this;\n};\n\nQueue.prototype.addPendingItem = function(item) {\n this.pendingItems.push(item);\n};\n\nQueue.prototype.removePendingItem = function(item) {\n var idx = this.pendingItems.indexOf(item);\n if (idx !== -1) {\n this.pendingItems.splice(idx, 1);\n }\n};\n\n/*\n * addItem - Send an item to the Rollbar API if all of the predicates are satisfied\n *\n * @param item - The payload to send to the backend\n * @param callback - function(error, repsonse) which will be called with the response from the API\n * in the case of a success, otherwise response will be null and error will have a value. If both\n * error and response are null then the item was stopped by a predicate which did not consider this\n * to be an error condition, but nonetheless did not send the item to the API.\n * @param originalError - The original error before any transformations that is to be logged if any\n */\nQueue.prototype.addItem = function(item, callback, originalError, originalItem) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() { return; };\n }\n var predicateResult = this._applyPredicates(item);\n if (predicateResult.stop) {\n this.removePendingItem(originalItem);\n callback(predicateResult.err);\n return;\n }\n this._maybeLog(item, originalError);\n this.removePendingItem(originalItem);\n if (!this.options.transmit) {\n callback(new Error('Transmit disabled'));\n return;\n }\n this.pendingRequests.push(item);\n try {\n this._makeApiRequest(item, function(err, resp) {\n this._dequeuePendingRequest(item);\n callback(err, resp);\n }.bind(this));\n } catch (e) {\n this._dequeuePendingRequest(item);\n callback(e);\n }\n};\n\n/*\n * wait - Stop any further errors from being added to the queue, and get called back when all items\n * currently processing have finished sending to the backend.\n *\n * @param callback - function() called when all pending items have been sent\n */\nQueue.prototype.wait = function(callback) {\n if (!_.isFunction(callback)) {\n return;\n }\n this.waitCallback = callback;\n if (this._maybeCallWait()) {\n return;\n }\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitIntervalID = setInterval(function() {\n this._maybeCallWait();\n }.bind(this), 500);\n};\n\n/* _applyPredicates - Sequentially applies the predicates that have been added to the queue to the\n * given item with the currently configured options.\n *\n * @param item - An item in the queue\n * @returns {stop: bool, err: (Error|null)} - stop being true means do not add item to the queue,\n * the error value should be passed up to a callbak if we are stopping.\n */\nQueue.prototype._applyPredicates = function(item) {\n var p = null;\n for (var i = 0, len = this.predicates.length; i < len; i++) {\n p = this.predicates[i](item, this.options);\n if (!p || p.err !== undefined) {\n return {stop: true, err: p.err};\n }\n }\n return {stop: false, err: null};\n};\n\n/*\n * _makeApiRequest - Send an item to Rollbar, callback when done, if there is an error make an\n * effort to retry if we are configured to do so.\n *\n * @param item - an item ready to send to the backend\n * @param callback - function(err, response)\n */\nQueue.prototype._makeApiRequest = function(item, callback) {\n var rateLimitResponse = this.rateLimiter.shouldSend(item);\n if (rateLimitResponse.shouldSend) {\n this.api.postItem(item, function(err, resp) {\n if (err) {\n this._maybeRetry(err, item, callback);\n } else {\n callback(err, resp);\n }\n }.bind(this));\n } else if (rateLimitResponse.error) {\n callback(rateLimitResponse.error);\n } else {\n this.api.postItem(rateLimitResponse.payload, callback);\n }\n};\n\n// These are errors basically mean there is no internet connection\nvar RETRIABLE_ERRORS = ['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED', 'EHOSTUNREACH', 'EPIPE', 'EAI_AGAIN'];\n\n/*\n * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback\n * with the error.\n *\n * @param err - an error returned by the API transport\n * @param item - the item that was trying to be sent when this error occured\n * @param callback - function(err, response)\n */\nQueue.prototype._maybeRetry = function(err, item, callback) {\n var shouldRetry = false;\n if (this.options.retryInterval) {\n for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {\n if (err.code === RETRIABLE_ERRORS[i]) {\n shouldRetry = true;\n break;\n }\n }\n if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {\n item.retries = item.retries ? item.retries + 1 : 1;\n if (item.retries > this.options.maxRetries) {\n shouldRetry = false;\n }\n }\n }\n if (shouldRetry) {\n this._retryApiRequest(item, callback);\n } else {\n callback(err);\n }\n};\n\n/*\n * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process\n * that queue based on the retryInterval in the options for this queue.\n *\n * @param item - an item that failed to send due to an error we deem retriable\n * @param callback - function(err, response)\n */\nQueue.prototype._retryApiRequest = function(item, callback) {\n this.retryQueue.push({item: item, callback: callback});\n\n if (!this.retryHandle) {\n this.retryHandle = setInterval(function() {\n while (this.retryQueue.length) {\n var retryObject = this.retryQueue.shift();\n this._makeApiRequest(retryObject.item, retryObject.callback);\n }\n }.bind(this), this.options.retryInterval);\n }\n};\n\n/*\n * _dequeuePendingRequest - Removes the item from the pending request queue, this queue is used to\n * enable to functionality of providing a callback that clients can pass to `wait` to be notified\n * when the pending request queue has been emptied. This must be called when the API finishes\n * processing this item. If a `wait` callback is configured, it is called by this function.\n *\n * @param item - the item previously added to the pending request queue\n */\nQueue.prototype._dequeuePendingRequest = function(item) {\n var idx = this.pendingRequests.indexOf(item);\n if (idx !== -1) {\n this.pendingRequests.splice(idx, 1);\n this._maybeCallWait();\n }\n};\n\nQueue.prototype._maybeLog = function(data, originalError) {\n if (this.logger && this.options.verbose) {\n var message = originalError;\n message = message || _.get(data, 'body.trace.exception.message');\n message = message || _.get(data, 'body.trace_chain.0.exception.message');\n if (message) {\n this.logger.error(message);\n return;\n }\n message = _.get(data, 'body.message.body');\n if (message) {\n this.logger.log(message);\n }\n }\n};\n\nQueue.prototype._maybeCallWait = function() {\n if (_.isFunction(this.waitCallback) && this.pendingItems.length === 0 && this.pendingRequests.length === 0) {\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitCallback();\n return true;\n }\n return false;\n};\n\nmodule.exports = Queue;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Notifier - the internal object responsible for delegating between the client exposed API, the\n * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the\n * queue which handles the communcation with the Rollbar API servers.\n *\n * @param queue - an object that conforms to the interface: addItem(item, callback)\n * @param options - an object representing the options to be set for this notifier, this should have\n * any defaults already set by the caller\n */\nfunction Notifier(queue, options) {\n this.queue = queue;\n this.options = options;\n this.transforms = [];\n this.diagnostic = {};\n}\n\n/*\n * configure - updates the options for this notifier with the passed in object\n *\n * @param options - an object which gets merged with the current options set on this notifier\n * @returns this\n */\nNotifier.prototype.configure = function(options) {\n this.queue && this.queue.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addTransform - adds a transform onto the end of the queue of transforms for this notifier\n *\n * @param transform - a function which takes three arguments:\n * * item: An Object representing the data to eventually be sent to Rollbar\n * * options: The current value of the options for this notifier\n * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this\n * callback with a null value for error if it wants the processing chain to continue, otherwise\n * with an error to terminate the processing. The item should be the updated item after this\n * transform is finished modifying it.\n */\nNotifier.prototype.addTransform = function(transform) {\n if (_.isFunction(transform)) {\n this.transforms.push(transform);\n }\n return this;\n};\n\n/*\n * log - the internal log function which applies the configured transforms and then pushes onto the\n * queue to be sent to the backend.\n *\n * @param item - An object with the following structure:\n * message [String] - An optional string to be sent to rollbar\n * error [Error] - An optional error\n *\n * @param callback - A function of type function(err, resp) which will be called with exactly one\n * null argument and one non-null argument. The callback will be called once, either during the\n * transform stage if an error occurs inside a transform, or in response to the communication with\n * the backend. The second argument will be the response from the backend in case of success.\n */\nNotifier.prototype.log = function(item, callback) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!this.options.enabled) {\n return callback(new Error('Rollbar is not enabled'));\n }\n\n this.queue.addPendingItem(item);\n var originalError = item.err;\n this._applyTransforms(item, function(err, i) {\n if (err) {\n this.queue.removePendingItem(item);\n return callback(err, null);\n }\n this.queue.addItem(i, callback, originalError, item);\n }.bind(this));\n};\n\n/* Internal */\n\n/*\n * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See\n * `addTransform` for more information.\n *\n * @param item - An item to be transformed\n * @param callback - A function of type function(err, item) which will be called with a non-null\n * error and a null item in the case of a transform failure, or a null error and non-null item after\n * all transforms have been applied.\n */\nNotifier.prototype._applyTransforms = function(item, callback) {\n var transformIndex = -1;\n var transformsLength = this.transforms.length;\n var transforms = this.transforms;\n var options = this.options;\n\n var cb = function(err, i) {\n if (err) {\n callback(err, null);\n return;\n }\n\n transformIndex++;\n\n if (transformIndex === transformsLength) {\n callback(null, i);\n return;\n }\n\n transforms[transformIndex](i, options, cb);\n };\n\n cb(null, item);\n};\n\nmodule.exports = Notifier;\n","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1/item/',\n search: null,\n version: '1',\n protocol: 'https:',\n port: 443\n};\n\n/**\n * Api is an object that encapsulates methods of communicating with\n * the Rollbar API. It is a standard interface with some parts implemented\n * differently for server or browser contexts. It is an object that should\n * be instantiated when used so it can contain non-global options that may\n * be different for another instance of RollbarApi.\n *\n * @param options {\n * accessToken: the accessToken to use for posting items to rollbar\n * endpoint: an alternative endpoint to send errors to\n * must be a valid, fully qualified URL.\n * The default is: https://api.rollbar.com/api/1/item\n * proxy: if you wish to proxy requests provide an object\n * with the following keys:\n * host or hostname (required): foo.example.com\n * port (optional): 123\n * protocol (optional): https\n * }\n */\nfunction Api(options, transport, urllib, truncation, jsonBackup) {\n this.options = options;\n this.transport = transport;\n this.url = urllib;\n this.truncation = truncation;\n this.jsonBackup = jsonBackup;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, urllib);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function(data, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n var self = this;\n\n // ensure the network request is scheduled after the current tick.\n setTimeout(function() {\n self.transport.post(self.accessToken, transportOptions, payload, callback);\n }, 0);\n};\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.buildJsonPayload = function(data, callback) {\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n\n if (stringifyResult.error) {\n if (callback) {\n callback(stringifyResult.error);\n }\n return null;\n }\n\n return stringifyResult.value;\n};\n\n/**\n *\n * @param jsonPayload\n * @param callback\n */\nApi.prototype.postJsonPayload = function(jsonPayload, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n this.transport.postJsonPayload(this.accessToken, transportOptions, jsonPayload, callback);\n};\n\nApi.prototype.configure = function(options) {\n var oldOptions = this.oldOptions;\n this.options = _.merge(oldOptions, options);\n this.transportOptions = _getTransport(this.options, this.url);\n if (this.options.accessToken !== undefined) {\n this.accessToken = this.options.accessToken;\n }\n return this;\n};\n\nfunction _getTransport(options, url) {\n return helpers.getTransportFromOptions(options, defaultOptions, url);\n}\n\nmodule.exports = Api;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (!_.isType(data.context, 'string')) {\n var contextResult = _.stringify(data.context, jsonBackup);\n if (contextResult.error) {\n data.context = 'Error: could not serialize \\'context\\'';\n } else {\n data.context = contextResult.value || '';\n }\n if (data.context.length > 255) {\n data.context = data.context.substr(0, 255);\n }\n }\n return {\n access_token: accessToken,\n data: data\n };\n}\n\nfunction getTransportFromOptions(options, defaults, url) {\n var hostname = defaults.hostname;\n var protocol = defaults.protocol;\n var port = defaults.port;\n var path = defaults.path;\n var search = defaults.search;\n var timeout = options.timeout;\n var transport = detectTransport(options)\n\n var proxy = options.proxy;\n if (options.endpoint) {\n var opts = url.parse(options.endpoint);\n hostname = opts.hostname;\n protocol = opts.protocol;\n port = opts.port;\n path = opts.pathname;\n search = opts.search;\n }\n return {\n timeout: timeout,\n hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy,\n transport: transport\n };\n}\n\nfunction detectTransport(options) {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var transport = options.defaultTransport || 'xhr';\n if (typeof gWindow.fetch === 'undefined') transport = 'xhr';\n if (typeof gWindow.XMLHttpRequest === 'undefined') transport = 'fetch';\n return transport;\n}\n\nfunction transportOptions(transport, method) {\n var protocol = transport.protocol || 'https:';\n var port = transport.port || (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);\n var hostname = transport.hostname;\n var path = transport.path;\n var timeout = transport.timeout;\n var transportAPI = transport.transport;\n if (transport.search) {\n path = path + transport.search;\n }\n if (transport.proxy) {\n path = protocol + '//' + hostname + path;\n hostname = transport.proxy.host || transport.proxy.hostname;\n port = transport.proxy.port;\n protocol = transport.proxy.protocol || protocol;\n }\n return {\n timeout: timeout,\n protocol: protocol,\n hostname: hostname,\n path: path,\n port: port,\n method: method,\n transport: transportAPI\n };\n}\n\nfunction appendPathToPath(base, path) {\n var baseTrailingSlash = /\\/$/.test(base);\n var pathBeginningSlash = /^\\//.test(path);\n\n if (baseTrailingSlash && pathBeginningSlash) {\n path = path.substring(1);\n } else if (!baseTrailingSlash && !pathBeginningSlash) {\n path = '/' + path;\n }\n\n return base + path;\n}\n\nmodule.exports = {\n buildPayload: buildPayload,\n getTransportFromOptions: getTransportFromOptions,\n transportOptions: transportOptions,\n appendPathToPath: appendPathToPath\n};\n","// Console-polyfill. MIT license.\n// https://github.com/paulmillr/console-polyfill\n// Make it safe to do console.log() always.\n(function(global) {\n 'use strict';\n if (!global.console) {\n global.console = {};\n }\n var con = global.console;\n var prop, method;\n var dummy = function() {};\n var properties = ['memory'];\n var methods = ('assert,clear,count,debug,dir,dirxml,error,exception,group,' +\n 'groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,' +\n 'show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn').split(',');\n while (prop = properties.pop()) if (!con[prop]) con[prop] = {};\n while (method = methods.pop()) if (!con[method]) con[method] = dummy;\n // Using `this` for web workers & supports Browserify / Webpack.\n})(typeof window === 'undefined' ? this : window);\n","'use strict';\n\n// This detection.js module is used to encapsulate any ugly browser/feature\n// detection we may need to do.\n\n// Figure out which version of IE we're using, if any.\n// This is gleaned from http://stackoverflow.com/questions/5574842/best-way-to-check-for-ie-less-than-9-in-javascript-without-library\n// Will return an integer on IE (i.e. 8)\n// Will return undefined otherwise\nfunction getIEVersion() {\n\tvar undef;\n\tif (typeof document === 'undefined') {\n\t\treturn undef;\n\t}\n\n var v = 3,\n div = document.createElement('div'),\n all = div.getElementsByTagName('i');\n\n while (\n div.innerHTML = '',\n all[0]\n );\n\n return v > 4 ? v : undef;\n}\n\nvar Detection = {\n ieVersion: getIEVersion\n};\n\nmodule.exports = Detection;\n","'use strict';\n\nfunction captureUncaughtExceptions(window, handler, shim) {\n if (!window) { return; }\n var oldOnError;\n\n if (typeof handler._rollbarOldOnError === 'function') {\n oldOnError = handler._rollbarOldOnError;\n } else if (window.onerror) {\n oldOnError = window.onerror;\n while (oldOnError._rollbarOldOnError) {\n oldOnError = oldOnError._rollbarOldOnError;\n }\n handler._rollbarOldOnError = oldOnError;\n }\n\n handler.handleAnonymousErrors();\n\n var fn = function() {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n if (shim) {\n fn._rollbarOldOnError = oldOnError;\n }\n window.onerror = fn;\n}\n\nfunction _rollbarWindowOnError(window, r, old, args) {\n if (window._rollbarWrappedError) {\n if (!args[4]) {\n args[4] = window._rollbarWrappedError;\n }\n if (!args[5]) {\n args[5] = window._rollbarWrappedError._rollbarContext;\n }\n window._rollbarWrappedError = null;\n }\n\n var ret = r.handleUncaughtException.apply(r, args);\n\n if (old) {\n old.apply(window, args);\n }\n\n // Let other chained onerror handlers above run before setting this.\n // If an error is thrown and caught within a chained onerror handler,\n // Error.prepareStackTrace() will see that one before the one we want.\n if (ret === 'anonymous') {\n r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()\n }\n}\n\nfunction captureUnhandledRejections(window, handler, shim) {\n if (!window) { return; }\n\n if (typeof window._rollbarURH === 'function' && window._rollbarURH.belongsToShim) {\n window.removeEventListener('unhandledrejection', window._rollbarURH);\n }\n\n var rejectionHandler = function (evt) {\n var reason, promise, detail;\n try {\n reason = evt.reason;\n } catch (e) {\n reason = undefined;\n }\n try {\n promise = evt.promise;\n } catch (e) {\n promise = '[unhandledrejection] error getting `promise` from event';\n }\n try {\n detail = evt.detail;\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\n }\n } catch (e) {\n // Ignore\n }\n if (!reason) {\n reason = '[unhandledrejection] error getting `reason` from event';\n }\n\n if (handler && handler.handleUnhandledRejection) {\n handler.handleUnhandledRejection(reason, promise);\n }\n };\n rejectionHandler.belongsToShim = shim;\n window._rollbarURH = rejectionHandler;\n window.addEventListener('unhandledrejection', rejectionHandler);\n}\n\n\nmodule.exports = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections\n};\n","'use strict';\n\nvar _ = require('../utility');\nvar makeFetchRequest = require('./transport/fetch');\nvar makeXhrRequest = require('./transport/xhr');\n\n/*\n * accessToken may be embedded in payload but that should not\n * be assumed\n *\n * options: {\n * hostname\n * protocol\n * path\n * port\n * method\n * transport ('xhr' | 'fetch')\n * }\n *\n * params is an object containing key/value pairs. These\n * will be appended to the path as 'key=value&key=value'\n *\n * payload is an unserialized object\n */\nfunction Transport(truncation) {\n this.truncation = truncation;\n}\n\nTransport.prototype.get = function(accessToken, options, params, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n _.addParamsAndAccessTokenToPath(accessToken, options, params);\n\n var method = 'GET';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken, url, method, null, callback, requestFactory, options.timeout, options.transport\n );\n}\n\nTransport.prototype.post = function(accessToken, options, payload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!payload) {\n return callback(new Error('Cannot send empty request'));\n }\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n if (stringifyResult.error) {\n return callback(stringifyResult.error);\n }\n\n var writeData = stringifyResult.value;\n var method = 'POST';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken, url, method, writeData, callback, requestFactory, options.timeout, options.transport\n );\n}\n\nTransport.prototype.postJsonPayload = function (accessToken, options, jsonPayload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n var method = 'POST';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken, url, method, jsonPayload, callback, requestFactory, options.timeout, options.transport\n );\n}\n\n\n// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope\n// so Angular change detection isn't triggered on each API call.\n// This is the equivalent of runOutsideAngular().\n//\nTransport.prototype._makeZoneRequest = function () {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;\n var args = Array.prototype.slice.call(arguments);\n\n if (currentZone && currentZone._name === 'angular') {\n var rootZone = currentZone._parent;\n var self = this;\n rootZone.run(function () {\n self._makeRequest.apply(undefined, args);\n });\n } else {\n this._makeRequest.apply(undefined, args);\n }\n}\n\nTransport.prototype._makeRequest = function (\n accessToken, url, method, data, callback, requestFactory, timeout, transport\n) {\n if (typeof RollbarProxy !== 'undefined') {\n return _proxyRequest(data, callback);\n }\n\n if (transport === 'fetch') {\n makeFetchRequest(accessToken, url, method, data, callback, timeout)\n } else {\n makeXhrRequest(accessToken, url, method, data, callback, requestFactory, timeout)\n }\n}\n\n/* global RollbarProxy */\nfunction _proxyRequest(json, callback) {\n var rollbarProxy = new RollbarProxy();\n rollbarProxy.sendJsonPayload(\n json,\n function(_msg) { /* do nothing */ }, // eslint-disable-line no-unused-vars\n function(err) {\n callback(new Error(err));\n }\n );\n}\n\nmodule.exports = Transport;\n","'use strict';\n\nvar logger = require('../logger');\nvar _ = require('../../utility');\n\nfunction makeFetchRequest(accessToken, url, method, data, callback, timeout) {\n var controller;\n var timeoutId;\n\n if(_.isFiniteNumber(timeout)) {\n controller = new AbortController();\n timeoutId = setTimeout(function () {controller.abort()}, timeout);\n }\n\n fetch(url, {\n method: method,\n headers: {\n 'Content-Type': 'application/json',\n 'X-Rollbar-Access-Token': accessToken,\n signal: controller && controller.signal\n },\n body: data,\n })\n .then(function (response) {\n if (timeoutId) clearTimeout(timeoutId);\n return response.json();\n })\n .then(function (data) {\n callback(null, data);\n })\n .catch(function (error) {\n logger.error(error.message);\n callback(error);\n });\n}\n\nmodule.exports = makeFetchRequest;\n","'use strict';\n\n/*global XDomainRequest*/\n\nvar _ = require('../../utility');\nvar logger = require('../logger');\n\nfunction makeXhrRequest(accessToken, url, method, data, callback, requestFactory, timeout) {\n var request;\n if (requestFactory) {\n request = requestFactory();\n } else {\n request = _createXMLHTTPObject();\n }\n if (!request) {\n // Give up, no way to send requests\n return callback(new Error('No way to send a request'));\n }\n try {\n try {\n var onreadystatechange = function() {\n try {\n if (onreadystatechange && request.readyState === 4) {\n onreadystatechange = undefined;\n\n var parseResponse = _.jsonParse(request.responseText);\n if (_isSuccess(request)) {\n callback(parseResponse.error, parseResponse.value);\n return;\n } else if (_isNormalFailure(request)) {\n if (request.status === 403) {\n // likely caused by using a server access token\n var message = parseResponse.value && parseResponse.value.message;\n logger.error(message);\n }\n // return valid http status codes\n callback(new Error(String(request.status)));\n } else {\n // IE will return a status 12000+ on some sort of connection failure,\n // so we return a blank error\n // http://msdn.microsoft.com/en-us/library/aa383770%28VS.85%29.aspx\n var msg = 'XHR response had no status code (likely connection failure)';\n callback(_newRetriableError(msg));\n }\n }\n } catch (ex) {\n //jquery source mentions firefox may error out while accessing the\n //request members if there is a network error\n //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111\n var exc;\n if (ex && ex.stack) {\n exc = ex;\n } else {\n exc = new Error(ex);\n }\n callback(exc);\n }\n };\n\n request.open(method, url, true);\n if (request.setRequestHeader) {\n request.setRequestHeader('Content-Type', 'application/json');\n request.setRequestHeader('X-Rollbar-Access-Token', accessToken);\n }\n\n if(_.isFiniteNumber(timeout)) {\n request.timeout = timeout;\n }\n\n request.onreadystatechange = onreadystatechange;\n request.send(data);\n } catch (e1) {\n // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest\n if (typeof XDomainRequest !== 'undefined') {\n\n // Assume we are in a really old browser which has a bunch of limitations:\n // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx\n\n // Extreme paranoia: if we have XDomainRequest then we have a window, but just in case\n if (!window || !window.location) {\n return callback(new Error('No window available during request, unknown environment'));\n }\n\n // If the current page is http, try and send over http\n if (window.location.href.substring(0, 5) === 'http:' && url.substring(0, 5) === 'https') {\n url = 'http' + url.substring(5);\n }\n\n var xdomainrequest = new XDomainRequest();\n xdomainrequest.onprogress = function() {};\n xdomainrequest.ontimeout = function() {\n var msg = 'Request timed out';\n var code = 'ETIMEDOUT';\n callback(_newRetriableError(msg, code));\n };\n xdomainrequest.onerror = function() {\n callback(new Error('Error during request'));\n };\n xdomainrequest.onload = function() {\n var parseResponse = _.jsonParse(xdomainrequest.responseText);\n callback(parseResponse.error, parseResponse.value);\n };\n xdomainrequest.open(method, url, true);\n xdomainrequest.send(data);\n } else {\n callback(new Error('Cannot find a method to transport a request'));\n }\n }\n } catch (e2) {\n callback(e2);\n }\n}\n\nfunction _createXMLHTTPObject() {\n /* global ActiveXObject:false */\n\n var factories = [\n function () {\n return new XMLHttpRequest();\n },\n function () {\n return new ActiveXObject('Msxml2.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Msxml3.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Microsoft.XMLHTTP');\n }\n ];\n var xmlhttp;\n var i;\n var numFactories = factories.length;\n for (i = 0; i < numFactories; i++) {\n /* eslint-disable no-empty */\n try {\n xmlhttp = factories[i]();\n break;\n } catch (e) {\n // pass\n }\n /* eslint-enable no-empty */\n }\n return xmlhttp;\n}\n\nfunction _isSuccess(r) {\n return r && r.status && r.status === 200;\n}\n\nfunction _isNormalFailure(r) {\n return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;\n}\n\nfunction _newRetriableError(message, code) {\n var err = new Error(message);\n err.code = code || 'ENOTFOUND';\n return err;\n}\n\nmodule.exports = makeXhrRequest;\n","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('../errorParser');\nvar logger = require('./logger');\n\nfunction handleDomException(item, options, callback) {\n if(item.err && errorParser.Stack(item.err).name === 'DOMException') {\n var originalError = new Error();\n originalError.name = item.err.name;\n originalError.message = item.err.message;\n originalError.stack = item.err.stack;\n originalError.nested = item.err;\n item.err = originalError;\n }\n callback(null, item);\n}\n\nfunction handleItemWithError(item, options, callback) {\n item.data = item.data || {};\n if (item.err) {\n try {\n item.stackInfo = item.err._savedStackTrace || errorParser.parse(item.err, item.skipFrames);\n\n if (options.addErrorContext) {\n addErrorContext(item);\n }\n } catch (e) {\n logger.error('Error while parsing the error object.', e);\n try {\n item.message = item.err.message || item.err.description || item.message || String(item.err);\n } catch (e2) {\n item.message = String(item.err) || String(e2);\n }\n delete item.err;\n }\n }\n callback(null, item);\n}\n\nfunction addErrorContext(item) {\n var chain = [];\n var err = item.err;\n\n chain.push(err);\n\n while (err.nested || err.cause) {\n err = err.nested || err.cause;\n chain.push(err);\n }\n\n _.addErrorContext(item, chain);\n}\n\nfunction ensureItemHasSomethingToSay(item, options, callback) {\n if (!item.message && !item.stackInfo && !item.custom) {\n callback(new Error('No message, stack info, or custom data'), null);\n }\n callback(null, item);\n}\n\nfunction addBaseInfo(item, options, callback) {\n var environment = (options.payload && options.payload.environment) || options.environment;\n item.data = _.merge(item.data, {\n environment: environment,\n level: item.level,\n endpoint: options.endpoint,\n platform: 'browser',\n framework: 'browser-js',\n language: 'javascript',\n server: {},\n uuid: item.uuid,\n notifier: {\n name: 'rollbar-browser-js',\n version: options.version\n },\n custom: item.custom\n });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function(item, options, callback) {\n var requestInfo = {};\n\n if (window && window.location) {\n requestInfo.url = window.location.href;\n requestInfo.query_string = window.location.search;\n }\n\n var remoteString = '$remote_ip';\n if (!options.captureIp) {\n remoteString = null;\n } else if (options.captureIp !== true) {\n remoteString += '_anonymize';\n }\n if (remoteString) requestInfo.user_ip = remoteString;\n\n if (Object.keys(requestInfo).length > 0) {\n _.set(item, 'data.request', requestInfo);\n }\n\n callback(null, item);\n };\n}\n\nfunction addClientInfo(window) {\n return function(item, options, callback) {\n if (!window) {\n return callback(null, item);\n }\n var nav = window.navigator || {};\n var scr = window.screen || {};\n _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: nav.userAgent,\n language: nav.language,\n cookie_enabled: nav.cookieEnabled,\n screen: {\n width: scr.width,\n height: scr.height\n }\n }\n });\n callback(null, item);\n };\n}\n\nfunction addPluginInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.navigator) {\n return callback(null, item);\n }\n var plugins = [];\n var navPlugins = window.navigator.plugins || [];\n var cur;\n for (var i=0, l=navPlugins.length; i < l; ++i) {\n cur = navPlugins[i];\n plugins.push({name: cur.name, description: cur.description});\n }\n _.set(item, 'data.client.javascript.plugins', plugins);\n callback(null, item);\n };\n}\n\nfunction addBody(item, options, callback) {\n if (item.stackInfo) {\n if (item.stackInfo.traceChain) {\n addBodyTraceChain(item, options, callback);\n } else {\n addBodyTrace(item, options, callback);\n }\n } else {\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction addBodyMessage(item, options, callback) {\n var message = item.message;\n var custom = item.custom;\n\n if (!message) {\n message = 'Item sent with null or missing arguments.';\n }\n var result = {\n body: message\n };\n\n if (custom) {\n result.extra = _.merge(custom);\n }\n\n _.set(item, 'data.body', {message: result});\n callback(null, item);\n}\n\nfunction stackFromItem(item) {\n // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = item.stackInfo.stack;\n if (stack && stack.length === 0 && item._unhandledStackInfo && item._unhandledStackInfo.stack) {\n stack = item._unhandledStackInfo.stack;\n }\n return stack;\n}\n\nfunction addBodyTraceChain(item, options, callback) {\n var traceChain = item.stackInfo.traceChain;\n var traces = [];\n\n var traceChainLength = traceChain.length;\n for (var i = 0; i < traceChainLength; i++) {\n var trace = buildTrace(item, traceChain[i], options);\n traces.push(trace);\n }\n\n _.set(item, 'data.body', {trace_chain: traces});\n callback(null, item);\n}\n\nfunction addBodyTrace(item, options, callback) {\n var stack = stackFromItem(item);\n\n if (stack) {\n var trace = buildTrace(item, item.stackInfo, options);\n _.set(item, 'data.body', {trace: trace});\n callback(null, item);\n } else {\n var stackInfo = item.stackInfo;\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction buildTrace(item, stackInfo, options) {\n var description = item && item.data.description;\n var custom = item && item.custom;\n var stack = stackFromItem(item);\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n var trace = {\n exception: {\n 'class': className,\n message: message\n }\n };\n\n if (description) {\n trace.exception.description = description;\n }\n\n if (stack) {\n if (stack.length === 0) {\n trace.exception.stack = stackInfo.rawStack;\n trace.exception.raw = String(stackInfo.rawException);\n }\n var stackFrame;\n var frame;\n var code;\n var pre;\n var post;\n var contextLength;\n var i, mid;\n\n trace.frames = [];\n for (i = 0; i < stack.length; ++i) {\n stackFrame = stack[i];\n frame = {\n filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',\n lineno: stackFrame.line || null,\n method: (!stackFrame.func || stackFrame.func === '?') ? '[anonymous]' : stackFrame.func,\n colno: stackFrame.column\n };\n if (options.sendFrameUrl) {\n frame.url = stackFrame.url;\n }\n if (frame.method && frame.method.endsWith && frame.method.endsWith('_rollbar_wrapped')) {\n continue;\n }\n\n code = pre = post = null;\n contextLength = stackFrame.context ? stackFrame.context.length : 0;\n if (contextLength) {\n mid = Math.floor(contextLength / 2);\n pre = stackFrame.context.slice(0, mid);\n code = stackFrame.context[mid];\n post = stackFrame.context.slice(mid);\n }\n\n if (code) {\n frame.code = code;\n }\n\n if (pre || post) {\n frame.context = {};\n if (pre && pre.length) {\n frame.context.pre = pre;\n }\n if (post && post.length) {\n frame.context.post = post;\n }\n }\n\n if (stackFrame.args) {\n frame.args = stackFrame.args;\n }\n\n trace.frames.push(frame);\n }\n\n // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last\n trace.frames.reverse();\n\n if (custom) {\n trace.extra = _.merge(custom);\n }\n }\n\n return trace;\n}\n\nfunction errorClass(stackInfo, guess, options) {\n if (stackInfo.name) {\n return stackInfo.name;\n } else if (options.guessErrorClass) {\n return guess;\n } else {\n return '(unknown)';\n }\n}\n\nfunction addScrubber(scrubFn) {\n return function (item, options, callback) {\n if (scrubFn) {\n var scrubFields = options.scrubFields || [];\n var scrubPaths = options.scrubPaths || [];\n item.data = scrubFn(item.data, scrubFields, scrubPaths);\n }\n callback(null, item);\n }\n}\n\nmodule.exports = {\n handleDomException: handleDomException,\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n addScrubber: addScrubber\n};\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('error-stack-parser', ['stackframe'], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory(require('stackframe'));\n } else {\n root.ErrorStackParser = factory(root.StackFrame);\n }\n}(this, function ErrorStackParser(StackFrame) {\n 'use strict';\n\n var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\\S+:\\d+/;\n var CHROME_IE_STACK_REGEXP = /^\\s*at .*(\\S+:\\d+|\\(native\\))/m;\n var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\\[native code])?$/;\n\n return {\n /**\n * Given an Error object, extract the most information from it.\n *\n * @param {Error} error object\n * @return {Array} of StackFrames\n */\n parse: function ErrorStackParser$$parse(error) {\n if (typeof error.stacktrace !== 'undefined' || typeof error['opera#sourceloc'] !== 'undefined') {\n return this.parseOpera(error);\n } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {\n return this.parseV8OrIE(error);\n } else if (error.stack) {\n return this.parseFFOrSafari(error);\n } else {\n throw new Error('Cannot parse given Error object');\n }\n },\n\n // Separate line and column numbers from a string of the form: (URI:Line:Column)\n extractLocation: function ErrorStackParser$$extractLocation(urlLike) {\n // Fail-fast but return locations like \"(native)\"\n if (urlLike.indexOf(':') === -1) {\n return [urlLike];\n }\n\n var regExp = /(.+?)(?::(\\d+))?(?::(\\d+))?$/;\n var parts = regExp.exec(urlLike.replace(/[()]/g, ''));\n return [parts[1], parts[2] || undefined, parts[3] || undefined];\n },\n\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(CHROME_IE_STACK_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n if (line.indexOf('(eval ') > -1) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n line = line.replace(/eval code/g, 'eval').replace(/(\\(eval at [^()]*)|(,.*$)/g, '');\n }\n var sanitizedLine = line.replace(/^\\s+/, '').replace(/\\(eval code/g, '(').replace(/^.*?\\s+/, '');\n\n // capture and preseve the parenthesized location \"(/foo/my bar.js:12:87)\" in\n // case it has spaces in it, as the string is split on \\s+ later on\n var location = sanitizedLine.match(/ (\\(.+\\)$)/);\n\n // remove the parenthesized location from the line, if it was matched\n sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;\n\n // if a location was matched, pass it to extractLocation() otherwise pass all sanitizedLine\n // because this line doesn't have function name\n var locationParts = this.extractLocation(location ? location[1] : sanitizedLine);\n var functionName = location && sanitizedLine || undefined;\n var fileName = ['eval', ''].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];\n\n return new StackFrame({\n functionName: functionName,\n fileName: fileName,\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n },\n\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n if (line.indexOf(' > eval') > -1) {\n line = line.replace(/ line (\\d+)(?: > eval line \\d+)* > eval:\\d+:\\d+/g, ':$1');\n }\n\n if (line.indexOf('@') === -1 && line.indexOf(':') === -1) {\n // Safari eval frames only have function names and nothing else\n return new StackFrame({\n functionName: line\n });\n } else {\n var functionNameRegex = /((.*\".+\"[^@]*)?[^@]*)(?:@)/;\n var matches = line.match(functionNameRegex);\n var functionName = matches && matches[1] ? matches[1] : undefined;\n var locationParts = this.extractLocation(line.replace(functionNameRegex, ''));\n\n return new StackFrame({\n functionName: functionName,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }\n }, this);\n },\n\n parseOpera: function ErrorStackParser$$parseOpera(e) {\n if (!e.stacktrace || (e.message.indexOf('\\n') > -1 &&\n e.message.split('\\n').length > e.stacktrace.split('\\n').length)) {\n return this.parseOpera9(e);\n } else if (!e.stack) {\n return this.parseOpera10(e);\n } else {\n return this.parseOpera11(e);\n }\n },\n\n parseOpera9: function ErrorStackParser$$parseOpera9(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)/i;\n var lines = e.message.split('\\n');\n var result = [];\n\n for (var i = 2, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(new StackFrame({\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n }));\n }\n }\n\n return result;\n },\n\n parseOpera10: function ErrorStackParser$$parseOpera10(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)(?:: In function (\\S+))?$/i;\n var lines = e.stacktrace.split('\\n');\n var result = [];\n\n for (var i = 0, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(\n new StackFrame({\n functionName: match[3] || undefined,\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n })\n );\n }\n }\n\n return result;\n },\n\n // Opera 10.65+ Error.stack very similar to FF/Safari\n parseOpera11: function ErrorStackParser$$parseOpera11(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);\n }, this);\n\n return filtered.map(function(line) {\n var tokens = line.split('@');\n var locationParts = this.extractLocation(tokens.pop());\n var functionCall = (tokens.shift() || '');\n var functionName = functionCall\n .replace(//, '$2')\n .replace(/\\([^)]*\\)/g, '') || undefined;\n var argsRaw;\n if (functionCall.match(/\\(([^)]*)\\)/)) {\n argsRaw = functionCall.replace(/^[^(]+\\(([^)]*)\\)$/, '$1');\n }\n var args = (argsRaw === undefined || argsRaw === '[arguments not available]') ?\n undefined : argsRaw.split(',');\n\n return new StackFrame({\n functionName: functionName,\n args: args,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n }\n };\n}));\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('stackframe', [], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.StackFrame = factory();\n }\n}(this, function() {\n 'use strict';\n function _isNumber(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n }\n\n function _capitalize(str) {\n return str.charAt(0).toUpperCase() + str.substring(1);\n }\n\n function _getter(p) {\n return function() {\n return this[p];\n };\n }\n\n var booleanProps = ['isConstructor', 'isEval', 'isNative', 'isToplevel'];\n var numericProps = ['columnNumber', 'lineNumber'];\n var stringProps = ['fileName', 'functionName', 'source'];\n var arrayProps = ['args'];\n var objectProps = ['evalOrigin'];\n\n var props = booleanProps.concat(numericProps, stringProps, arrayProps, objectProps);\n\n function StackFrame(obj) {\n if (!obj) return;\n for (var i = 0; i < props.length; i++) {\n if (obj[props[i]] !== undefined) {\n this['set' + _capitalize(props[i])](obj[props[i]]);\n }\n }\n }\n\n StackFrame.prototype = {\n getArgs: function() {\n return this.args;\n },\n setArgs: function(v) {\n if (Object.prototype.toString.call(v) !== '[object Array]') {\n throw new TypeError('Args must be an Array');\n }\n this.args = v;\n },\n\n getEvalOrigin: function() {\n return this.evalOrigin;\n },\n setEvalOrigin: function(v) {\n if (v instanceof StackFrame) {\n this.evalOrigin = v;\n } else if (v instanceof Object) {\n this.evalOrigin = new StackFrame(v);\n } else {\n throw new TypeError('Eval Origin must be an Object or StackFrame');\n }\n },\n\n toString: function() {\n var fileName = this.getFileName() || '';\n var lineNumber = this.getLineNumber() || '';\n var columnNumber = this.getColumnNumber() || '';\n var functionName = this.getFunctionName() || '';\n if (this.getIsEval()) {\n if (fileName) {\n return '[eval] (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return '[eval]:' + lineNumber + ':' + columnNumber;\n }\n if (functionName) {\n return functionName + ' (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return fileName + ':' + lineNumber + ':' + columnNumber;\n }\n };\n\n StackFrame.fromString = function StackFrame$$fromString(str) {\n var argsStartIndex = str.indexOf('(');\n var argsEndIndex = str.lastIndexOf(')');\n\n var functionName = str.substring(0, argsStartIndex);\n var args = str.substring(argsStartIndex + 1, argsEndIndex).split(',');\n var locationString = str.substring(argsEndIndex + 1);\n\n if (locationString.indexOf('@') === 0) {\n var parts = /@(.+?)(?::(\\d+))?(?::(\\d+))?$/.exec(locationString, '');\n var fileName = parts[1];\n var lineNumber = parts[2];\n var columnNumber = parts[3];\n }\n\n return new StackFrame({\n functionName: functionName,\n args: args || undefined,\n fileName: fileName,\n lineNumber: lineNumber || undefined,\n columnNumber: columnNumber || undefined\n });\n };\n\n for (var i = 0; i < booleanProps.length; i++) {\n StackFrame.prototype['get' + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);\n StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function(p) {\n return function(v) {\n this[p] = Boolean(v);\n };\n })(booleanProps[i]);\n }\n\n for (var j = 0; j < numericProps.length; j++) {\n StackFrame.prototype['get' + _capitalize(numericProps[j])] = _getter(numericProps[j]);\n StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function(p) {\n return function(v) {\n if (!_isNumber(v)) {\n throw new TypeError(p + ' must be a Number');\n }\n this[p] = Number(v);\n };\n })(numericProps[j]);\n }\n\n for (var k = 0; k < stringProps.length; k++) {\n StackFrame.prototype['get' + _capitalize(stringProps[k])] = _getter(stringProps[k]);\n StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function(p) {\n return function(v) {\n this[p] = String(v);\n };\n })(stringProps[k]);\n }\n\n return StackFrame;\n}));\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction itemToPayload(item, options, callback) {\n var data = item.data;\n\n if (item._isUncaught) {\n data._isUncaught = true;\n }\n if (item._originalArgs) {\n data._originalArgs = item._originalArgs;\n }\n callback(null, data);\n}\n\nfunction addPayloadOptions(item, options, callback) {\n var payloadOptions = options.payload || {};\n if (payloadOptions.body) {\n delete payloadOptions.body;\n }\n\n item.data = _.merge(item.data, payloadOptions);\n callback(null, item);\n}\n\nfunction addTelemetryData(item, options, callback) {\n if (item.telemetryEvents) {\n _.set(item, 'data.body.telemetry', item.telemetryEvents);\n }\n callback(null, item);\n}\n\nfunction addMessageWithError(item, options, callback) {\n if (!item.message) {\n callback(null, item);\n return;\n }\n var tracePath = 'data.body.trace_chain.0';\n var trace = _.get(item, tracePath);\n if (!trace) {\n tracePath = 'data.body.trace';\n trace = _.get(item, tracePath);\n }\n if (trace) {\n if (!(trace.exception && trace.exception.description)) {\n _.set(item, tracePath+'.exception.description', item.message);\n callback(null, item);\n return;\n }\n var extra = _.get(item, tracePath+'.extra') || {};\n var newExtra = _.merge(extra, {message: item.message});\n _.set(item, tracePath+'.extra', newExtra);\n }\n callback(null, item);\n}\n\nfunction userTransform(logger) {\n return function(item, options, callback) {\n var newItem = _.merge(item);\n var response = null;\n try {\n if (_.isFunction(options.transform)) {\n response = options.transform(newItem.data, item);\n }\n } catch (e) {\n options.transform = null;\n logger.error('Error while calling custom transform() function. Removing custom transform().', e);\n callback(null, item);\n return;\n }\n if(_.isPromise(response)) {\n response.then(function (promisedItem) {\n if(promisedItem) {\n newItem.data = promisedItem;\n }\n callback(null, newItem);\n }, function (error) {\n callback(error, item);\n });\n } else {\n callback(null, newItem);\n }\n }\n}\n\nfunction addConfigToPayload(item, options, callback) {\n if (!options.sendConfig) {\n return callback(null, item);\n }\n var configKey = '_rollbarConfig';\n var custom = _.get(item, 'data.custom') || {};\n custom[configKey] = options;\n item.data.custom = custom;\n callback(null, item);\n}\n\nfunction addFunctionOption(options, name) {\n if(_.isFunction(options[name])) {\n options[name] = options[name].toString();\n }\n}\n\nfunction addConfiguredOptions(item, options, callback) {\n var configuredOptions = options._configuredOptions;\n\n // These must be stringified or they'll get dropped during serialization.\n addFunctionOption(configuredOptions, 'transform');\n addFunctionOption(configuredOptions, 'checkIgnore');\n addFunctionOption(configuredOptions, 'onSendCallback');\n\n delete configuredOptions.accessToken;\n item.data.notifier.configured_options = configuredOptions;\n callback(null, item);\n}\n\nfunction addDiagnosticKeys(item, options, callback) {\n var diagnostic = _.merge(item.notifier.client.notifier.diagnostic, item.diagnostic);\n\n if (_.get(item, 'err._isAnonymous')) {\n diagnostic.is_anonymous = true;\n }\n\n if (item._isUncaught) {\n diagnostic.is_uncaught = item._isUncaught;\n }\n\n if (item.err) {\n try {\n diagnostic.raw_error = {\n message: item.err.message,\n name: item.err.name,\n constructor_name: item.err.constructor && item.err.constructor.name,\n filename: item.err.fileName,\n line: item.err.lineNumber,\n column: item.err.columnNumber,\n stack: item.err.stack\n };\n } catch (e) {\n diagnostic.raw_error = { failed: String(e) };\n }\n }\n\n item.data.notifier.diagnostic = _.merge(item.data.notifier.diagnostic, diagnostic);\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addPayloadOptions: addPayloadOptions,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError,\n userTransform: userTransform,\n addConfigToPayload: addConfigToPayload,\n addConfiguredOptions: addConfiguredOptions,\n addDiagnosticKeys: addDiagnosticKeys\n};\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction checkIgnore(item, settings) {\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore\n};\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction checkLevel(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = settings.reportLevel;\n var reportLevelVal = _.LEVELS[reportLevel] || 0;\n\n if (levelVal < reportLevelVal) {\n return false;\n }\n return true;\n}\n\nfunction userCheckIgnore(logger) {\n return function(item, settings) {\n var isUncaught = !!item._isUncaught;\n delete item._isUncaught;\n var args = item._originalArgs;\n delete item._originalArgs;\n try {\n if (_.isFunction(settings.onSendCallback)) {\n settings.onSendCallback(isUncaught, args, item);\n }\n } catch (e) {\n settings.onSendCallback = null;\n logger.error('Error while calling onSendCallback, removing', e);\n }\n try {\n if (_.isFunction(settings.checkIgnore) && settings.checkIgnore(isUncaught, args, item)) {\n return false;\n }\n } catch (e) {\n settings.checkIgnore = null;\n logger.error('Error while calling custom checkIgnore(), removing', e);\n }\n return true;\n }\n}\n\nfunction urlIsNotBlockListed(logger) {\n return function(item, settings) {\n return !urlIsOnAList(item, settings, 'blocklist', logger);\n }\n}\n\nfunction urlIsSafeListed(logger) {\n return function(item, settings) {\n return urlIsOnAList(item, settings, 'safelist', logger);\n }\n}\n\nfunction matchFrames(trace, list, block) {\n if (!trace) { return !block }\n\n var frames = trace.frames;\n\n if (!frames || frames.length === 0) { return !block; }\n\n var frame, filename, url, urlRegex;\n var listLength = list.length;\n var frameLength = frames.length;\n for (var i = 0; i < frameLength; i++) {\n frame = frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) { return !block; }\n\n for (var j = 0; j < listLength; j++) {\n url = list[j];\n urlRegex = new RegExp(url);\n\n if (urlRegex.test(filename)) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction urlIsOnAList(item, settings, safeOrBlock, logger) {\n // safelist is the default\n var block = false;\n if (safeOrBlock === 'blocklist') {\n block = true;\n }\n\n var list, traces;\n try {\n list = block ? settings.hostBlockList : settings.hostSafeList;\n traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];\n\n // These two checks are important to come first as they are defaults\n // in case the list is missing or the trace is missing or not well-formed\n if (!list || list.length === 0) {\n return !block;\n }\n if (traces.length === 0 || !traces[0]) {\n return !block;\n }\n\n var tracesLength = traces.length;\n for (var i = 0; i < tracesLength; i++) {\n if(matchFrames(traces[i], list, block)) {\n return true;\n }\n }\n } catch (e)\n /* istanbul ignore next */\n {\n if (block) {\n settings.hostBlockList = null;\n } else {\n settings.hostSafeList = null;\n }\n var listName = block ? 'hostBlockList' : 'hostSafeList';\n logger.error('Error while reading your configuration\\'s ' + listName + ' option. Removing custom ' + listName + '.', e);\n return !block;\n }\n return false;\n}\n\nfunction messageIsIgnored(logger) {\n return function(item, settings) {\n var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n messages = messagesFromItem(item);\n\n if (messages.length === 0){\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n\n for (j = 0; j < messages.length; j++) {\n messageIsIgnored = rIgnoredMessage.test(messages[j]);\n\n if (messageIsIgnored) {\n return false;\n }\n }\n }\n } catch(e)\n /* istanbul ignore next */\n {\n settings.ignoredMessages = null;\n logger.error('Error while reading your configuration\\'s ignoredMessages option. Removing custom ignoredMessages.');\n }\n\n return true;\n }\n}\n\nfunction messagesFromItem(item) {\n var body = item.body;\n var messages = [];\n\n // The payload schema only allows one of trace_chain, message, or trace.\n // However, existing test cases are based on having both trace and message present.\n // So here we preserve the ability to collect strings from any combination of these keys.\n if (body.trace_chain) {\n var traceChain = body.trace_chain;\n for (var i = 0; i < traceChain.length; i++) {\n var trace = traceChain[i];\n messages.push(_.get(trace, 'exception.message'));\n }\n }\n if (body.trace) {\n messages.push(_.get(body, 'trace.exception.message'));\n }\n if (body.message) {\n messages.push(_.get(body, 'message.body'));\n }\n return messages;\n}\n\nmodule.exports = {\n checkLevel: checkLevel,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlockListed: urlIsNotBlockListed,\n urlIsSafeListed: urlIsSafeListed,\n messageIsIgnored: messageIsIgnored\n};\n","'use strict';\n\nmodule.exports = {\n version: '2.26.3',\n endpoint: 'api.rollbar.com/api/1/item/',\n logLevel: 'debug',\n reportLevel: 'debug',\n uncaughtErrorLevel: 'error',\n maxItems: 0,\n itemsPerMin: 60\n}\n","'use strict';\n\nmodule.exports = {\n scrubFields: [\n 'pw',\n 'pass',\n 'passwd',\n 'password',\n 'secret',\n 'confirm_password',\n 'confirmPassword',\n 'password_confirmation',\n 'passwordConfirmation',\n 'access_token',\n 'accessToken',\n 'X-Rollbar-Access-Token',\n 'secret_key',\n 'secretKey',\n 'secretToken',\n 'cc-number',\n 'card number',\n 'cardnumber',\n 'cardnum',\n 'ccnum',\n 'ccnumber',\n 'cc num',\n 'creditcardnumber',\n 'credit card number',\n 'newcreditcardnumber',\n 'new credit card',\n 'creditcardno',\n 'credit card no',\n 'card#',\n 'card #',\n 'cc-csc',\n 'cvc',\n 'cvc2',\n 'cvv2',\n 'ccv2',\n 'security code',\n 'card verification',\n 'name on credit card',\n 'name on card',\n 'nameoncard',\n 'cardholder',\n 'card holder',\n 'name des karteninhabers',\n 'ccname',\n 'card type',\n 'cardtype',\n 'cc type',\n 'cctype',\n 'payment type',\n 'expiration date',\n 'expirationdate',\n 'expdate',\n 'cc-exp',\n 'ccmonth',\n 'ccyear'\n ]\n}\n","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.merge(options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n}\n\nTelemeter.prototype.configure = function(options) {\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n var deleteCount = 0;\n if (this.queue.length > newMaxEvents) {\n deleteCount = this.queue.length - newMaxEvents;\n }\n this.maxQueueSize = newMaxEvents;\n this.queue.splice(0, deleteCount);\n};\n\nTelemeter.prototype.copyEvents = function() {\n var events = Array.prototype.slice.call(this.queue, 0);\n if (_.isFunction(this.options.filterTelemetry)) {\n try {\n var i = events.length;\n while (i--) {\n if (this.options.filterTelemetry(events[i])) {\n events.splice(i, 1);\n }\n }\n } catch (e) {\n this.options.filterTelemetry = null;\n }\n }\n return events;\n};\n\nTelemeter.prototype.capture = function(type, metadata, level, rollbarUUID, timestamp) {\n var e = {\n level: getLevel(type, level),\n type: type,\n timestamp_ms: timestamp || _.now(),\n body: metadata,\n source: 'client'\n };\n if (rollbarUUID) {\n e.uuid = rollbarUUID;\n }\n\n try {\n if (_.isFunction(this.options.filterTelemetry) && this.options.filterTelemetry(e)) {\n return false;\n }\n } catch (exc) {\n this.options.filterTelemetry = null;\n }\n\n this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function(type, metadata, level, rollbarUUID) {\n return this.capture(type, metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.captureError = function(err, level, rollbarUUID, timestamp) {\n var metadata = {\n message: err.message || String(err)\n };\n if (err.stack) {\n metadata.stack = err.stack;\n }\n return this.capture('error', metadata, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureLog = function(message, level, rollbarUUID, timestamp) {\n return this.capture('log', {\n message: message\n }, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID, requestData) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\n if (requestData) {\n metadata.request = requestData;\n }\n var level = this.levelFromStatus(metadata.status_code);\n return this.capture('network', metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.levelFromStatus = function(statusCode) {\n if (statusCode >= 200 && statusCode < 400) {\n return 'info';\n }\n if (statusCode === 0 || statusCode >= 400) {\n return 'error';\n }\n return 'info';\n};\n\nTelemeter.prototype.captureDom = function(subtype, element, value, checked, rollbarUUID) {\n var metadata = {\n subtype: subtype,\n element: element\n };\n if (value !== undefined) {\n metadata.value = value;\n }\n if (checked !== undefined) {\n metadata.checked = checked;\n }\n return this.capture('dom', metadata, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureNavigation = function(from, to, rollbarUUID) {\n return this.capture('navigation', {from: from, to: to}, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureDomContentLoaded = function(ts) {\n return this.capture('navigation', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n */\n};\nTelemeter.prototype.captureLoad = function(ts) {\n return this.capture('navigation', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n */\n};\n\nTelemeter.prototype.captureConnectivityChange = function(type, rollbarUUID) {\n return this.captureNetwork({change: type}, 'connectivity', rollbarUUID);\n};\n\n// Only intended to be used internally by the notifier\nTelemeter.prototype._captureRollbarItem = function(item) {\n if (!this.options.includeItemsInTelemetry) {\n return;\n }\n if (item.err) {\n return this.captureError(item.err, item.level, item.uuid, item.timestamp);\n }\n if (item.message) {\n return this.captureLog(item.message, item.level, item.uuid, item.timestamp);\n }\n if (item.custom) {\n return this.capture('log', item.custom, item.level, item.uuid, item.timestamp);\n }\n};\n\nTelemeter.prototype.push = function(e) {\n this.queue.push(e);\n if (this.queue.length > this.maxQueueSize) {\n this.queue.shift();\n }\n};\n\nfunction getLevel(type, level) {\n if (level) {\n return level;\n }\n var defaultLevel = {\n error: 'error',\n manual: 'info'\n };\n return defaultLevel[type] || 'info';\n}\n\nmodule.exports = Telemeter;\n","'use strict';\n\nvar _ = require('../utility');\nvar headers = require('../utility/headers');\nvar scrub = require('../scrub');\nvar urlparser = require('./url');\nvar domUtil = require('./domUtility');\n\nvar defaults = {\n network: true,\n networkResponseHeaders: false,\n networkResponseBody: false,\n networkRequestHeaders: false,\n networkRequestBody: false,\n networkErrorOnHttp5xx: false,\n networkErrorOnHttp4xx: false,\n networkErrorOnHttp0: false,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true,\n contentSecurityPolicy: true,\n errorOnContentSecurityPolicy: false\n};\n\nfunction replace(obj, name, replacement, replacements, type) {\n var orig = obj[name];\n obj[name] = replacement(orig);\n if (replacements) {\n replacements[type].push([obj, name, orig]);\n }\n}\n\nfunction restore(replacements, type) {\n var b;\n while (replacements[type].length) {\n b = replacements[type].shift();\n b[0][b[1]] = b[2];\n }\n}\n\nfunction nameFromDescription(description) {\n if (!description || !description.attributes) { return null; }\n var attrs = description.attributes;\n for (var a = 0; a < attrs.length; ++a) {\n if (attrs[a].key === 'name') {\n return attrs[a].value;\n }\n }\n return null;\n}\n\nfunction defaultValueScrubber(scrubFields) {\n var patterns = [];\n for (var i = 0; i < scrubFields.length; ++i) {\n patterns.push(new RegExp(scrubFields[i], 'i'));\n }\n return function(description) {\n var name = nameFromDescription(description);\n if (!name) { return false; }\n for (var i = 0; i < patterns.length; ++i) {\n if (patterns[i].test(name)) {\n return true;\n }\n }\n return false;\n };\n}\n\nfunction Instrumenter(options, telemeter, rollbar, _window, _document) {\n this.options = options;\n var autoInstrument = options.autoInstrument;\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);\n this.telemeter = telemeter;\n this.rollbar = rollbar;\n this.diagnostic = rollbar.client.notifier.diagnostic;\n this._window = _window || {};\n this._document = _document || {};\n this.replacements = {\n network: [],\n log: [],\n navigation: [],\n connectivity: []\n };\n this.eventRemovers = {\n dom: [],\n connectivity: [],\n contentsecuritypolicy: []\n };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function(options) {\n this.options = _.merge(this.options, options);\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.merge(this.autoInstrument);\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n if (options.scrubTelemetryInputs !== undefined) {\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n }\n if (options.telemetryScrubber !== undefined) {\n this.telemetryScrubber = options.telemetryScrubber;\n }\n};\n\n// eslint-disable-next-line complexity\nInstrumenter.prototype.instrument = function(oldSettings) {\n if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {\n this.instrumentNetwork();\n } else if (!this.autoInstrument.network && oldSettings && oldSettings.network) {\n this.deinstrumentNetwork();\n }\n\n if (this.autoInstrument.log && !(oldSettings && oldSettings.log)) {\n this.instrumentConsole();\n } else if (!this.autoInstrument.log && oldSettings && oldSettings.log) {\n this.deinstrumentConsole();\n }\n\n if (this.autoInstrument.dom && !(oldSettings && oldSettings.dom)) {\n this.instrumentDom();\n } else if (!this.autoInstrument.dom && oldSettings && oldSettings.dom) {\n this.deinstrumentDom();\n }\n\n if (this.autoInstrument.navigation && !(oldSettings && oldSettings.navigation)) {\n this.instrumentNavigation();\n } else if (!this.autoInstrument.navigation && oldSettings && oldSettings.navigation) {\n this.deinstrumentNavigation();\n }\n\n if (this.autoInstrument.connectivity && !(oldSettings && oldSettings.connectivity)) {\n this.instrumentConnectivity();\n } else if (!this.autoInstrument.connectivity && oldSettings && oldSettings.connectivity) {\n this.deinstrumentConnectivity();\n }\n\n if (this.autoInstrument.contentSecurityPolicy && !(oldSettings && oldSettings.contentSecurityPolicy)) {\n this.instrumentContentSecurityPolicy();\n } else if (!this.autoInstrument.contentSecurityPolicy && oldSettings && oldSettings.contentSecurityPolicy) {\n this.deinstrumentContentSecurityPolicy();\n }\n};\n\nInstrumenter.prototype.deinstrumentNetwork = function() {\n restore(this.replacements, 'network');\n};\n\nInstrumenter.prototype.instrumentNetwork = function() {\n var self = this;\n\n function wrapProp(prop, xhr) {\n if (prop in xhr && _.isFunction(xhr[prop])) {\n replace(xhr, prop, function(orig) {\n return self.rollbar.wrap(orig);\n });\n }\n }\n\n if ('XMLHttpRequest' in this._window) {\n var xhrp = this._window.XMLHttpRequest.prototype;\n replace(xhrp, 'open', function(orig) {\n return function(method, url) {\n var isUrlObject = _isUrlObject(url)\n if (_.isType(url, 'string') || isUrlObject) {\n url = isUrlObject ? url.toString() : url;\n if (this.__rollbar_xhr) {\n this.__rollbar_xhr.method = method;\n this.__rollbar_xhr.url = url;\n this.__rollbar_xhr.status_code = null;\n this.__rollbar_xhr.start_time_ms = _.now();\n this.__rollbar_xhr.end_time_ms = null;\n } else {\n this.__rollbar_xhr = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'setRequestHeader', function(orig) {\n return function(header, value) {\n // If xhr.open is async, __rollbar_xhr may not be initialized yet.\n if (!this.__rollbar_xhr) {\n this.__rollbar_xhr = {};\n }\n if (_.isType(header, 'string') && _.isType(value, 'string')) {\n if (self.autoInstrument.networkRequestHeaders) {\n if (!this.__rollbar_xhr.request_headers) {\n this.__rollbar_xhr.request_headers = {};\n }\n this.__rollbar_xhr.request_headers[header] = value;\n }\n // We want the content type even if request header telemetry is off.\n if (header.toLowerCase() === 'content-type') {\n this.__rollbar_xhr.request_content_type = value;\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'send', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(data) {\n /* eslint-enable no-unused-vars */\n var xhr = this;\n\n function onreadystatechangeHandler() {\n if (xhr.__rollbar_xhr) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n if (self.autoInstrument.networkRequestBody) {\n xhr.__rollbar_xhr.request = data;\n }\n xhr.__rollbar_event = self.captureNetwork(xhr.__rollbar_xhr, 'xhr', undefined);\n }\n if (xhr.readyState < 2) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n }\n if (xhr.readyState > 3) {\n xhr.__rollbar_xhr.end_time_ms = _.now();\n\n var headers = null;\n xhr.__rollbar_xhr.response_content_type = xhr.getResponseHeader('Content-Type');\n if (self.autoInstrument.networkResponseHeaders) {\n var headersConfig = self.autoInstrument.networkResponseHeaders;\n headers = {};\n try {\n var header, i;\n if (headersConfig === true) {\n var allHeaders = xhr.getAllResponseHeaders();\n if (allHeaders) {\n var arr = allHeaders.trim().split(/[\\r\\n]+/);\n var parts, value;\n for (i=0; i < arr.length; i++) {\n parts = arr[i].split(': ');\n header = parts.shift();\n value = parts.join(': ');\n headers[header] = value;\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n header = headersConfig[i];\n headers[header] = xhr.getResponseHeader(header);\n }\n }\n } catch (e) {\n /* we ignore the errors here that could come from different\n * browser issues with the xhr methods */\n }\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n try {\n body = xhr.responseText;\n } catch (e) {\n /* ignore errors from reading responseText */\n }\n }\n var response = null;\n if (body || headers) {\n response = {};\n if (body) {\n if (self.isJsonContentType(xhr.__rollbar_xhr.response_content_type)) {\n response.body = self.scrubJson(body);\n } else {\n response.body = body;\n }\n }\n if (headers) {\n response.headers = headers;\n }\n }\n if (response) {\n xhr.__rollbar_xhr.response = response;\n }\n try {\n var code = xhr.status;\n code = code === 1223 ? 204 : code;\n xhr.__rollbar_xhr.status_code = code;\n xhr.__rollbar_event.level = self.telemeter.levelFromStatus(code);\n self.errorOnHttpStatus(xhr.__rollbar_xhr);\n } catch (e) {\n /* ignore possible exception from xhr.status */\n }\n }\n }\n }\n\n wrapProp('onload', xhr);\n wrapProp('onerror', xhr);\n wrapProp('onprogress', xhr);\n\n if ('onreadystatechange' in xhr && _.isFunction(xhr.onreadystatechange)) {\n replace(xhr, 'onreadystatechange', function(orig) {\n return self.rollbar.wrap(orig, undefined, onreadystatechangeHandler);\n });\n } else {\n xhr.onreadystatechange = onreadystatechangeHandler;\n }\n if (xhr.__rollbar_xhr && self.trackHttpErrors()) {\n xhr.__rollbar_xhr.stack = (new Error()).stack;\n }\n return orig.apply(this, arguments);\n }\n }, this.replacements, 'network');\n }\n\n if ('fetch' in this._window) {\n replace(this._window, 'fetch', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(fn, t) {\n /* eslint-enable no-unused-vars */\n var args = new Array(arguments.length);\n for (var i=0, len=args.length; i < len; i++) {\n args[i] = arguments[i];\n }\n var input = args[0];\n var method = 'GET';\n var url;\n var isUrlObject = _isUrlObject(input)\n if (_.isType(input, 'string') || isUrlObject) {\n url = isUrlObject ? input.toString() : input;\n } else if (input) {\n url = input.url;\n if (input.method) {\n method = input.method;\n }\n }\n if (args[1] && args[1].method) {\n method = args[1].method;\n }\n var metadata = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n if (args[1] && args[1].headers) {\n // Argument may be a Headers object, or plain object. Ensure here that\n // we are working with a Headers object with case-insensitive keys.\n var reqHeaders = headers(args[1].headers);\n\n metadata.request_content_type = reqHeaders.get('Content-Type');\n\n if (self.autoInstrument.networkRequestHeaders) {\n metadata.request_headers = self.fetchHeaders(reqHeaders, self.autoInstrument.networkRequestHeaders)\n }\n }\n\n if (self.autoInstrument.networkRequestBody) {\n if (args[1] && args[1].body) {\n metadata.request = args[1].body;\n } else if (args[0] && !_.isType(args[0], 'string') && args[0].body) {\n metadata.request = args[0].body;\n }\n }\n self.captureNetwork(metadata, 'fetch', undefined);\n if (self.trackHttpErrors()) {\n metadata.stack = (new Error()).stack;\n }\n\n // Start our handler before returning the promise. This allows resp.clone()\n // to execute before other handlers touch the response.\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n metadata.response_content_type = resp.headers.get('Content-Type');\n var headers = null;\n if (self.autoInstrument.networkResponseHeaders) {\n headers = self.fetchHeaders(resp.headers, self.autoInstrument.networkResponseHeaders);\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n if (typeof resp.text === 'function') { // Response.text() is not implemented on some platforms\n // The response must be cloned to prevent reading (and locking) the original stream.\n // This must be done before other handlers touch the response.\n body = resp.clone().text(); //returns a Promise\n }\n }\n if (headers || body) {\n metadata.response = {};\n if (body) {\n // Test to ensure body is a Promise, which it should always be.\n if (typeof body.then === 'function') {\n body.then(function (text) {\n if (text && self.isJsonContentType(metadata.response_content_type)) {\n metadata.response.body = self.scrubJson(text);\n } else {\n metadata.response.body = text;\n }\n });\n } else {\n metadata.response.body = body;\n }\n }\n if (headers) {\n metadata.response.headers = headers;\n }\n }\n self.errorOnHttpStatus(metadata);\n return resp;\n });\n };\n }, this.replacements, 'network');\n }\n};\n\nInstrumenter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID) {\n if (metadata.request && this.isJsonContentType(metadata.request_content_type)) {\n metadata.request = this.scrubJson(metadata.request);\n }\n return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);\n};\n\nInstrumenter.prototype.isJsonContentType = function(contentType) {\n return (contentType && _.isType(contentType, 'string') && contentType.toLowerCase().includes('json')) ? true : false;\n}\n\nInstrumenter.prototype.scrubJson = function(json) {\n return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));\n}\n\nInstrumenter.prototype.fetchHeaders = function(inHeaders, headersConfig) {\n var outHeaders = {};\n try {\n var i;\n if (headersConfig === true) {\n if (typeof inHeaders.entries === 'function') { // Headers.entries() is not implemented in IE\n var allHeaders = inHeaders.entries();\n var currentHeader = allHeaders.next();\n while (!currentHeader.done) {\n outHeaders[currentHeader.value[0]] = currentHeader.value[1];\n currentHeader = allHeaders.next();\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n var header = headersConfig[i];\n outHeaders[header] = inHeaders.get(header);\n }\n }\n } catch (e) {\n /* ignore probable IE errors */\n }\n return outHeaders;\n}\n\nInstrumenter.prototype.trackHttpErrors = function() {\n return this.autoInstrument.networkErrorOnHttp5xx ||\n this.autoInstrument.networkErrorOnHttp4xx ||\n this.autoInstrument.networkErrorOnHttp0;\n}\n\nInstrumenter.prototype.errorOnHttpStatus = function(metadata) {\n var status = metadata.status_code;\n\n if ((status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||\n (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||\n (status === 0 && this.autoInstrument.networkErrorOnHttp0)) {\n var error = new Error('HTTP request failed with Status ' + status);\n error.stack = metadata.stack;\n this.rollbar.error(error, { skipFrames: 1 });\n }\n}\n\nInstrumenter.prototype.deinstrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n var b;\n while (this.replacements['log'].length) {\n b = this.replacements['log'].shift();\n this._window.console[b[0]] = b[1];\n }\n};\n\nInstrumenter.prototype.instrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n\n var self = this;\n var c = this._window.console;\n\n function wrapConsole(method) {\n 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778\n\n var orig = c[method];\n var origConsole = c;\n var level = method === 'warn' ? 'warning' : method;\n c[method] = function() {\n var args = Array.prototype.slice.call(arguments);\n var message = _.formatArgsAsString(args);\n self.telemeter.captureLog(message, level);\n if (orig) {\n Function.prototype.apply.call(orig, origConsole, args);\n }\n };\n self.replacements['log'].push([method, orig]);\n }\n var methods = ['debug','info','warn','error','log'];\n try {\n for (var i=0, len=methods.length; i < len; i++) {\n wrapConsole(methods[i]);\n }\n } catch (e) {\n this.diagnostic.instrumentConsole = { error: e.message };\n }\n};\n\nInstrumenter.prototype.deinstrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n this.removeListeners('dom');\n};\n\nInstrumenter.prototype.instrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n var clickHandler = this.handleClick.bind(this);\n var blurHandler = this.handleBlur.bind(this);\n this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);\n this.addListener('dom', this._window, 'blur', 'onfocusout', blurHandler, true);\n};\n\nInstrumenter.prototype.handleClick = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n var hasTag = e && e.tagName;\n var anchorOrButton = domUtil.isDescribedElement(e, 'a') || domUtil.isDescribedElement(e, 'button');\n if (hasTag && (anchorOrButton || domUtil.isDescribedElement(e, 'input', ['button', 'submit']))) {\n this.captureDomEvent('click', e);\n } else if (domUtil.isDescribedElement(e, 'input', ['checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value, e.checked);\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleBlur = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n if (e && e.tagName) {\n if (domUtil.isDescribedElement(e, 'textarea')) {\n this.captureDomEvent('input', e, e.value);\n } else if (domUtil.isDescribedElement(e, 'select') && e.options && e.options.length) {\n this.handleSelectInputChanged(e);\n } else if (domUtil.isDescribedElement(e, 'input') && !domUtil.isDescribedElement(e, 'input', ['button', 'submit', 'hidden', 'checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value);\n }\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleSelectInputChanged = function(elem) {\n if (elem.multiple) {\n for (var i = 0; i < elem.options.length; i++) {\n if (elem.options[i].selected) {\n this.captureDomEvent('input', elem, elem.options[i].value);\n }\n }\n } else if (elem.selectedIndex >= 0 && elem.options[elem.selectedIndex]) {\n this.captureDomEvent('input', elem, elem.options[elem.selectedIndex].value);\n }\n};\n\nInstrumenter.prototype.captureDomEvent = function(subtype, element, value, isChecked) {\n if (value !== undefined) {\n if (this.scrubTelemetryInputs || (domUtil.getElementType(element) === 'password')) {\n value = '[scrubbed]';\n } else {\n var description = domUtil.describeElement(element);\n if (this.telemetryScrubber) {\n if (this.telemetryScrubber(description)) {\n value = '[scrubbed]';\n }\n } else if (this.defaultValueScrubber(description)) {\n value = '[scrubbed]';\n }\n }\n }\n var elementString = domUtil.elementArrayToString(domUtil.treeToArray(element));\n this.telemeter.captureDom(subtype, elementString, value, isChecked);\n};\n\nInstrumenter.prototype.deinstrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n restore(this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.instrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n var self = this;\n replace(this._window, 'onpopstate', function(orig) {\n return function() {\n var current = self._location.href;\n self.handleUrlChange(self._lastHref, current);\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n }, this.replacements, 'navigation');\n\n replace(this._window.history, 'pushState', function(orig) {\n return function() {\n var url = arguments.length > 2 ? arguments[2] : undefined;\n if (url) {\n self.handleUrlChange(self._lastHref, url + '');\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.handleUrlChange = function(from, to) {\n var parsedHref = urlparser.parse(this._location.href);\n var parsedTo = urlparser.parse(to);\n var parsedFrom = urlparser.parse(from);\n this._lastHref = to;\n if (parsedHref.protocol === parsedTo.protocol && parsedHref.host === parsedTo.host) {\n to = parsedTo.path + (parsedTo.hash || '');\n }\n if (parsedHref.protocol === parsedFrom.protocol && parsedHref.host === parsedFrom.host) {\n from = parsedFrom.path + (parsedFrom.hash || '');\n }\n this.telemeter.captureNavigation(from, to);\n};\n\nInstrumenter.prototype.deinstrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.removeListeners('connectivity');\n } else {\n restore(this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.instrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.addListener('connectivity', this._window, 'online', undefined, function() {\n this.telemeter.captureConnectivityChange('online');\n }.bind(this), true);\n this.addListener('connectivity', this._window, 'offline', undefined, function() {\n this.telemeter.captureConnectivityChange('offline');\n }.bind(this), true);\n } else {\n var self = this;\n replace(this._document.body, 'ononline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('online');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n replace(this._document.body, 'onoffline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('offline');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.handleCspEvent = function(cspEvent) {\n var message = 'Security Policy Violation: ' +\n 'blockedURI: ' + cspEvent.blockedURI + ', ' +\n 'violatedDirective: ' + cspEvent.violatedDirective + ', ' +\n 'effectiveDirective: ' + cspEvent.effectiveDirective + ', ';\n\n if (cspEvent.sourceFile) {\n message += 'location: ' + cspEvent.sourceFile + ', ' +\n 'line: ' + cspEvent.lineNumber + ', ' +\n 'col: ' + cspEvent.columnNumber + ', ';\n }\n\n message += 'originalPolicy: ' + cspEvent.originalPolicy;\n\n this.telemeter.captureLog(message, 'error');\n this.handleCspError(message);\n}\n\nInstrumenter.prototype.handleCspError = function(message) {\n if (this.autoInstrument.errorOnContentSecurityPolicy) {\n this.rollbar.error(message);\n }\n}\n\nInstrumenter.prototype.deinstrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._document)) { return; }\n\n this.removeListeners('contentsecuritypolicy');\n};\n\nInstrumenter.prototype.instrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._document)) { return; }\n\n var cspHandler = this.handleCspEvent.bind(this);\n this.addListener('contentsecuritypolicy', this._document, 'securitypolicyviolation', null, cspHandler, false);\n};\n\nInstrumenter.prototype.addListener = function(section, obj, type, altType, handler, capture) {\n if (obj.addEventListener) {\n obj.addEventListener(type, handler, capture);\n this.eventRemovers[section].push(function() {\n obj.removeEventListener(type, handler, capture);\n });\n } else if (altType) {\n obj.attachEvent(altType, handler);\n this.eventRemovers[section].push(function() {\n obj.detachEvent(altType, handler);\n });\n }\n};\n\nInstrumenter.prototype.removeListeners = function(section) {\n var r;\n while (this.eventRemovers[section].length) {\n r = this.eventRemovers[section].shift();\n r();\n }\n};\n\nfunction _isUrlObject(input) {\n return typeof URL !== 'undefined' && input instanceof URL\n}\n\nmodule.exports = Instrumenter;\n","'use strict';\n\n/*\n * headers - Detect when fetch Headers are undefined and use a partial polyfill.\n *\n * A full polyfill is not used in order to keep package size as small as possible.\n * Since this is only used internally and is not added to the window object,\n * the full interface doesn't need to be supported.\n *\n * This implementation is modified from whatwg-fetch:\n * https://github.com/github/fetch\n */\nfunction headers(headers) {\n if (typeof Headers === 'undefined') {\n return new FetchHeaders(headers);\n }\n\n return new Headers(headers);\n}\n\nfunction normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name)\n }\n return name.toLowerCase()\n}\n\nfunction normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value)\n }\n return value\n}\n\nfunction iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n return iterator\n}\n\nfunction FetchHeaders(headers) {\n this.map = {}\n\n if (headers instanceof FetchHeaders) {\n headers.forEach(function(value, name) {\n this.append(name, value)\n }, this)\n } else if (Array.isArray(headers)) {\n headers.forEach(function(header) {\n this.append(header[0], header[1])\n }, this)\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function(name) {\n this.append(name, headers[name])\n }, this)\n }\n}\n\nFetchHeaders.prototype.append = function(name, value) {\n name = normalizeName(name)\n value = normalizeValue(value)\n var oldValue = this.map[name]\n this.map[name] = oldValue ? oldValue + ', ' + value : value\n}\n\nFetchHeaders.prototype.get = function(name) {\n name = normalizeName(name)\n return this.has(name) ? this.map[name] : null\n}\n\nFetchHeaders.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n}\n\nFetchHeaders.prototype.forEach = function(callback, thisArg) {\n for (var name in this.map) {\n if (this.map.hasOwnProperty(name)) {\n callback.call(thisArg, this.map[name], name, this)\n }\n }\n}\n\nFetchHeaders.prototype.entries = function() {\n var items = []\n this.forEach(function(value, name) {\n items.push([name, value])\n })\n return iteratorFor(items)\n}\n\nmodule.exports = headers;\n","'use strict';\n\nfunction getElementType(e) {\n return (e.getAttribute('type') || '').toLowerCase();\n}\n\nfunction isDescribedElement(element, type, subtypes) {\n if (element.tagName.toLowerCase() !== type.toLowerCase()) {\n return false;\n }\n if (!subtypes) {\n return true;\n }\n element = getElementType(element);\n for (var i = 0; i < subtypes.length; i++) {\n if (subtypes[i] === element) {\n return true;\n }\n }\n return false;\n}\n\nfunction getElementFromEvent(evt, doc) {\n if (evt.target) {\n return evt.target;\n }\n if (doc && doc.elementFromPoint) {\n return doc.elementFromPoint(evt.clientX, evt.clientY);\n }\n return undefined;\n}\n\nfunction treeToArray(elem) {\n var MAX_HEIGHT = 5;\n var out = [];\n var nextDescription;\n for (var height = 0; elem && height < MAX_HEIGHT; height++) {\n nextDescription = describeElement(elem);\n if (nextDescription.tagName === 'html') {\n break;\n }\n out.unshift(nextDescription);\n elem = elem.parentNode;\n }\n return out;\n}\n\nfunction elementArrayToString(a) {\n var MAX_LENGTH = 80;\n var separator = ' > ', separatorLength = separator.length;\n var out = [], len = 0, nextStr, totalLength;\n\n for (var i = a.length - 1; i >= 0; i--) {\n nextStr = descriptionToString(a[i]);\n totalLength = len + (out.length * separatorLength) + nextStr.length;\n if (i < a.length - 1 && totalLength >= MAX_LENGTH + 3) {\n out.unshift('...');\n break;\n }\n out.unshift(nextStr);\n len += nextStr.length;\n }\n return out.join(separator);\n}\n\nfunction descriptionToString(desc) {\n if (!desc || !desc.tagName) {\n return '';\n }\n var out = [desc.tagName];\n if (desc.id) {\n out.push('#' + desc.id);\n }\n if (desc.classes) {\n out.push('.' + desc.classes.join('.'));\n }\n for (var i = 0; i < desc.attributes.length; i++) {\n out.push('[' + desc.attributes[i].key + '=\"' + desc.attributes[i].value + '\"]');\n }\n\n return out.join('');\n}\n\n/**\n * Input: a dom element\n * Output: null if tagName is falsey or input is falsey, else\n * {\n * tagName: String,\n * id: String | undefined,\n * classes: [String] | undefined,\n * attributes: [\n * {\n * key: OneOf(type, name, title, alt),\n * value: String\n * }\n * ]\n * }\n */\nfunction describeElement(elem) {\n if (!elem || !elem.tagName) {\n return null;\n }\n var out = {}, className, key, attr, i;\n out.tagName = elem.tagName.toLowerCase();\n if (elem.id) {\n out.id = elem.id;\n }\n className = elem.className;\n if (className && (typeof className === 'string')) {\n out.classes = className.split(/\\s+/);\n }\n var attributes = ['type', 'name', 'title', 'alt'];\n out.attributes = [];\n for (i = 0; i < attributes.length; i++) {\n key = attributes[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.attributes.push({key: key, value: attr});\n }\n }\n return out;\n}\n\nmodule.exports = {\n describeElement: describeElement,\n descriptionToString: descriptionToString,\n elementArrayToString: elementArrayToString,\n treeToArray: treeToArray,\n getElementFromEvent: getElementFromEvent,\n isDescribedElement: isDescribedElement,\n getElementType: getElementType\n};\n","'use strict';\n\nvar polyfillJSON = require('../../vendor/JSON-js/json3');\n\nmodule.exports = polyfillJSON;\n","// json3.js\n// 2017-02-21\n// Public Domain.\n// NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.\n// See http://www.JSON.org/js.html\n// This code should be minified before deployment.\n// See http://javascript.crockford.com/jsmin.html\n\n// USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO\n// NOT CONTROL.\n\n// This file creates a global JSON object containing two methods: stringify\n// and parse. This file provides the ES5 JSON capability to ES3 systems.\n// If a project might run on IE8 or earlier, then this file should be included.\n// This file does nothing on ES5 systems.\n\n// JSON.stringify(value, replacer, space)\n// value any JavaScript value, usually an object or array.\n// replacer an optional parameter that determines how object\n// values are stringified for objects. It can be a\n// function or an array of strings.\n// space an optional parameter that specifies the indentation\n// of nested structures. If it is omitted, the text will\n// be packed without extra whitespace. If it is a number,\n// it will specify the number of spaces to indent at each\n// level. If it is a string (such as \"\\t\" or \" \"),\n// it contains the characters used to indent at each level.\n// This method produces a JSON text from a JavaScript value.\n// When an object value is found, if the object contains a toJSON\n// method, its toJSON method will be called and the result will be\n// stringified. A toJSON method does not serialize: it returns the\n// value represented by the name/value pair that should be serialized,\n// or undefined if nothing should be serialized. The toJSON method\n// will be passed the key associated with the value, and this will be\n// bound to the value.\n\n// For example, this would serialize Dates as ISO strings.\n\n// Date.prototype.toJSON = function (key) {\n// function f(n) {\n// // Format integers to have at least two digits.\n// return (n < 10)\n// ? \"0\" + n\n// : n;\n// }\n// return this.getUTCFullYear() + \"-\" +\n// f(this.getUTCMonth() + 1) + \"-\" +\n// f(this.getUTCDate()) + \"T\" +\n// f(this.getUTCHours()) + \":\" +\n// f(this.getUTCMinutes()) + \":\" +\n// f(this.getUTCSeconds()) + \"Z\";\n// };\n\n// You can provide an optional replacer method. It will be passed the\n// key and value of each member, with this bound to the containing\n// object. The value that is returned from your method will be\n// serialized. If your method returns undefined, then the member will\n// be excluded from the serialization.\n\n// If the replacer parameter is an array of strings, then it will be\n// used to select the members to be serialized. It filters the results\n// such that only members with keys listed in the replacer array are\n// stringified.\n\n// Values that do not have JSON representations, such as undefined or\n// functions, will not be serialized. Such values in objects will be\n// dropped; in arrays they will be replaced with null. You can use\n// a replacer function to replace those with JSON values.\n\n// JSON.stringify(undefined) returns undefined.\n\n// The optional space parameter produces a stringification of the\n// value that is filled with line breaks and indentation to make it\n// easier to read.\n\n// If the space parameter is a non-empty string, then that string will\n// be used for indentation. If the space parameter is a number, then\n// the indentation will be that many spaces.\n\n// Example:\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}]);\n// // text is '[\"e\",{\"pluribus\":\"unum\"}]'\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}], null, \"\\t\");\n// // text is '[\\n\\t\"e\",\\n\\t{\\n\\t\\t\"pluribus\": \"unum\"\\n\\t}\\n]'\n\n// text = JSON.stringify([new Date()], function (key, value) {\n// return this[key] instanceof Date\n// ? \"Date(\" + this[key] + \")\"\n// : value;\n// });\n// // text is '[\"Date(---current time---)\"]'\n\n// JSON.parse(text, reviver)\n// This method parses a JSON text to produce an object or array.\n// It can throw a SyntaxError exception.\n// This has been modified to use JSON-js/json_parse_state.js as the\n// parser instead of the one built around eval found in JSON-js/json2.js\n\n// The optional reviver parameter is a function that can filter and\n// transform the results. It receives each of the keys and values,\n// and its return value is used instead of the original value.\n// If it returns what it received, then the structure is not modified.\n// If it returns undefined then the member is deleted.\n\n// Example:\n\n// // Parse the text. Values that look like ISO date strings will\n// // be converted to Date objects.\n\n// myData = JSON.parse(text, function (key, value) {\n// var a;\n// if (typeof value === \"string\") {\n// a =\n// /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2}(?:\\.\\d*)?)Z$/.exec(value);\n// if (a) {\n// return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],\n// +a[5], +a[6]));\n// }\n// }\n// return value;\n// });\n\n// myData = JSON.parse('[\"Date(09/09/2001)\"]', function (key, value) {\n// var d;\n// if (typeof value === \"string\" &&\n// value.slice(0, 5) === \"Date(\" &&\n// value.slice(-1) === \")\") {\n// d = new Date(value.slice(5, -1));\n// if (d) {\n// return d;\n// }\n// }\n// return value;\n// });\n\n// This is a reference implementation. You are free to copy, modify, or\n// redistribute.\n\n/*jslint\n for, this\n */\n\n/*property\n JSON, apply, call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,\n getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,\n lastIndex, length, parse, prototype, push, replace, slice, stringify,\n test, toJSON, toString, valueOf\n */\n\nvar setupCustomJSON = function(JSON) {\n\n var rx_one = /^[\\],:{}\\s]*$/;\n var rx_two = /\\\\(?:[\"\\\\\\/bfnrt]|u[0-9a-fA-F]{4})/g;\n var rx_three = /\"[^\"\\\\\\n\\r]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g;\n var rx_four = /(?:^|:|,)(?:\\s*\\[)+/g;\n var rx_escapable = /[\\\\\"\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n var rx_dangerous = /[\\u0000\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n\n function f(n) {\n // Format integers to have at least two digits.\n return n < 10\n ? \"0\" + n\n : n;\n }\n\n function this_value() {\n return this.valueOf();\n }\n\n if (typeof Date.prototype.toJSON !== \"function\") {\n\n Date.prototype.toJSON = function () {\n\n return isFinite(this.valueOf())\n ? this.getUTCFullYear() + \"-\" +\n f(this.getUTCMonth() + 1) + \"-\" +\n f(this.getUTCDate()) + \"T\" +\n f(this.getUTCHours()) + \":\" +\n f(this.getUTCMinutes()) + \":\" +\n f(this.getUTCSeconds()) + \"Z\"\n : null;\n };\n\n Boolean.prototype.toJSON = this_value;\n Number.prototype.toJSON = this_value;\n String.prototype.toJSON = this_value;\n }\n\n var gap;\n var indent;\n var meta;\n var rep;\n\n\n function quote(string) {\n\n // If the string contains no control characters, no quote characters, and no\n // backslash characters, then we can safely slap some quotes around it.\n // Otherwise we must also replace the offending characters with safe escape\n // sequences.\n\n rx_escapable.lastIndex = 0;\n return rx_escapable.test(string)\n ? \"\\\"\" + string.replace(rx_escapable, function (a) {\n var c = meta[a];\n return typeof c === \"string\"\n ? c\n : \"\\\\u\" + (\"0000\" + a.charCodeAt(0).toString(16)).slice(-4);\n }) + \"\\\"\"\n : \"\\\"\" + string + \"\\\"\";\n }\n\n\n function str(key, holder) {\n\n // Produce a string from holder[key].\n\n var i; // The loop counter.\n var k; // The member key.\n var v; // The member value.\n var length;\n var mind = gap;\n var partial;\n var value = holder[key];\n\n // If the value has a toJSON method, call it to obtain a replacement value.\n\n if (value && typeof value === \"object\" &&\n typeof value.toJSON === \"function\") {\n value = value.toJSON(key);\n }\n\n // If we were called with a replacer function, then call the replacer to\n // obtain a replacement value.\n\n if (typeof rep === \"function\") {\n value = rep.call(holder, key, value);\n }\n\n // What happens next depends on the value's type.\n\n switch (typeof value) {\n case \"string\":\n return quote(value);\n\n case \"number\":\n\n // JSON numbers must be finite. Encode non-finite numbers as null.\n\n return isFinite(value)\n ? String(value)\n : \"null\";\n\n case \"boolean\":\n case \"null\":\n\n // If the value is a boolean or null, convert it to a string. Note:\n // typeof null does not produce \"null\". The case is included here in\n // the remote chance that this gets fixed someday.\n\n return String(value);\n\n // If the type is \"object\", we might be dealing with an object or an array or\n // null.\n\n case \"object\":\n\n // Due to a specification blunder in ECMAScript, typeof null is \"object\",\n // so watch out for that case.\n\n if (!value) {\n return \"null\";\n }\n\n // Make an array to hold the partial results of stringifying this object value.\n\n gap += indent;\n partial = [];\n\n // Is the value an array?\n\n if (Object.prototype.toString.apply(value) === \"[object Array]\") {\n\n // The value is an array. Stringify every element. Use null as a placeholder\n // for non-JSON values.\n\n length = value.length;\n for (i = 0; i < length; i += 1) {\n partial[i] = str(i, value) || \"null\";\n }\n\n // Join all of the elements together, separated with commas, and wrap them in\n // brackets.\n\n v = partial.length === 0\n ? \"[]\"\n : gap\n ? \"[\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"]\"\n : \"[\" + partial.join(\",\") + \"]\";\n gap = mind;\n return v;\n }\n\n // If the replacer is an array, use it to select the members to be stringified.\n\n if (rep && typeof rep === \"object\") {\n length = rep.length;\n for (i = 0; i < length; i += 1) {\n if (typeof rep[i] === \"string\") {\n k = rep[i];\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n } else {\n\n // Otherwise, iterate through all of the keys in the object.\n\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(value, k)) {\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n }\n\n // Join all of the member texts together, separated with commas,\n // and wrap them in braces.\n\n v = partial.length === 0\n ? \"{}\"\n : gap\n ? \"{\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"}\"\n : \"{\" + partial.join(\",\") + \"}\";\n gap = mind;\n return v;\n }\n }\n\n // If the JSON object does not yet have a stringify method, give it one.\n\n if (typeof JSON.stringify !== \"function\") {\n meta = { // table of character substitutions\n \"\\b\": \"\\\\b\",\n \"\\t\": \"\\\\t\",\n \"\\n\": \"\\\\n\",\n \"\\f\": \"\\\\f\",\n \"\\r\": \"\\\\r\",\n \"\\\"\": \"\\\\\\\"\",\n \"\\\\\": \"\\\\\\\\\"\n };\n JSON.stringify = function (value, replacer, space) {\n\n // The stringify method takes a value and an optional replacer, and an optional\n // space parameter, and returns a JSON text. The replacer can be a function\n // that can replace values, or an array of strings that will select the keys.\n // A default replacer method can be provided. Use of the space parameter can\n // produce text that is more easily readable.\n\n var i;\n gap = \"\";\n indent = \"\";\n\n // If the space parameter is a number, make an indent string containing that\n // many spaces.\n\n if (typeof space === \"number\") {\n for (i = 0; i < space; i += 1) {\n indent += \" \";\n }\n\n // If the space parameter is a string, it will be used as the indent string.\n\n } else if (typeof space === \"string\") {\n indent = space;\n }\n\n // If there is a replacer, it must be a function or an array.\n // Otherwise, throw an error.\n\n rep = replacer;\n if (replacer && typeof replacer !== \"function\" &&\n (typeof replacer !== \"object\" ||\n typeof replacer.length !== \"number\")) {\n throw new Error(\"JSON.stringify\");\n }\n\n // Make a fake root object containing our value under the key of \"\".\n // Return the result of stringifying the value.\n\n return str(\"\", {\"\": value});\n };\n }\n\n\n // If the JSON object does not yet have a parse method, give it one.\n\n if (typeof JSON.parse !== \"function\") {\n JSON.parse = (function () {\n\n // This function creates a JSON parse function that uses a state machine rather\n // than the dangerous eval function to parse a JSON text.\n\n var state; // The state of the parser, one of\n // 'go' The starting state\n // 'ok' The final, accepting state\n // 'firstokey' Ready for the first key of the object or\n // the closing of an empty object\n // 'okey' Ready for the next key of the object\n // 'colon' Ready for the colon\n // 'ovalue' Ready for the value half of a key/value pair\n // 'ocomma' Ready for a comma or closing }\n // 'firstavalue' Ready for the first value of an array or\n // an empty array\n // 'avalue' Ready for the next value of an array\n // 'acomma' Ready for a comma or closing ]\n var stack; // The stack, for controlling nesting.\n var container; // The current container object or array\n var key; // The current key\n var value; // The current value\n var escapes = { // Escapement translation table\n \"\\\\\": \"\\\\\",\n \"\\\"\": \"\\\"\",\n \"/\": \"/\",\n \"t\": \"\\t\",\n \"n\": \"\\n\",\n \"r\": \"\\r\",\n \"f\": \"\\f\",\n \"b\": \"\\b\"\n };\n var string = { // The actions for string tokens\n go: function () {\n state = \"ok\";\n },\n firstokey: function () {\n key = value;\n state = \"colon\";\n },\n okey: function () {\n key = value;\n state = \"colon\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var number = { // The actions for number tokens\n go: function () {\n state = \"ok\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var action = {\n\n // The action table describes the behavior of the machine. It contains an\n // object for each token. Each object contains a method that is called when\n // a token is matched in a state. An object will lack a method for illegal\n // states.\n\n \"{\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = {};\n state = \"firstokey\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = {};\n state = \"firstokey\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n }\n },\n \"}\": {\n firstokey: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n ocomma: function () {\n var pop = stack.pop();\n container[key] = value;\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \"[\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = [];\n state = \"firstavalue\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = [];\n state = \"firstavalue\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n }\n },\n \"]\": {\n firstavalue: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n acomma: function () {\n var pop = stack.pop();\n container.push(value);\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \":\": {\n colon: function () {\n if (Object.hasOwnProperty.call(container, key)) {\n throw new SyntaxError(\"Duplicate key '\" + key + \"\\\"\");\n }\n state = \"ovalue\";\n }\n },\n \",\": {\n ocomma: function () {\n container[key] = value;\n state = \"okey\";\n },\n acomma: function () {\n container.push(value);\n state = \"avalue\";\n }\n },\n \"true\": {\n go: function () {\n value = true;\n state = \"ok\";\n },\n ovalue: function () {\n value = true;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = true;\n state = \"acomma\";\n },\n avalue: function () {\n value = true;\n state = \"acomma\";\n }\n },\n \"false\": {\n go: function () {\n value = false;\n state = \"ok\";\n },\n ovalue: function () {\n value = false;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = false;\n state = \"acomma\";\n },\n avalue: function () {\n value = false;\n state = \"acomma\";\n }\n },\n \"null\": {\n go: function () {\n value = null;\n state = \"ok\";\n },\n ovalue: function () {\n value = null;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = null;\n state = \"acomma\";\n },\n avalue: function () {\n value = null;\n state = \"acomma\";\n }\n }\n };\n\n function debackslashify(text) {\n\n // Remove and replace any backslash escapement.\n\n return text.replace(/\\\\(?:u(.{4})|([^u]))/g, function (ignore, b, c) {\n return b\n ? String.fromCharCode(parseInt(b, 16))\n : escapes[c];\n });\n }\n\n return function (source, reviver) {\n\n // A regular expression is used to extract tokens from the JSON text.\n // The extraction process is cautious.\n\n var result;\n var tx = /^[\\u0020\\t\\n\\r]*(?:([,:\\[\\]{}]|true|false|null)|(-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?)|\"((?:[^\\r\\n\\t\\\\\\\"]|\\\\(?:[\"\\\\\\/trnfb]|u[0-9a-fA-F]{4}))*)\")/;\n\n // Set the starting state.\n\n state = \"go\";\n\n // The stack records the container, key, and state for each object or array\n // that contains another object or array while processing nested structures.\n\n stack = [];\n\n // If any error occurs, we will catch it and ultimately throw a syntax error.\n\n try {\n\n // For each token...\n\n while (true) {\n result = tx.exec(source);\n if (!result) {\n break;\n }\n\n // result is the result array from matching the tokenizing regular expression.\n // result[0] contains everything that matched, including any initial whitespace.\n // result[1] contains any punctuation that was matched, or true, false, or null.\n // result[2] contains a matched number, still in string form.\n // result[3] contains a matched string, without quotes but with escapement.\n\n if (result[1]) {\n\n // Token: Execute the action for this state and token.\n\n action[result[1]][state]();\n\n } else if (result[2]) {\n\n // Number token: Convert the number string into a number value and execute\n // the action for this state and number.\n\n value = +result[2];\n number[state]();\n } else {\n\n // String token: Replace the escapement sequences and execute the action for\n // this state and string.\n\n value = debackslashify(result[3]);\n string[state]();\n }\n\n // Remove the token from the string. The loop will continue as long as there\n // are tokens. This is a slow process, but it allows the use of ^ matching,\n // which assures that no illegal tokens slip through.\n\n source = source.slice(result[0].length);\n }\n\n // If we find a state/token combination that is illegal, then the action will\n // cause an error. We handle the error by simply changing the state.\n\n } catch (e) {\n state = e;\n }\n\n // The parsing is finished. If we are not in the final \"ok\" state, or if the\n // remaining source contains anything except whitespace, then we did not have\n //a well-formed JSON text.\n\n if (state !== \"ok\" || (/[^\\u0020\\t\\n\\r]/.test(source))) {\n throw (state instanceof SyntaxError)\n ? state\n : new SyntaxError(\"JSON\");\n }\n\n // If there is a reviver function, we recursively walk the new structure,\n // passing each name/value pair to the reviver function for possible\n // transformation, starting with a temporary root object that holds the current\n // value in an empty key. If there is not a reviver function, we simply return\n // that value.\n\n return (typeof reviver === \"function\")\n ? (function walk(holder, key) {\n var k;\n var v;\n var val = holder[key];\n if (val && typeof val === \"object\") {\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(val, k)) {\n v = walk(val, k);\n if (v !== undefined) {\n val[k] = v;\n } else {\n delete val[k];\n }\n }\n }\n }\n return reviver.call(holder, key, val);\n }({\"\": value}, \"\"))\n : value;\n };\n }());\n }\n}\n\nmodule.exports = setupCustomJSON;\n","'use strict';\n\nfunction wrapGlobals(window, handler, shim) {\n if (!window) { return; }\n // Adapted from https://github.com/bugsnag/bugsnag-js\n var globals = 'EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload'.split(',');\n var i, global;\n for (i = 0; i < globals.length; ++i) {\n global = globals[i];\n\n if (window[global] && window[global].prototype) {\n _extendListenerPrototype(handler, window[global].prototype, shim);\n }\n }\n}\n\nfunction _extendListenerPrototype(handler, prototype, shim) {\n if (prototype.hasOwnProperty && prototype.hasOwnProperty('addEventListener')) {\n var oldAddEventListener = prototype.addEventListener;\n while (oldAddEventListener._rollbarOldAdd && oldAddEventListener.belongsToShim) {\n oldAddEventListener = oldAddEventListener._rollbarOldAdd;\n }\n var addFn = function(event, callback, bubble) {\n oldAddEventListener.call(this, event, handler.wrap(callback), bubble);\n };\n addFn._rollbarOldAdd = oldAddEventListener;\n addFn.belongsToShim = shim;\n prototype.addEventListener = addFn;\n\n var oldRemoveEventListener = prototype.removeEventListener;\n while (oldRemoveEventListener._rollbarOldRemove && oldRemoveEventListener.belongsToShim) {\n oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;\n }\n var removeFn = function(event, callback, bubble) {\n oldRemoveEventListener.call(this, event, callback && callback._rollbar_wrapped || callback, bubble);\n };\n removeFn._rollbarOldRemove = oldRemoveEventListener;\n removeFn.belongsToShim = shim;\n prototype.removeEventListener = removeFn;\n }\n}\n\nmodule.exports = wrapGlobals;\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction raw(payload, jsonBackup) {\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction selectFrames(frames, range) {\n var len = frames.length;\n if (len > range * 2) {\n return frames.slice(0, range).concat(frames.slice(len - range));\n }\n return frames;\n}\n\nfunction truncateFrames(payload, jsonBackup, range) {\n range = (typeof range === 'undefined') ? 30 : range;\n var body = payload.data.body;\n var frames;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n frames = chain[i].frames;\n frames = selectFrames(frames, range);\n chain[i].frames = frames;\n }\n } else if (body.trace) {\n frames = body.trace.frames;\n frames = selectFrames(frames, range);\n body.trace.frames = frames;\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction maybeTruncateValue(len, val) {\n if (!val) {\n return val;\n }\n if (val.length > len) {\n return val.slice(0, len - 3).concat('...');\n }\n return val;\n}\n\nfunction truncateStrings(len, payload, jsonBackup) {\n function truncator(k, v, seen) {\n switch (_.typeName(v)) {\n case 'string':\n return maybeTruncateValue(len, v);\n case 'object':\n case 'array':\n return traverse(v, truncator, seen);\n default:\n return v;\n }\n }\n payload = traverse(payload, truncator);\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction truncateTraceData(traceData) {\n if (traceData.exception) {\n delete traceData.exception.description;\n traceData.exception.message = maybeTruncateValue(255, traceData.exception.message);\n }\n traceData.frames = selectFrames(traceData.frames, 1);\n return traceData;\n}\n\nfunction minBody(payload, jsonBackup) {\n var body = payload.data.body;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n chain[i] = truncateTraceData(chain[i]);\n }\n } else if (body.trace) {\n body.trace = truncateTraceData(body.trace);\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction needsTruncation(payload, maxSize) {\n return _.maxByteSize(payload) > maxSize;\n}\n\nfunction truncate(payload, jsonBackup, maxSize) {\n maxSize = (typeof maxSize === 'undefined') ? (512 * 1024) : maxSize;\n var strategies = [\n raw,\n truncateFrames,\n truncateStrings.bind(null, 1024),\n truncateStrings.bind(null, 512),\n truncateStrings.bind(null, 256),\n minBody\n ];\n var strategy, results, result;\n\n while ((strategy = strategies.shift())) {\n results = strategy(payload, jsonBackup);\n payload = results[0];\n result = results[1];\n if (result.error || !needsTruncation(result.value, maxSize)) {\n return result;\n }\n }\n return result;\n}\n\nmodule.exports = {\n truncate: truncate,\n\n /* for testing */\n raw: raw,\n truncateFrames: truncateFrames,\n truncateStrings: truncateStrings,\n maybeTruncateValue: maybeTruncateValue\n};\n"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/rollbar.min.js b/dist/rollbar.min.js index 12ad9de5a..f1e3ea575 100644 --- a/dist/rollbar.min.js +++ b/dist/rollbar.min.js @@ -1 +1 @@ -!function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=6)}([function(t,e,r){"use strict";var n=r(11),o={};function i(t,e){return e===s(t)}function s(t){var e=typeof t;return"object"!==e?e:t?t instanceof Error?"error":{}.toString.call(t).match(/\s([a-zA-Z]+)/)[1].toLowerCase():"null"}function a(t){return i(t,"function")}function u(t){var e=Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?"),r=RegExp("^"+e+"$");return c(t)&&r.test(t)}function c(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function l(){var t=y();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var r=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?r:7&r|8).toString(16)}))}var p={strictMode:!1,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};function f(t,e){var r,n;try{r=o.stringify(t)}catch(o){if(e&&a(e))try{r=e(t)}catch(t){n=t}else n=o}return{error:n,value:r}}function h(t,e){return function(r,n){try{e(r,n)}catch(e){t.error(e)}}}function d(t){return function t(e,r){var n,o,a,u={};try{for(o in e)(n=e[o])&&(i(n,"object")||i(n,"array"))?r.includes(n)?u[o]="Removed circular reference: "+s(n):((a=r.slice()).push(n),u[o]=t(n,a)):u[o]=n}catch(t){u="Failed cloning custom data: "+t.message}return u}(t,[t])}var m=["log","network","dom","navigation","error","manual"],g=["critical","error","warning","info","debug"];function v(t,e){for(var r=0;ra)?(s=e.path,e.path=s.substring(0,a)+i+"&"+s.substring(a+1)):-1!==u?(s=e.path,e.path=s.substring(0,u)+i+s.substring(u)):e.path=e.path+i},createItem:function(t,e,r,n,o){for(var i,a,u,c,p,f,m=[],g=[],v=0,b=t.length;v0&&(u||(u=d({})),u.extraArgs=d(m));var k={message:i,err:a,custom:u,timestamp:y(),callback:c,notifier:r,diagnostic:{},uuid:l()};return function(t,e){e&&void 0!==e.level&&(t.level=e.level,delete e.level);e&&void 0!==e.skipFrames&&(t.skipFrames=e.skipFrames,delete e.skipFrames)}(k,u),n&&p&&(k.request=p),o&&(k.lambdaContext=o),k._originalArgs=t,k.diagnostic.original_arg_types=g,k},addErrorContext:function(t,e){var r=t.data.custom||{},o=!1;try{for(var i=0;i2){var o=n.slice(0,3),i=o[2].indexOf("/");-1!==i&&(o[2]=o[2].substring(0,i));r=o.concat("0000:0000:0000:0000:0000").join(":")}}else r=null}catch(t){r=null}else r=null;t.user_ip=r}},formatArgsAsString:function(t){var e,r,n,o=[];for(e=0,r=t.length;e500&&(n=n.substr(0,497)+"...");break;case"null":n="null";break;case"undefined":n="undefined";break;case"symbol":n=n.toString()}o.push(n)}return o.join(" ")},formatUrl:function(t,e){if(!(e=e||t.protocol)&&t.port&&(80===t.port?e="http:":443===t.port&&(e="https:")),e=e||"https:",!t.hostname)return null;var r=e+"//"+t.hostname;return t.port&&(r=r+":"+t.port),t.path&&(r+=t.path),r},get:function(t,e){if(t){var r=e.split("."),n=t;try{for(var o=0,i=r.length;o=1&&r>e}function s(t,e,r,n,o,i,s){var a=null;return r&&(r=new Error(r)),r||n||(a=function(t,e,r,n,o){var i,s=e.environment||e.payload&&e.payload.environment;i=o?"item per minute limit reached, ignoring errors until timeout":"maxItems has been hit, ignoring errors until reset.";var a={body:{message:{body:i,extra:{maxItems:r,itemsPerMinute:n}}},language:"javascript",environment:s,notifier:{version:e.notifier&&e.notifier.version||e.version}};"browser"===t?(a.platform="browser",a.framework="browser-js",a.notifier.name="rollbar-browser-js"):"server"===t?(a.framework=e.framework||"node-js",a.notifier.name=e.notifier.name):"react-native"===t&&(a.framework=e.framework||"react-native",a.notifier.name=e.notifier.name);return a}(t,e,o,i,s)),{error:r,shouldSend:n,payload:a}}o.globalSettings={startTime:n.now(),maxItems:void 0,itemsPerMinute:void 0},o.prototype.configureGlobal=function(t){void 0!==t.startTime&&(o.globalSettings.startTime=t.startTime),void 0!==t.maxItems&&(o.globalSettings.maxItems=t.maxItems),void 0!==t.itemsPerMinute&&(o.globalSettings.itemsPerMinute=t.itemsPerMinute)},o.prototype.shouldSend=function(t,e){var r=(e=e||n.now())-this.startTime;(r<0||r>=6e4)&&(this.startTime=e,this.perMinCounter=0);var a=o.globalSettings.maxItems,u=o.globalSettings.itemsPerMinute;if(i(t,a,this.counter))return s(this.platform,this.platformOptions,a+" max items reached",!1);if(i(t,u,this.perMinCounter))return s(this.platform,this.platformOptions,u+" items per minute reached",!1);this.counter++,this.perMinCounter++;var c=!i(t,a,this.counter),l=c;return c=c&&!i(t,u,this.perMinCounter),s(this.platform,this.platformOptions,null,c,a,u,l)},o.prototype.setPlatformOptions=function(t,e){this.platform=t,this.platformOptions=e},t.exports=o},function(t,e,r){"use strict";var n=Object.prototype.hasOwnProperty,o=Object.prototype.toString,i=function(t){if(!t||"[object Object]"!==o.call(t))return!1;var e,r=n.call(t,"constructor"),i=t.constructor&&t.constructor.prototype&&n.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!r&&!i)return!1;for(e in t);return void 0===e||n.call(t,e)};t.exports=function t(){var e,r,n,o,s,a={},u=null,c=arguments.length;for(e=0;ethis.options.maxRetries&&(o=!1))}o?this._retryApiRequest(e,r):r(t)},o.prototype._retryApiRequest=function(t,e){this.retryQueue.push({item:t,callback:e}),this.retryHandle||(this.retryHandle=setInterval(function(){for(;this.retryQueue.length;){var t=this.retryQueue.shift();this._makeApiRequest(t.item,t.callback)}}.bind(this),this.options.retryInterval))},o.prototype._dequeuePendingRequest=function(t){var e=this.pendingRequests.indexOf(t);-1!==e&&(this.pendingRequests.splice(e,1),this._maybeCallWait())},o.prototype._maybeLog=function(t,e){if(this.logger&&this.options.verbose){var r=e;if(r=(r=r||n.get(t,"body.trace.exception.message"))||n.get(t,"body.trace_chain.0.exception.message"))return void this.logger.error(r);(r=n.get(t,"body.message.body"))&&this.logger.log(r)}},o.prototype._maybeCallWait=function(){return!(!n.isFunction(this.waitCallback)||0!==this.pendingItems.length||0!==this.pendingRequests.length)&&(this.waitIntervalID&&(this.waitIntervalID=clearInterval(this.waitIntervalID)),this.waitCallback(),!0)},t.exports=o},function(t,e,r){"use strict";var n=r(0);function o(t,e){this.queue=t,this.options=e,this.transforms=[],this.diagnostic={}}o.prototype.configure=function(t){this.queue&&this.queue.configure(t);var e=this.options;return this.options=n.merge(e,t),this},o.prototype.addTransform=function(t){return n.isFunction(t)&&this.transforms.push(t),this},o.prototype.log=function(t,e){if(e&&n.isFunction(e)||(e=function(){}),!this.options.enabled)return e(new Error("Rollbar is not enabled"));this.queue.addPendingItem(t);var r=t.err;this._applyTransforms(t,function(n,o){if(n)return this.queue.removePendingItem(t),e(n,null);this.queue.addItem(o,e,r,t)}.bind(this))},o.prototype._applyTransforms=function(t,e){var r=-1,n=this.transforms.length,o=this.transforms,i=this.options,s=function(t,a){t?e(t,null):++r!==n?o[r](a,i,s):e(null,a)};s(null,t)},t.exports=o},function(t,e,r){"use strict";var n=r(0),o=r(15),i={hostname:"api.rollbar.com",path:"/api/1/item/",search:null,version:"1",protocol:"https:",port:443};function s(t,e,r,n,o){this.options=t,this.transport=e,this.url=r,this.truncation=n,this.jsonBackup=o,this.accessToken=t.accessToken,this.transportOptions=a(t,r)}function a(t,e){return o.getTransportFromOptions(t,i,e)}s.prototype.postItem=function(t,e){var r=o.transportOptions(this.transportOptions,"POST"),n=o.buildPayload(this.accessToken,t,this.jsonBackup),i=this;setTimeout((function(){i.transport.post(i.accessToken,r,n,e)}),0)},s.prototype.buildJsonPayload=function(t,e){var r,i=o.buildPayload(this.accessToken,t,this.jsonBackup);return(r=this.truncation?this.truncation.truncate(i):n.stringify(i)).error?(e&&e(r.error),null):r.value},s.prototype.postJsonPayload=function(t,e){var r=o.transportOptions(this.transportOptions,"POST");this.transport.postJsonPayload(this.accessToken,r,t,e)},s.prototype.configure=function(t){var e=this.oldOptions;return this.options=n.merge(e,t),this.transportOptions=a(this.options,this.url),void 0!==this.options.accessToken&&(this.accessToken=this.options.accessToken),this},t.exports=s},function(t,e,r){"use strict";var n=r(0);t.exports={buildPayload:function(t,e,r){if(!n.isType(e.context,"string")){var o=n.stringify(e.context,r);o.error?e.context="Error: could not serialize 'context'":e.context=o.value||"",e.context.length>255&&(e.context=e.context.substr(0,255))}return{access_token:t,data:e}},getTransportFromOptions:function(t,e,r){var n=e.hostname,o=e.protocol,i=e.port,s=e.path,a=e.search,u=t.timeout,c=function(t){var e="undefined"!=typeof window&&window||"undefined"!=typeof self&&self,r=t.defaultTransport||"xhr";void 0===e.fetch&&(r="xhr");void 0===e.XMLHttpRequest&&(r="fetch");return r}(t),l=t.proxy;if(t.endpoint){var p=r.parse(t.endpoint);n=p.hostname,o=p.protocol,i=p.port,s=p.pathname,a=p.search}return{timeout:u,hostname:n,protocol:o,port:i,path:s,search:a,proxy:l,transport:c}},transportOptions:function(t,e){var r=t.protocol||"https:",n=t.port||("http:"===r?80:"https:"===r?443:void 0),o=t.hostname,i=t.path,s=t.timeout,a=t.transport;return t.search&&(i+=t.search),t.proxy&&(i=r+"//"+o+i,o=t.proxy.host||t.proxy.hostname,n=t.proxy.port,r=t.proxy.protocol||r),{timeout:s,protocol:r,hostname:o,path:i,port:n,method:e,transport:a}},appendPathToPath:function(t,e){var r=/\/$/.test(t),n=/^\//.test(e);return r&&n?e=e.substring(1):r||n||(e="/"+e),t+e}}},function(t,e){!function(t){"use strict";t.console||(t.console={});for(var e,r,n=t.console,o=function(){},i=["memory"],s="assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(",");e=i.pop();)n[e]||(n[e]={});for(;r=s.pop();)n[r]||(n[r]=o)}("undefined"==typeof window?this:window)},function(t,e,r){"use strict";var n={ieVersion:function(){if("undefined"!=typeof document){for(var t=3,e=document.createElement("div"),r=e.getElementsByTagName("i");e.innerHTML="\x3c!--[if gt IE "+ ++t+"]>4?t:void 0}}};t.exports=n},function(t,e,r){"use strict";function n(t,e,r,n){t._rollbarWrappedError&&(n[4]||(n[4]=t._rollbarWrappedError),n[5]||(n[5]=t._rollbarWrappedError._rollbarContext),t._rollbarWrappedError=null);var o=e.handleUncaughtException.apply(e,n);r&&r.apply(t,n),"anonymous"===o&&(e.anonymousErrorsPending+=1)}t.exports={captureUncaughtExceptions:function(t,e,r){if(t){var o;if("function"==typeof e._rollbarOldOnError)o=e._rollbarOldOnError;else if(t.onerror){for(o=t.onerror;o._rollbarOldOnError;)o=o._rollbarOldOnError;e._rollbarOldOnError=o}e.handleAnonymousErrors();var i=function(){var r=Array.prototype.slice.call(arguments,0);n(t,e,o,r)};r&&(i._rollbarOldOnError=o),t.onerror=i}},captureUnhandledRejections:function(t,e,r){if(t){"function"==typeof t._rollbarURH&&t._rollbarURH.belongsToShim&&t.removeEventListener("unhandledrejection",t._rollbarURH);var n=function(t){var r,n,o;try{r=t.reason}catch(t){r=void 0}try{n=t.promise}catch(t){n="[unhandledrejection] error getting `promise` from event"}try{o=t.detail,!r&&o&&(r=o.reason,n=o.promise)}catch(t){}r||(r="[unhandledrejection] error getting `reason` from event"),e&&e.handleUnhandledRejection&&e.handleUnhandledRejection(r,n)};n.belongsToShim=r,t._rollbarURH=n,t.addEventListener("unhandledrejection",n)}}}},function(t,e,r){"use strict";var n=r(0),o=r(20),i=r(21);function s(t){this.truncation=t}s.prototype.get=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){}),n.addParamsAndAccessTokenToPath(t,e,r);var s=n.formatUrl(e);this._makeZoneRequest(t,s,"GET",null,o,i,e.timeout,e.transport)},s.prototype.post=function(t,e,r,o,i){if(o&&n.isFunction(o)||(o=function(){}),!r)return o(new Error("Cannot send empty request"));var s;if((s=this.truncation?this.truncation.truncate(r):n.stringify(r)).error)return o(s.error);var a=s.value,u=n.formatUrl(e);this._makeZoneRequest(t,u,"POST",a,o,i,e.timeout,e.transport)},s.prototype.postJsonPayload=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){});var s=n.formatUrl(e);this._makeZoneRequest(t,s,"POST",r,o,i,e.timeout,e.transport)},s.prototype._makeZoneRequest=function(){var t="undefined"!=typeof window&&window||void 0!==o&&o,e=t&&t.Zone&&t.Zone.current,r=Array.prototype.slice.call(arguments);if(e&&"angular"===e._name){var n=e._parent,o=this;n.run((function(){o._makeRequest.apply(void 0,r)}))}else this._makeRequest.apply(void 0,r)},s.prototype._makeRequest=function(t,e,r,n,s,a,u,c){if("undefined"!=typeof RollbarProxy)return function(t,e){(new RollbarProxy).sendJsonPayload(t,(function(t){}),(function(t){e(new Error(t))}))}(n,s);"fetch"===c?o(t,e,r,n,s,u):i(t,e,r,n,s,a,u)},t.exports=s},function(t,e,r){"use strict";var n=r(1),o=r(0);t.exports=function(t,e,r,i,s,a){var u,c;o.isFiniteNumber(a)&&(u=new AbortController,c=setTimeout((function(){u.abort()}),a)),fetch(e,{method:r,headers:{"Content-Type":"application/json","X-Rollbar-Access-Token":t,signal:u&&u.signal},body:i}).then((function(t){return c&&clearTimeout(c),t.json()})).then((function(t){s(null,t)})).catch((function(t){n.error(t.message),s(t)}))}},function(t,e,r){"use strict";var n=r(0),o=r(1);function i(t,e){var r=new Error(t);return r.code=e||"ENOTFOUND",r}t.exports=function(t,e,r,s,a,u,c){var l;if(!(l=u?u():function(){var t,e,r=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],n=r.length;for(e=0;e=400&&t.status<600}(l)){if(403===l.status){var e=t.value&&t.value.message;o.error(e)}a(new Error(String(l.status)))}else{a(i("XHR response had no status code (likely connection failure)"))}}}catch(t){var r;r=t&&t.stack?t:new Error(t),a(r)}var s};l.open(r,e,!0),l.setRequestHeader&&(l.setRequestHeader("Content-Type","application/json"),l.setRequestHeader("X-Rollbar-Access-Token",t)),n.isFiniteNumber(c)&&(l.timeout=c),l.onreadystatechange=p,l.send(s)}catch(t){if("undefined"!=typeof XDomainRequest){if(!window||!window.location)return a(new Error("No window available during request, unknown environment"));"http:"===window.location.href.substring(0,5)&&"https"===e.substring(0,5)&&(e="http"+e.substring(5));var f=new XDomainRequest;f.onprogress=function(){},f.ontimeout=function(){a(i("Request timed out","ETIMEDOUT"))},f.onerror=function(){a(new Error("Error during request"))},f.onload=function(){var t=n.jsonParse(f.responseText);a(t.error,t.value)},f.open(r,e,!0),f.send(s)}else a(new Error("Cannot find a method to transport a request"))}}catch(t){a(t)}}},function(t,e,r){"use strict";var n=r(0),o=r(3),i=r(1);function s(t,e,r){var o=t.message,i=t.custom;o||(o="Item sent with null or missing arguments.");var s={body:o};i&&(s.extra=n.merge(i)),n.set(t,"data.body",{message:s}),r(null,t)}function a(t){var e=t.stackInfo.stack;return e&&0===e.length&&t._unhandledStackInfo&&t._unhandledStackInfo.stack&&(e=t._unhandledStackInfo.stack),e}function u(t,e,r){var i=t&&t.data.description,s=t&&t.custom,u=a(t),l=o.guessErrorClass(e.message),p={exception:{class:c(e,l[0],r),message:l[1]}};if(i&&(p.exception.description=i),u){var f,h,d,m,g,v,y,b;for(0===u.length&&(p.exception.stack=e.rawStack,p.exception.raw=String(e.rawException)),p.frames=[],y=0;y0&&n.set(e,"data.request",i),o(null,e)}},addClientInfo:function(t){return function(e,r,o){if(!t)return o(null,e);var i=t.navigator||{},s=t.screen||{};n.set(e,"data.client",{runtime_ms:e.timestamp-t._rollbarStartTime,timestamp:Math.round(e.timestamp/1e3),javascript:{browser:i.userAgent,language:i.language,cookie_enabled:i.cookieEnabled,screen:{width:s.width,height:s.height}}}),o(null,e)}},addPluginInfo:function(t){return function(e,r,o){if(!t||!t.navigator)return o(null,e);for(var i,s=[],a=t.navigator.plugins||[],u=0,c=a.length;u-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));var r=e.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),n=r.match(/ (\(.+\)$)/);r=n?r.replace(n[0],""):r;var o=this.extractLocation(n?n[1]:r),i=n&&r||void 0,s=["eval",""].indexOf(o[0])>-1?void 0:o[0];return new t({functionName:i,fileName:s,lineNumber:o[1],columnNumber:o[2],source:e})}),this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter((function(t){return!t.match(n)}),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 t({functionName:e});var r=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(r),o=n&&n[1]?n[1]:void 0,i=this.extractLocation(e.replace(r,""));return new t({functionName:o,fileName:i[0],lineNumber:i[1],columnNumber:i[2],source:e})}),this)},parseOpera:function(t){return!t.stacktrace||t.message.indexOf("\n")>-1&&t.message.split("\n").length>t.stacktrace.split("\n").length?this.parseOpera9(t):t.stack?this.parseOpera11(t):this.parseOpera10(t)},parseOpera9:function(e){for(var r=/Line (\d+).*script (?:in )?(\S+)/i,n=e.message.split("\n"),o=[],i=2,s=n.length;i/,"$2").replace(/\([^)]*\)/g,"")||void 0;i.match(/\(([^)]*)\)/)&&(r=i.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var a=void 0===r||"[arguments not available]"===r?void 0:r.split(",");return new t({functionName:s,args:a,fileName:o[0],lineNumber:o[1],columnNumber:o[2],source:e})}),this)}}})?n.apply(e,o):n)||(t.exports=i)}()},function(t,e,r){var n,o,i;!function(r,s){"use strict";o=[],void 0===(i="function"==typeof(n=function(){function t(t){return t.charAt(0).toUpperCase()+t.substring(1)}function e(t){return function(){return this[t]}}var r=["isConstructor","isEval","isNative","isToplevel"],n=["columnNumber","lineNumber"],o=["fileName","functionName","source"],i=r.concat(n,o,["args"],["evalOrigin"]);function s(e){if(e)for(var r=0;ro&&(i=this.queue.length-o),this.maxQueueSize=o,this.queue.splice(0,i)},o.prototype.copyEvents=function(){var t=Array.prototype.slice.call(this.queue,0);if(n.isFunction(this.options.filterTelemetry))try{for(var e=t.length;e--;)this.options.filterTelemetry(t[e])&&t.splice(e,1)}catch(t){this.options.filterTelemetry=null}return t},o.prototype.capture=function(t,e,r,o,s){var a={level:i(t,r),type:t,timestamp_ms:s||n.now(),body:e,source:"client"};o&&(a.uuid=o);try{if(n.isFunction(this.options.filterTelemetry)&&this.options.filterTelemetry(a))return!1}catch(t){this.options.filterTelemetry=null}return this.push(a),a},o.prototype.captureEvent=function(t,e,r,n){return this.capture(t,e,r,n)},o.prototype.captureError=function(t,e,r,n){var o={message:t.message||String(t)};return t.stack&&(o.stack=t.stack),this.capture("error",o,e,r,n)},o.prototype.captureLog=function(t,e,r,n){return this.capture("log",{message:t},e,r,n)},o.prototype.captureNetwork=function(t,e,r,n){e=e||"xhr",t.subtype=t.subtype||e,n&&(t.request=n);var o=this.levelFromStatus(t.status_code);return this.capture("network",t,o,r)},o.prototype.levelFromStatus=function(t){return t>=200&&t<400?"info":0===t||t>=400?"error":"info"},o.prototype.captureDom=function(t,e,r,n,o){var i={subtype:t,element:e};return void 0!==r&&(i.value=r),void 0!==n&&(i.checked=n),this.capture("dom",i,"info",o)},o.prototype.captureNavigation=function(t,e,r){return this.capture("navigation",{from:t,to:e},"info",r)},o.prototype.captureDomContentLoaded=function(t){return this.capture("navigation",{subtype:"DOMContentLoaded"},"info",void 0,t&&t.getTime())},o.prototype.captureLoad=function(t){return this.capture("navigation",{subtype:"load"},"info",void 0,t&&t.getTime())},o.prototype.captureConnectivityChange=function(t,e){return this.captureNetwork({change:t},"connectivity",e)},o.prototype._captureRollbarItem=function(t){if(this.options.includeItemsInTelemetry)return t.err?this.captureError(t.err,t.level,t.uuid,t.timestamp):t.message?this.captureLog(t.message,t.level,t.uuid,t.timestamp):t.custom?this.capture("log",t.custom,t.level,t.uuid,t.timestamp):void 0},o.prototype.push=function(t){this.queue.push(t),this.queue.length>this.maxQueueSize&&this.queue.shift()},t.exports=o},function(t,e,r){"use strict";var n=r(0),o=r(32),i=r(4),s=r(2),a=r(33),u={network:!0,networkResponseHeaders:!1,networkResponseBody:!1,networkRequestHeaders:!1,networkRequestBody:!1,networkErrorOnHttp5xx:!1,networkErrorOnHttp4xx:!1,networkErrorOnHttp0:!1,log:!0,dom:!0,navigation:!0,connectivity:!0,contentSecurityPolicy:!0,errorOnContentSecurityPolicy:!1};function c(t,e,r,n,o){var i=t[e];t[e]=r(i),n&&n[o].push([t,e,i])}function l(t,e){for(var r;t[e].length;)(r=t[e].shift())[0][r[1]]=r[2]}function p(t,e,r,o,i){this.options=t;var s=t.autoInstrument;!1===t.enabled||!1===s?this.autoInstrument={}:(n.isType(s,"object")||(s=u),this.autoInstrument=n.merge(u,s)),this.scrubTelemetryInputs=!!t.scrubTelemetryInputs,this.telemetryScrubber=t.telemetryScrubber,this.defaultValueScrubber=function(t){for(var e=[],r=0;r3)){i.__rollbar_xhr.end_time_ms=n.now();var e=null;if(i.__rollbar_xhr.response_content_type=i.getResponseHeader("Content-Type"),t.autoInstrument.networkResponseHeaders){var r=t.autoInstrument.networkResponseHeaders;e={};try{var s,a;if(!0===r){var u=i.getAllResponseHeaders();if(u){var c,l,p=u.trim().split(/[\r\n]+/);for(a=0;a=500&&this.autoInstrument.networkErrorOnHttp5xx||e>=400&&this.autoInstrument.networkErrorOnHttp4xx||0===e&&this.autoInstrument.networkErrorOnHttp0){var r=new Error("HTTP request failed with Status "+e);r.stack=t.stack,this.rollbar.error(r,{skipFrames:1})}},p.prototype.deinstrumentConsole=function(){if("console"in this._window&&this._window.console.log)for(var t;this.replacements.log.length;)t=this.replacements.log.shift(),this._window.console[t[0]]=t[1]},p.prototype.instrumentConsole=function(){if("console"in this._window&&this._window.console.log){var t=this,e=this._window.console,r=["debug","info","warn","error","log"];try{for(var o=0,i=r.length;o=0&&t.options[t.selectedIndex]&&this.captureDomEvent("input",t,t.options[t.selectedIndex].value)},p.prototype.captureDomEvent=function(t,e,r,n){if(void 0!==r)if(this.scrubTelemetryInputs||"password"===a.getElementType(e))r="[scrubbed]";else{var o=a.describeElement(e);this.telemetryScrubber?this.telemetryScrubber(o)&&(r="[scrubbed]"):this.defaultValueScrubber(o)&&(r="[scrubbed]")}var i=a.elementArrayToString(a.treeToArray(e));this.telemeter.captureDom(t,i,r,n)},p.prototype.deinstrumentNavigation=function(){var t=this._window.chrome;!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState&&l(this.replacements,"navigation")},p.prototype.instrumentNavigation=function(){var t=this._window.chrome;if(!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState){var e=this;c(this._window,"onpopstate",(function(t){return function(){var r=e._location.href;e.handleUrlChange(e._lastHref,r),t&&t.apply(this,arguments)}}),this.replacements,"navigation"),c(this._window.history,"pushState",(function(t){return function(){var r=arguments.length>2?arguments[2]:void 0;return r&&e.handleUrlChange(e._lastHref,r+""),t.apply(this,arguments)}}),this.replacements,"navigation")}},p.prototype.handleUrlChange=function(t,e){var r=s.parse(this._location.href),n=s.parse(e),o=s.parse(t);this._lastHref=e,r.protocol===n.protocol&&r.host===n.host&&(e=n.path+(n.hash||"")),r.protocol===o.protocol&&r.host===o.host&&(t=o.path+(o.hash||"")),this.telemeter.captureNavigation(t,e)},p.prototype.deinstrumentConnectivity=function(){("addEventListener"in this._window||"body"in this._document)&&(this._window.addEventListener?this.removeListeners("connectivity"):l(this.replacements,"connectivity"))},p.prototype.instrumentConnectivity=function(){if("addEventListener"in this._window||"body"in this._document)if(this._window.addEventListener)this.addListener("connectivity",this._window,"online",void 0,function(){this.telemeter.captureConnectivityChange("online")}.bind(this),!0),this.addListener("connectivity",this._window,"offline",void 0,function(){this.telemeter.captureConnectivityChange("offline")}.bind(this),!0);else{var t=this;c(this._document.body,"ononline",(function(e){return function(){t.telemeter.captureConnectivityChange("online"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity"),c(this._document.body,"onoffline",(function(e){return function(){t.telemeter.captureConnectivityChange("offline"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity")}},p.prototype.handleCspEvent=function(t){var e="Security Policy Violation: blockedURI: "+t.blockedURI+", violatedDirective: "+t.violatedDirective+", effectiveDirective: "+t.effectiveDirective+", ";t.sourceFile&&(e+="location: "+t.sourceFile+", line: "+t.lineNumber+", col: "+t.columnNumber+", "),e+="originalPolicy: "+t.originalPolicy,this.telemeter.captureLog(e,"error"),this.handleCspError(e)},p.prototype.handleCspError=function(t){this.autoInstrument.errorOnContentSecurityPolicy&&this.rollbar.error(t)},p.prototype.deinstrumentContentSecurityPolicy=function(){"addEventListener"in this._document&&this.removeListeners("contentsecuritypolicy")},p.prototype.instrumentContentSecurityPolicy=function(){if("addEventListener"in this._document){var t=this.handleCspEvent.bind(this);this.addListener("contentsecuritypolicy",this._document,"securitypolicyviolation",null,t,!1)}},p.prototype.addListener=function(t,e,r,n,o,i){e.addEventListener?(e.addEventListener(r,o,i),this.eventRemovers[t].push((function(){e.removeEventListener(r,o,i)}))):n&&(e.attachEvent(n,o),this.eventRemovers[t].push((function(){e.detachEvent(n,o)})))},p.prototype.removeListeners=function(t){for(;this.eventRemovers[t].length;)this.eventRemovers[t].shift()()},t.exports=p},function(t,e,r){"use strict";function n(t){return"string"!=typeof t&&(t=String(t)),t.toLowerCase()}function o(t){this.map={},t instanceof o?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}o.prototype.append=function(t,e){t=n(t),e=function(t){return"string"!=typeof t&&(t=String(t)),t}(e);var r=this.map[t];this.map[t]=r?r+", "+e:e},o.prototype.get=function(t){return t=n(t),this.has(t)?this.map[t]:null},o.prototype.has=function(t){return this.map.hasOwnProperty(n(t))},o.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},o.prototype.entries=function(){var t=[];return this.forEach((function(e,r){t.push([r,e])})),function(t){return{next:function(){var e=t.shift();return{done:void 0===e,value:e}}}}(t)},t.exports=function(t){return"undefined"==typeof Headers?new o(t):new Headers(t)}},function(t,e,r){"use strict";function n(t){return(t.getAttribute("type")||"").toLowerCase()}function o(t){if(!t||!t.tagName)return"";var e=[t.tagName];t.id&&e.push("#"+t.id),t.classes&&e.push("."+t.classes.join("."));for(var r=0;r=0;a--){if(e=o(t[a]),r=s+i.length*n+e.length,a=83){i.unshift("...");break}i.unshift(e),s+=e.length}return i.join(" > ")},treeToArray:function(t){for(var e,r=[],n=0;t&&n<5&&"html"!==(e=i(t)).tagName;n++)r.unshift(e),t=t.parentNode;return r},getElementFromEvent:function(t,e){return t.target?t.target:e&&e.elementFromPoint?e.elementFromPoint(t.clientX,t.clientY):void 0},isDescribedElement:function(t,e,r){if(t.tagName.toLowerCase()!==e.toLowerCase())return!1;if(!r)return!0;t=n(t);for(var o=0;o2*e?t.slice(0,e).concat(t.slice(r-e)):t}function a(t,e,r){r=void 0===r?30:r;var o,i=t.data.body;if(i.trace_chain)for(var a=i.trace_chain,u=0;ut?e.slice(0,t-3).concat("..."):e}function c(t,e,r){return[e=o(e,(function e(r,i,s){switch(n.typeName(i)){case"string":return u(t,i);case"object":case"array":return o(i,e,s);default:return i}})),n.stringify(e,r)]}function l(t){return t.exception&&(delete t.exception.description,t.exception.message=u(255,t.exception.message)),t.frames=s(t.frames,1),t}function p(t,e){var r=t.data.body;if(r.trace_chain)for(var o=r.trace_chain,i=0;ie}t.exports={truncate:function(t,e,r){r=void 0===r?524288:r;for(var n,o,s,u=[i,a,c.bind(null,1024),c.bind(null,512),c.bind(null,256),p];n=u.shift();)if(t=(o=n(t,e))[0],(s=o[1]).error||!f(s.value,r))return s;return s},raw:i,truncateFrames:a,truncateStrings:c,maybeTruncateValue:u}}]); \ No newline at end of file +!function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=6)}([function(t,e,r){"use strict";var n=r(11),o={};function i(t,e){return e===s(t)}function s(t){var e=typeof t;return"object"!==e?e:t?t instanceof Error?"error":{}.toString.call(t).match(/\s([a-zA-Z]+)/)[1].toLowerCase():"null"}function a(t){return i(t,"function")}function u(t){var e=Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?"),r=RegExp("^"+e+"$");return c(t)&&r.test(t)}function c(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function l(){var t=y();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var r=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?r:7&r|8).toString(16)}))}var p={strictMode:!1,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};function f(t,e){var r,n;try{r=o.stringify(t)}catch(o){if(e&&a(e))try{r=e(t)}catch(t){n=t}else n=o}return{error:n,value:r}}function h(t,e){return function(r,n){try{e(r,n)}catch(e){t.error(e)}}}function d(t){return function t(e,r){var n,o,a,u={};try{for(o in e)(n=e[o])&&(i(n,"object")||i(n,"array"))?r.includes(n)?u[o]="Removed circular reference: "+s(n):((a=r.slice()).push(n),u[o]=t(n,a)):u[o]=n}catch(t){u="Failed cloning custom data: "+t.message}return u}(t,[t])}var m=["log","network","dom","navigation","error","manual"],g=["critical","error","warning","info","debug"];function v(t,e){for(var r=0;ra)?(s=e.path,e.path=s.substring(0,a)+i+"&"+s.substring(a+1)):-1!==u?(s=e.path,e.path=s.substring(0,u)+i+s.substring(u)):e.path=e.path+i},createItem:function(t,e,r,n,o){for(var i,a,u,c,p,f,m=[],g=[],v=0,b=t.length;v0&&(u||(u=d({})),u.extraArgs=d(m));var k={message:i,err:a,custom:u,timestamp:y(),callback:c,notifier:r,diagnostic:{},uuid:l()};return function(t,e){e&&void 0!==e.level&&(t.level=e.level,delete e.level);e&&void 0!==e.skipFrames&&(t.skipFrames=e.skipFrames,delete e.skipFrames)}(k,u),n&&p&&(k.request=p),o&&(k.lambdaContext=o),k._originalArgs=t,k.diagnostic.original_arg_types=g,k},addErrorContext:function(t,e){var r=t.data.custom||{},o=!1;try{for(var i=0;i2){var o=n.slice(0,3),i=o[2].indexOf("/");-1!==i&&(o[2]=o[2].substring(0,i));r=o.concat("0000:0000:0000:0000:0000").join(":")}}else r=null}catch(t){r=null}else r=null;t.user_ip=r}},formatArgsAsString:function(t){var e,r,n,o=[];for(e=0,r=t.length;e500&&(n=n.substr(0,497)+"...");break;case"null":n="null";break;case"undefined":n="undefined";break;case"symbol":n=n.toString()}o.push(n)}return o.join(" ")},formatUrl:function(t,e){if(!(e=e||t.protocol)&&t.port&&(80===t.port?e="http:":443===t.port&&(e="https:")),e=e||"https:",!t.hostname)return null;var r=e+"//"+t.hostname;return t.port&&(r=r+":"+t.port),t.path&&(r+=t.path),r},get:function(t,e){if(t){var r=e.split("."),n=t;try{for(var o=0,i=r.length;o=1&&r>e}function s(t,e,r,n,o,i,s){var a=null;return r&&(r=new Error(r)),r||n||(a=function(t,e,r,n,o){var i,s=e.environment||e.payload&&e.payload.environment;i=o?"item per minute limit reached, ignoring errors until timeout":"maxItems has been hit, ignoring errors until reset.";var a={body:{message:{body:i,extra:{maxItems:r,itemsPerMinute:n}}},language:"javascript",environment:s,notifier:{version:e.notifier&&e.notifier.version||e.version}};"browser"===t?(a.platform="browser",a.framework="browser-js",a.notifier.name="rollbar-browser-js"):"server"===t?(a.framework=e.framework||"node-js",a.notifier.name=e.notifier.name):"react-native"===t&&(a.framework=e.framework||"react-native",a.notifier.name=e.notifier.name);return a}(t,e,o,i,s)),{error:r,shouldSend:n,payload:a}}o.globalSettings={startTime:n.now(),maxItems:void 0,itemsPerMinute:void 0},o.prototype.configureGlobal=function(t){void 0!==t.startTime&&(o.globalSettings.startTime=t.startTime),void 0!==t.maxItems&&(o.globalSettings.maxItems=t.maxItems),void 0!==t.itemsPerMinute&&(o.globalSettings.itemsPerMinute=t.itemsPerMinute)},o.prototype.shouldSend=function(t,e){var r=(e=e||n.now())-this.startTime;(r<0||r>=6e4)&&(this.startTime=e,this.perMinCounter=0);var a=o.globalSettings.maxItems,u=o.globalSettings.itemsPerMinute;if(i(t,a,this.counter))return s(this.platform,this.platformOptions,a+" max items reached",!1);if(i(t,u,this.perMinCounter))return s(this.platform,this.platformOptions,u+" items per minute reached",!1);this.counter++,this.perMinCounter++;var c=!i(t,a,this.counter),l=c;return c=c&&!i(t,u,this.perMinCounter),s(this.platform,this.platformOptions,null,c,a,u,l)},o.prototype.setPlatformOptions=function(t,e){this.platform=t,this.platformOptions=e},t.exports=o},function(t,e,r){"use strict";var n=Object.prototype.hasOwnProperty,o=Object.prototype.toString,i=function(t){if(!t||"[object Object]"!==o.call(t))return!1;var e,r=n.call(t,"constructor"),i=t.constructor&&t.constructor.prototype&&n.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!r&&!i)return!1;for(e in t);return void 0===e||n.call(t,e)};t.exports=function t(){var e,r,n,o,s,a={},u=null,c=arguments.length;for(e=0;ethis.options.maxRetries&&(o=!1))}o?this._retryApiRequest(e,r):r(t)},o.prototype._retryApiRequest=function(t,e){this.retryQueue.push({item:t,callback:e}),this.retryHandle||(this.retryHandle=setInterval(function(){for(;this.retryQueue.length;){var t=this.retryQueue.shift();this._makeApiRequest(t.item,t.callback)}}.bind(this),this.options.retryInterval))},o.prototype._dequeuePendingRequest=function(t){var e=this.pendingRequests.indexOf(t);-1!==e&&(this.pendingRequests.splice(e,1),this._maybeCallWait())},o.prototype._maybeLog=function(t,e){if(this.logger&&this.options.verbose){var r=e;if(r=(r=r||n.get(t,"body.trace.exception.message"))||n.get(t,"body.trace_chain.0.exception.message"))return void this.logger.error(r);(r=n.get(t,"body.message.body"))&&this.logger.log(r)}},o.prototype._maybeCallWait=function(){return!(!n.isFunction(this.waitCallback)||0!==this.pendingItems.length||0!==this.pendingRequests.length)&&(this.waitIntervalID&&(this.waitIntervalID=clearInterval(this.waitIntervalID)),this.waitCallback(),!0)},t.exports=o},function(t,e,r){"use strict";var n=r(0);function o(t,e){this.queue=t,this.options=e,this.transforms=[],this.diagnostic={}}o.prototype.configure=function(t){this.queue&&this.queue.configure(t);var e=this.options;return this.options=n.merge(e,t),this},o.prototype.addTransform=function(t){return n.isFunction(t)&&this.transforms.push(t),this},o.prototype.log=function(t,e){if(e&&n.isFunction(e)||(e=function(){}),!this.options.enabled)return e(new Error("Rollbar is not enabled"));this.queue.addPendingItem(t);var r=t.err;this._applyTransforms(t,function(n,o){if(n)return this.queue.removePendingItem(t),e(n,null);this.queue.addItem(o,e,r,t)}.bind(this))},o.prototype._applyTransforms=function(t,e){var r=-1,n=this.transforms.length,o=this.transforms,i=this.options,s=function(t,a){t?e(t,null):++r!==n?o[r](a,i,s):e(null,a)};s(null,t)},t.exports=o},function(t,e,r){"use strict";var n=r(0),o=r(15),i={hostname:"api.rollbar.com",path:"/api/1/item/",search:null,version:"1",protocol:"https:",port:443};function s(t,e,r,n,o){this.options=t,this.transport=e,this.url=r,this.truncation=n,this.jsonBackup=o,this.accessToken=t.accessToken,this.transportOptions=a(t,r)}function a(t,e){return o.getTransportFromOptions(t,i,e)}s.prototype.postItem=function(t,e){var r=o.transportOptions(this.transportOptions,"POST"),n=o.buildPayload(this.accessToken,t,this.jsonBackup),i=this;setTimeout((function(){i.transport.post(i.accessToken,r,n,e)}),0)},s.prototype.buildJsonPayload=function(t,e){var r,i=o.buildPayload(this.accessToken,t,this.jsonBackup);return(r=this.truncation?this.truncation.truncate(i):n.stringify(i)).error?(e&&e(r.error),null):r.value},s.prototype.postJsonPayload=function(t,e){var r=o.transportOptions(this.transportOptions,"POST");this.transport.postJsonPayload(this.accessToken,r,t,e)},s.prototype.configure=function(t){var e=this.oldOptions;return this.options=n.merge(e,t),this.transportOptions=a(this.options,this.url),void 0!==this.options.accessToken&&(this.accessToken=this.options.accessToken),this},t.exports=s},function(t,e,r){"use strict";var n=r(0);t.exports={buildPayload:function(t,e,r){if(!n.isType(e.context,"string")){var o=n.stringify(e.context,r);o.error?e.context="Error: could not serialize 'context'":e.context=o.value||"",e.context.length>255&&(e.context=e.context.substr(0,255))}return{access_token:t,data:e}},getTransportFromOptions:function(t,e,r){var n=e.hostname,o=e.protocol,i=e.port,s=e.path,a=e.search,u=t.timeout,c=function(t){var e="undefined"!=typeof window&&window||"undefined"!=typeof self&&self,r=t.defaultTransport||"xhr";void 0===e.fetch&&(r="xhr");void 0===e.XMLHttpRequest&&(r="fetch");return r}(t),l=t.proxy;if(t.endpoint){var p=r.parse(t.endpoint);n=p.hostname,o=p.protocol,i=p.port,s=p.pathname,a=p.search}return{timeout:u,hostname:n,protocol:o,port:i,path:s,search:a,proxy:l,transport:c}},transportOptions:function(t,e){var r=t.protocol||"https:",n=t.port||("http:"===r?80:"https:"===r?443:void 0),o=t.hostname,i=t.path,s=t.timeout,a=t.transport;return t.search&&(i+=t.search),t.proxy&&(i=r+"//"+o+i,o=t.proxy.host||t.proxy.hostname,n=t.proxy.port,r=t.proxy.protocol||r),{timeout:s,protocol:r,hostname:o,path:i,port:n,method:e,transport:a}},appendPathToPath:function(t,e){var r=/\/$/.test(t),n=/^\//.test(e);return r&&n?e=e.substring(1):r||n||(e="/"+e),t+e}}},function(t,e){!function(t){"use strict";t.console||(t.console={});for(var e,r,n=t.console,o=function(){},i=["memory"],s="assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(",");e=i.pop();)n[e]||(n[e]={});for(;r=s.pop();)n[r]||(n[r]=o)}("undefined"==typeof window?this:window)},function(t,e,r){"use strict";var n={ieVersion:function(){if("undefined"!=typeof document){for(var t=3,e=document.createElement("div"),r=e.getElementsByTagName("i");e.innerHTML="\x3c!--[if gt IE "+ ++t+"]>4?t:void 0}}};t.exports=n},function(t,e,r){"use strict";function n(t,e,r,n){t._rollbarWrappedError&&(n[4]||(n[4]=t._rollbarWrappedError),n[5]||(n[5]=t._rollbarWrappedError._rollbarContext),t._rollbarWrappedError=null);var o=e.handleUncaughtException.apply(e,n);r&&r.apply(t,n),"anonymous"===o&&(e.anonymousErrorsPending+=1)}t.exports={captureUncaughtExceptions:function(t,e,r){if(t){var o;if("function"==typeof e._rollbarOldOnError)o=e._rollbarOldOnError;else if(t.onerror){for(o=t.onerror;o._rollbarOldOnError;)o=o._rollbarOldOnError;e._rollbarOldOnError=o}e.handleAnonymousErrors();var i=function(){var r=Array.prototype.slice.call(arguments,0);n(t,e,o,r)};r&&(i._rollbarOldOnError=o),t.onerror=i}},captureUnhandledRejections:function(t,e,r){if(t){"function"==typeof t._rollbarURH&&t._rollbarURH.belongsToShim&&t.removeEventListener("unhandledrejection",t._rollbarURH);var n=function(t){var r,n,o;try{r=t.reason}catch(t){r=void 0}try{n=t.promise}catch(t){n="[unhandledrejection] error getting `promise` from event"}try{o=t.detail,!r&&o&&(r=o.reason,n=o.promise)}catch(t){}r||(r="[unhandledrejection] error getting `reason` from event"),e&&e.handleUnhandledRejection&&e.handleUnhandledRejection(r,n)};n.belongsToShim=r,t._rollbarURH=n,t.addEventListener("unhandledrejection",n)}}}},function(t,e,r){"use strict";var n=r(0),o=r(20),i=r(21);function s(t){this.truncation=t}s.prototype.get=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){}),n.addParamsAndAccessTokenToPath(t,e,r);var s=n.formatUrl(e);this._makeZoneRequest(t,s,"GET",null,o,i,e.timeout,e.transport)},s.prototype.post=function(t,e,r,o,i){if(o&&n.isFunction(o)||(o=function(){}),!r)return o(new Error("Cannot send empty request"));var s;if((s=this.truncation?this.truncation.truncate(r):n.stringify(r)).error)return o(s.error);var a=s.value,u=n.formatUrl(e);this._makeZoneRequest(t,u,"POST",a,o,i,e.timeout,e.transport)},s.prototype.postJsonPayload=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){});var s=n.formatUrl(e);this._makeZoneRequest(t,s,"POST",r,o,i,e.timeout,e.transport)},s.prototype._makeZoneRequest=function(){var t="undefined"!=typeof window&&window||void 0!==o&&o,e=t&&t.Zone&&t.Zone.current,r=Array.prototype.slice.call(arguments);if(e&&"angular"===e._name){var n=e._parent,o=this;n.run((function(){o._makeRequest.apply(void 0,r)}))}else this._makeRequest.apply(void 0,r)},s.prototype._makeRequest=function(t,e,r,n,s,a,u,c){if("undefined"!=typeof RollbarProxy)return function(t,e){(new RollbarProxy).sendJsonPayload(t,(function(t){}),(function(t){e(new Error(t))}))}(n,s);"fetch"===c?o(t,e,r,n,s,u):i(t,e,r,n,s,a,u)},t.exports=s},function(t,e,r){"use strict";var n=r(1),o=r(0);t.exports=function(t,e,r,i,s,a){var u,c;o.isFiniteNumber(a)&&(u=new AbortController,c=setTimeout((function(){u.abort()}),a)),fetch(e,{method:r,headers:{"Content-Type":"application/json","X-Rollbar-Access-Token":t,signal:u&&u.signal},body:i}).then((function(t){return c&&clearTimeout(c),t.json()})).then((function(t){s(null,t)})).catch((function(t){n.error(t.message),s(t)}))}},function(t,e,r){"use strict";var n=r(0),o=r(1);function i(t,e){var r=new Error(t);return r.code=e||"ENOTFOUND",r}t.exports=function(t,e,r,s,a,u,c){var l;if(!(l=u?u():function(){var t,e,r=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],n=r.length;for(e=0;e=400&&t.status<600}(l)){if(403===l.status){var e=t.value&&t.value.message;o.error(e)}a(new Error(String(l.status)))}else{a(i("XHR response had no status code (likely connection failure)"))}}}catch(t){var r;r=t&&t.stack?t:new Error(t),a(r)}var s};l.open(r,e,!0),l.setRequestHeader&&(l.setRequestHeader("Content-Type","application/json"),l.setRequestHeader("X-Rollbar-Access-Token",t)),n.isFiniteNumber(c)&&(l.timeout=c),l.onreadystatechange=p,l.send(s)}catch(t){if("undefined"!=typeof XDomainRequest){if(!window||!window.location)return a(new Error("No window available during request, unknown environment"));"http:"===window.location.href.substring(0,5)&&"https"===e.substring(0,5)&&(e="http"+e.substring(5));var f=new XDomainRequest;f.onprogress=function(){},f.ontimeout=function(){a(i("Request timed out","ETIMEDOUT"))},f.onerror=function(){a(new Error("Error during request"))},f.onload=function(){var t=n.jsonParse(f.responseText);a(t.error,t.value)},f.open(r,e,!0),f.send(s)}else a(new Error("Cannot find a method to transport a request"))}}catch(t){a(t)}}},function(t,e,r){"use strict";var n=r(0),o=r(3),i=r(1);function s(t,e,r){var o=t.message,i=t.custom;o||(o="Item sent with null or missing arguments.");var s={body:o};i&&(s.extra=n.merge(i)),n.set(t,"data.body",{message:s}),r(null,t)}function a(t){var e=t.stackInfo.stack;return e&&0===e.length&&t._unhandledStackInfo&&t._unhandledStackInfo.stack&&(e=t._unhandledStackInfo.stack),e}function u(t,e,r){var i=t&&t.data.description,s=t&&t.custom,u=a(t),l=o.guessErrorClass(e.message),p={exception:{class:c(e,l[0],r),message:l[1]}};if(i&&(p.exception.description=i),u){var f,h,d,m,g,v,y,b;for(0===u.length&&(p.exception.stack=e.rawStack,p.exception.raw=String(e.rawException)),p.frames=[],y=0;y0&&n.set(e,"data.request",i),o(null,e)}},addClientInfo:function(t){return function(e,r,o){if(!t)return o(null,e);var i=t.navigator||{},s=t.screen||{};n.set(e,"data.client",{runtime_ms:e.timestamp-t._rollbarStartTime,timestamp:Math.round(e.timestamp/1e3),javascript:{browser:i.userAgent,language:i.language,cookie_enabled:i.cookieEnabled,screen:{width:s.width,height:s.height}}}),o(null,e)}},addPluginInfo:function(t){return function(e,r,o){if(!t||!t.navigator)return o(null,e);for(var i,s=[],a=t.navigator.plugins||[],u=0,c=a.length;u-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));var r=e.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),n=r.match(/ (\(.+\)$)/);r=n?r.replace(n[0],""):r;var o=this.extractLocation(n?n[1]:r),i=n&&r||void 0,s=["eval",""].indexOf(o[0])>-1?void 0:o[0];return new t({functionName:i,fileName:s,lineNumber:o[1],columnNumber:o[2],source:e})}),this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter((function(t){return!t.match(n)}),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 t({functionName:e});var r=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(r),o=n&&n[1]?n[1]:void 0,i=this.extractLocation(e.replace(r,""));return new t({functionName:o,fileName:i[0],lineNumber:i[1],columnNumber:i[2],source:e})}),this)},parseOpera:function(t){return!t.stacktrace||t.message.indexOf("\n")>-1&&t.message.split("\n").length>t.stacktrace.split("\n").length?this.parseOpera9(t):t.stack?this.parseOpera11(t):this.parseOpera10(t)},parseOpera9:function(e){for(var r=/Line (\d+).*script (?:in )?(\S+)/i,n=e.message.split("\n"),o=[],i=2,s=n.length;i/,"$2").replace(/\([^)]*\)/g,"")||void 0;i.match(/\(([^)]*)\)/)&&(r=i.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var a=void 0===r||"[arguments not available]"===r?void 0:r.split(",");return new t({functionName:s,args:a,fileName:o[0],lineNumber:o[1],columnNumber:o[2],source:e})}),this)}}})?n.apply(e,o):n)||(t.exports=i)}()},function(t,e,r){var n,o,i;!function(r,s){"use strict";o=[],void 0===(i="function"==typeof(n=function(){function t(t){return t.charAt(0).toUpperCase()+t.substring(1)}function e(t){return function(){return this[t]}}var r=["isConstructor","isEval","isNative","isToplevel"],n=["columnNumber","lineNumber"],o=["fileName","functionName","source"],i=r.concat(n,o,["args"],["evalOrigin"]);function s(e){if(e)for(var r=0;ro&&(i=this.queue.length-o),this.maxQueueSize=o,this.queue.splice(0,i)},o.prototype.copyEvents=function(){var t=Array.prototype.slice.call(this.queue,0);if(n.isFunction(this.options.filterTelemetry))try{for(var e=t.length;e--;)this.options.filterTelemetry(t[e])&&t.splice(e,1)}catch(t){this.options.filterTelemetry=null}return t},o.prototype.capture=function(t,e,r,o,s){var a={level:i(t,r),type:t,timestamp_ms:s||n.now(),body:e,source:"client"};o&&(a.uuid=o);try{if(n.isFunction(this.options.filterTelemetry)&&this.options.filterTelemetry(a))return!1}catch(t){this.options.filterTelemetry=null}return this.push(a),a},o.prototype.captureEvent=function(t,e,r,n){return this.capture(t,e,r,n)},o.prototype.captureError=function(t,e,r,n){var o={message:t.message||String(t)};return t.stack&&(o.stack=t.stack),this.capture("error",o,e,r,n)},o.prototype.captureLog=function(t,e,r,n){return this.capture("log",{message:t},e,r,n)},o.prototype.captureNetwork=function(t,e,r,n){e=e||"xhr",t.subtype=t.subtype||e,n&&(t.request=n);var o=this.levelFromStatus(t.status_code);return this.capture("network",t,o,r)},o.prototype.levelFromStatus=function(t){return t>=200&&t<400?"info":0===t||t>=400?"error":"info"},o.prototype.captureDom=function(t,e,r,n,o){var i={subtype:t,element:e};return void 0!==r&&(i.value=r),void 0!==n&&(i.checked=n),this.capture("dom",i,"info",o)},o.prototype.captureNavigation=function(t,e,r){return this.capture("navigation",{from:t,to:e},"info",r)},o.prototype.captureDomContentLoaded=function(t){return this.capture("navigation",{subtype:"DOMContentLoaded"},"info",void 0,t&&t.getTime())},o.prototype.captureLoad=function(t){return this.capture("navigation",{subtype:"load"},"info",void 0,t&&t.getTime())},o.prototype.captureConnectivityChange=function(t,e){return this.captureNetwork({change:t},"connectivity",e)},o.prototype._captureRollbarItem=function(t){if(this.options.includeItemsInTelemetry)return t.err?this.captureError(t.err,t.level,t.uuid,t.timestamp):t.message?this.captureLog(t.message,t.level,t.uuid,t.timestamp):t.custom?this.capture("log",t.custom,t.level,t.uuid,t.timestamp):void 0},o.prototype.push=function(t){this.queue.push(t),this.queue.length>this.maxQueueSize&&this.queue.shift()},t.exports=o},function(t,e,r){"use strict";var n=r(0),o=r(32),i=r(4),s=r(2),a=r(33),u={network:!0,networkResponseHeaders:!1,networkResponseBody:!1,networkRequestHeaders:!1,networkRequestBody:!1,networkErrorOnHttp5xx:!1,networkErrorOnHttp4xx:!1,networkErrorOnHttp0:!1,log:!0,dom:!0,navigation:!0,connectivity:!0,contentSecurityPolicy:!0,errorOnContentSecurityPolicy:!1};function c(t,e,r,n,o){var i=t[e];t[e]=r(i),n&&n[o].push([t,e,i])}function l(t,e){for(var r;t[e].length;)(r=t[e].shift())[0][r[1]]=r[2]}function p(t,e,r,o,i){this.options=t;var s=t.autoInstrument;!1===t.enabled||!1===s?this.autoInstrument={}:(n.isType(s,"object")||(s=u),this.autoInstrument=n.merge(u,s)),this.scrubTelemetryInputs=!!t.scrubTelemetryInputs,this.telemetryScrubber=t.telemetryScrubber,this.defaultValueScrubber=function(t){for(var e=[],r=0;r3)){i.__rollbar_xhr.end_time_ms=n.now();var e=null;if(i.__rollbar_xhr.response_content_type=i.getResponseHeader("Content-Type"),t.autoInstrument.networkResponseHeaders){var r=t.autoInstrument.networkResponseHeaders;e={};try{var s,a;if(!0===r){var u=i.getAllResponseHeaders();if(u){var c,l,p=u.trim().split(/[\r\n]+/);for(a=0;a=500&&this.autoInstrument.networkErrorOnHttp5xx||e>=400&&this.autoInstrument.networkErrorOnHttp4xx||0===e&&this.autoInstrument.networkErrorOnHttp0){var r=new Error("HTTP request failed with Status "+e);r.stack=t.stack,this.rollbar.error(r,{skipFrames:1})}},p.prototype.deinstrumentConsole=function(){if("console"in this._window&&this._window.console.log)for(var t;this.replacements.log.length;)t=this.replacements.log.shift(),this._window.console[t[0]]=t[1]},p.prototype.instrumentConsole=function(){if("console"in this._window&&this._window.console.log){var t=this,e=this._window.console,r=["debug","info","warn","error","log"];try{for(var o=0,i=r.length;o=0&&t.options[t.selectedIndex]&&this.captureDomEvent("input",t,t.options[t.selectedIndex].value)},p.prototype.captureDomEvent=function(t,e,r,n){if(void 0!==r)if(this.scrubTelemetryInputs||"password"===a.getElementType(e))r="[scrubbed]";else{var o=a.describeElement(e);this.telemetryScrubber?this.telemetryScrubber(o)&&(r="[scrubbed]"):this.defaultValueScrubber(o)&&(r="[scrubbed]")}var i=a.elementArrayToString(a.treeToArray(e));this.telemeter.captureDom(t,i,r,n)},p.prototype.deinstrumentNavigation=function(){var t=this._window.chrome;!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState&&l(this.replacements,"navigation")},p.prototype.instrumentNavigation=function(){var t=this._window.chrome;if(!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState){var e=this;c(this._window,"onpopstate",(function(t){return function(){var r=e._location.href;e.handleUrlChange(e._lastHref,r),t&&t.apply(this,arguments)}}),this.replacements,"navigation"),c(this._window.history,"pushState",(function(t){return function(){var r=arguments.length>2?arguments[2]:void 0;return r&&e.handleUrlChange(e._lastHref,r+""),t.apply(this,arguments)}}),this.replacements,"navigation")}},p.prototype.handleUrlChange=function(t,e){var r=s.parse(this._location.href),n=s.parse(e),o=s.parse(t);this._lastHref=e,r.protocol===n.protocol&&r.host===n.host&&(e=n.path+(n.hash||"")),r.protocol===o.protocol&&r.host===o.host&&(t=o.path+(o.hash||"")),this.telemeter.captureNavigation(t,e)},p.prototype.deinstrumentConnectivity=function(){("addEventListener"in this._window||"body"in this._document)&&(this._window.addEventListener?this.removeListeners("connectivity"):l(this.replacements,"connectivity"))},p.prototype.instrumentConnectivity=function(){if("addEventListener"in this._window||"body"in this._document)if(this._window.addEventListener)this.addListener("connectivity",this._window,"online",void 0,function(){this.telemeter.captureConnectivityChange("online")}.bind(this),!0),this.addListener("connectivity",this._window,"offline",void 0,function(){this.telemeter.captureConnectivityChange("offline")}.bind(this),!0);else{var t=this;c(this._document.body,"ononline",(function(e){return function(){t.telemeter.captureConnectivityChange("online"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity"),c(this._document.body,"onoffline",(function(e){return function(){t.telemeter.captureConnectivityChange("offline"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity")}},p.prototype.handleCspEvent=function(t){var e="Security Policy Violation: blockedURI: "+t.blockedURI+", violatedDirective: "+t.violatedDirective+", effectiveDirective: "+t.effectiveDirective+", ";t.sourceFile&&(e+="location: "+t.sourceFile+", line: "+t.lineNumber+", col: "+t.columnNumber+", "),e+="originalPolicy: "+t.originalPolicy,this.telemeter.captureLog(e,"error"),this.handleCspError(e)},p.prototype.handleCspError=function(t){this.autoInstrument.errorOnContentSecurityPolicy&&this.rollbar.error(t)},p.prototype.deinstrumentContentSecurityPolicy=function(){"addEventListener"in this._document&&this.removeListeners("contentsecuritypolicy")},p.prototype.instrumentContentSecurityPolicy=function(){if("addEventListener"in this._document){var t=this.handleCspEvent.bind(this);this.addListener("contentsecuritypolicy",this._document,"securitypolicyviolation",null,t,!1)}},p.prototype.addListener=function(t,e,r,n,o,i){e.addEventListener?(e.addEventListener(r,o,i),this.eventRemovers[t].push((function(){e.removeEventListener(r,o,i)}))):n&&(e.attachEvent(n,o),this.eventRemovers[t].push((function(){e.detachEvent(n,o)})))},p.prototype.removeListeners=function(t){for(;this.eventRemovers[t].length;)this.eventRemovers[t].shift()()},t.exports=p},function(t,e,r){"use strict";function n(t){return"string"!=typeof t&&(t=String(t)),t.toLowerCase()}function o(t){this.map={},t instanceof o?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}o.prototype.append=function(t,e){t=n(t),e=function(t){return"string"!=typeof t&&(t=String(t)),t}(e);var r=this.map[t];this.map[t]=r?r+", "+e:e},o.prototype.get=function(t){return t=n(t),this.has(t)?this.map[t]:null},o.prototype.has=function(t){return this.map.hasOwnProperty(n(t))},o.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},o.prototype.entries=function(){var t=[];return this.forEach((function(e,r){t.push([r,e])})),function(t){return{next:function(){var e=t.shift();return{done:void 0===e,value:e}}}}(t)},t.exports=function(t){return"undefined"==typeof Headers?new o(t):new Headers(t)}},function(t,e,r){"use strict";function n(t){return(t.getAttribute("type")||"").toLowerCase()}function o(t){if(!t||!t.tagName)return"";var e=[t.tagName];t.id&&e.push("#"+t.id),t.classes&&e.push("."+t.classes.join("."));for(var r=0;r=0;a--){if(e=o(t[a]),r=s+i.length*n+e.length,a=83){i.unshift("...");break}i.unshift(e),s+=e.length}return i.join(" > ")},treeToArray:function(t){for(var e,r=[],n=0;t&&n<5&&"html"!==(e=i(t)).tagName;n++)r.unshift(e),t=t.parentNode;return r},getElementFromEvent:function(t,e){return t.target?t.target:e&&e.elementFromPoint?e.elementFromPoint(t.clientX,t.clientY):void 0},isDescribedElement:function(t,e,r){if(t.tagName.toLowerCase()!==e.toLowerCase())return!1;if(!r)return!0;t=n(t);for(var o=0;o2*e?t.slice(0,e).concat(t.slice(r-e)):t}function a(t,e,r){r=void 0===r?30:r;var o,i=t.data.body;if(i.trace_chain)for(var a=i.trace_chain,u=0;ut?e.slice(0,t-3).concat("..."):e}function c(t,e,r){return[e=o(e,(function e(r,i,s){switch(n.typeName(i)){case"string":return u(t,i);case"object":case"array":return o(i,e,s);default:return i}})),n.stringify(e,r)]}function l(t){return t.exception&&(delete t.exception.description,t.exception.message=u(255,t.exception.message)),t.frames=s(t.frames,1),t}function p(t,e){var r=t.data.body;if(r.trace_chain)for(var o=r.trace_chain,i=0;ie}t.exports={truncate:function(t,e,r){r=void 0===r?524288:r;for(var n,o,s,u=[i,a,c.bind(null,1024),c.bind(null,512),c.bind(null,256),p];n=u.shift();)if(t=(o=n(t,e))[0],(s=o[1]).error||!f(s.value,r))return s;return s},raw:i,truncateFrames:a,truncateStrings:c,maybeTruncateValue:u}}]); \ No newline at end of file diff --git a/dist/rollbar.named-amd.js b/dist/rollbar.named-amd.js index 8cc2b7dae..03138240a 100644 --- a/dist/rollbar.named-amd.js +++ b/dist/rollbar.named-amd.js @@ -4695,7 +4695,7 @@ module.exports = { module.exports = { - version: '2.26.2', + version: '2.26.3', endpoint: 'api.rollbar.com/api/1/item/', logLevel: 'debug', reportLevel: 'debug', @@ -5147,7 +5147,9 @@ Instrumenter.prototype.instrumentNetwork = function() { var xhrp = this._window.XMLHttpRequest.prototype; replace(xhrp, 'open', function(orig) { return function(method, url) { - if (_.isType(url, 'string')) { + var isUrlObject = _isUrlObject(url) + if (_.isType(url, 'string') || isUrlObject) { + url = isUrlObject ? url.toString() : url; if (this.__rollbar_xhr) { this.__rollbar_xhr.method = method; this.__rollbar_xhr.url = url; @@ -5310,8 +5312,9 @@ Instrumenter.prototype.instrumentNetwork = function() { var input = args[0]; var method = 'GET'; var url; - if (_.isType(input, 'string')) { - url = input; + var isUrlObject = _isUrlObject(input) + if (_.isType(input, 'string') || isUrlObject) { + url = isUrlObject ? input.toString() : input; } else if (input) { url = input.url; if (input.method) { @@ -5738,6 +5741,10 @@ Instrumenter.prototype.removeListeners = function(section) { } }; +function _isUrlObject(input) { + return typeof URL !== 'undefined' && input instanceof URL +} + module.exports = Instrumenter; diff --git a/dist/rollbar.named-amd.js.map b/dist/rollbar.named-amd.js.map index f31ae5620..9ad41e0fd 100644 --- a/dist/rollbar.named-amd.js.map +++ b/dist/rollbar.named-amd.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://rollbar/webpack/bootstrap","webpack://rollbar/./src/utility.js","webpack://rollbar/./src/browser/logger.js","webpack://rollbar/./src/browser/url.js","webpack://rollbar/./src/errorParser.js","webpack://rollbar/./src/scrub.js","webpack://rollbar/./src/utility/traverse.js","webpack://rollbar/./src/browser/bundles/rollbar.js","webpack://rollbar/./src/browser/rollbar.js","webpack://rollbar/./src/browser/core.js","webpack://rollbar/./src/rollbar.js","webpack://rollbar/./src/rateLimiter.js","webpack://rollbar/./src/merge.js","webpack://rollbar/./src/queue.js","webpack://rollbar/./src/notifier.js","webpack://rollbar/./src/api.js","webpack://rollbar/./src/apiUtility.js","webpack://rollbar/./node_modules/console-polyfill/index.js","webpack://rollbar/./src/browser/detection.js","webpack://rollbar/./src/browser/globalSetup.js","webpack://rollbar/./src/browser/transport.js","webpack://rollbar/./src/browser/transport/fetch.js","webpack://rollbar/./src/browser/transport/xhr.js","webpack://rollbar/./src/browser/transforms.js","webpack://rollbar/./node_modules/error-stack-parser/error-stack-parser.js","webpack://rollbar/./node_modules/error-stack-parser/node_modules/stackframe/stackframe.js","webpack://rollbar/./src/transforms.js","webpack://rollbar/./src/browser/predicates.js","webpack://rollbar/./src/predicates.js","webpack://rollbar/./src/defaults.js","webpack://rollbar/./src/browser/defaults/scrubFields.js","webpack://rollbar/./src/telemetry.js","webpack://rollbar/./src/browser/telemetry.js","webpack://rollbar/./src/utility/headers.js","webpack://rollbar/./src/browser/domUtility.js","webpack://rollbar/./src/utility/polyfillJSON.js","webpack://rollbar/./vendor/JSON-js/json3.js","webpack://rollbar/./src/browser/wrapGlobals.js","webpack://rollbar/./src/truncation.js"],"names":[],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;AClFa;;AAEb,YAAY,mBAAO,CAAC,EAAS;;AAE7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,OAAO;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,EAAE;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,mCAAmC,OAAO;AAC1C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,iBAAiB,YAAY;AAC7B;AACA,qBAAqB;AACrB;AACA,KAAK,wBAAwB;AAC7B;AACA,KAAK,yBAAyB;AAC9B;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kCAAkC,OAAO;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,SAAS;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,kCAAkC,OAAO;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,SAAS,UAAU,YAAY,GAAG;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,aAAa;AAChC;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5wBa;;AAEb;AACA,mBAAO,CAAC,EAAkB;AAC1B,gBAAgB,mBAAO,CAAC,EAAa;AACrC,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;AC3Ca;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;AChFa;;AAEb,uBAAuB,mBAAO,CAAC,EAAoB;;AAEnD;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;;AAEA,sBAAsB,wBAAwB;AAC9C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,eAAe;AACf;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7Ha;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,eAAe,mBAAO,CAAC,CAAoB;;AAE3C;AACA;;AAEA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,WAAW;AAC9B;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC9Fa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,kBAAkB;;AAElB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,eAAe,gBAAgB;AAC/B;AACA;AACA;;AAEA,yBAAyB;AACzB;AACA,aAAa,iBAAiB;AAC9B;A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ACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,0BAA0B,sBAAsB;AAChD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,oCAAoC,SAAS;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,eAAe,mBAAO,CAAC,EAAa;AACpC,kBAAkB,mBAAO,CAAC,EAAwB;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACxjBa;;AAEb,kBAAkB,mBAAO,CAAC,EAAe;AACzC,YAAY,mBAAO,CAAC,EAAS;AAC7B,eAAe,mBAAO,CAAC,EAAY;AACnC,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,6EAA6E,UAAU;AACvF,yFAAyF,UAAU;;AAEnG;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,6BAA6B;AAC7B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACnRa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AChJa;;AAEb;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA,WAAW,YAAY;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACvDa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wDAAwD,WAAW;AACnE;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,QAAQ;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,aAAa,8BAA8B;AAC3C;AACA;AACA;AACA;AACA,+CAA+C,SAAS;AACxD;AACA;AACA,cAAc;AACd;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,SAAS;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,+BAA+B;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC7Qa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACxHa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,cAAc,mBAAO,CAAC,EAAc;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;AC5Ga;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACzGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;AClBY;;AAEb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;AC/Ba;;AAEb;AACA,gBAAgB,QAAQ;AACxB;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;;AAEA;AACA,gBAAgB,QAAQ;;AAExB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;;;;;;;AClGa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,uBAAuB,mBAAO,CAAC,EAAmB;AAClD,qBAAqB,mBAAO,CAAC,EAAiB;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC/Ha;;AAEb,aAAa,mBAAO,CAAC,CAAW;AAChC,QAAQ,mBAAO,CAAC,CAAe;;AAE/B;AACA;AACA;;AAEA;AACA;AACA,wCAAwC,mBAAmB;AAC3D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;;AAEA;;;;;;;;ACpCa;;AAEb;;AAEA,QAAQ,mBAAO,CAAC,CAAe;AAC/B,aAAa,mBAAO,CAAC,CAAW;;AAEhC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AChKa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,kBAAkB,mBAAO,CAAC,CAAgB;AAC1C,aAAa,mBAAO,CAAC,CAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,OAAO;AAC7C;AACA,oBAAoB,6CAA6C;AACjE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,4BAA4B,gBAAgB;AAC5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,sBAAsB;AACvC;AACA;AACA;;AAEA,4BAA4B,oBAAoB;AAChD;AACA;;AAEA;AACA;;AAEA;AACA;AACA,8BAA8B,aAAa;AAC3C;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,kBAAkB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACnVA;AACA;AACA;;AAEA;AACA,QAAQ,IAA0C;AAClD,QAAQ,iCAA6B,CAAC,uBAAY,CAAC,oCAAE,OAAO;AAAA;AAAA;AAAA,oGAAC;AAC7D,KAAK,MAAM,EAIN;AACL,CAAC;AACD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,MAAM;AACzB,oBAAoB,MAAM;AAC1B;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA,CAAC;;;;;;;ACzMD;AACA;AACA;;AAEA;AACA,QAAQ,IAA0C;AAClD,QAAQ,iCAAqB,EAAE,oCAAE,OAAO;AAAA;AAAA;AAAA,oGAAC;AACzC,KAAK,MAAM,EAIN;AACL,CAAC;AACD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,wBAAwB;AAC3C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA,CAAC;;;;;;;;AC9IY;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,sBAAsB;AAC1D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,8BAA8B;AAC9B;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5Ja;;AAEb,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;ACba;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe;;AAEf;;AAEA,uCAAuC,eAAe;;AAEtD;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA;;AAEA,wCAAwC,eAAe;;AAEvD,mBAAmB,gBAAgB;AACnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,SAAS;AAC1B;;AAEA,mBAAmB,qBAAqB;AACxC;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClMa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACVa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5Da;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qCAAqC,mBAAmB;AACxD;;AAEA;AACA,qCAAqC,4BAA4B;AACjE;AACA;AACA,8BAA8B,4BAA4B;AAC1D;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD;AACA;AACA,8BAA8B,gBAAgB;AAC9C;AACA;;AAEA;AACA,8BAA8B,aAAa;AAC3C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AClLa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,cAAc,mBAAO,CAAC,EAAoB;AAC1C,YAAY,mBAAO,CAAC,CAAU;AAC9B,gBAAgB,mBAAO,CAAC,CAAO;AAC/B,cAAc,mBAAO,CAAC,EAAc;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gDAAgD,aAAa;AAC7D;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B,mBAAmB,qBAAqB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,6BAA6B,0BAA0B;AACvD;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA,iBAAiB;AACjB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,eAAe,0BAA0B;AACzC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB;;AAEjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,SAAS;AAC9C;AACA;AACA,GAAG;AACH,yCAAyC;AACzC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,gDAAgD,QAAQ;;AAExD;AACA;;AAEA;AACA,gDAAgD,QAAQ;;AAExD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACtwBa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;AC/Fa;;AAEb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,6BAA6B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,4BAA4B,QAAQ;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,4BAA4B;AAC7C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,uBAAuB;AACpC;AACA;AACA;AACA,2BAA2B,sBAAsB;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnIa;;AAEb,mBAAmB,mBAAO,CAAC,EAA4B;;AAEvD;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB;AACpB;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,yCAAyC,iBAAiB;AAC1D,8BAA8B,kBAAkB;;AAEhD,yCAAyC,iBAAiB;AAC1D,sCAAsC,6BAA6B;;AAEnE;AACA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,wBAAwB;AACxB,+CAA+C,EAAE;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;;AAGA;;AAEA;;AAEA,UAAU;AACV,UAAU;AACV,UAAU;AACV;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA,qBAAqB,YAAY;AACjC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,qBAAqB,YAAY;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,eAAe;AACf;AACA,cAAc,wDAAwD;AACtE,cAAc,0BAA0B;AACxC;AACA;AACA;AACA;;AAEA;;AAEA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,mBAAmB,WAAW;AAC9B;AACA;;AAEA;;AAEA,OAAO;AACP;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,sBAAsB,UAAU;AAChC;AACA;;;AAGA;;AAEA;AACA;;AAEA;AACA;;AAEA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB,oBAAoB;AACpB,cAAc;AACd,gBAAgB;AAChB,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,UAAU;AACV;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,WAAW;AACX;AACA,wBAAwB,gDAAgD;AACxE;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,SAAS;AACT,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,WAAW;AACX;AACA,wBAAwB,gDAAgD;AACxE;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,sCAAsC,EAAE;AACxC;AACA;AACA;AACA,SAAS;AACT;;AAEA;;AAEA;AACA;;AAEA;AACA,+CAA+C,yGAAyG,EAAE;;AAE1J;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,SAAS;AACT;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE,UAAU;AACvB;AACA;AACA,KAAK;AACL;AACA;;AAEA;;;;;;;;AC1vBa;;AAEb;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,aAAa,oBAAoB;AACjC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC1Ca;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,eAAe,mBAAO,CAAC,CAAoB;;AAE3C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA","file":"rollbar.named-amd.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n","'use strict';\n\nvar merge = require('./merge');\n\nvar RollbarJSON = {};\nfunction setupJSON(polyfillJSON) {\n if (isFunction(RollbarJSON.stringify) && isFunction(RollbarJSON.parse)) {\n return;\n }\n\n if (isDefined(JSON)) {\n // If polyfill is provided, prefer it over existing non-native shims.\n if(polyfillJSON) {\n if (isNativeFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isNativeFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n } else { // else accept any interface that is present.\n if (isFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n }\n }\n if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {\n polyfillJSON && polyfillJSON(RollbarJSON);\n }\n}\n\n/*\n * isType - Given a Javascript value and a string, returns true if the type of the value matches the\n * given string.\n *\n * @param x - any value\n * @param t - a lowercase string containing one of the following type names:\n * - undefined\n * - null\n * - error\n * - number\n * - boolean\n * - string\n * - symbol\n * - function\n * - object\n * - array\n * @returns true if x is of type t, otherwise false\n */\nfunction isType(x, t) {\n return t === typeName(x);\n}\n\n/*\n * typeName - Given a Javascript value, returns the type of the object as a string\n */\nfunction typeName(x) {\n var name = typeof x;\n if (name !== 'object') {\n return name;\n }\n if (!x) {\n return 'null';\n }\n if (x instanceof Error) {\n return 'error';\n }\n return ({}).toString.call(x).match(/\\s([a-zA-Z]+)/)[1].toLowerCase();\n}\n\n/* isFunction - a convenience function for checking if a value is a function\n *\n * @param f - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isFunction(f) {\n return isType(f, 'function');\n}\n\n/* isNativeFunction - a convenience function for checking if a value is a native JS function\n *\n * @param f - any value\n * @returns true if f is a native JS function, otherwise false\n */\nfunction isNativeFunction(f) {\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n var funcMatchString = Function.prototype.toString.call(Object.prototype.hasOwnProperty)\n .replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?');\n var reIsNative = RegExp('^' + funcMatchString + '$');\n return isObject(f) && reIsNative.test(f);\n}\n\n/* isObject - Checks if the argument is an object\n *\n * @param value - any value\n * @returns true is value is an object function is an object)\n*/\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/* isString - Checks if the argument is a string\n *\n * @param value - any value\n * @returns true if value is a string\n*/\nfunction isString(value) {\n return typeof value === 'string' || value instanceof String\n}\n\n/**\n * isFiniteNumber - determines whether the passed value is a finite number\n *\n * @param {*} n - any value\n * @returns true if value is a finite number\n */\n function isFiniteNumber(n) {\n return Number.isFinite(n);\n}\n\n/*\n * isDefined - a convenience function for checking if a value is not equal to undefined\n *\n * @param u - any value\n * @returns true if u is anything other than undefined\n */\nfunction isDefined(u) {\n return !isType(u, 'undefined');\n}\n\n/*\n * isIterable - convenience function for checking if a value can be iterated, essentially\n * whether it is an object or an array.\n *\n * @param i - any value\n * @returns true if i is an object or an array as determined by `typeName`\n */\nfunction isIterable(i) {\n var type = typeName(i);\n return (type === 'object' || type === 'array');\n}\n\n/*\n * isError - convenience function for checking if a value is of an error type\n *\n * @param e - any value\n * @returns true if e is an error\n */\nfunction isError(e) {\n // Detect both Error and Firefox Exception type\n return isType(e, 'error') || isType(e, 'exception');\n}\n\n/* isPromise - a convenience function for checking if a value is a promise\n *\n * @param p - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isPromise(p) {\n return isObject(p) && isType(p.then, 'function');\n}\n\nfunction redact() {\n return '********';\n}\n\n// from http://stackoverflow.com/a/8809472/1138191\nfunction uuid4() {\n var d = now();\n var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n var r = (d + Math.random() * 16) % 16 | 0;\n d = Math.floor(d / 16);\n return (c === 'x' ? r : (r & 0x7 | 0x8)).toString(16);\n });\n return uuid;\n}\n\nvar LEVELS = {\n debug: 0,\n info: 1,\n warning: 2,\n error: 3,\n critical: 4\n};\n\nfunction sanitizeUrl(url) {\n var baseUrlParts = parseUri(url);\n if (!baseUrlParts) {\n return '(unknown)';\n }\n\n // remove a trailing # if there is no anchor\n if (baseUrlParts.anchor === '') {\n baseUrlParts.source = baseUrlParts.source.replace('#', '');\n }\n\n url = baseUrlParts.source.replace('?' + baseUrlParts.query, '');\n return url;\n}\n\nvar parseUriOptions = {\n strictMode: false,\n key: [\n 'source',\n 'protocol',\n 'authority',\n 'userInfo',\n 'user',\n 'password',\n 'host',\n 'port',\n 'relative',\n 'path',\n 'directory',\n 'file',\n 'query',\n 'anchor'\n ],\n q: {\n name: 'queryKey',\n parser: /(?:^|&)([^&=]*)=?([^&]*)/g\n },\n parser: {\n strict: /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n loose: /^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/\n }\n};\n\nfunction parseUri(str) {\n if (!isType(str, 'string')) {\n return undefined;\n }\n\n var o = parseUriOptions;\n var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);\n var uri = {};\n\n for (var i = 0, l = o.key.length; i < l; ++i) {\n uri[o.key[i]] = m[i] || '';\n }\n\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) {\n uri[o.q.name][$1] = $2;\n }\n });\n\n return uri;\n}\n\nfunction addParamsAndAccessTokenToPath(accessToken, options, params) {\n params = params || {};\n params.access_token = accessToken;\n var paramsArray = [];\n var k;\n for (k in params) {\n if (Object.prototype.hasOwnProperty.call(params, k)) {\n paramsArray.push([k, params[k]].join('='));\n }\n }\n var query = '?' + paramsArray.sort().join('&');\n\n options = options || {};\n options.path = options.path || '';\n var qs = options.path.indexOf('?');\n var h = options.path.indexOf('#');\n var p;\n if (qs !== -1 && (h === -1 || h > qs)) {\n p = options.path;\n options.path = p.substring(0,qs) + query + '&' + p.substring(qs+1);\n } else {\n if (h !== -1) {\n p = options.path;\n options.path = p.substring(0,h) + query + p.substring(h);\n } else {\n options.path = options.path + query;\n }\n }\n}\n\nfunction formatUrl(u, protocol) {\n protocol = protocol || u.protocol;\n if (!protocol && u.port) {\n if (u.port === 80) {\n protocol = 'http:';\n } else if (u.port === 443) {\n protocol = 'https:';\n }\n }\n protocol = protocol || 'https:';\n\n if (!u.hostname) {\n return null;\n }\n var result = protocol + '//' + u.hostname;\n if (u.port) {\n result = result + ':' + u.port;\n }\n if (u.path) {\n result = result + u.path;\n }\n return result;\n}\n\nfunction stringify(obj, backup) {\n var value, error;\n try {\n value = RollbarJSON.stringify(obj);\n } catch (jsonError) {\n if (backup && isFunction(backup)) {\n try {\n value = backup(obj);\n } catch (backupError) {\n error = backupError;\n }\n } else {\n error = jsonError;\n }\n }\n return {error: error, value: value};\n}\n\nfunction maxByteSize(string) {\n // The transport will use utf-8, so assume utf-8 encoding.\n //\n // This minimal implementation will accurately count bytes for all UCS-2 and\n // single code point UTF-16. If presented with multi code point UTF-16,\n // which should be rare, it will safely overcount, not undercount.\n //\n // While robust utf-8 encoders exist, this is far smaller and far more performant.\n // For quickly counting payload size for truncation, smaller is better.\n\n var count = 0;\n var length = string.length;\n\n for (var i = 0; i < length; i++) {\n var code = string.charCodeAt(i);\n if (code < 128) { // up to 7 bits\n count = count + 1;\n } else if (code < 2048) { // up to 11 bits\n count = count + 2;\n } else if (code < 65536) { // up to 16 bits\n count = count + 3;\n }\n }\n\n return count;\n}\n\nfunction jsonParse(s) {\n var value, error;\n try {\n value = RollbarJSON.parse(s);\n } catch (e) {\n error = e;\n }\n return {error: error, value: value};\n}\n\nfunction makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n mode,\n backupMessage,\n errorParser\n) {\n var location = {\n url: url || '',\n line: lineno,\n column: colno\n };\n location.func = errorParser.guessFunctionName(location.url, location.line);\n location.context = errorParser.gatherContext(location.url, location.line);\n var href = typeof document !== 'undefined' && document && document.location && document.location.href;\n var useragent = typeof window !== 'undefined' && window && window.navigator && window.navigator.userAgent;\n return {\n 'mode': mode,\n 'message': error ? String(error) : (message || backupMessage),\n 'url': href,\n 'stack': [location],\n 'useragent': useragent\n };\n}\n\nfunction wrapCallback(logger, f) {\n return function(err, resp) {\n try {\n f(err, resp);\n } catch (e) {\n logger.error(e);\n }\n };\n}\n\nfunction nonCircularClone(obj) {\n var seen = [obj];\n\n function clone(obj, seen) {\n var value, name, newSeen, result = {};\n\n try {\n for (name in obj) {\n value = obj[name];\n\n if (value && (isType(value, 'object') || isType(value, 'array'))) {\n if (seen.includes(value)) {\n result[name] = 'Removed circular reference: ' + typeName(value);\n } else {\n newSeen = seen.slice();\n newSeen.push(value);\n result[name] = clone(value, newSeen);\n }\n continue;\n }\n\n result[name] = value;\n }\n } catch (e) {\n result = 'Failed cloning custom data: ' + e.message;\n }\n return result;\n }\n return clone(obj, seen);\n}\n\nfunction createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\n var diagnostic = {};\n var argTypes = [];\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n argTypes.push(typ);\n switch (typ) {\n case 'undefined':\n break;\n case 'string':\n message ? extraArgs.push(arg) : message = arg;\n break;\n case 'function':\n callback = wrapCallback(logger, arg);\n break;\n case 'date':\n extraArgs.push(arg);\n break;\n case 'error':\n case 'domexception':\n case 'exception': // Firefox Exception type\n err ? extraArgs.push(arg) : err = arg;\n break;\n case 'object':\n case 'array':\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n if (requestKeys && typ === 'object' && !request) {\n for (var j = 0, len = requestKeys.length; j < len; ++j) {\n if (arg[requestKeys[j]] !== undefined) {\n request = arg;\n break;\n }\n }\n if (request) {\n break;\n }\n }\n custom ? extraArgs.push(arg) : custom = arg;\n break;\n default:\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n extraArgs.push(arg);\n }\n }\n\n // if custom is an array this turns it into an object with integer keys\n if (custom) custom = nonCircularClone(custom);\n\n if (extraArgs.length > 0) {\n if (!custom) custom = nonCircularClone({});\n custom.extraArgs = nonCircularClone(extraArgs);\n }\n\n var item = {\n message: message,\n err: err,\n custom: custom,\n timestamp: now(),\n callback: callback,\n notifier: notifier,\n diagnostic: diagnostic,\n uuid: uuid4()\n };\n\n setCustomItemKeys(item, custom);\n\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n item.diagnostic.original_arg_types = argTypes;\n return item;\n}\n\nfunction setCustomItemKeys(item, custom) {\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (custom && custom.skipFrames !== undefined) {\n item.skipFrames = custom.skipFrames;\n delete custom.skipFrames;\n }\n}\n\nfunction addErrorContext(item, errors) {\n var custom = item.data.custom || {};\n var contextAdded = false;\n\n try {\n for (var i = 0; i < errors.length; ++i) {\n if (errors[i].hasOwnProperty('rollbarContext')) {\n custom = merge(custom, nonCircularClone(errors[i].rollbarContext));\n contextAdded = true;\n }\n }\n\n // Avoid adding an empty object to the data.\n if (contextAdded) {\n item.data.custom = custom;\n }\n } catch (e) {\n item.diagnostic.error_context = 'Failed: ' + e.message;\n }\n}\n\nvar TELEMETRY_TYPES = ['log', 'network', 'dom', 'navigation', 'error', 'manual'];\nvar TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];\n\nfunction arrayIncludes(arr, val) {\n for (var k = 0; k < arr.length; ++k) {\n if (arr[k] === val) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction createTelemetryEvent(args) {\n var type, metadata, level;\n var arg;\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n switch (typ) {\n case 'string':\n if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {\n type = arg;\n } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {\n level = arg;\n }\n break;\n case 'object':\n metadata = arg;\n break;\n default:\n break;\n }\n }\n var event = {\n type: type || 'manual',\n metadata: metadata || {},\n level: level\n };\n\n return event;\n}\n\n/*\n * get - given an obj/array and a keypath, return the value at that keypath or\n * undefined if not possible.\n *\n * @param obj - an object or array\n * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'\n * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`\n */\nfunction get(obj, path) {\n if (!obj) {\n return undefined;\n }\n var keys = path.split('.');\n var result = obj;\n try {\n for (var i = 0, len = keys.length; i < len; ++i) {\n result = result[keys[i]];\n }\n } catch (e) {\n result = undefined;\n }\n return result;\n}\n\nfunction set(obj, path, value) {\n if (!obj) {\n return;\n }\n var keys = path.split('.');\n var len = keys.length;\n if (len < 1) {\n return;\n }\n if (len === 1) {\n obj[keys[0]] = value;\n return;\n }\n try {\n var temp = obj[keys[0]] || {};\n var replacement = temp;\n for (var i = 1; i < len - 1; ++i) {\n temp[keys[i]] = temp[keys[i]] || {};\n temp = temp[keys[i]];\n }\n temp[keys[len-1]] = value;\n obj[keys[0]] = replacement;\n } catch (e) {\n return;\n }\n}\n\nfunction formatArgsAsString(args) {\n var i, len, arg;\n var result = [];\n for (i = 0, len = args.length; i < len; ++i) {\n arg = args[i];\n switch (typeName(arg)) {\n case 'object':\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500) {\n arg = arg.substr(0, 497) + '...';\n }\n break;\n case 'null':\n arg = 'null';\n break;\n case 'undefined':\n arg = 'undefined';\n break;\n case 'symbol':\n arg = arg.toString();\n break;\n }\n result.push(arg);\n }\n return result.join(' ');\n}\n\nfunction now() {\n if (Date.now) {\n return +Date.now();\n }\n return +new Date();\n}\n\nfunction filterIp(requestData, captureIp) {\n if (!requestData || !requestData['user_ip'] || captureIp === true) {\n return;\n }\n var newIp = requestData['user_ip'];\n if (!captureIp) {\n newIp = null;\n } else {\n try {\n var parts;\n if (newIp.indexOf('.') !== -1) {\n parts = newIp.split('.');\n parts.pop();\n parts.push('0');\n newIp = parts.join('.');\n } else if (newIp.indexOf(':') !== -1) {\n parts = newIp.split(':');\n if (parts.length > 2) {\n var beginning = parts.slice(0, 3);\n var slashIdx = beginning[2].indexOf('/');\n if (slashIdx !== -1) {\n beginning[2] = beginning[2].substring(0, slashIdx);\n }\n var terminal = '0000:0000:0000:0000:0000';\n newIp = beginning.concat(terminal).join(':');\n }\n } else {\n newIp = null;\n }\n } catch (e) {\n newIp = null;\n }\n }\n requestData['user_ip'] = newIp;\n}\n\nfunction handleOptions(current, input, payload, logger) {\n var result = merge(current, input, payload);\n result = updateDeprecatedOptions(result, logger);\n if (!input || input.overwriteScrubFields) {\n return result;\n }\n if (input.scrubFields) {\n result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);\n }\n return result;\n}\n\nfunction updateDeprecatedOptions(options, logger) {\n if(options.hostWhiteList && !options.hostSafeList) {\n options.hostSafeList = options.hostWhiteList;\n options.hostWhiteList = undefined;\n logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');\n }\n if(options.hostBlackList && !options.hostBlockList) {\n options.hostBlockList = options.hostBlackList;\n options.hostBlackList = undefined;\n logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');\n }\n return options;\n}\n\nmodule.exports = {\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n createItem: createItem,\n addErrorContext: addErrorContext,\n createTelemetryEvent: createTelemetryEvent,\n filterIp: filterIp,\n formatArgsAsString: formatArgsAsString,\n formatUrl: formatUrl,\n get: get,\n handleOptions: handleOptions,\n isError: isError,\n isFiniteNumber: isFiniteNumber,\n isFunction: isFunction,\n isIterable: isIterable,\n isNativeFunction: isNativeFunction,\n isObject: isObject,\n isString: isString,\n isType: isType,\n isPromise: isPromise,\n jsonParse: jsonParse,\n LEVELS: LEVELS,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n merge: merge,\n now: now,\n redact: redact,\n RollbarJSON: RollbarJSON,\n sanitizeUrl: sanitizeUrl,\n set: set,\n setupJSON: setupJSON,\n stringify: stringify,\n maxByteSize: maxByteSize,\n typeName: typeName,\n uuid4: uuid4\n};\n","'use strict';\n\n/* eslint-disable no-console */\nrequire('console-polyfill');\nvar detection = require('./detection');\nvar _ = require('../utility');\n\nfunction error() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.error(_.formatArgsAsString(args));\n } else {\n console.error.apply(console, args);\n }\n}\n\nfunction info() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.info(_.formatArgsAsString(args));\n } else {\n console.info.apply(console, args);\n }\n}\n\nfunction log() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.log(_.formatArgsAsString(args));\n } else {\n console.log.apply(console, args);\n }\n}\n\n/* eslint-enable no-console */\n\nmodule.exports = {\n error: error,\n info: info,\n log: log\n};\n","'use strict';\n\n// See https://nodejs.org/docs/latest/api/url.html\nfunction parse(url) {\n var result = {\n protocol: null, auth: null, host: null, path: null,\n hash: null, href: url, hostname: null, port: null,\n pathname: null, search: null, query: null\n };\n\n var i, last;\n i = url.indexOf('//');\n if (i !== -1) {\n result.protocol = url.substring(0,i);\n last = i+2;\n } else {\n last = 0;\n }\n \n i = url.indexOf('@', last);\n if (i !== -1) {\n result.auth = url.substring(last, i);\n last = i+1;\n }\n\n i = url.indexOf('/', last);\n if (i === -1) {\n i = url.indexOf('?', last);\n if (i === -1) {\n i = url.indexOf('#', last);\n if (i === -1) {\n result.host = url.substring(last);\n } else {\n result.host = url.substring(last, i);\n result.hash = url.substring(i);\n }\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n return result;\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n\n i = url.indexOf('#', last);\n if (i === -1) {\n result.path = url.substring(last);\n } else {\n result.path = url.substring(last, i);\n result.hash = url.substring(i);\n }\n\n if (result.path) {\n var pathParts = result.path.split('?');\n result.pathname = pathParts[0];\n result.query = pathParts[1];\n result.search = result.query ? '?' + result.query : null;\n }\n return result;\n}\n\nmodule.exports = {\n parse: parse\n};\n","'use strict';\n\nvar ErrorStackParser = require('error-stack-parser');\n\nvar UNKNOWN_FUNCTION = '?';\nvar ERR_CLASS_REGEXP = new RegExp('^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ');\n\nfunction guessFunctionName() {\n return UNKNOWN_FUNCTION;\n}\n\n\nfunction gatherContext() {\n return null;\n}\n\n\nfunction Frame(stackFrame) {\n var data = {};\n\n data._stackFrame = stackFrame;\n\n data.url = stackFrame.fileName;\n data.line = stackFrame.lineNumber;\n data.func = stackFrame.functionName;\n data.column = stackFrame.columnNumber;\n data.args = stackFrame.args;\n\n data.context = gatherContext();\n\n return data;\n}\n\n\nfunction Stack(exception, skip) {\n function getStack() {\n var parserStack = [];\n\n skip = skip || 0;\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch(e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = skip; i < parserStack.length; i++) {\n stack.push(new Frame(parserStack[i]));\n }\n\n return stack;\n }\n\n return {\n stack: getStack(),\n message: exception.message,\n name: _mostSpecificErrorName(exception),\n rawStack: exception.stack,\n rawException: exception\n };\n}\n\n\nfunction parse(e, skip) {\n var err = e;\n\n if (err.nested || err.cause) {\n var traceChain = [];\n while (err) {\n traceChain.push(new Stack(err, skip));\n err = err.nested || err.cause;\n\n skip = 0; // Only apply skip value to primary error\n }\n\n // Return primary error with full trace chain attached.\n traceChain[0].traceChain = traceChain;\n return traceChain[0];\n } else {\n return new Stack(err, skip);\n }\n}\n\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg || !errMsg.match) {\n return ['Unknown error. There was no error message to display.', ''];\n }\n var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);\n var errClass = '(unknown)';\n\n if (errClassMatch) {\n errClass = errClassMatch[errClassMatch.length - 1];\n errMsg = errMsg.replace((errClassMatch[errClassMatch.length - 2] || '') + errClass + ':', '');\n errMsg = errMsg.replace(/(^[\\s]+|[\\s]+$)/g, '');\n }\n return [errClass, errMsg];\n}\n\n// * Prefers any value over an empty string\n// * Prefers any value over 'Error' where possible\n// * Prefers name over constructor.name when both are more specific than 'Error'\nfunction _mostSpecificErrorName(error) {\n var name = error.name && error.name.length && error.name;\n var constructorName = error.constructor.name && error.constructor.name.length && error.constructor.name;\n\n if (!name || !constructorName) {\n return name || constructorName;\n }\n\n if (name === 'Error') {\n return constructorName;\n }\n return name;\n}\n\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame\n};\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction scrub(data, scrubFields, scrubPaths) {\n scrubFields = scrubFields || [];\n\n if (scrubPaths) {\n for (var i = 0; i < scrubPaths.length; ++i) {\n scrubPath(data, scrubPaths[i]);\n }\n }\n\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart) {\n return paramPart + _.redact();\n }\n\n function paramScrubber(v) {\n var i;\n if (_.isType(v, 'string')) {\n for (i = 0; i < queryRes.length; ++i) {\n v = v.replace(queryRes[i], redactQueryParam);\n }\n }\n return v;\n }\n\n function valScrubber(k, v) {\n var i;\n for (i = 0; i < paramRes.length; ++i) {\n if (paramRes[i].test(k)) {\n v = _.redact();\n break;\n }\n }\n return v;\n }\n\n function scrubber(k, v, seen) {\n var tmpV = valScrubber(k, v);\n if (tmpV === v) {\n if (_.isType(v, 'object') || _.isType(v, 'array')) {\n return traverse(v, scrubber, seen);\n }\n return paramScrubber(tmpV);\n } else {\n return tmpV;\n }\n }\n\n return traverse(data, scrubber);\n}\n\nfunction scrubPath(obj, path) {\n var keys = path.split('.');\n var last = keys.length - 1;\n try {\n for (var i = 0; i <= last; ++i) {\n if (i < last) {\n obj = obj[keys[i]];\n } else {\n obj[keys[i]] = _.redact();\n }\n }\n } catch (e) {\n // Missing key is OK;\n }\n}\n\nfunction _getScrubFieldRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '^\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?$';\n ret.push(new RegExp(pat, 'i'));\n }\n return ret;\n}\n\n\nfunction _getScrubQueryParamRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?';\n ret.push(new RegExp('(' + pat + '=)([^&\\\\n]+)', 'igm'));\n }\n return ret;\n}\n\nmodule.exports = scrub;\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction traverse(obj, func, seen) {\n var k, v, i;\n var isObj = _.isType(obj, 'object');\n var isArray = _.isType(obj, 'array');\n var keys = [];\n var seenIndex;\n\n // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.\n seen = seen || { obj: [], mapped: []};\n\n if (isObj) {\n seenIndex = seen.obj.indexOf(obj);\n\n if (isObj && seenIndex !== -1) {\n // Prefer the mapped object if there is one.\n return seen.mapped[seenIndex] || seen.obj[seenIndex];\n }\n\n seen.obj.push(obj);\n seenIndex = seen.obj.length - 1;\n }\n\n if (isObj) {\n for (k in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, k)) {\n keys.push(k);\n }\n }\n } else if (isArray) {\n for (i = 0; i < obj.length; ++i) {\n keys.push(i);\n }\n }\n\n var result = isObj ? {} : [];\n var same = true;\n for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n result[k] = func(k, v, seen);\n same = same && result[k] === obj[k];\n }\n\n if (isObj && !same) {\n seen.mapped[seenIndex] = result;\n }\n\n return !same ? result : obj;\n}\n\nmodule.exports = traverse;\n","'use strict';\n\nvar rollbar = require('../rollbar');\n\nvar options = (typeof window !== 'undefined') && window._rollbarConfig;\nvar alias = options && options.globalAlias || 'Rollbar';\nvar shimRunning = (typeof window !== 'undefined') && window[alias] && typeof window[alias].shimId === 'function' && window[alias].shimId() !== undefined;\n\nif ((typeof window !== 'undefined') && !window._rollbarStartTime) {\n window._rollbarStartTime = (new Date()).getTime();\n}\n\nif (!shimRunning && options) {\n var Rollbar = new rollbar(options);\n window[alias] = Rollbar;\n} else if (typeof window !== 'undefined') {\n window.rollbar = rollbar;\n window._rollbarDidLoad = true;\n} else if (typeof self !== 'undefined') {\n self.rollbar = rollbar;\n self._rollbarDidLoad = true;\n}\n\nmodule.exports = rollbar;\n","'use strict';\n\nvar Rollbar = require('./core');\nvar telemeter = require('../telemetry');\nvar instrumenter = require('./telemetry');\nvar polyfillJSON = require('../utility/polyfillJSON');\nvar wrapGlobals = require('./wrapGlobals');\nvar scrub = require('../scrub');\nvar truncation = require('../truncation');\n\nRollbar.setComponents({\n telemeter: telemeter,\n instrumenter: instrumenter,\n polyfillJSON: polyfillJSON,\n wrapGlobals: wrapGlobals,\n scrub: scrub,\n truncation: truncation\n});\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar Client = require('../rollbar');\nvar _ = require('../utility');\nvar API = require('../api');\nvar logger = require('./logger');\nvar globals = require('./globalSetup');\n\nvar Transport = require('./transport');\nvar urllib = require('./url');\n\nvar transforms = require('./transforms');\nvar sharedTransforms = require('../transforms');\nvar predicates = require('./predicates');\nvar sharedPredicates = require('../predicates');\nvar errorParser = require('../errorParser');\n\nfunction Rollbar(options, client) {\n this.options = _.handleOptions(defaultOptions, options, null, logger);\n this.options._configuredOptions = options;\n var Telemeter = this.components.telemeter;\n var Instrumenter = this.components.instrumenter;\n var polyfillJSON = this.components.polyfillJSON;\n this.wrapGlobals = this.components.wrapGlobals;\n this.scrub = this.components.scrub;\n var truncation = this.components.truncation;\n\n var transport = new Transport(truncation);\n var api = new API(this.options, transport, urllib, truncation);\n if (Telemeter) {\n this.telemeter = new Telemeter(this.options);\n }\n this.client = client || new Client(this.options, api, logger, this.telemeter, 'browser');\n var gWindow = _gWindow();\n var gDocument = (typeof document != 'undefined') && document;\n this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers\n this.anonymousErrorsPending = 0;\n addTransformsToNotifier(this.client.notifier, this, gWindow);\n addPredicatesToQueue(this.client.queue);\n this.setupUnhandledCapture();\n if (Instrumenter) {\n this.instrumenter = new Instrumenter(this.options, this.client.telemeter, this, gWindow, gDocument);\n this.instrumenter.instrument();\n }\n _.setupJSON(polyfillJSON);\n\n // Used with rollbar-react for rollbar-react-native compatibility.\n this.rollbar = this;\n}\n\nvar _instance = null;\nRollbar.init = function(options, client) {\n if (_instance) {\n return _instance.global(options).configure(options);\n }\n _instance = new Rollbar(options, client);\n return _instance;\n};\n\nRollbar.prototype.components = {};\n\nRollbar.setComponents = function(components) {\n Rollbar.prototype.components = components;\n}\n\nfunction handleUninitialized(maybeCallback) {\n var message = 'Rollbar is not initialized';\n logger.error(message);\n if (maybeCallback) {\n maybeCallback(new Error(message));\n }\n}\n\nRollbar.prototype.global = function(options) {\n this.client.global(options);\n return this;\n};\nRollbar.global = function(options) {\n if (_instance) {\n return _instance.global(options);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.configure = function(options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = {payload: payloadData};\n }\n this.options = _.handleOptions(oldOptions, options, payload, logger);\n this.options._configuredOptions = _.handleOptions(oldOptions._configuredOptions, options, payload);\n this.client.configure(this.options, payloadData);\n this.instrumenter && this.instrumenter.configure(this.options);\n this.setupUnhandledCapture();\n return this;\n};\nRollbar.configure = function(options, payloadData) {\n if (_instance) {\n return _instance.configure(options, payloadData);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.lastError = function() {\n return this.client.lastError;\n};\nRollbar.lastError = function() {\n if (_instance) {\n return _instance.lastError();\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.log = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.log(item);\n return {uuid: uuid};\n};\nRollbar.log = function() {\n if (_instance) {\n return _instance.log.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.debug = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.debug(item);\n return {uuid: uuid};\n};\nRollbar.debug = function() {\n if (_instance) {\n return _instance.debug.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.info = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.info(item);\n return {uuid: uuid};\n};\nRollbar.info = function() {\n if (_instance) {\n return _instance.info.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warn = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warn(item);\n return {uuid: uuid};\n};\nRollbar.warn = function() {\n if (_instance) {\n return _instance.warn.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warning = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warning(item);\n return {uuid: uuid};\n};\nRollbar.warning = function() {\n if (_instance) {\n return _instance.warning.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.error = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.error(item);\n return {uuid: uuid};\n};\nRollbar.error = function() {\n if (_instance) {\n return _instance.error.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.critical = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.critical(item);\n return {uuid: uuid};\n};\nRollbar.critical = function() {\n if (_instance) {\n return _instance.critical.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.buildJsonPayload = function(item) {\n return this.client.buildJsonPayload(item);\n};\nRollbar.buildJsonPayload = function() {\n if (_instance) {\n return _instance.buildJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.sendJsonPayload = function(jsonPayload) {\n return this.client.sendJsonPayload(jsonPayload);\n};\nRollbar.sendJsonPayload = function() {\n if (_instance) {\n return _instance.sendJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.setupUnhandledCapture = function() {\n var gWindow = _gWindow();\n\n if (!this.unhandledExceptionsInitialized) {\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(gWindow, this);\n if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {\n this.wrapGlobals(gWindow, this);\n }\n this.unhandledExceptionsInitialized = true;\n }\n }\n if (!this.unhandledRejectionsInitialized) {\n if (this.options.captureUnhandledRejections || this.options.handleUnhandledRejections) {\n globals.captureUnhandledRejections(gWindow, this);\n this.unhandledRejectionsInitialized = true;\n }\n }\n};\n\nRollbar.prototype.handleUncaughtException = function(message, url, lineno, colno, error, context) {\n if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {\n return;\n }\n\n // Chrome will always send 5+ arguments and error will be valid or null, not undefined.\n // If error is undefined, we have a different caller.\n // Chrome also sends errors from web workers with null error, but does not invoke\n // prepareStackTrace() for these. Test for empty url to skip them.\n if (this.options.inspectAnonymousErrors && this.isChrome && error === null && url === '') {\n return 'anonymous';\n }\n\n var item;\n var stackInfo = _.makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n 'onerror',\n 'uncaught exception',\n errorParser\n );\n if (_.isError(error)) {\n item = this._createItem([message, error, context]);\n item._unhandledStackInfo = stackInfo;\n } else if (_.isError(url)) {\n item = this._createItem([message, url, context]);\n item._unhandledStackInfo = stackInfo;\n } else {\n item = this._createItem([message, context]);\n item.stackInfo = stackInfo;\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n this.client.log(item);\n};\n\n/**\n * Chrome only. Other browsers will ignore.\n *\n * Use Error.prepareStackTrace to extract information about errors that\n * do not have a valid error object in onerror().\n *\n * In tested version of Chrome, onerror is called first but has no way\n * to communicate with prepareStackTrace. Use a counter to let this\n * handler know which errors to send to Rollbar.\n *\n * In config options, set inspectAnonymousErrors to enable.\n */\nRollbar.prototype.handleAnonymousErrors = function() {\n if (!this.options.inspectAnonymousErrors || !this.isChrome) {\n return;\n }\n\n var r = this;\n function prepareStackTrace(error, _stack) { // eslint-disable-line no-unused-vars\n if (r.options.inspectAnonymousErrors) {\n if (r.anonymousErrorsPending) {\n // This is the only known way to detect that onerror saw an anonymous error.\n // It depends on onerror reliably being called before Error.prepareStackTrace,\n // which so far holds true on tested versions of Chrome. If versions of Chrome\n // are tested that behave differently, this logic will need to be updated\n // accordingly.\n r.anonymousErrorsPending -= 1;\n\n if (!error) {\n // Not likely to get here, but calling handleUncaughtException from here\n // without an error object would throw off the anonymousErrorsPending counter,\n // so return now.\n return;\n }\n\n // Allow this to be tracked later.\n error._isAnonymous = true;\n\n // url, lineno, colno shouldn't be needed for these errors.\n // If that changes, update this accordingly, using the unused\n // _stack param as needed (rather than parse error.toString()).\n r.handleUncaughtException(error.message, null, null, null, error);\n }\n }\n\n // Workaround to ensure stack is preserved for normal errors.\n return error.stack;\n }\n\n // https://v8.dev/docs/stack-trace-api\n try {\n Error.prepareStackTrace = prepareStackTrace;\n } catch (e) {\n this.options.inspectAnonymousErrors = false;\n this.error('anonymous error handler failed', e);\n }\n}\n\nRollbar.prototype.handleUnhandledRejection = function(reason, promise) {\n if (!this.options.captureUnhandledRejections && !this.options.handleUnhandledRejections) {\n return;\n }\n\n var message = 'unhandled rejection was null or undefined!';\n if (reason) {\n if (reason.message) {\n message = reason.message;\n } else {\n var reasonResult = _.stringify(reason);\n if (reasonResult.value) {\n message = reasonResult.value;\n }\n }\n }\n var context = (reason && reason._rollbarContext) || (promise && promise._rollbarContext);\n\n var item;\n if (_.isError(reason)) {\n item = this._createItem([message, reason, context]);\n } else {\n item = this._createItem([message, reason, context]);\n item.stackInfo = _.makeUnhandledStackInfo(\n message,\n '',\n 0,\n 0,\n null,\n 'unhandledrejection',\n '',\n errorParser\n );\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n item._originalArgs = item._originalArgs || [];\n item._originalArgs.push(promise);\n this.client.log(item);\n};\n\nRollbar.prototype.wrap = function(f, context, _before) {\n try {\n var ctxFn;\n if(_.isFunction(context)) {\n ctxFn = context;\n } else {\n ctxFn = function() { return context || {}; };\n }\n\n if (!_.isFunction(f)) {\n return f;\n }\n\n if (f._isWrap) {\n return f;\n }\n\n if (!f._rollbar_wrapped) {\n f._rollbar_wrapped = function () {\n if (_before && _.isFunction(_before)) {\n _before.apply(this, arguments);\n }\n try {\n return f.apply(this, arguments);\n } catch(exc) {\n var e = exc;\n if (e && window._rollbarWrappedError !== e) {\n if (_.isType(e, 'string')) {\n e = new String(e);\n }\n e._rollbarContext = ctxFn() || {};\n e._rollbarContext._wrappedSource = f.toString();\n\n window._rollbarWrappedError = e;\n }\n throw e;\n }\n };\n\n f._rollbar_wrapped._isWrap = true;\n\n if (f.hasOwnProperty) {\n for (var prop in f) {\n if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {\n f._rollbar_wrapped[prop] = f[prop];\n }\n }\n }\n }\n\n return f._rollbar_wrapped;\n } catch (e) {\n // Return the original function if the wrap fails.\n return f;\n }\n};\nRollbar.wrap = function(f, context) {\n if (_instance) {\n return _instance.wrap(f, context);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.captureEvent = function() {\n var event = _.createTelemetryEvent(arguments);\n return this.client.captureEvent(event.type, event.metadata, event.level);\n};\nRollbar.captureEvent = function() {\n if (_instance) {\n return _instance.captureEvent.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\n// The following two methods are used internally and are not meant for public use\nRollbar.prototype.captureDomContentLoaded = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureLoad(ts);\n};\n\n/* Internal */\n\nfunction addTransformsToNotifier(notifier, rollbar, gWindow) {\n notifier\n .addTransform(transforms.handleDomException)\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(gWindow))\n .addTransform(transforms.addClientInfo(gWindow))\n .addTransform(transforms.addPluginInfo(gWindow))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(sharedTransforms.addConfigToPayload)\n .addTransform(transforms.addScrubber(rollbar.scrub))\n .addTransform(sharedTransforms.addPayloadOptions)\n .addTransform(sharedTransforms.userTransform(logger))\n .addTransform(sharedTransforms.addConfiguredOptions)\n .addTransform(sharedTransforms.addDiagnosticKeys)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(sharedPredicates.checkLevel)\n .addPredicate(predicates.checkIgnore)\n .addPredicate(sharedPredicates.userCheckIgnore(logger))\n .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))\n .addPredicate(sharedPredicates.urlIsSafeListed(logger))\n .addPredicate(sharedPredicates.messageIsIgnored(logger));\n}\n\nRollbar.prototype.loadFull = function() {\n logger.info('Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.');\n};\n\nRollbar.prototype._createItem = function(args) {\n return _.createItem(args, logger, this);\n};\n\nfunction _getFirstFunction(args) {\n for (var i = 0, len = args.length; i < len; ++i) {\n if (_.isFunction(args[i])) {\n return args[i];\n }\n }\n return undefined;\n}\n\nfunction _gWindow() {\n return ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n}\n\nvar defaults = require('../defaults');\nvar scrubFields = require('./defaults/scrubFields');\n\nvar defaultOptions = {\n version: defaults.version,\n scrubFields: scrubFields.scrubFields,\n logLevel: defaults.logLevel,\n reportLevel: defaults.reportLevel,\n uncaughtErrorLevel: defaults.uncaughtErrorLevel,\n endpoint: defaults.endpoint,\n verbose: false,\n enabled: true,\n transmit: true,\n sendConfig: false,\n includeItemsInTelemetry: true,\n captureIp: true,\n inspectAnonymousErrors: true,\n ignoreDuplicateErrors: true,\n wrapGlobalEventHandlers: false\n};\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar _ = require('./utility');\n\n/*\n * Rollbar - the interface to Rollbar\n *\n * @param options\n * @param api\n * @param logger\n */\nfunction Rollbar(options, api, logger, telemeter, platform) {\n this.options = _.merge(options);\n this.logger = logger;\n Rollbar.rateLimiter.configureGlobal(this.options);\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.api = api;\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n\n // This must happen before the Notifier is created\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = telemeter;\n setStackTraceLimit(options);\n this.lastError = null;\n this.lastErrorHash = 'none';\n}\n\nvar defaultOptions = {\n maxItems: 0,\n itemsPerMinute: 60\n};\n\nRollbar.rateLimiter = new RateLimiter(defaultOptions);\n\nRollbar.prototype.global = function (options) {\n Rollbar.rateLimiter.configureGlobal(options);\n return this;\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n\n this.options = _.merge(oldOptions, options, payload);\n\n // This must happen before the Notifier is configured\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier && this.notifier.configure(this.options);\n this.telemeter && this.telemeter.configure(this.options);\n setStackTraceLimit(options);\n this.global(this.options);\n\n if (validateTracer(options.tracer)) {\n this.tracer = options.tracer\n }\n\n return this;\n};\n\nRollbar.prototype.log = function (item) {\n var level = this._defaultLogLevel();\n return this._log(level, item);\n};\n\nRollbar.prototype.debug = function (item) {\n this._log('debug', item);\n};\n\nRollbar.prototype.info = function (item) {\n this._log('info', item);\n};\n\nRollbar.prototype.warn = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.warning = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.error = function (item) {\n this._log('error', item);\n};\n\nRollbar.prototype.critical = function (item) {\n this._log('critical', item);\n};\n\nRollbar.prototype.wait = function (callback) {\n this.queue.wait(callback);\n};\n\nRollbar.prototype.captureEvent = function (type, metadata, level) {\n return this.telemeter && this.telemeter.captureEvent(type, metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function (ts) {\n return this.telemeter && this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (ts) {\n return this.telemeter && this.telemeter.captureLoad(ts);\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.api.buildJsonPayload(item);\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n this.api.postJsonPayload(jsonPayload);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function (defaultLevel, item) {\n var callback;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {\n if (callback) {\n var error = new Error('ignored identical item');\n error.item = item;\n callback(error);\n }\n return;\n }\n try {\n this._addTracingInfo(item);\n item.level = item.level || defaultLevel;\n this.telemeter && this.telemeter._captureRollbarItem(item);\n item.telemetryEvents = (this.telemeter && this.telemeter.copyEvents()) || [];\n this.notifier.log(item, callback);\n } catch (e) {\n if (callback) {\n callback(e);\n }\n this.logger.error(e);\n }\n};\n\nRollbar.prototype._defaultLogLevel = function () {\n return this.options.logLevel || 'debug';\n};\n\nRollbar.prototype._sameAsLastError = function (item) {\n if (!item._isUncaught) {\n return false;\n }\n var itemHash = generateItemHash(item);\n if (this.lastErrorHash === itemHash) {\n return true;\n }\n this.lastError = item.err;\n this.lastErrorHash = itemHash;\n return false;\n};\n\nRollbar.prototype._addTracingInfo = function (item) {\n // Tracer validation occurs in the constructor\n // or in the Rollbar.prototype.configure methods\n if (this.tracer) {\n // add rollbar occurrence uuid to span\n var span = this.tracer.scope().active();\n\n if (validateSpan(span)) {\n span.setTag('rollbar.error_uuid', item.uuid);\n span.setTag('rollbar.has_error', true);\n span.setTag('error', true);\n span.setTag('rollbar.item_url', `https://rollbar.com/item/uuid/?uuid=${item.uuid}`);\n span.setTag('rollbar.occurrence_url', `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`);\n\n // add span ID & trace ID to occurrence\n var opentracingSpanId = span.context().toSpanId();\n var opentracingTraceId = span.context().toTraceId();\n\n if (item.custom) {\n item.custom.opentracing_span_id = opentracingSpanId;\n item.custom.opentracing_trace_id = opentracingTraceId;\n } else {\n item.custom = {\n opentracing_span_id: opentracingSpanId,\n opentracing_trace_id: opentracingTraceId\n };\n }\n }\n }\n}\n\nfunction generateItemHash(item) {\n var message = item.message || '';\n var stack = (item.err || {}).stack || String(item.err);\n return message + '::' + stack;\n}\n\n// Node.js, Chrome, Safari, and some other browsers support this property\n// which globally sets the number of stack frames returned in an Error object.\n// If a browser can't use it, no harm done.\nfunction setStackTraceLimit(options) {\n if (options.stackTraceLimit) {\n Error.stackTraceLimit = options.stackTraceLimit;\n }\n}\n\n/**\n * Validate the Tracer object provided to the Client\n * is valid for our Opentracing use case.\n * @param {opentracer.Tracer} tracer\n */\nfunction validateTracer(tracer) {\n if (!tracer) {\n return false;\n }\n\n if (!tracer.scope || typeof tracer.scope !== 'function') {\n return false;\n }\n\n var scope = tracer.scope();\n\n if (!scope || !scope.active || typeof scope.active !== 'function') {\n return false;\n }\n\n return true;\n}\n\n/**\n * Validate the Span object provided\n * @param {opentracer.Span} span\n */\nfunction validateSpan(span) {\n if (!span || !span.context || typeof span.context !== 'function') {\n return false;\n }\n\n var spanContext = span.context();\n\n if (!spanContext\n || !spanContext.toSpanId\n || !spanContext.toTraceId\n || typeof spanContext.toSpanId !== 'function'\n || typeof spanContext.toTraceId !== 'function') {\n return false\n }\n\n return true;\n}\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar\n *\n * @param options - the same options that are accepted by configureGlobal offered as a convenience\n */\nfunction RateLimiter(options) {\n this.startTime = _.now();\n this.counter = 0;\n this.perMinCounter = 0;\n this.platform = null;\n this.platformOptions = {};\n this.configureGlobal(options);\n}\n\nRateLimiter.globalSettings = {\n startTime: _.now(),\n maxItems: undefined,\n itemsPerMinute: undefined\n};\n\n/*\n * configureGlobal - set the global rate limiter options\n *\n * @param options - Only the following values are recognized:\n * startTime: a timestamp of the form returned by (new Date()).getTime()\n * maxItems: the maximum items\n * itemsPerMinute: the max number of items to send in a given minute\n */\nRateLimiter.prototype.configureGlobal = function(options) {\n if (options.startTime !== undefined) {\n RateLimiter.globalSettings.startTime = options.startTime;\n }\n if (options.maxItems !== undefined) {\n RateLimiter.globalSettings.maxItems = options.maxItems;\n }\n if (options.itemsPerMinute !== undefined) {\n RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;\n }\n};\n\n/*\n * shouldSend - determine if we should send a given item based on rate limit settings\n *\n * @param item - the item we are about to send\n * @returns An object with the following structure:\n * error: (Error|null)\n * shouldSend: bool\n * payload: (Object|null)\n * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and\n * exactly one of error or payload will be non-null. If error is non-null, the returned Error will\n * describe the situation, but it means that we were already over a rate limit (either globally or\n * per minute) when this item was checked. If error is null, and therefore payload is non-null, it\n * means this item put us over the global rate limit and the payload should be sent to Rollbar in\n * place of the passed in item.\n */\nRateLimiter.prototype.shouldSend = function(item, now) {\n now = now || _.now();\n var elapsedTime = now - this.startTime;\n if (elapsedTime < 0 || elapsedTime >= 60000) {\n this.startTime = now;\n this.perMinCounter = 0;\n }\n\n var globalRateLimit = RateLimiter.globalSettings.maxItems;\n var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;\n\n if (checkRate(item, globalRateLimit, this.counter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimit + ' max items reached', false);\n } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimitPerMin + ' items per minute reached', false);\n }\n this.counter++;\n this.perMinCounter++;\n\n var shouldSend = !checkRate(item, globalRateLimit, this.counter);\n var perMinute = shouldSend;\n shouldSend = shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);\n return shouldSendValue(this.platform, this.platformOptions, null, shouldSend, globalRateLimit, globalRateLimitPerMin, perMinute);\n};\n\nRateLimiter.prototype.setPlatformOptions = function(platform, options) {\n this.platform = platform;\n this.platformOptions = options;\n};\n\n/* Helpers */\n\nfunction checkRate(item, limit, counter) {\n return !item.ignoreRateLimit && limit >= 1 && counter > limit;\n}\n\nfunction shouldSendValue(platform, options, error, shouldSend, globalRateLimit, limitPerMin, perMinute) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute);\n }\n return {error: error, shouldSend: shouldSend, payload: payload};\n}\n\nfunction rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute) {\n var environment = options.environment || (options.payload && options.payload.environment);\n var msg;\n if (perMinute) {\n msg = 'item per minute limit reached, ignoring errors until timeout';\n } else {\n msg = 'maxItems has been hit, ignoring errors until reset.';\n }\n var item = {\n body: {\n message: {\n body: msg,\n extra: {\n maxItems: globalRateLimit,\n itemsPerMinute: limitPerMin\n }\n }\n },\n language: 'javascript',\n environment: environment,\n notifier: {\n version: (options.notifier && options.notifier.version) || options.version\n }\n };\n if (platform === 'browser') {\n item.platform = 'browser';\n item.framework = 'browser-js';\n item.notifier.name = 'rollbar-browser-js';\n } else if (platform === 'server') {\n item.framework = options.framework || 'node-js';\n item.notifier.name = options.notifier.name;\n } else if (platform === 'react-native') {\n item.framework = options.framework || 'react-native';\n item.notifier.name = options.notifier.name;\n }\n return item;\n}\n\nmodule.exports = RateLimiter;\n","'use strict';\n\n'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isPlainObject = function isPlainObject(obj) {\n\tif (!obj || toStr.call(obj) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tvar hasOwnConstructor = hasOwn.call(obj, 'constructor');\n\tvar hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n\t// Not own constructor property must be Object\n\tif (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n\t\treturn false;\n\t}\n\n\t// Own properties are enumerated firstly, so to speed up,\n\t// if last one is own, then all properties are own.\n\tvar key;\n\tfor (key in obj) {/**/}\n\n\treturn typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\nfunction merge() {\n var i, src, copy, clone, name,\n result = {},\n current = null,\n length = arguments.length;\n\n for (i=0; i < length; i++) {\n current = arguments[i];\n if (current == null) {\n continue;\n }\n\n for (name in current) {\n src = result[name];\n copy = current[name];\n if (result !== copy) {\n if (copy && isPlainObject(copy)) {\n clone = src && isPlainObject(src) ? src : {};\n result[name] = merge(clone, copy);\n } else if (typeof copy !== 'undefined') {\n result[name] = copy;\n }\n }\n }\n }\n return result;\n}\n\nmodule.exports = merge;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Queue - an object which handles which handles a queue of items to be sent to Rollbar.\n * This object handles rate limiting via a passed in rate limiter, retries based on connection\n * errors, and filtering of items based on a set of configurable predicates. The communication to\n * the backend is performed via a given API object.\n *\n * @param rateLimiter - An object which conforms to the interface\n * rateLimiter.shouldSend(item) -> bool\n * @param api - An object which conforms to the interface\n * api.postItem(payload, function(err, response))\n * @param logger - An object used to log verbose messages if desired\n * @param options - see Queue.prototype.configure\n */\nfunction Queue(rateLimiter, api, logger, options) {\n this.rateLimiter = rateLimiter;\n this.api = api;\n this.logger = logger;\n this.options = options;\n this.predicates = [];\n this.pendingItems = [];\n this.pendingRequests = [];\n this.retryQueue = [];\n this.retryHandle = null;\n this.waitCallback = null;\n this.waitIntervalID = null;\n}\n\n/*\n * configure - updates the options this queue uses\n *\n * @param options\n */\nQueue.prototype.configure = function(options) {\n this.api && this.api.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addPredicate - adds a predicate to the end of the list of predicates for this queue\n *\n * @param predicate - function(item, options) -> (bool|{err: Error})\n * Returning true means that this predicate passes and the item is okay to go on the queue\n * Returning false means do not add the item to the queue, but it is not an error\n * Returning {err: Error} means do not add the item to the queue, and the given error explains why\n * Returning {err: undefined} is equivalent to returning true but don't do that\n */\nQueue.prototype.addPredicate = function(predicate) {\n if (_.isFunction(predicate)) {\n this.predicates.push(predicate);\n }\n return this;\n};\n\nQueue.prototype.addPendingItem = function(item) {\n this.pendingItems.push(item);\n};\n\nQueue.prototype.removePendingItem = function(item) {\n var idx = this.pendingItems.indexOf(item);\n if (idx !== -1) {\n this.pendingItems.splice(idx, 1);\n }\n};\n\n/*\n * addItem - Send an item to the Rollbar API if all of the predicates are satisfied\n *\n * @param item - The payload to send to the backend\n * @param callback - function(error, repsonse) which will be called with the response from the API\n * in the case of a success, otherwise response will be null and error will have a value. If both\n * error and response are null then the item was stopped by a predicate which did not consider this\n * to be an error condition, but nonetheless did not send the item to the API.\n * @param originalError - The original error before any transformations that is to be logged if any\n */\nQueue.prototype.addItem = function(item, callback, originalError, originalItem) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() { return; };\n }\n var predicateResult = this._applyPredicates(item);\n if (predicateResult.stop) {\n this.removePendingItem(originalItem);\n callback(predicateResult.err);\n return;\n }\n this._maybeLog(item, originalError);\n this.removePendingItem(originalItem);\n if (!this.options.transmit) {\n callback(new Error('Transmit disabled'));\n return;\n }\n this.pendingRequests.push(item);\n try {\n this._makeApiRequest(item, function(err, resp) {\n this._dequeuePendingRequest(item);\n callback(err, resp);\n }.bind(this));\n } catch (e) {\n this._dequeuePendingRequest(item);\n callback(e);\n }\n};\n\n/*\n * wait - Stop any further errors from being added to the queue, and get called back when all items\n * currently processing have finished sending to the backend.\n *\n * @param callback - function() called when all pending items have been sent\n */\nQueue.prototype.wait = function(callback) {\n if (!_.isFunction(callback)) {\n return;\n }\n this.waitCallback = callback;\n if (this._maybeCallWait()) {\n return;\n }\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitIntervalID = setInterval(function() {\n this._maybeCallWait();\n }.bind(this), 500);\n};\n\n/* _applyPredicates - Sequentially applies the predicates that have been added to the queue to the\n * given item with the currently configured options.\n *\n * @param item - An item in the queue\n * @returns {stop: bool, err: (Error|null)} - stop being true means do not add item to the queue,\n * the error value should be passed up to a callbak if we are stopping.\n */\nQueue.prototype._applyPredicates = function(item) {\n var p = null;\n for (var i = 0, len = this.predicates.length; i < len; i++) {\n p = this.predicates[i](item, this.options);\n if (!p || p.err !== undefined) {\n return {stop: true, err: p.err};\n }\n }\n return {stop: false, err: null};\n};\n\n/*\n * _makeApiRequest - Send an item to Rollbar, callback when done, if there is an error make an\n * effort to retry if we are configured to do so.\n *\n * @param item - an item ready to send to the backend\n * @param callback - function(err, response)\n */\nQueue.prototype._makeApiRequest = function(item, callback) {\n var rateLimitResponse = this.rateLimiter.shouldSend(item);\n if (rateLimitResponse.shouldSend) {\n this.api.postItem(item, function(err, resp) {\n if (err) {\n this._maybeRetry(err, item, callback);\n } else {\n callback(err, resp);\n }\n }.bind(this));\n } else if (rateLimitResponse.error) {\n callback(rateLimitResponse.error);\n } else {\n this.api.postItem(rateLimitResponse.payload, callback);\n }\n};\n\n// These are errors basically mean there is no internet connection\nvar RETRIABLE_ERRORS = ['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED', 'EHOSTUNREACH', 'EPIPE', 'EAI_AGAIN'];\n\n/*\n * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback\n * with the error.\n *\n * @param err - an error returned by the API transport\n * @param item - the item that was trying to be sent when this error occured\n * @param callback - function(err, response)\n */\nQueue.prototype._maybeRetry = function(err, item, callback) {\n var shouldRetry = false;\n if (this.options.retryInterval) {\n for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {\n if (err.code === RETRIABLE_ERRORS[i]) {\n shouldRetry = true;\n break;\n }\n }\n if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {\n item.retries = item.retries ? item.retries + 1 : 1;\n if (item.retries > this.options.maxRetries) {\n shouldRetry = false;\n }\n }\n }\n if (shouldRetry) {\n this._retryApiRequest(item, callback);\n } else {\n callback(err);\n }\n};\n\n/*\n * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process\n * that queue based on the retryInterval in the options for this queue.\n *\n * @param item - an item that failed to send due to an error we deem retriable\n * @param callback - function(err, response)\n */\nQueue.prototype._retryApiRequest = function(item, callback) {\n this.retryQueue.push({item: item, callback: callback});\n\n if (!this.retryHandle) {\n this.retryHandle = setInterval(function() {\n while (this.retryQueue.length) {\n var retryObject = this.retryQueue.shift();\n this._makeApiRequest(retryObject.item, retryObject.callback);\n }\n }.bind(this), this.options.retryInterval);\n }\n};\n\n/*\n * _dequeuePendingRequest - Removes the item from the pending request queue, this queue is used to\n * enable to functionality of providing a callback that clients can pass to `wait` to be notified\n * when the pending request queue has been emptied. This must be called when the API finishes\n * processing this item. If a `wait` callback is configured, it is called by this function.\n *\n * @param item - the item previously added to the pending request queue\n */\nQueue.prototype._dequeuePendingRequest = function(item) {\n var idx = this.pendingRequests.indexOf(item);\n if (idx !== -1) {\n this.pendingRequests.splice(idx, 1);\n this._maybeCallWait();\n }\n};\n\nQueue.prototype._maybeLog = function(data, originalError) {\n if (this.logger && this.options.verbose) {\n var message = originalError;\n message = message || _.get(data, 'body.trace.exception.message');\n message = message || _.get(data, 'body.trace_chain.0.exception.message');\n if (message) {\n this.logger.error(message);\n return;\n }\n message = _.get(data, 'body.message.body');\n if (message) {\n this.logger.log(message);\n }\n }\n};\n\nQueue.prototype._maybeCallWait = function() {\n if (_.isFunction(this.waitCallback) && this.pendingItems.length === 0 && this.pendingRequests.length === 0) {\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitCallback();\n return true;\n }\n return false;\n};\n\nmodule.exports = Queue;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Notifier - the internal object responsible for delegating between the client exposed API, the\n * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the\n * queue which handles the communcation with the Rollbar API servers.\n *\n * @param queue - an object that conforms to the interface: addItem(item, callback)\n * @param options - an object representing the options to be set for this notifier, this should have\n * any defaults already set by the caller\n */\nfunction Notifier(queue, options) {\n this.queue = queue;\n this.options = options;\n this.transforms = [];\n this.diagnostic = {};\n}\n\n/*\n * configure - updates the options for this notifier with the passed in object\n *\n * @param options - an object which gets merged with the current options set on this notifier\n * @returns this\n */\nNotifier.prototype.configure = function(options) {\n this.queue && this.queue.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addTransform - adds a transform onto the end of the queue of transforms for this notifier\n *\n * @param transform - a function which takes three arguments:\n * * item: An Object representing the data to eventually be sent to Rollbar\n * * options: The current value of the options for this notifier\n * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this\n * callback with a null value for error if it wants the processing chain to continue, otherwise\n * with an error to terminate the processing. The item should be the updated item after this\n * transform is finished modifying it.\n */\nNotifier.prototype.addTransform = function(transform) {\n if (_.isFunction(transform)) {\n this.transforms.push(transform);\n }\n return this;\n};\n\n/*\n * log - the internal log function which applies the configured transforms and then pushes onto the\n * queue to be sent to the backend.\n *\n * @param item - An object with the following structure:\n * message [String] - An optional string to be sent to rollbar\n * error [Error] - An optional error\n *\n * @param callback - A function of type function(err, resp) which will be called with exactly one\n * null argument and one non-null argument. The callback will be called once, either during the\n * transform stage if an error occurs inside a transform, or in response to the communication with\n * the backend. The second argument will be the response from the backend in case of success.\n */\nNotifier.prototype.log = function(item, callback) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!this.options.enabled) {\n return callback(new Error('Rollbar is not enabled'));\n }\n\n this.queue.addPendingItem(item);\n var originalError = item.err;\n this._applyTransforms(item, function(err, i) {\n if (err) {\n this.queue.removePendingItem(item);\n return callback(err, null);\n }\n this.queue.addItem(i, callback, originalError, item);\n }.bind(this));\n};\n\n/* Internal */\n\n/*\n * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See\n * `addTransform` for more information.\n *\n * @param item - An item to be transformed\n * @param callback - A function of type function(err, item) which will be called with a non-null\n * error and a null item in the case of a transform failure, or a null error and non-null item after\n * all transforms have been applied.\n */\nNotifier.prototype._applyTransforms = function(item, callback) {\n var transformIndex = -1;\n var transformsLength = this.transforms.length;\n var transforms = this.transforms;\n var options = this.options;\n\n var cb = function(err, i) {\n if (err) {\n callback(err, null);\n return;\n }\n\n transformIndex++;\n\n if (transformIndex === transformsLength) {\n callback(null, i);\n return;\n }\n\n transforms[transformIndex](i, options, cb);\n };\n\n cb(null, item);\n};\n\nmodule.exports = Notifier;\n","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1/item/',\n search: null,\n version: '1',\n protocol: 'https:',\n port: 443\n};\n\n/**\n * Api is an object that encapsulates methods of communicating with\n * the Rollbar API. It is a standard interface with some parts implemented\n * differently for server or browser contexts. It is an object that should\n * be instantiated when used so it can contain non-global options that may\n * be different for another instance of RollbarApi.\n *\n * @param options {\n * accessToken: the accessToken to use for posting items to rollbar\n * endpoint: an alternative endpoint to send errors to\n * must be a valid, fully qualified URL.\n * The default is: https://api.rollbar.com/api/1/item\n * proxy: if you wish to proxy requests provide an object\n * with the following keys:\n * host or hostname (required): foo.example.com\n * port (optional): 123\n * protocol (optional): https\n * }\n */\nfunction Api(options, transport, urllib, truncation, jsonBackup) {\n this.options = options;\n this.transport = transport;\n this.url = urllib;\n this.truncation = truncation;\n this.jsonBackup = jsonBackup;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, urllib);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function(data, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n var self = this;\n\n // ensure the network request is scheduled after the current tick.\n setTimeout(function() {\n self.transport.post(self.accessToken, transportOptions, payload, callback);\n }, 0);\n};\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.buildJsonPayload = function(data, callback) {\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n\n if (stringifyResult.error) {\n if (callback) {\n callback(stringifyResult.error);\n }\n return null;\n }\n\n return stringifyResult.value;\n};\n\n/**\n *\n * @param jsonPayload\n * @param callback\n */\nApi.prototype.postJsonPayload = function(jsonPayload, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n this.transport.postJsonPayload(this.accessToken, transportOptions, jsonPayload, callback);\n};\n\nApi.prototype.configure = function(options) {\n var oldOptions = this.oldOptions;\n this.options = _.merge(oldOptions, options);\n this.transportOptions = _getTransport(this.options, this.url);\n if (this.options.accessToken !== undefined) {\n this.accessToken = this.options.accessToken;\n }\n return this;\n};\n\nfunction _getTransport(options, url) {\n return helpers.getTransportFromOptions(options, defaultOptions, url);\n}\n\nmodule.exports = Api;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (!_.isType(data.context, 'string')) {\n var contextResult = _.stringify(data.context, jsonBackup);\n if (contextResult.error) {\n data.context = 'Error: could not serialize \\'context\\'';\n } else {\n data.context = contextResult.value || '';\n }\n if (data.context.length > 255) {\n data.context = data.context.substr(0, 255);\n }\n }\n return {\n access_token: accessToken,\n data: data\n };\n}\n\nfunction getTransportFromOptions(options, defaults, url) {\n var hostname = defaults.hostname;\n var protocol = defaults.protocol;\n var port = defaults.port;\n var path = defaults.path;\n var search = defaults.search;\n var timeout = options.timeout;\n var transport = detectTransport(options)\n\n var proxy = options.proxy;\n if (options.endpoint) {\n var opts = url.parse(options.endpoint);\n hostname = opts.hostname;\n protocol = opts.protocol;\n port = opts.port;\n path = opts.pathname;\n search = opts.search;\n }\n return {\n timeout: timeout,\n hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy,\n transport: transport\n };\n}\n\nfunction detectTransport(options) {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var transport = options.defaultTransport || 'xhr';\n if (typeof gWindow.fetch === 'undefined') transport = 'xhr';\n if (typeof gWindow.XMLHttpRequest === 'undefined') transport = 'fetch';\n return transport;\n}\n\nfunction transportOptions(transport, method) {\n var protocol = transport.protocol || 'https:';\n var port = transport.port || (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);\n var hostname = transport.hostname;\n var path = transport.path;\n var timeout = transport.timeout;\n var transportAPI = transport.transport;\n if (transport.search) {\n path = path + transport.search;\n }\n if (transport.proxy) {\n path = protocol + '//' + hostname + path;\n hostname = transport.proxy.host || transport.proxy.hostname;\n port = transport.proxy.port;\n protocol = transport.proxy.protocol || protocol;\n }\n return {\n timeout: timeout,\n protocol: protocol,\n hostname: hostname,\n path: path,\n port: port,\n method: method,\n transport: transportAPI\n };\n}\n\nfunction appendPathToPath(base, path) {\n var baseTrailingSlash = /\\/$/.test(base);\n var pathBeginningSlash = /^\\//.test(path);\n\n if (baseTrailingSlash && pathBeginningSlash) {\n path = path.substring(1);\n } else if (!baseTrailingSlash && !pathBeginningSlash) {\n path = '/' + path;\n }\n\n return base + path;\n}\n\nmodule.exports = {\n buildPayload: buildPayload,\n getTransportFromOptions: getTransportFromOptions,\n transportOptions: transportOptions,\n appendPathToPath: appendPathToPath\n};\n","// Console-polyfill. MIT license.\n// https://github.com/paulmillr/console-polyfill\n// Make it safe to do console.log() always.\n(function(global) {\n 'use strict';\n if (!global.console) {\n global.console = {};\n }\n var con = global.console;\n var prop, method;\n var dummy = function() {};\n var properties = ['memory'];\n var methods = ('assert,clear,count,debug,dir,dirxml,error,exception,group,' +\n 'groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,' +\n 'show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn').split(',');\n while (prop = properties.pop()) if (!con[prop]) con[prop] = {};\n while (method = methods.pop()) if (!con[method]) con[method] = dummy;\n // Using `this` for web workers & supports Browserify / Webpack.\n})(typeof window === 'undefined' ? this : window);\n","'use strict';\n\n// This detection.js module is used to encapsulate any ugly browser/feature\n// detection we may need to do.\n\n// Figure out which version of IE we're using, if any.\n// This is gleaned from http://stackoverflow.com/questions/5574842/best-way-to-check-for-ie-less-than-9-in-javascript-without-library\n// Will return an integer on IE (i.e. 8)\n// Will return undefined otherwise\nfunction getIEVersion() {\n\tvar undef;\n\tif (typeof document === 'undefined') {\n\t\treturn undef;\n\t}\n\n var v = 3,\n div = document.createElement('div'),\n all = div.getElementsByTagName('i');\n\n while (\n div.innerHTML = '',\n all[0]\n );\n\n return v > 4 ? v : undef;\n}\n\nvar Detection = {\n ieVersion: getIEVersion\n};\n\nmodule.exports = Detection;\n","'use strict';\n\nfunction captureUncaughtExceptions(window, handler, shim) {\n if (!window) { return; }\n var oldOnError;\n\n if (typeof handler._rollbarOldOnError === 'function') {\n oldOnError = handler._rollbarOldOnError;\n } else if (window.onerror) {\n oldOnError = window.onerror;\n while (oldOnError._rollbarOldOnError) {\n oldOnError = oldOnError._rollbarOldOnError;\n }\n handler._rollbarOldOnError = oldOnError;\n }\n\n handler.handleAnonymousErrors();\n\n var fn = function() {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n if (shim) {\n fn._rollbarOldOnError = oldOnError;\n }\n window.onerror = fn;\n}\n\nfunction _rollbarWindowOnError(window, r, old, args) {\n if (window._rollbarWrappedError) {\n if (!args[4]) {\n args[4] = window._rollbarWrappedError;\n }\n if (!args[5]) {\n args[5] = window._rollbarWrappedError._rollbarContext;\n }\n window._rollbarWrappedError = null;\n }\n\n var ret = r.handleUncaughtException.apply(r, args);\n\n if (old) {\n old.apply(window, args);\n }\n\n // Let other chained onerror handlers above run before setting this.\n // If an error is thrown and caught within a chained onerror handler,\n // Error.prepareStackTrace() will see that one before the one we want.\n if (ret === 'anonymous') {\n r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()\n }\n}\n\nfunction captureUnhandledRejections(window, handler, shim) {\n if (!window) { return; }\n\n if (typeof window._rollbarURH === 'function' && window._rollbarURH.belongsToShim) {\n window.removeEventListener('unhandledrejection', window._rollbarURH);\n }\n\n var rejectionHandler = function (evt) {\n var reason, promise, detail;\n try {\n reason = evt.reason;\n } catch (e) {\n reason = undefined;\n }\n try {\n promise = evt.promise;\n } catch (e) {\n promise = '[unhandledrejection] error getting `promise` from event';\n }\n try {\n detail = evt.detail;\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\n }\n } catch (e) {\n // Ignore\n }\n if (!reason) {\n reason = '[unhandledrejection] error getting `reason` from event';\n }\n\n if (handler && handler.handleUnhandledRejection) {\n handler.handleUnhandledRejection(reason, promise);\n }\n };\n rejectionHandler.belongsToShim = shim;\n window._rollbarURH = rejectionHandler;\n window.addEventListener('unhandledrejection', rejectionHandler);\n}\n\n\nmodule.exports = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections\n};\n","'use strict';\n\nvar _ = require('../utility');\nvar makeFetchRequest = require('./transport/fetch');\nvar makeXhrRequest = require('./transport/xhr');\n\n/*\n * accessToken may be embedded in payload but that should not\n * be assumed\n *\n * options: {\n * hostname\n * protocol\n * path\n * port\n * method\n * transport ('xhr' | 'fetch')\n * }\n *\n * params is an object containing key/value pairs. These\n * will be appended to the path as 'key=value&key=value'\n *\n * payload is an unserialized object\n */\nfunction Transport(truncation) {\n this.truncation = truncation;\n}\n\nTransport.prototype.get = function(accessToken, options, params, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n _.addParamsAndAccessTokenToPath(accessToken, options, params);\n\n var method = 'GET';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken, url, method, null, callback, requestFactory, options.timeout, options.transport\n );\n}\n\nTransport.prototype.post = function(accessToken, options, payload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!payload) {\n return callback(new Error('Cannot send empty request'));\n }\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n if (stringifyResult.error) {\n return callback(stringifyResult.error);\n }\n\n var writeData = stringifyResult.value;\n var method = 'POST';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken, url, method, writeData, callback, requestFactory, options.timeout, options.transport\n );\n}\n\nTransport.prototype.postJsonPayload = function (accessToken, options, jsonPayload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n var method = 'POST';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken, url, method, jsonPayload, callback, requestFactory, options.timeout, options.transport\n );\n}\n\n\n// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope\n// so Angular change detection isn't triggered on each API call.\n// This is the equivalent of runOutsideAngular().\n//\nTransport.prototype._makeZoneRequest = function () {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;\n var args = Array.prototype.slice.call(arguments);\n\n if (currentZone && currentZone._name === 'angular') {\n var rootZone = currentZone._parent;\n var self = this;\n rootZone.run(function () {\n self._makeRequest.apply(undefined, args);\n });\n } else {\n this._makeRequest.apply(undefined, args);\n }\n}\n\nTransport.prototype._makeRequest = function (\n accessToken, url, method, data, callback, requestFactory, timeout, transport\n) {\n if (typeof RollbarProxy !== 'undefined') {\n return _proxyRequest(data, callback);\n }\n\n if (transport === 'fetch') {\n makeFetchRequest(accessToken, url, method, data, callback, timeout)\n } else {\n makeXhrRequest(accessToken, url, method, data, callback, requestFactory, timeout)\n }\n}\n\n/* global RollbarProxy */\nfunction _proxyRequest(json, callback) {\n var rollbarProxy = new RollbarProxy();\n rollbarProxy.sendJsonPayload(\n json,\n function(_msg) { /* do nothing */ }, // eslint-disable-line no-unused-vars\n function(err) {\n callback(new Error(err));\n }\n );\n}\n\nmodule.exports = Transport;\n","'use strict';\n\nvar logger = require('../logger');\nvar _ = require('../../utility');\n\nfunction makeFetchRequest(accessToken, url, method, data, callback, timeout) {\n var controller;\n var timeoutId;\n\n if(_.isFiniteNumber(timeout)) {\n controller = new AbortController();\n timeoutId = setTimeout(function () {controller.abort()}, timeout);\n }\n\n fetch(url, {\n method: method,\n headers: {\n 'Content-Type': 'application/json',\n 'X-Rollbar-Access-Token': accessToken,\n signal: controller && controller.signal\n },\n body: data,\n })\n .then(function (response) {\n if (timeoutId) clearTimeout(timeoutId);\n return response.json();\n })\n .then(function (data) {\n callback(null, data);\n })\n .catch(function (error) {\n logger.error(error.message);\n callback(error);\n });\n}\n\nmodule.exports = makeFetchRequest;\n","'use strict';\n\n/*global XDomainRequest*/\n\nvar _ = require('../../utility');\nvar logger = require('../logger');\n\nfunction makeXhrRequest(accessToken, url, method, data, callback, requestFactory, timeout) {\n var request;\n if (requestFactory) {\n request = requestFactory();\n } else {\n request = _createXMLHTTPObject();\n }\n if (!request) {\n // Give up, no way to send requests\n return callback(new Error('No way to send a request'));\n }\n try {\n try {\n var onreadystatechange = function() {\n try {\n if (onreadystatechange && request.readyState === 4) {\n onreadystatechange = undefined;\n\n var parseResponse = _.jsonParse(request.responseText);\n if (_isSuccess(request)) {\n callback(parseResponse.error, parseResponse.value);\n return;\n } else if (_isNormalFailure(request)) {\n if (request.status === 403) {\n // likely caused by using a server access token\n var message = parseResponse.value && parseResponse.value.message;\n logger.error(message);\n }\n // return valid http status codes\n callback(new Error(String(request.status)));\n } else {\n // IE will return a status 12000+ on some sort of connection failure,\n // so we return a blank error\n // http://msdn.microsoft.com/en-us/library/aa383770%28VS.85%29.aspx\n var msg = 'XHR response had no status code (likely connection failure)';\n callback(_newRetriableError(msg));\n }\n }\n } catch (ex) {\n //jquery source mentions firefox may error out while accessing the\n //request members if there is a network error\n //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111\n var exc;\n if (ex && ex.stack) {\n exc = ex;\n } else {\n exc = new Error(ex);\n }\n callback(exc);\n }\n };\n\n request.open(method, url, true);\n if (request.setRequestHeader) {\n request.setRequestHeader('Content-Type', 'application/json');\n request.setRequestHeader('X-Rollbar-Access-Token', accessToken);\n }\n\n if(_.isFiniteNumber(timeout)) {\n request.timeout = timeout;\n }\n\n request.onreadystatechange = onreadystatechange;\n request.send(data);\n } catch (e1) {\n // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest\n if (typeof XDomainRequest !== 'undefined') {\n\n // Assume we are in a really old browser which has a bunch of limitations:\n // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx\n\n // Extreme paranoia: if we have XDomainRequest then we have a window, but just in case\n if (!window || !window.location) {\n return callback(new Error('No window available during request, unknown environment'));\n }\n\n // If the current page is http, try and send over http\n if (window.location.href.substring(0, 5) === 'http:' && url.substring(0, 5) === 'https') {\n url = 'http' + url.substring(5);\n }\n\n var xdomainrequest = new XDomainRequest();\n xdomainrequest.onprogress = function() {};\n xdomainrequest.ontimeout = function() {\n var msg = 'Request timed out';\n var code = 'ETIMEDOUT';\n callback(_newRetriableError(msg, code));\n };\n xdomainrequest.onerror = function() {\n callback(new Error('Error during request'));\n };\n xdomainrequest.onload = function() {\n var parseResponse = _.jsonParse(xdomainrequest.responseText);\n callback(parseResponse.error, parseResponse.value);\n };\n xdomainrequest.open(method, url, true);\n xdomainrequest.send(data);\n } else {\n callback(new Error('Cannot find a method to transport a request'));\n }\n }\n } catch (e2) {\n callback(e2);\n }\n}\n\nfunction _createXMLHTTPObject() {\n /* global ActiveXObject:false */\n\n var factories = [\n function () {\n return new XMLHttpRequest();\n },\n function () {\n return new ActiveXObject('Msxml2.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Msxml3.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Microsoft.XMLHTTP');\n }\n ];\n var xmlhttp;\n var i;\n var numFactories = factories.length;\n for (i = 0; i < numFactories; i++) {\n /* eslint-disable no-empty */\n try {\n xmlhttp = factories[i]();\n break;\n } catch (e) {\n // pass\n }\n /* eslint-enable no-empty */\n }\n return xmlhttp;\n}\n\nfunction _isSuccess(r) {\n return r && r.status && r.status === 200;\n}\n\nfunction _isNormalFailure(r) {\n return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;\n}\n\nfunction _newRetriableError(message, code) {\n var err = new Error(message);\n err.code = code || 'ENOTFOUND';\n return err;\n}\n\nmodule.exports = makeXhrRequest;\n","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('../errorParser');\nvar logger = require('./logger');\n\nfunction handleDomException(item, options, callback) {\n if(item.err && errorParser.Stack(item.err).name === 'DOMException') {\n var originalError = new Error();\n originalError.name = item.err.name;\n originalError.message = item.err.message;\n originalError.stack = item.err.stack;\n originalError.nested = item.err;\n item.err = originalError;\n }\n callback(null, item);\n}\n\nfunction handleItemWithError(item, options, callback) {\n item.data = item.data || {};\n if (item.err) {\n try {\n item.stackInfo = item.err._savedStackTrace || errorParser.parse(item.err, item.skipFrames);\n\n if (options.addErrorContext) {\n addErrorContext(item);\n }\n } catch (e) {\n logger.error('Error while parsing the error object.', e);\n try {\n item.message = item.err.message || item.err.description || item.message || String(item.err);\n } catch (e2) {\n item.message = String(item.err) || String(e2);\n }\n delete item.err;\n }\n }\n callback(null, item);\n}\n\nfunction addErrorContext(item) {\n var chain = [];\n var err = item.err;\n\n chain.push(err);\n\n while (err.nested || err.cause) {\n err = err.nested || err.cause;\n chain.push(err);\n }\n\n _.addErrorContext(item, chain);\n}\n\nfunction ensureItemHasSomethingToSay(item, options, callback) {\n if (!item.message && !item.stackInfo && !item.custom) {\n callback(new Error('No message, stack info, or custom data'), null);\n }\n callback(null, item);\n}\n\nfunction addBaseInfo(item, options, callback) {\n var environment = (options.payload && options.payload.environment) || options.environment;\n item.data = _.merge(item.data, {\n environment: environment,\n level: item.level,\n endpoint: options.endpoint,\n platform: 'browser',\n framework: 'browser-js',\n language: 'javascript',\n server: {},\n uuid: item.uuid,\n notifier: {\n name: 'rollbar-browser-js',\n version: options.version\n },\n custom: item.custom\n });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function(item, options, callback) {\n var requestInfo = {};\n\n if (window && window.location) {\n requestInfo.url = window.location.href;\n requestInfo.query_string = window.location.search;\n }\n\n var remoteString = '$remote_ip';\n if (!options.captureIp) {\n remoteString = null;\n } else if (options.captureIp !== true) {\n remoteString += '_anonymize';\n }\n if (remoteString) requestInfo.user_ip = remoteString;\n\n if (Object.keys(requestInfo).length > 0) {\n _.set(item, 'data.request', requestInfo);\n }\n\n callback(null, item);\n };\n}\n\nfunction addClientInfo(window) {\n return function(item, options, callback) {\n if (!window) {\n return callback(null, item);\n }\n var nav = window.navigator || {};\n var scr = window.screen || {};\n _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: nav.userAgent,\n language: nav.language,\n cookie_enabled: nav.cookieEnabled,\n screen: {\n width: scr.width,\n height: scr.height\n }\n }\n });\n callback(null, item);\n };\n}\n\nfunction addPluginInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.navigator) {\n return callback(null, item);\n }\n var plugins = [];\n var navPlugins = window.navigator.plugins || [];\n var cur;\n for (var i=0, l=navPlugins.length; i < l; ++i) {\n cur = navPlugins[i];\n plugins.push({name: cur.name, description: cur.description});\n }\n _.set(item, 'data.client.javascript.plugins', plugins);\n callback(null, item);\n };\n}\n\nfunction addBody(item, options, callback) {\n if (item.stackInfo) {\n if (item.stackInfo.traceChain) {\n addBodyTraceChain(item, options, callback);\n } else {\n addBodyTrace(item, options, callback);\n }\n } else {\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction addBodyMessage(item, options, callback) {\n var message = item.message;\n var custom = item.custom;\n\n if (!message) {\n message = 'Item sent with null or missing arguments.';\n }\n var result = {\n body: message\n };\n\n if (custom) {\n result.extra = _.merge(custom);\n }\n\n _.set(item, 'data.body', {message: result});\n callback(null, item);\n}\n\nfunction stackFromItem(item) {\n // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = item.stackInfo.stack;\n if (stack && stack.length === 0 && item._unhandledStackInfo && item._unhandledStackInfo.stack) {\n stack = item._unhandledStackInfo.stack;\n }\n return stack;\n}\n\nfunction addBodyTraceChain(item, options, callback) {\n var traceChain = item.stackInfo.traceChain;\n var traces = [];\n\n var traceChainLength = traceChain.length;\n for (var i = 0; i < traceChainLength; i++) {\n var trace = buildTrace(item, traceChain[i], options);\n traces.push(trace);\n }\n\n _.set(item, 'data.body', {trace_chain: traces});\n callback(null, item);\n}\n\nfunction addBodyTrace(item, options, callback) {\n var stack = stackFromItem(item);\n\n if (stack) {\n var trace = buildTrace(item, item.stackInfo, options);\n _.set(item, 'data.body', {trace: trace});\n callback(null, item);\n } else {\n var stackInfo = item.stackInfo;\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction buildTrace(item, stackInfo, options) {\n var description = item && item.data.description;\n var custom = item && item.custom;\n var stack = stackFromItem(item);\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n var trace = {\n exception: {\n 'class': className,\n message: message\n }\n };\n\n if (description) {\n trace.exception.description = description;\n }\n\n if (stack) {\n if (stack.length === 0) {\n trace.exception.stack = stackInfo.rawStack;\n trace.exception.raw = String(stackInfo.rawException);\n }\n var stackFrame;\n var frame;\n var code;\n var pre;\n var post;\n var contextLength;\n var i, mid;\n\n trace.frames = [];\n for (i = 0; i < stack.length; ++i) {\n stackFrame = stack[i];\n frame = {\n filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',\n lineno: stackFrame.line || null,\n method: (!stackFrame.func || stackFrame.func === '?') ? '[anonymous]' : stackFrame.func,\n colno: stackFrame.column\n };\n if (options.sendFrameUrl) {\n frame.url = stackFrame.url;\n }\n if (frame.method && frame.method.endsWith && frame.method.endsWith('_rollbar_wrapped')) {\n continue;\n }\n\n code = pre = post = null;\n contextLength = stackFrame.context ? stackFrame.context.length : 0;\n if (contextLength) {\n mid = Math.floor(contextLength / 2);\n pre = stackFrame.context.slice(0, mid);\n code = stackFrame.context[mid];\n post = stackFrame.context.slice(mid);\n }\n\n if (code) {\n frame.code = code;\n }\n\n if (pre || post) {\n frame.context = {};\n if (pre && pre.length) {\n frame.context.pre = pre;\n }\n if (post && post.length) {\n frame.context.post = post;\n }\n }\n\n if (stackFrame.args) {\n frame.args = stackFrame.args;\n }\n\n trace.frames.push(frame);\n }\n\n // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last\n trace.frames.reverse();\n\n if (custom) {\n trace.extra = _.merge(custom);\n }\n }\n\n return trace;\n}\n\nfunction errorClass(stackInfo, guess, options) {\n if (stackInfo.name) {\n return stackInfo.name;\n } else if (options.guessErrorClass) {\n return guess;\n } else {\n return '(unknown)';\n }\n}\n\nfunction addScrubber(scrubFn) {\n return function (item, options, callback) {\n if (scrubFn) {\n var scrubFields = options.scrubFields || [];\n var scrubPaths = options.scrubPaths || [];\n item.data = scrubFn(item.data, scrubFields, scrubPaths);\n }\n callback(null, item);\n }\n}\n\nmodule.exports = {\n handleDomException: handleDomException,\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n addScrubber: addScrubber\n};\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('error-stack-parser', ['stackframe'], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory(require('stackframe'));\n } else {\n root.ErrorStackParser = factory(root.StackFrame);\n }\n}(this, function ErrorStackParser(StackFrame) {\n 'use strict';\n\n var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\\S+:\\d+/;\n var CHROME_IE_STACK_REGEXP = /^\\s*at .*(\\S+:\\d+|\\(native\\))/m;\n var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\\[native code])?$/;\n\n return {\n /**\n * Given an Error object, extract the most information from it.\n *\n * @param {Error} error object\n * @return {Array} of StackFrames\n */\n parse: function ErrorStackParser$$parse(error) {\n if (typeof error.stacktrace !== 'undefined' || typeof error['opera#sourceloc'] !== 'undefined') {\n return this.parseOpera(error);\n } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {\n return this.parseV8OrIE(error);\n } else if (error.stack) {\n return this.parseFFOrSafari(error);\n } else {\n throw new Error('Cannot parse given Error object');\n }\n },\n\n // Separate line and column numbers from a string of the form: (URI:Line:Column)\n extractLocation: function ErrorStackParser$$extractLocation(urlLike) {\n // Fail-fast but return locations like \"(native)\"\n if (urlLike.indexOf(':') === -1) {\n return [urlLike];\n }\n\n var regExp = /(.+?)(?::(\\d+))?(?::(\\d+))?$/;\n var parts = regExp.exec(urlLike.replace(/[()]/g, ''));\n return [parts[1], parts[2] || undefined, parts[3] || undefined];\n },\n\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(CHROME_IE_STACK_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n if (line.indexOf('(eval ') > -1) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n line = line.replace(/eval code/g, 'eval').replace(/(\\(eval at [^()]*)|(,.*$)/g, '');\n }\n var sanitizedLine = line.replace(/^\\s+/, '').replace(/\\(eval code/g, '(').replace(/^.*?\\s+/, '');\n\n // capture and preseve the parenthesized location \"(/foo/my bar.js:12:87)\" in\n // case it has spaces in it, as the string is split on \\s+ later on\n var location = sanitizedLine.match(/ (\\(.+\\)$)/);\n\n // remove the parenthesized location from the line, if it was matched\n sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;\n\n // if a location was matched, pass it to extractLocation() otherwise pass all sanitizedLine\n // because this line doesn't have function name\n var locationParts = this.extractLocation(location ? location[1] : sanitizedLine);\n var functionName = location && sanitizedLine || undefined;\n var fileName = ['eval', ''].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];\n\n return new StackFrame({\n functionName: functionName,\n fileName: fileName,\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n },\n\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n if (line.indexOf(' > eval') > -1) {\n line = line.replace(/ line (\\d+)(?: > eval line \\d+)* > eval:\\d+:\\d+/g, ':$1');\n }\n\n if (line.indexOf('@') === -1 && line.indexOf(':') === -1) {\n // Safari eval frames only have function names and nothing else\n return new StackFrame({\n functionName: line\n });\n } else {\n var functionNameRegex = /((.*\".+\"[^@]*)?[^@]*)(?:@)/;\n var matches = line.match(functionNameRegex);\n var functionName = matches && matches[1] ? matches[1] : undefined;\n var locationParts = this.extractLocation(line.replace(functionNameRegex, ''));\n\n return new StackFrame({\n functionName: functionName,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }\n }, this);\n },\n\n parseOpera: function ErrorStackParser$$parseOpera(e) {\n if (!e.stacktrace || (e.message.indexOf('\\n') > -1 &&\n e.message.split('\\n').length > e.stacktrace.split('\\n').length)) {\n return this.parseOpera9(e);\n } else if (!e.stack) {\n return this.parseOpera10(e);\n } else {\n return this.parseOpera11(e);\n }\n },\n\n parseOpera9: function ErrorStackParser$$parseOpera9(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)/i;\n var lines = e.message.split('\\n');\n var result = [];\n\n for (var i = 2, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(new StackFrame({\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n }));\n }\n }\n\n return result;\n },\n\n parseOpera10: function ErrorStackParser$$parseOpera10(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)(?:: In function (\\S+))?$/i;\n var lines = e.stacktrace.split('\\n');\n var result = [];\n\n for (var i = 0, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(\n new StackFrame({\n functionName: match[3] || undefined,\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n })\n );\n }\n }\n\n return result;\n },\n\n // Opera 10.65+ Error.stack very similar to FF/Safari\n parseOpera11: function ErrorStackParser$$parseOpera11(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);\n }, this);\n\n return filtered.map(function(line) {\n var tokens = line.split('@');\n var locationParts = this.extractLocation(tokens.pop());\n var functionCall = (tokens.shift() || '');\n var functionName = functionCall\n .replace(//, '$2')\n .replace(/\\([^)]*\\)/g, '') || undefined;\n var argsRaw;\n if (functionCall.match(/\\(([^)]*)\\)/)) {\n argsRaw = functionCall.replace(/^[^(]+\\(([^)]*)\\)$/, '$1');\n }\n var args = (argsRaw === undefined || argsRaw === '[arguments not available]') ?\n undefined : argsRaw.split(',');\n\n return new StackFrame({\n functionName: functionName,\n args: args,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n }\n };\n}));\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('stackframe', [], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.StackFrame = factory();\n }\n}(this, function() {\n 'use strict';\n function _isNumber(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n }\n\n function _capitalize(str) {\n return str.charAt(0).toUpperCase() + str.substring(1);\n }\n\n function _getter(p) {\n return function() {\n return this[p];\n };\n }\n\n var booleanProps = ['isConstructor', 'isEval', 'isNative', 'isToplevel'];\n var numericProps = ['columnNumber', 'lineNumber'];\n var stringProps = ['fileName', 'functionName', 'source'];\n var arrayProps = ['args'];\n var objectProps = ['evalOrigin'];\n\n var props = booleanProps.concat(numericProps, stringProps, arrayProps, objectProps);\n\n function StackFrame(obj) {\n if (!obj) return;\n for (var i = 0; i < props.length; i++) {\n if (obj[props[i]] !== undefined) {\n this['set' + _capitalize(props[i])](obj[props[i]]);\n }\n }\n }\n\n StackFrame.prototype = {\n getArgs: function() {\n return this.args;\n },\n setArgs: function(v) {\n if (Object.prototype.toString.call(v) !== '[object Array]') {\n throw new TypeError('Args must be an Array');\n }\n this.args = v;\n },\n\n getEvalOrigin: function() {\n return this.evalOrigin;\n },\n setEvalOrigin: function(v) {\n if (v instanceof StackFrame) {\n this.evalOrigin = v;\n } else if (v instanceof Object) {\n this.evalOrigin = new StackFrame(v);\n } else {\n throw new TypeError('Eval Origin must be an Object or StackFrame');\n }\n },\n\n toString: function() {\n var fileName = this.getFileName() || '';\n var lineNumber = this.getLineNumber() || '';\n var columnNumber = this.getColumnNumber() || '';\n var functionName = this.getFunctionName() || '';\n if (this.getIsEval()) {\n if (fileName) {\n return '[eval] (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return '[eval]:' + lineNumber + ':' + columnNumber;\n }\n if (functionName) {\n return functionName + ' (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return fileName + ':' + lineNumber + ':' + columnNumber;\n }\n };\n\n StackFrame.fromString = function StackFrame$$fromString(str) {\n var argsStartIndex = str.indexOf('(');\n var argsEndIndex = str.lastIndexOf(')');\n\n var functionName = str.substring(0, argsStartIndex);\n var args = str.substring(argsStartIndex + 1, argsEndIndex).split(',');\n var locationString = str.substring(argsEndIndex + 1);\n\n if (locationString.indexOf('@') === 0) {\n var parts = /@(.+?)(?::(\\d+))?(?::(\\d+))?$/.exec(locationString, '');\n var fileName = parts[1];\n var lineNumber = parts[2];\n var columnNumber = parts[3];\n }\n\n return new StackFrame({\n functionName: functionName,\n args: args || undefined,\n fileName: fileName,\n lineNumber: lineNumber || undefined,\n columnNumber: columnNumber || undefined\n });\n };\n\n for (var i = 0; i < booleanProps.length; i++) {\n StackFrame.prototype['get' + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);\n StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function(p) {\n return function(v) {\n this[p] = Boolean(v);\n };\n })(booleanProps[i]);\n }\n\n for (var j = 0; j < numericProps.length; j++) {\n StackFrame.prototype['get' + _capitalize(numericProps[j])] = _getter(numericProps[j]);\n StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function(p) {\n return function(v) {\n if (!_isNumber(v)) {\n throw new TypeError(p + ' must be a Number');\n }\n this[p] = Number(v);\n };\n })(numericProps[j]);\n }\n\n for (var k = 0; k < stringProps.length; k++) {\n StackFrame.prototype['get' + _capitalize(stringProps[k])] = _getter(stringProps[k]);\n StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function(p) {\n return function(v) {\n this[p] = String(v);\n };\n })(stringProps[k]);\n }\n\n return StackFrame;\n}));\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction itemToPayload(item, options, callback) {\n var data = item.data;\n\n if (item._isUncaught) {\n data._isUncaught = true;\n }\n if (item._originalArgs) {\n data._originalArgs = item._originalArgs;\n }\n callback(null, data);\n}\n\nfunction addPayloadOptions(item, options, callback) {\n var payloadOptions = options.payload || {};\n if (payloadOptions.body) {\n delete payloadOptions.body;\n }\n\n item.data = _.merge(item.data, payloadOptions);\n callback(null, item);\n}\n\nfunction addTelemetryData(item, options, callback) {\n if (item.telemetryEvents) {\n _.set(item, 'data.body.telemetry', item.telemetryEvents);\n }\n callback(null, item);\n}\n\nfunction addMessageWithError(item, options, callback) {\n if (!item.message) {\n callback(null, item);\n return;\n }\n var tracePath = 'data.body.trace_chain.0';\n var trace = _.get(item, tracePath);\n if (!trace) {\n tracePath = 'data.body.trace';\n trace = _.get(item, tracePath);\n }\n if (trace) {\n if (!(trace.exception && trace.exception.description)) {\n _.set(item, tracePath+'.exception.description', item.message);\n callback(null, item);\n return;\n }\n var extra = _.get(item, tracePath+'.extra') || {};\n var newExtra = _.merge(extra, {message: item.message});\n _.set(item, tracePath+'.extra', newExtra);\n }\n callback(null, item);\n}\n\nfunction userTransform(logger) {\n return function(item, options, callback) {\n var newItem = _.merge(item);\n var response = null;\n try {\n if (_.isFunction(options.transform)) {\n response = options.transform(newItem.data, item);\n }\n } catch (e) {\n options.transform = null;\n logger.error('Error while calling custom transform() function. Removing custom transform().', e);\n callback(null, item);\n return;\n }\n if(_.isPromise(response)) {\n response.then(function (promisedItem) {\n if(promisedItem) {\n newItem.data = promisedItem;\n }\n callback(null, newItem);\n }, function (error) {\n callback(error, item);\n });\n } else {\n callback(null, newItem);\n }\n }\n}\n\nfunction addConfigToPayload(item, options, callback) {\n if (!options.sendConfig) {\n return callback(null, item);\n }\n var configKey = '_rollbarConfig';\n var custom = _.get(item, 'data.custom') || {};\n custom[configKey] = options;\n item.data.custom = custom;\n callback(null, item);\n}\n\nfunction addFunctionOption(options, name) {\n if(_.isFunction(options[name])) {\n options[name] = options[name].toString();\n }\n}\n\nfunction addConfiguredOptions(item, options, callback) {\n var configuredOptions = options._configuredOptions;\n\n // These must be stringified or they'll get dropped during serialization.\n addFunctionOption(configuredOptions, 'transform');\n addFunctionOption(configuredOptions, 'checkIgnore');\n addFunctionOption(configuredOptions, 'onSendCallback');\n\n delete configuredOptions.accessToken;\n item.data.notifier.configured_options = configuredOptions;\n callback(null, item);\n}\n\nfunction addDiagnosticKeys(item, options, callback) {\n var diagnostic = _.merge(item.notifier.client.notifier.diagnostic, item.diagnostic);\n\n if (_.get(item, 'err._isAnonymous')) {\n diagnostic.is_anonymous = true;\n }\n\n if (item._isUncaught) {\n diagnostic.is_uncaught = item._isUncaught;\n }\n\n if (item.err) {\n try {\n diagnostic.raw_error = {\n message: item.err.message,\n name: item.err.name,\n constructor_name: item.err.constructor && item.err.constructor.name,\n filename: item.err.fileName,\n line: item.err.lineNumber,\n column: item.err.columnNumber,\n stack: item.err.stack\n };\n } catch (e) {\n diagnostic.raw_error = { failed: String(e) };\n }\n }\n\n item.data.notifier.diagnostic = _.merge(item.data.notifier.diagnostic, diagnostic);\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addPayloadOptions: addPayloadOptions,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError,\n userTransform: userTransform,\n addConfigToPayload: addConfigToPayload,\n addConfiguredOptions: addConfiguredOptions,\n addDiagnosticKeys: addDiagnosticKeys\n};\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction checkIgnore(item, settings) {\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore\n};\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction checkLevel(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = settings.reportLevel;\n var reportLevelVal = _.LEVELS[reportLevel] || 0;\n\n if (levelVal < reportLevelVal) {\n return false;\n }\n return true;\n}\n\nfunction userCheckIgnore(logger) {\n return function(item, settings) {\n var isUncaught = !!item._isUncaught;\n delete item._isUncaught;\n var args = item._originalArgs;\n delete item._originalArgs;\n try {\n if (_.isFunction(settings.onSendCallback)) {\n settings.onSendCallback(isUncaught, args, item);\n }\n } catch (e) {\n settings.onSendCallback = null;\n logger.error('Error while calling onSendCallback, removing', e);\n }\n try {\n if (_.isFunction(settings.checkIgnore) && settings.checkIgnore(isUncaught, args, item)) {\n return false;\n }\n } catch (e) {\n settings.checkIgnore = null;\n logger.error('Error while calling custom checkIgnore(), removing', e);\n }\n return true;\n }\n}\n\nfunction urlIsNotBlockListed(logger) {\n return function(item, settings) {\n return !urlIsOnAList(item, settings, 'blocklist', logger);\n }\n}\n\nfunction urlIsSafeListed(logger) {\n return function(item, settings) {\n return urlIsOnAList(item, settings, 'safelist', logger);\n }\n}\n\nfunction matchFrames(trace, list, block) {\n if (!trace) { return !block }\n\n var frames = trace.frames;\n\n if (!frames || frames.length === 0) { return !block; }\n\n var frame, filename, url, urlRegex;\n var listLength = list.length;\n var frameLength = frames.length;\n for (var i = 0; i < frameLength; i++) {\n frame = frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) { return !block; }\n\n for (var j = 0; j < listLength; j++) {\n url = list[j];\n urlRegex = new RegExp(url);\n\n if (urlRegex.test(filename)) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction urlIsOnAList(item, settings, safeOrBlock, logger) {\n // safelist is the default\n var block = false;\n if (safeOrBlock === 'blocklist') {\n block = true;\n }\n\n var list, traces;\n try {\n list = block ? settings.hostBlockList : settings.hostSafeList;\n traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];\n\n // These two checks are important to come first as they are defaults\n // in case the list is missing or the trace is missing or not well-formed\n if (!list || list.length === 0) {\n return !block;\n }\n if (traces.length === 0 || !traces[0]) {\n return !block;\n }\n\n var tracesLength = traces.length;\n for (var i = 0; i < tracesLength; i++) {\n if(matchFrames(traces[i], list, block)) {\n return true;\n }\n }\n } catch (e)\n /* istanbul ignore next */\n {\n if (block) {\n settings.hostBlockList = null;\n } else {\n settings.hostSafeList = null;\n }\n var listName = block ? 'hostBlockList' : 'hostSafeList';\n logger.error('Error while reading your configuration\\'s ' + listName + ' option. Removing custom ' + listName + '.', e);\n return !block;\n }\n return false;\n}\n\nfunction messageIsIgnored(logger) {\n return function(item, settings) {\n var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n messages = messagesFromItem(item);\n\n if (messages.length === 0){\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n\n for (j = 0; j < messages.length; j++) {\n messageIsIgnored = rIgnoredMessage.test(messages[j]);\n\n if (messageIsIgnored) {\n return false;\n }\n }\n }\n } catch(e)\n /* istanbul ignore next */\n {\n settings.ignoredMessages = null;\n logger.error('Error while reading your configuration\\'s ignoredMessages option. Removing custom ignoredMessages.');\n }\n\n return true;\n }\n}\n\nfunction messagesFromItem(item) {\n var body = item.body;\n var messages = [];\n\n // The payload schema only allows one of trace_chain, message, or trace.\n // However, existing test cases are based on having both trace and message present.\n // So here we preserve the ability to collect strings from any combination of these keys.\n if (body.trace_chain) {\n var traceChain = body.trace_chain;\n for (var i = 0; i < traceChain.length; i++) {\n var trace = traceChain[i];\n messages.push(_.get(trace, 'exception.message'));\n }\n }\n if (body.trace) {\n messages.push(_.get(body, 'trace.exception.message'));\n }\n if (body.message) {\n messages.push(_.get(body, 'message.body'));\n }\n return messages;\n}\n\nmodule.exports = {\n checkLevel: checkLevel,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlockListed: urlIsNotBlockListed,\n urlIsSafeListed: urlIsSafeListed,\n messageIsIgnored: messageIsIgnored\n};\n","'use strict';\n\nmodule.exports = {\n version: '2.26.2',\n endpoint: 'api.rollbar.com/api/1/item/',\n logLevel: 'debug',\n reportLevel: 'debug',\n uncaughtErrorLevel: 'error',\n maxItems: 0,\n itemsPerMin: 60\n}\n","'use strict';\n\nmodule.exports = {\n scrubFields: [\n 'pw',\n 'pass',\n 'passwd',\n 'password',\n 'secret',\n 'confirm_password',\n 'confirmPassword',\n 'password_confirmation',\n 'passwordConfirmation',\n 'access_token',\n 'accessToken',\n 'X-Rollbar-Access-Token',\n 'secret_key',\n 'secretKey',\n 'secretToken',\n 'cc-number',\n 'card number',\n 'cardnumber',\n 'cardnum',\n 'ccnum',\n 'ccnumber',\n 'cc num',\n 'creditcardnumber',\n 'credit card number',\n 'newcreditcardnumber',\n 'new credit card',\n 'creditcardno',\n 'credit card no',\n 'card#',\n 'card #',\n 'cc-csc',\n 'cvc',\n 'cvc2',\n 'cvv2',\n 'ccv2',\n 'security code',\n 'card verification',\n 'name on credit card',\n 'name on card',\n 'nameoncard',\n 'cardholder',\n 'card holder',\n 'name des karteninhabers',\n 'ccname',\n 'card type',\n 'cardtype',\n 'cc type',\n 'cctype',\n 'payment type',\n 'expiration date',\n 'expirationdate',\n 'expdate',\n 'cc-exp',\n 'ccmonth',\n 'ccyear'\n ]\n}\n","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.merge(options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n}\n\nTelemeter.prototype.configure = function(options) {\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n var deleteCount = 0;\n if (this.queue.length > newMaxEvents) {\n deleteCount = this.queue.length - newMaxEvents;\n }\n this.maxQueueSize = newMaxEvents;\n this.queue.splice(0, deleteCount);\n};\n\nTelemeter.prototype.copyEvents = function() {\n var events = Array.prototype.slice.call(this.queue, 0);\n if (_.isFunction(this.options.filterTelemetry)) {\n try {\n var i = events.length;\n while (i--) {\n if (this.options.filterTelemetry(events[i])) {\n events.splice(i, 1);\n }\n }\n } catch (e) {\n this.options.filterTelemetry = null;\n }\n }\n return events;\n};\n\nTelemeter.prototype.capture = function(type, metadata, level, rollbarUUID, timestamp) {\n var e = {\n level: getLevel(type, level),\n type: type,\n timestamp_ms: timestamp || _.now(),\n body: metadata,\n source: 'client'\n };\n if (rollbarUUID) {\n e.uuid = rollbarUUID;\n }\n\n try {\n if (_.isFunction(this.options.filterTelemetry) && this.options.filterTelemetry(e)) {\n return false;\n }\n } catch (exc) {\n this.options.filterTelemetry = null;\n }\n\n this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function(type, metadata, level, rollbarUUID) {\n return this.capture(type, metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.captureError = function(err, level, rollbarUUID, timestamp) {\n var metadata = {\n message: err.message || String(err)\n };\n if (err.stack) {\n metadata.stack = err.stack;\n }\n return this.capture('error', metadata, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureLog = function(message, level, rollbarUUID, timestamp) {\n return this.capture('log', {\n message: message\n }, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID, requestData) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\n if (requestData) {\n metadata.request = requestData;\n }\n var level = this.levelFromStatus(metadata.status_code);\n return this.capture('network', metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.levelFromStatus = function(statusCode) {\n if (statusCode >= 200 && statusCode < 400) {\n return 'info';\n }\n if (statusCode === 0 || statusCode >= 400) {\n return 'error';\n }\n return 'info';\n};\n\nTelemeter.prototype.captureDom = function(subtype, element, value, checked, rollbarUUID) {\n var metadata = {\n subtype: subtype,\n element: element\n };\n if (value !== undefined) {\n metadata.value = value;\n }\n if (checked !== undefined) {\n metadata.checked = checked;\n }\n return this.capture('dom', metadata, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureNavigation = function(from, to, rollbarUUID) {\n return this.capture('navigation', {from: from, to: to}, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureDomContentLoaded = function(ts) {\n return this.capture('navigation', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n */\n};\nTelemeter.prototype.captureLoad = function(ts) {\n return this.capture('navigation', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n */\n};\n\nTelemeter.prototype.captureConnectivityChange = function(type, rollbarUUID) {\n return this.captureNetwork({change: type}, 'connectivity', rollbarUUID);\n};\n\n// Only intended to be used internally by the notifier\nTelemeter.prototype._captureRollbarItem = function(item) {\n if (!this.options.includeItemsInTelemetry) {\n return;\n }\n if (item.err) {\n return this.captureError(item.err, item.level, item.uuid, item.timestamp);\n }\n if (item.message) {\n return this.captureLog(item.message, item.level, item.uuid, item.timestamp);\n }\n if (item.custom) {\n return this.capture('log', item.custom, item.level, item.uuid, item.timestamp);\n }\n};\n\nTelemeter.prototype.push = function(e) {\n this.queue.push(e);\n if (this.queue.length > this.maxQueueSize) {\n this.queue.shift();\n }\n};\n\nfunction getLevel(type, level) {\n if (level) {\n return level;\n }\n var defaultLevel = {\n error: 'error',\n manual: 'info'\n };\n return defaultLevel[type] || 'info';\n}\n\nmodule.exports = Telemeter;\n","'use strict';\n\nvar _ = require('../utility');\nvar headers = require('../utility/headers');\nvar scrub = require('../scrub');\nvar urlparser = require('./url');\nvar domUtil = require('./domUtility');\n\nvar defaults = {\n network: true,\n networkResponseHeaders: false,\n networkResponseBody: false,\n networkRequestHeaders: false,\n networkRequestBody: false,\n networkErrorOnHttp5xx: false,\n networkErrorOnHttp4xx: false,\n networkErrorOnHttp0: false,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true,\n contentSecurityPolicy: true,\n errorOnContentSecurityPolicy: false\n};\n\nfunction replace(obj, name, replacement, replacements, type) {\n var orig = obj[name];\n obj[name] = replacement(orig);\n if (replacements) {\n replacements[type].push([obj, name, orig]);\n }\n}\n\nfunction restore(replacements, type) {\n var b;\n while (replacements[type].length) {\n b = replacements[type].shift();\n b[0][b[1]] = b[2];\n }\n}\n\nfunction nameFromDescription(description) {\n if (!description || !description.attributes) { return null; }\n var attrs = description.attributes;\n for (var a = 0; a < attrs.length; ++a) {\n if (attrs[a].key === 'name') {\n return attrs[a].value;\n }\n }\n return null;\n}\n\nfunction defaultValueScrubber(scrubFields) {\n var patterns = [];\n for (var i = 0; i < scrubFields.length; ++i) {\n patterns.push(new RegExp(scrubFields[i], 'i'));\n }\n return function(description) {\n var name = nameFromDescription(description);\n if (!name) { return false; }\n for (var i = 0; i < patterns.length; ++i) {\n if (patterns[i].test(name)) {\n return true;\n }\n }\n return false;\n };\n}\n\nfunction Instrumenter(options, telemeter, rollbar, _window, _document) {\n this.options = options;\n var autoInstrument = options.autoInstrument;\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);\n this.telemeter = telemeter;\n this.rollbar = rollbar;\n this.diagnostic = rollbar.client.notifier.diagnostic;\n this._window = _window || {};\n this._document = _document || {};\n this.replacements = {\n network: [],\n log: [],\n navigation: [],\n connectivity: []\n };\n this.eventRemovers = {\n dom: [],\n connectivity: [],\n contentsecuritypolicy: []\n };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function(options) {\n this.options = _.merge(this.options, options);\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.merge(this.autoInstrument);\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n if (options.scrubTelemetryInputs !== undefined) {\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n }\n if (options.telemetryScrubber !== undefined) {\n this.telemetryScrubber = options.telemetryScrubber;\n }\n};\n\n// eslint-disable-next-line complexity\nInstrumenter.prototype.instrument = function(oldSettings) {\n if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {\n this.instrumentNetwork();\n } else if (!this.autoInstrument.network && oldSettings && oldSettings.network) {\n this.deinstrumentNetwork();\n }\n\n if (this.autoInstrument.log && !(oldSettings && oldSettings.log)) {\n this.instrumentConsole();\n } else if (!this.autoInstrument.log && oldSettings && oldSettings.log) {\n this.deinstrumentConsole();\n }\n\n if (this.autoInstrument.dom && !(oldSettings && oldSettings.dom)) {\n this.instrumentDom();\n } else if (!this.autoInstrument.dom && oldSettings && oldSettings.dom) {\n this.deinstrumentDom();\n }\n\n if (this.autoInstrument.navigation && !(oldSettings && oldSettings.navigation)) {\n this.instrumentNavigation();\n } else if (!this.autoInstrument.navigation && oldSettings && oldSettings.navigation) {\n this.deinstrumentNavigation();\n }\n\n if (this.autoInstrument.connectivity && !(oldSettings && oldSettings.connectivity)) {\n this.instrumentConnectivity();\n } else if (!this.autoInstrument.connectivity && oldSettings && oldSettings.connectivity) {\n this.deinstrumentConnectivity();\n }\n\n if (this.autoInstrument.contentSecurityPolicy && !(oldSettings && oldSettings.contentSecurityPolicy)) {\n this.instrumentContentSecurityPolicy();\n } else if (!this.autoInstrument.contentSecurityPolicy && oldSettings && oldSettings.contentSecurityPolicy) {\n this.deinstrumentContentSecurityPolicy();\n }\n};\n\nInstrumenter.prototype.deinstrumentNetwork = function() {\n restore(this.replacements, 'network');\n};\n\nInstrumenter.prototype.instrumentNetwork = function() {\n var self = this;\n\n function wrapProp(prop, xhr) {\n if (prop in xhr && _.isFunction(xhr[prop])) {\n replace(xhr, prop, function(orig) {\n return self.rollbar.wrap(orig);\n });\n }\n }\n\n if ('XMLHttpRequest' in this._window) {\n var xhrp = this._window.XMLHttpRequest.prototype;\n replace(xhrp, 'open', function(orig) {\n return function(method, url) {\n if (_.isType(url, 'string')) {\n if (this.__rollbar_xhr) {\n this.__rollbar_xhr.method = method;\n this.__rollbar_xhr.url = url;\n this.__rollbar_xhr.status_code = null;\n this.__rollbar_xhr.start_time_ms = _.now();\n this.__rollbar_xhr.end_time_ms = null;\n } else {\n this.__rollbar_xhr = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'setRequestHeader', function(orig) {\n return function(header, value) {\n // If xhr.open is async, __rollbar_xhr may not be initialized yet.\n if (!this.__rollbar_xhr) {\n this.__rollbar_xhr = {};\n }\n if (_.isType(header, 'string') && _.isType(value, 'string')) {\n if (self.autoInstrument.networkRequestHeaders) {\n if (!this.__rollbar_xhr.request_headers) {\n this.__rollbar_xhr.request_headers = {};\n }\n this.__rollbar_xhr.request_headers[header] = value;\n }\n // We want the content type even if request header telemetry is off.\n if (header.toLowerCase() === 'content-type') {\n this.__rollbar_xhr.request_content_type = value;\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'send', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(data) {\n /* eslint-enable no-unused-vars */\n var xhr = this;\n\n function onreadystatechangeHandler() {\n if (xhr.__rollbar_xhr) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n if (self.autoInstrument.networkRequestBody) {\n xhr.__rollbar_xhr.request = data;\n }\n xhr.__rollbar_event = self.captureNetwork(xhr.__rollbar_xhr, 'xhr', undefined);\n }\n if (xhr.readyState < 2) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n }\n if (xhr.readyState > 3) {\n xhr.__rollbar_xhr.end_time_ms = _.now();\n\n var headers = null;\n xhr.__rollbar_xhr.response_content_type = xhr.getResponseHeader('Content-Type');\n if (self.autoInstrument.networkResponseHeaders) {\n var headersConfig = self.autoInstrument.networkResponseHeaders;\n headers = {};\n try {\n var header, i;\n if (headersConfig === true) {\n var allHeaders = xhr.getAllResponseHeaders();\n if (allHeaders) {\n var arr = allHeaders.trim().split(/[\\r\\n]+/);\n var parts, value;\n for (i=0; i < arr.length; i++) {\n parts = arr[i].split(': ');\n header = parts.shift();\n value = parts.join(': ');\n headers[header] = value;\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n header = headersConfig[i];\n headers[header] = xhr.getResponseHeader(header);\n }\n }\n } catch (e) {\n /* we ignore the errors here that could come from different\n * browser issues with the xhr methods */\n }\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n try {\n body = xhr.responseText;\n } catch (e) {\n /* ignore errors from reading responseText */\n }\n }\n var response = null;\n if (body || headers) {\n response = {};\n if (body) {\n if (self.isJsonContentType(xhr.__rollbar_xhr.response_content_type)) {\n response.body = self.scrubJson(body);\n } else {\n response.body = body;\n }\n }\n if (headers) {\n response.headers = headers;\n }\n }\n if (response) {\n xhr.__rollbar_xhr.response = response;\n }\n try {\n var code = xhr.status;\n code = code === 1223 ? 204 : code;\n xhr.__rollbar_xhr.status_code = code;\n xhr.__rollbar_event.level = self.telemeter.levelFromStatus(code);\n self.errorOnHttpStatus(xhr.__rollbar_xhr);\n } catch (e) {\n /* ignore possible exception from xhr.status */\n }\n }\n }\n }\n\n wrapProp('onload', xhr);\n wrapProp('onerror', xhr);\n wrapProp('onprogress', xhr);\n\n if ('onreadystatechange' in xhr && _.isFunction(xhr.onreadystatechange)) {\n replace(xhr, 'onreadystatechange', function(orig) {\n return self.rollbar.wrap(orig, undefined, onreadystatechangeHandler);\n });\n } else {\n xhr.onreadystatechange = onreadystatechangeHandler;\n }\n if (xhr.__rollbar_xhr && self.trackHttpErrors()) {\n xhr.__rollbar_xhr.stack = (new Error()).stack;\n }\n return orig.apply(this, arguments);\n }\n }, this.replacements, 'network');\n }\n\n if ('fetch' in this._window) {\n replace(this._window, 'fetch', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(fn, t) {\n /* eslint-enable no-unused-vars */\n var args = new Array(arguments.length);\n for (var i=0, len=args.length; i < len; i++) {\n args[i] = arguments[i];\n }\n var input = args[0];\n var method = 'GET';\n var url;\n if (_.isType(input, 'string')) {\n url = input;\n } else if (input) {\n url = input.url;\n if (input.method) {\n method = input.method;\n }\n }\n if (args[1] && args[1].method) {\n method = args[1].method;\n }\n var metadata = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n if (args[1] && args[1].headers) {\n // Argument may be a Headers object, or plain object. Ensure here that\n // we are working with a Headers object with case-insensitive keys.\n var reqHeaders = headers(args[1].headers);\n\n metadata.request_content_type = reqHeaders.get('Content-Type');\n\n if (self.autoInstrument.networkRequestHeaders) {\n metadata.request_headers = self.fetchHeaders(reqHeaders, self.autoInstrument.networkRequestHeaders)\n }\n }\n\n if (self.autoInstrument.networkRequestBody) {\n if (args[1] && args[1].body) {\n metadata.request = args[1].body;\n } else if (args[0] && !_.isType(args[0], 'string') && args[0].body) {\n metadata.request = args[0].body;\n }\n }\n self.captureNetwork(metadata, 'fetch', undefined);\n if (self.trackHttpErrors()) {\n metadata.stack = (new Error()).stack;\n }\n\n // Start our handler before returning the promise. This allows resp.clone()\n // to execute before other handlers touch the response.\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n metadata.response_content_type = resp.headers.get('Content-Type');\n var headers = null;\n if (self.autoInstrument.networkResponseHeaders) {\n headers = self.fetchHeaders(resp.headers, self.autoInstrument.networkResponseHeaders);\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n if (typeof resp.text === 'function') { // Response.text() is not implemented on some platforms\n // The response must be cloned to prevent reading (and locking) the original stream.\n // This must be done before other handlers touch the response.\n body = resp.clone().text(); //returns a Promise\n }\n }\n if (headers || body) {\n metadata.response = {};\n if (body) {\n // Test to ensure body is a Promise, which it should always be.\n if (typeof body.then === 'function') {\n body.then(function (text) {\n if (text && self.isJsonContentType(metadata.response_content_type)) {\n metadata.response.body = self.scrubJson(text);\n } else {\n metadata.response.body = text;\n }\n });\n } else {\n metadata.response.body = body;\n }\n }\n if (headers) {\n metadata.response.headers = headers;\n }\n }\n self.errorOnHttpStatus(metadata);\n return resp;\n });\n };\n }, this.replacements, 'network');\n }\n};\n\nInstrumenter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID) {\n if (metadata.request && this.isJsonContentType(metadata.request_content_type)) {\n metadata.request = this.scrubJson(metadata.request);\n }\n return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);\n};\n\nInstrumenter.prototype.isJsonContentType = function(contentType) {\n return (contentType && _.isType(contentType, 'string') && contentType.toLowerCase().includes('json')) ? true : false;\n}\n\nInstrumenter.prototype.scrubJson = function(json) {\n return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));\n}\n\nInstrumenter.prototype.fetchHeaders = function(inHeaders, headersConfig) {\n var outHeaders = {};\n try {\n var i;\n if (headersConfig === true) {\n if (typeof inHeaders.entries === 'function') { // Headers.entries() is not implemented in IE\n var allHeaders = inHeaders.entries();\n var currentHeader = allHeaders.next();\n while (!currentHeader.done) {\n outHeaders[currentHeader.value[0]] = currentHeader.value[1];\n currentHeader = allHeaders.next();\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n var header = headersConfig[i];\n outHeaders[header] = inHeaders.get(header);\n }\n }\n } catch (e) {\n /* ignore probable IE errors */\n }\n return outHeaders;\n}\n\nInstrumenter.prototype.trackHttpErrors = function() {\n return this.autoInstrument.networkErrorOnHttp5xx ||\n this.autoInstrument.networkErrorOnHttp4xx ||\n this.autoInstrument.networkErrorOnHttp0;\n}\n\nInstrumenter.prototype.errorOnHttpStatus = function(metadata) {\n var status = metadata.status_code;\n\n if ((status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||\n (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||\n (status === 0 && this.autoInstrument.networkErrorOnHttp0)) {\n var error = new Error('HTTP request failed with Status ' + status);\n error.stack = metadata.stack;\n this.rollbar.error(error, { skipFrames: 1 });\n }\n}\n\nInstrumenter.prototype.deinstrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n var b;\n while (this.replacements['log'].length) {\n b = this.replacements['log'].shift();\n this._window.console[b[0]] = b[1];\n }\n};\n\nInstrumenter.prototype.instrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n\n var self = this;\n var c = this._window.console;\n\n function wrapConsole(method) {\n 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778\n\n var orig = c[method];\n var origConsole = c;\n var level = method === 'warn' ? 'warning' : method;\n c[method] = function() {\n var args = Array.prototype.slice.call(arguments);\n var message = _.formatArgsAsString(args);\n self.telemeter.captureLog(message, level);\n if (orig) {\n Function.prototype.apply.call(orig, origConsole, args);\n }\n };\n self.replacements['log'].push([method, orig]);\n }\n var methods = ['debug','info','warn','error','log'];\n try {\n for (var i=0, len=methods.length; i < len; i++) {\n wrapConsole(methods[i]);\n }\n } catch (e) {\n this.diagnostic.instrumentConsole = { error: e.message };\n }\n};\n\nInstrumenter.prototype.deinstrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n this.removeListeners('dom');\n};\n\nInstrumenter.prototype.instrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n var clickHandler = this.handleClick.bind(this);\n var blurHandler = this.handleBlur.bind(this);\n this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);\n this.addListener('dom', this._window, 'blur', 'onfocusout', blurHandler, true);\n};\n\nInstrumenter.prototype.handleClick = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n var hasTag = e && e.tagName;\n var anchorOrButton = domUtil.isDescribedElement(e, 'a') || domUtil.isDescribedElement(e, 'button');\n if (hasTag && (anchorOrButton || domUtil.isDescribedElement(e, 'input', ['button', 'submit']))) {\n this.captureDomEvent('click', e);\n } else if (domUtil.isDescribedElement(e, 'input', ['checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value, e.checked);\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleBlur = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n if (e && e.tagName) {\n if (domUtil.isDescribedElement(e, 'textarea')) {\n this.captureDomEvent('input', e, e.value);\n } else if (domUtil.isDescribedElement(e, 'select') && e.options && e.options.length) {\n this.handleSelectInputChanged(e);\n } else if (domUtil.isDescribedElement(e, 'input') && !domUtil.isDescribedElement(e, 'input', ['button', 'submit', 'hidden', 'checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value);\n }\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleSelectInputChanged = function(elem) {\n if (elem.multiple) {\n for (var i = 0; i < elem.options.length; i++) {\n if (elem.options[i].selected) {\n this.captureDomEvent('input', elem, elem.options[i].value);\n }\n }\n } else if (elem.selectedIndex >= 0 && elem.options[elem.selectedIndex]) {\n this.captureDomEvent('input', elem, elem.options[elem.selectedIndex].value);\n }\n};\n\nInstrumenter.prototype.captureDomEvent = function(subtype, element, value, isChecked) {\n if (value !== undefined) {\n if (this.scrubTelemetryInputs || (domUtil.getElementType(element) === 'password')) {\n value = '[scrubbed]';\n } else {\n var description = domUtil.describeElement(element);\n if (this.telemetryScrubber) {\n if (this.telemetryScrubber(description)) {\n value = '[scrubbed]';\n }\n } else if (this.defaultValueScrubber(description)) {\n value = '[scrubbed]';\n }\n }\n }\n var elementString = domUtil.elementArrayToString(domUtil.treeToArray(element));\n this.telemeter.captureDom(subtype, elementString, value, isChecked);\n};\n\nInstrumenter.prototype.deinstrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n restore(this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.instrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n var self = this;\n replace(this._window, 'onpopstate', function(orig) {\n return function() {\n var current = self._location.href;\n self.handleUrlChange(self._lastHref, current);\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n }, this.replacements, 'navigation');\n\n replace(this._window.history, 'pushState', function(orig) {\n return function() {\n var url = arguments.length > 2 ? arguments[2] : undefined;\n if (url) {\n self.handleUrlChange(self._lastHref, url + '');\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.handleUrlChange = function(from, to) {\n var parsedHref = urlparser.parse(this._location.href);\n var parsedTo = urlparser.parse(to);\n var parsedFrom = urlparser.parse(from);\n this._lastHref = to;\n if (parsedHref.protocol === parsedTo.protocol && parsedHref.host === parsedTo.host) {\n to = parsedTo.path + (parsedTo.hash || '');\n }\n if (parsedHref.protocol === parsedFrom.protocol && parsedHref.host === parsedFrom.host) {\n from = parsedFrom.path + (parsedFrom.hash || '');\n }\n this.telemeter.captureNavigation(from, to);\n};\n\nInstrumenter.prototype.deinstrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.removeListeners('connectivity');\n } else {\n restore(this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.instrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.addListener('connectivity', this._window, 'online', undefined, function() {\n this.telemeter.captureConnectivityChange('online');\n }.bind(this), true);\n this.addListener('connectivity', this._window, 'offline', undefined, function() {\n this.telemeter.captureConnectivityChange('offline');\n }.bind(this), true);\n } else {\n var self = this;\n replace(this._document.body, 'ononline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('online');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n replace(this._document.body, 'onoffline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('offline');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.handleCspEvent = function(cspEvent) {\n var message = 'Security Policy Violation: ' +\n 'blockedURI: ' + cspEvent.blockedURI + ', ' +\n 'violatedDirective: ' + cspEvent.violatedDirective + ', ' +\n 'effectiveDirective: ' + cspEvent.effectiveDirective + ', ';\n\n if (cspEvent.sourceFile) {\n message += 'location: ' + cspEvent.sourceFile + ', ' +\n 'line: ' + cspEvent.lineNumber + ', ' +\n 'col: ' + cspEvent.columnNumber + ', ';\n }\n\n message += 'originalPolicy: ' + cspEvent.originalPolicy;\n\n this.telemeter.captureLog(message, 'error');\n this.handleCspError(message);\n}\n\nInstrumenter.prototype.handleCspError = function(message) {\n if (this.autoInstrument.errorOnContentSecurityPolicy) {\n this.rollbar.error(message);\n }\n}\n\nInstrumenter.prototype.deinstrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._document)) { return; }\n\n this.removeListeners('contentsecuritypolicy');\n};\n\nInstrumenter.prototype.instrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._document)) { return; }\n\n var cspHandler = this.handleCspEvent.bind(this);\n this.addListener('contentsecuritypolicy', this._document, 'securitypolicyviolation', null, cspHandler, false);\n};\n\nInstrumenter.prototype.addListener = function(section, obj, type, altType, handler, capture) {\n if (obj.addEventListener) {\n obj.addEventListener(type, handler, capture);\n this.eventRemovers[section].push(function() {\n obj.removeEventListener(type, handler, capture);\n });\n } else if (altType) {\n obj.attachEvent(altType, handler);\n this.eventRemovers[section].push(function() {\n obj.detachEvent(altType, handler);\n });\n }\n};\n\nInstrumenter.prototype.removeListeners = function(section) {\n var r;\n while (this.eventRemovers[section].length) {\n r = this.eventRemovers[section].shift();\n r();\n }\n};\n\nmodule.exports = Instrumenter;\n","'use strict';\n\n/*\n * headers - Detect when fetch Headers are undefined and use a partial polyfill.\n *\n * A full polyfill is not used in order to keep package size as small as possible.\n * Since this is only used internally and is not added to the window object,\n * the full interface doesn't need to be supported.\n *\n * This implementation is modified from whatwg-fetch:\n * https://github.com/github/fetch\n */\nfunction headers(headers) {\n if (typeof Headers === 'undefined') {\n return new FetchHeaders(headers);\n }\n\n return new Headers(headers);\n}\n\nfunction normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name)\n }\n return name.toLowerCase()\n}\n\nfunction normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value)\n }\n return value\n}\n\nfunction iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n return iterator\n}\n\nfunction FetchHeaders(headers) {\n this.map = {}\n\n if (headers instanceof FetchHeaders) {\n headers.forEach(function(value, name) {\n this.append(name, value)\n }, this)\n } else if (Array.isArray(headers)) {\n headers.forEach(function(header) {\n this.append(header[0], header[1])\n }, this)\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function(name) {\n this.append(name, headers[name])\n }, this)\n }\n}\n\nFetchHeaders.prototype.append = function(name, value) {\n name = normalizeName(name)\n value = normalizeValue(value)\n var oldValue = this.map[name]\n this.map[name] = oldValue ? oldValue + ', ' + value : value\n}\n\nFetchHeaders.prototype.get = function(name) {\n name = normalizeName(name)\n return this.has(name) ? this.map[name] : null\n}\n\nFetchHeaders.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n}\n\nFetchHeaders.prototype.forEach = function(callback, thisArg) {\n for (var name in this.map) {\n if (this.map.hasOwnProperty(name)) {\n callback.call(thisArg, this.map[name], name, this)\n }\n }\n}\n\nFetchHeaders.prototype.entries = function() {\n var items = []\n this.forEach(function(value, name) {\n items.push([name, value])\n })\n return iteratorFor(items)\n}\n\nmodule.exports = headers;\n","'use strict';\n\nfunction getElementType(e) {\n return (e.getAttribute('type') || '').toLowerCase();\n}\n\nfunction isDescribedElement(element, type, subtypes) {\n if (element.tagName.toLowerCase() !== type.toLowerCase()) {\n return false;\n }\n if (!subtypes) {\n return true;\n }\n element = getElementType(element);\n for (var i = 0; i < subtypes.length; i++) {\n if (subtypes[i] === element) {\n return true;\n }\n }\n return false;\n}\n\nfunction getElementFromEvent(evt, doc) {\n if (evt.target) {\n return evt.target;\n }\n if (doc && doc.elementFromPoint) {\n return doc.elementFromPoint(evt.clientX, evt.clientY);\n }\n return undefined;\n}\n\nfunction treeToArray(elem) {\n var MAX_HEIGHT = 5;\n var out = [];\n var nextDescription;\n for (var height = 0; elem && height < MAX_HEIGHT; height++) {\n nextDescription = describeElement(elem);\n if (nextDescription.tagName === 'html') {\n break;\n }\n out.unshift(nextDescription);\n elem = elem.parentNode;\n }\n return out;\n}\n\nfunction elementArrayToString(a) {\n var MAX_LENGTH = 80;\n var separator = ' > ', separatorLength = separator.length;\n var out = [], len = 0, nextStr, totalLength;\n\n for (var i = a.length - 1; i >= 0; i--) {\n nextStr = descriptionToString(a[i]);\n totalLength = len + (out.length * separatorLength) + nextStr.length;\n if (i < a.length - 1 && totalLength >= MAX_LENGTH + 3) {\n out.unshift('...');\n break;\n }\n out.unshift(nextStr);\n len += nextStr.length;\n }\n return out.join(separator);\n}\n\nfunction descriptionToString(desc) {\n if (!desc || !desc.tagName) {\n return '';\n }\n var out = [desc.tagName];\n if (desc.id) {\n out.push('#' + desc.id);\n }\n if (desc.classes) {\n out.push('.' + desc.classes.join('.'));\n }\n for (var i = 0; i < desc.attributes.length; i++) {\n out.push('[' + desc.attributes[i].key + '=\"' + desc.attributes[i].value + '\"]');\n }\n\n return out.join('');\n}\n\n/**\n * Input: a dom element\n * Output: null if tagName is falsey or input is falsey, else\n * {\n * tagName: String,\n * id: String | undefined,\n * classes: [String] | undefined,\n * attributes: [\n * {\n * key: OneOf(type, name, title, alt),\n * value: String\n * }\n * ]\n * }\n */\nfunction describeElement(elem) {\n if (!elem || !elem.tagName) {\n return null;\n }\n var out = {}, className, key, attr, i;\n out.tagName = elem.tagName.toLowerCase();\n if (elem.id) {\n out.id = elem.id;\n }\n className = elem.className;\n if (className && (typeof className === 'string')) {\n out.classes = className.split(/\\s+/);\n }\n var attributes = ['type', 'name', 'title', 'alt'];\n out.attributes = [];\n for (i = 0; i < attributes.length; i++) {\n key = attributes[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.attributes.push({key: key, value: attr});\n }\n }\n return out;\n}\n\nmodule.exports = {\n describeElement: describeElement,\n descriptionToString: descriptionToString,\n elementArrayToString: elementArrayToString,\n treeToArray: treeToArray,\n getElementFromEvent: getElementFromEvent,\n isDescribedElement: isDescribedElement,\n getElementType: getElementType\n};\n","'use strict';\n\nvar polyfillJSON = require('../../vendor/JSON-js/json3');\n\nmodule.exports = polyfillJSON;\n","// json3.js\n// 2017-02-21\n// Public Domain.\n// NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.\n// See http://www.JSON.org/js.html\n// This code should be minified before deployment.\n// See http://javascript.crockford.com/jsmin.html\n\n// USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO\n// NOT CONTROL.\n\n// This file creates a global JSON object containing two methods: stringify\n// and parse. This file provides the ES5 JSON capability to ES3 systems.\n// If a project might run on IE8 or earlier, then this file should be included.\n// This file does nothing on ES5 systems.\n\n// JSON.stringify(value, replacer, space)\n// value any JavaScript value, usually an object or array.\n// replacer an optional parameter that determines how object\n// values are stringified for objects. It can be a\n// function or an array of strings.\n// space an optional parameter that specifies the indentation\n// of nested structures. If it is omitted, the text will\n// be packed without extra whitespace. If it is a number,\n// it will specify the number of spaces to indent at each\n// level. If it is a string (such as \"\\t\" or \" \"),\n// it contains the characters used to indent at each level.\n// This method produces a JSON text from a JavaScript value.\n// When an object value is found, if the object contains a toJSON\n// method, its toJSON method will be called and the result will be\n// stringified. A toJSON method does not serialize: it returns the\n// value represented by the name/value pair that should be serialized,\n// or undefined if nothing should be serialized. The toJSON method\n// will be passed the key associated with the value, and this will be\n// bound to the value.\n\n// For example, this would serialize Dates as ISO strings.\n\n// Date.prototype.toJSON = function (key) {\n// function f(n) {\n// // Format integers to have at least two digits.\n// return (n < 10)\n// ? \"0\" + n\n// : n;\n// }\n// return this.getUTCFullYear() + \"-\" +\n// f(this.getUTCMonth() + 1) + \"-\" +\n// f(this.getUTCDate()) + \"T\" +\n// f(this.getUTCHours()) + \":\" +\n// f(this.getUTCMinutes()) + \":\" +\n// f(this.getUTCSeconds()) + \"Z\";\n// };\n\n// You can provide an optional replacer method. It will be passed the\n// key and value of each member, with this bound to the containing\n// object. The value that is returned from your method will be\n// serialized. If your method returns undefined, then the member will\n// be excluded from the serialization.\n\n// If the replacer parameter is an array of strings, then it will be\n// used to select the members to be serialized. It filters the results\n// such that only members with keys listed in the replacer array are\n// stringified.\n\n// Values that do not have JSON representations, such as undefined or\n// functions, will not be serialized. Such values in objects will be\n// dropped; in arrays they will be replaced with null. You can use\n// a replacer function to replace those with JSON values.\n\n// JSON.stringify(undefined) returns undefined.\n\n// The optional space parameter produces a stringification of the\n// value that is filled with line breaks and indentation to make it\n// easier to read.\n\n// If the space parameter is a non-empty string, then that string will\n// be used for indentation. If the space parameter is a number, then\n// the indentation will be that many spaces.\n\n// Example:\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}]);\n// // text is '[\"e\",{\"pluribus\":\"unum\"}]'\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}], null, \"\\t\");\n// // text is '[\\n\\t\"e\",\\n\\t{\\n\\t\\t\"pluribus\": \"unum\"\\n\\t}\\n]'\n\n// text = JSON.stringify([new Date()], function (key, value) {\n// return this[key] instanceof Date\n// ? \"Date(\" + this[key] + \")\"\n// : value;\n// });\n// // text is '[\"Date(---current time---)\"]'\n\n// JSON.parse(text, reviver)\n// This method parses a JSON text to produce an object or array.\n// It can throw a SyntaxError exception.\n// This has been modified to use JSON-js/json_parse_state.js as the\n// parser instead of the one built around eval found in JSON-js/json2.js\n\n// The optional reviver parameter is a function that can filter and\n// transform the results. It receives each of the keys and values,\n// and its return value is used instead of the original value.\n// If it returns what it received, then the structure is not modified.\n// If it returns undefined then the member is deleted.\n\n// Example:\n\n// // Parse the text. Values that look like ISO date strings will\n// // be converted to Date objects.\n\n// myData = JSON.parse(text, function (key, value) {\n// var a;\n// if (typeof value === \"string\") {\n// a =\n// /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2}(?:\\.\\d*)?)Z$/.exec(value);\n// if (a) {\n// return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],\n// +a[5], +a[6]));\n// }\n// }\n// return value;\n// });\n\n// myData = JSON.parse('[\"Date(09/09/2001)\"]', function (key, value) {\n// var d;\n// if (typeof value === \"string\" &&\n// value.slice(0, 5) === \"Date(\" &&\n// value.slice(-1) === \")\") {\n// d = new Date(value.slice(5, -1));\n// if (d) {\n// return d;\n// }\n// }\n// return value;\n// });\n\n// This is a reference implementation. You are free to copy, modify, or\n// redistribute.\n\n/*jslint\n for, this\n */\n\n/*property\n JSON, apply, call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,\n getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,\n lastIndex, length, parse, prototype, push, replace, slice, stringify,\n test, toJSON, toString, valueOf\n */\n\nvar setupCustomJSON = function(JSON) {\n\n var rx_one = /^[\\],:{}\\s]*$/;\n var rx_two = /\\\\(?:[\"\\\\\\/bfnrt]|u[0-9a-fA-F]{4})/g;\n var rx_three = /\"[^\"\\\\\\n\\r]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g;\n var rx_four = /(?:^|:|,)(?:\\s*\\[)+/g;\n var rx_escapable = /[\\\\\"\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n var rx_dangerous = /[\\u0000\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n\n function f(n) {\n // Format integers to have at least two digits.\n return n < 10\n ? \"0\" + n\n : n;\n }\n\n function this_value() {\n return this.valueOf();\n }\n\n if (typeof Date.prototype.toJSON !== \"function\") {\n\n Date.prototype.toJSON = function () {\n\n return isFinite(this.valueOf())\n ? this.getUTCFullYear() + \"-\" +\n f(this.getUTCMonth() + 1) + \"-\" +\n f(this.getUTCDate()) + \"T\" +\n f(this.getUTCHours()) + \":\" +\n f(this.getUTCMinutes()) + \":\" +\n f(this.getUTCSeconds()) + \"Z\"\n : null;\n };\n\n Boolean.prototype.toJSON = this_value;\n Number.prototype.toJSON = this_value;\n String.prototype.toJSON = this_value;\n }\n\n var gap;\n var indent;\n var meta;\n var rep;\n\n\n function quote(string) {\n\n // If the string contains no control characters, no quote characters, and no\n // backslash characters, then we can safely slap some quotes around it.\n // Otherwise we must also replace the offending characters with safe escape\n // sequences.\n\n rx_escapable.lastIndex = 0;\n return rx_escapable.test(string)\n ? \"\\\"\" + string.replace(rx_escapable, function (a) {\n var c = meta[a];\n return typeof c === \"string\"\n ? c\n : \"\\\\u\" + (\"0000\" + a.charCodeAt(0).toString(16)).slice(-4);\n }) + \"\\\"\"\n : \"\\\"\" + string + \"\\\"\";\n }\n\n\n function str(key, holder) {\n\n // Produce a string from holder[key].\n\n var i; // The loop counter.\n var k; // The member key.\n var v; // The member value.\n var length;\n var mind = gap;\n var partial;\n var value = holder[key];\n\n // If the value has a toJSON method, call it to obtain a replacement value.\n\n if (value && typeof value === \"object\" &&\n typeof value.toJSON === \"function\") {\n value = value.toJSON(key);\n }\n\n // If we were called with a replacer function, then call the replacer to\n // obtain a replacement value.\n\n if (typeof rep === \"function\") {\n value = rep.call(holder, key, value);\n }\n\n // What happens next depends on the value's type.\n\n switch (typeof value) {\n case \"string\":\n return quote(value);\n\n case \"number\":\n\n // JSON numbers must be finite. Encode non-finite numbers as null.\n\n return isFinite(value)\n ? String(value)\n : \"null\";\n\n case \"boolean\":\n case \"null\":\n\n // If the value is a boolean or null, convert it to a string. Note:\n // typeof null does not produce \"null\". The case is included here in\n // the remote chance that this gets fixed someday.\n\n return String(value);\n\n // If the type is \"object\", we might be dealing with an object or an array or\n // null.\n\n case \"object\":\n\n // Due to a specification blunder in ECMAScript, typeof null is \"object\",\n // so watch out for that case.\n\n if (!value) {\n return \"null\";\n }\n\n // Make an array to hold the partial results of stringifying this object value.\n\n gap += indent;\n partial = [];\n\n // Is the value an array?\n\n if (Object.prototype.toString.apply(value) === \"[object Array]\") {\n\n // The value is an array. Stringify every element. Use null as a placeholder\n // for non-JSON values.\n\n length = value.length;\n for (i = 0; i < length; i += 1) {\n partial[i] = str(i, value) || \"null\";\n }\n\n // Join all of the elements together, separated with commas, and wrap them in\n // brackets.\n\n v = partial.length === 0\n ? \"[]\"\n : gap\n ? \"[\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"]\"\n : \"[\" + partial.join(\",\") + \"]\";\n gap = mind;\n return v;\n }\n\n // If the replacer is an array, use it to select the members to be stringified.\n\n if (rep && typeof rep === \"object\") {\n length = rep.length;\n for (i = 0; i < length; i += 1) {\n if (typeof rep[i] === \"string\") {\n k = rep[i];\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n } else {\n\n // Otherwise, iterate through all of the keys in the object.\n\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(value, k)) {\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n }\n\n // Join all of the member texts together, separated with commas,\n // and wrap them in braces.\n\n v = partial.length === 0\n ? \"{}\"\n : gap\n ? \"{\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"}\"\n : \"{\" + partial.join(\",\") + \"}\";\n gap = mind;\n return v;\n }\n }\n\n // If the JSON object does not yet have a stringify method, give it one.\n\n if (typeof JSON.stringify !== \"function\") {\n meta = { // table of character substitutions\n \"\\b\": \"\\\\b\",\n \"\\t\": \"\\\\t\",\n \"\\n\": \"\\\\n\",\n \"\\f\": \"\\\\f\",\n \"\\r\": \"\\\\r\",\n \"\\\"\": \"\\\\\\\"\",\n \"\\\\\": \"\\\\\\\\\"\n };\n JSON.stringify = function (value, replacer, space) {\n\n // The stringify method takes a value and an optional replacer, and an optional\n // space parameter, and returns a JSON text. The replacer can be a function\n // that can replace values, or an array of strings that will select the keys.\n // A default replacer method can be provided. Use of the space parameter can\n // produce text that is more easily readable.\n\n var i;\n gap = \"\";\n indent = \"\";\n\n // If the space parameter is a number, make an indent string containing that\n // many spaces.\n\n if (typeof space === \"number\") {\n for (i = 0; i < space; i += 1) {\n indent += \" \";\n }\n\n // If the space parameter is a string, it will be used as the indent string.\n\n } else if (typeof space === \"string\") {\n indent = space;\n }\n\n // If there is a replacer, it must be a function or an array.\n // Otherwise, throw an error.\n\n rep = replacer;\n if (replacer && typeof replacer !== \"function\" &&\n (typeof replacer !== \"object\" ||\n typeof replacer.length !== \"number\")) {\n throw new Error(\"JSON.stringify\");\n }\n\n // Make a fake root object containing our value under the key of \"\".\n // Return the result of stringifying the value.\n\n return str(\"\", {\"\": value});\n };\n }\n\n\n // If the JSON object does not yet have a parse method, give it one.\n\n if (typeof JSON.parse !== \"function\") {\n JSON.parse = (function () {\n\n // This function creates a JSON parse function that uses a state machine rather\n // than the dangerous eval function to parse a JSON text.\n\n var state; // The state of the parser, one of\n // 'go' The starting state\n // 'ok' The final, accepting state\n // 'firstokey' Ready for the first key of the object or\n // the closing of an empty object\n // 'okey' Ready for the next key of the object\n // 'colon' Ready for the colon\n // 'ovalue' Ready for the value half of a key/value pair\n // 'ocomma' Ready for a comma or closing }\n // 'firstavalue' Ready for the first value of an array or\n // an empty array\n // 'avalue' Ready for the next value of an array\n // 'acomma' Ready for a comma or closing ]\n var stack; // The stack, for controlling nesting.\n var container; // The current container object or array\n var key; // The current key\n var value; // The current value\n var escapes = { // Escapement translation table\n \"\\\\\": \"\\\\\",\n \"\\\"\": \"\\\"\",\n \"/\": \"/\",\n \"t\": \"\\t\",\n \"n\": \"\\n\",\n \"r\": \"\\r\",\n \"f\": \"\\f\",\n \"b\": \"\\b\"\n };\n var string = { // The actions for string tokens\n go: function () {\n state = \"ok\";\n },\n firstokey: function () {\n key = value;\n state = \"colon\";\n },\n okey: function () {\n key = value;\n state = \"colon\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var number = { // The actions for number tokens\n go: function () {\n state = \"ok\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var action = {\n\n // The action table describes the behavior of the machine. It contains an\n // object for each token. Each object contains a method that is called when\n // a token is matched in a state. An object will lack a method for illegal\n // states.\n\n \"{\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = {};\n state = \"firstokey\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = {};\n state = \"firstokey\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n }\n },\n \"}\": {\n firstokey: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n ocomma: function () {\n var pop = stack.pop();\n container[key] = value;\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \"[\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = [];\n state = \"firstavalue\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = [];\n state = \"firstavalue\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n }\n },\n \"]\": {\n firstavalue: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n acomma: function () {\n var pop = stack.pop();\n container.push(value);\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \":\": {\n colon: function () {\n if (Object.hasOwnProperty.call(container, key)) {\n throw new SyntaxError(\"Duplicate key '\" + key + \"\\\"\");\n }\n state = \"ovalue\";\n }\n },\n \",\": {\n ocomma: function () {\n container[key] = value;\n state = \"okey\";\n },\n acomma: function () {\n container.push(value);\n state = \"avalue\";\n }\n },\n \"true\": {\n go: function () {\n value = true;\n state = \"ok\";\n },\n ovalue: function () {\n value = true;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = true;\n state = \"acomma\";\n },\n avalue: function () {\n value = true;\n state = \"acomma\";\n }\n },\n \"false\": {\n go: function () {\n value = false;\n state = \"ok\";\n },\n ovalue: function () {\n value = false;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = false;\n state = \"acomma\";\n },\n avalue: function () {\n value = false;\n state = \"acomma\";\n }\n },\n \"null\": {\n go: function () {\n value = null;\n state = \"ok\";\n },\n ovalue: function () {\n value = null;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = null;\n state = \"acomma\";\n },\n avalue: function () {\n value = null;\n state = \"acomma\";\n }\n }\n };\n\n function debackslashify(text) {\n\n // Remove and replace any backslash escapement.\n\n return text.replace(/\\\\(?:u(.{4})|([^u]))/g, function (ignore, b, c) {\n return b\n ? String.fromCharCode(parseInt(b, 16))\n : escapes[c];\n });\n }\n\n return function (source, reviver) {\n\n // A regular expression is used to extract tokens from the JSON text.\n // The extraction process is cautious.\n\n var result;\n var tx = /^[\\u0020\\t\\n\\r]*(?:([,:\\[\\]{}]|true|false|null)|(-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?)|\"((?:[^\\r\\n\\t\\\\\\\"]|\\\\(?:[\"\\\\\\/trnfb]|u[0-9a-fA-F]{4}))*)\")/;\n\n // Set the starting state.\n\n state = \"go\";\n\n // The stack records the container, key, and state for each object or array\n // that contains another object or array while processing nested structures.\n\n stack = [];\n\n // If any error occurs, we will catch it and ultimately throw a syntax error.\n\n try {\n\n // For each token...\n\n while (true) {\n result = tx.exec(source);\n if (!result) {\n break;\n }\n\n // result is the result array from matching the tokenizing regular expression.\n // result[0] contains everything that matched, including any initial whitespace.\n // result[1] contains any punctuation that was matched, or true, false, or null.\n // result[2] contains a matched number, still in string form.\n // result[3] contains a matched string, without quotes but with escapement.\n\n if (result[1]) {\n\n // Token: Execute the action for this state and token.\n\n action[result[1]][state]();\n\n } else if (result[2]) {\n\n // Number token: Convert the number string into a number value and execute\n // the action for this state and number.\n\n value = +result[2];\n number[state]();\n } else {\n\n // String token: Replace the escapement sequences and execute the action for\n // this state and string.\n\n value = debackslashify(result[3]);\n string[state]();\n }\n\n // Remove the token from the string. The loop will continue as long as there\n // are tokens. This is a slow process, but it allows the use of ^ matching,\n // which assures that no illegal tokens slip through.\n\n source = source.slice(result[0].length);\n }\n\n // If we find a state/token combination that is illegal, then the action will\n // cause an error. We handle the error by simply changing the state.\n\n } catch (e) {\n state = e;\n }\n\n // The parsing is finished. If we are not in the final \"ok\" state, or if the\n // remaining source contains anything except whitespace, then we did not have\n //a well-formed JSON text.\n\n if (state !== \"ok\" || (/[^\\u0020\\t\\n\\r]/.test(source))) {\n throw (state instanceof SyntaxError)\n ? state\n : new SyntaxError(\"JSON\");\n }\n\n // If there is a reviver function, we recursively walk the new structure,\n // passing each name/value pair to the reviver function for possible\n // transformation, starting with a temporary root object that holds the current\n // value in an empty key. If there is not a reviver function, we simply return\n // that value.\n\n return (typeof reviver === \"function\")\n ? (function walk(holder, key) {\n var k;\n var v;\n var val = holder[key];\n if (val && typeof val === \"object\") {\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(val, k)) {\n v = walk(val, k);\n if (v !== undefined) {\n val[k] = v;\n } else {\n delete val[k];\n }\n }\n }\n }\n return reviver.call(holder, key, val);\n }({\"\": value}, \"\"))\n : value;\n };\n }());\n }\n}\n\nmodule.exports = setupCustomJSON;\n","'use strict';\n\nfunction wrapGlobals(window, handler, shim) {\n if (!window) { return; }\n // Adapted from https://github.com/bugsnag/bugsnag-js\n var globals = 'EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload'.split(',');\n var i, global;\n for (i = 0; i < globals.length; ++i) {\n global = globals[i];\n\n if (window[global] && window[global].prototype) {\n _extendListenerPrototype(handler, window[global].prototype, shim);\n }\n }\n}\n\nfunction _extendListenerPrototype(handler, prototype, shim) {\n if (prototype.hasOwnProperty && prototype.hasOwnProperty('addEventListener')) {\n var oldAddEventListener = prototype.addEventListener;\n while (oldAddEventListener._rollbarOldAdd && oldAddEventListener.belongsToShim) {\n oldAddEventListener = oldAddEventListener._rollbarOldAdd;\n }\n var addFn = function(event, callback, bubble) {\n oldAddEventListener.call(this, event, handler.wrap(callback), bubble);\n };\n addFn._rollbarOldAdd = oldAddEventListener;\n addFn.belongsToShim = shim;\n prototype.addEventListener = addFn;\n\n var oldRemoveEventListener = prototype.removeEventListener;\n while (oldRemoveEventListener._rollbarOldRemove && oldRemoveEventListener.belongsToShim) {\n oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;\n }\n var removeFn = function(event, callback, bubble) {\n oldRemoveEventListener.call(this, event, callback && callback._rollbar_wrapped || callback, bubble);\n };\n removeFn._rollbarOldRemove = oldRemoveEventListener;\n removeFn.belongsToShim = shim;\n prototype.removeEventListener = removeFn;\n }\n}\n\nmodule.exports = wrapGlobals;\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction raw(payload, jsonBackup) {\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction selectFrames(frames, range) {\n var len = frames.length;\n if (len > range * 2) {\n return frames.slice(0, range).concat(frames.slice(len - range));\n }\n return frames;\n}\n\nfunction truncateFrames(payload, jsonBackup, range) {\n range = (typeof range === 'undefined') ? 30 : range;\n var body = payload.data.body;\n var frames;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n frames = chain[i].frames;\n frames = selectFrames(frames, range);\n chain[i].frames = frames;\n }\n } else if (body.trace) {\n frames = body.trace.frames;\n frames = selectFrames(frames, range);\n body.trace.frames = frames;\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction maybeTruncateValue(len, val) {\n if (!val) {\n return val;\n }\n if (val.length > len) {\n return val.slice(0, len - 3).concat('...');\n }\n return val;\n}\n\nfunction truncateStrings(len, payload, jsonBackup) {\n function truncator(k, v, seen) {\n switch (_.typeName(v)) {\n case 'string':\n return maybeTruncateValue(len, v);\n case 'object':\n case 'array':\n return traverse(v, truncator, seen);\n default:\n return v;\n }\n }\n payload = traverse(payload, truncator);\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction truncateTraceData(traceData) {\n if (traceData.exception) {\n delete traceData.exception.description;\n traceData.exception.message = maybeTruncateValue(255, traceData.exception.message);\n }\n traceData.frames = selectFrames(traceData.frames, 1);\n return traceData;\n}\n\nfunction minBody(payload, jsonBackup) {\n var body = payload.data.body;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n chain[i] = truncateTraceData(chain[i]);\n }\n } else if (body.trace) {\n body.trace = truncateTraceData(body.trace);\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction needsTruncation(payload, maxSize) {\n return _.maxByteSize(payload) > maxSize;\n}\n\nfunction truncate(payload, jsonBackup, maxSize) {\n maxSize = (typeof maxSize === 'undefined') ? (512 * 1024) : maxSize;\n var strategies = [\n raw,\n truncateFrames,\n truncateStrings.bind(null, 1024),\n truncateStrings.bind(null, 512),\n truncateStrings.bind(null, 256),\n minBody\n ];\n var strategy, results, result;\n\n while ((strategy = strategies.shift())) {\n results = strategy(payload, jsonBackup);\n payload = results[0];\n result = results[1];\n if (result.error || !needsTruncation(result.value, maxSize)) {\n return result;\n }\n }\n return result;\n}\n\nmodule.exports = {\n truncate: truncate,\n\n /* for testing */\n raw: raw,\n truncateFrames: truncateFrames,\n truncateStrings: truncateStrings,\n maybeTruncateValue: maybeTruncateValue\n};\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://rollbar/webpack/bootstrap","webpack://rollbar/./src/utility.js","webpack://rollbar/./src/browser/logger.js","webpack://rollbar/./src/browser/url.js","webpack://rollbar/./src/errorParser.js","webpack://rollbar/./src/scrub.js","webpack://rollbar/./src/utility/traverse.js","webpack://rollbar/./src/browser/bundles/rollbar.js","webpack://rollbar/./src/browser/rollbar.js","webpack://rollbar/./src/browser/core.js","webpack://rollbar/./src/rollbar.js","webpack://rollbar/./src/rateLimiter.js","webpack://rollbar/./src/merge.js","webpack://rollbar/./src/queue.js","webpack://rollbar/./src/notifier.js","webpack://rollbar/./src/api.js","webpack://rollbar/./src/apiUtility.js","webpack://rollbar/./node_modules/console-polyfill/index.js","webpack://rollbar/./src/browser/detection.js","webpack://rollbar/./src/browser/globalSetup.js","webpack://rollbar/./src/browser/transport.js","webpack://rollbar/./src/browser/transport/fetch.js","webpack://rollbar/./src/browser/transport/xhr.js","webpack://rollbar/./src/browser/transforms.js","webpack://rollbar/./node_modules/error-stack-parser/error-stack-parser.js","webpack://rollbar/./node_modules/error-stack-parser/node_modules/stackframe/stackframe.js","webpack://rollbar/./src/transforms.js","webpack://rollbar/./src/browser/predicates.js","webpack://rollbar/./src/predicates.js","webpack://rollbar/./src/defaults.js","webpack://rollbar/./src/browser/defaults/scrubFields.js","webpack://rollbar/./src/telemetry.js","webpack://rollbar/./src/browser/telemetry.js","webpack://rollbar/./src/utility/headers.js","webpack://rollbar/./src/browser/domUtility.js","webpack://rollbar/./src/utility/polyfillJSON.js","webpack://rollbar/./vendor/JSON-js/json3.js","webpack://rollbar/./src/browser/wrapGlobals.js","webpack://rollbar/./src/truncation.js"],"names":[],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;AClFa;;AAEb,YAAY,mBAAO,CAAC,EAAS;;AAE7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,OAAO;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,EAAE;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,mCAAmC,OAAO;AAC1C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,iBAAiB,YAAY;AAC7B;AACA,qBAAqB;AACrB;AACA,KAAK,wBAAwB;AAC7B;AACA,KAAK,yBAAyB;AAC9B;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kCAAkC,OAAO;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,SAAS;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,kCAAkC,OAAO;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,SAAS,UAAU,YAAY,GAAG;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,aAAa;AAChC;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5wBa;;AAEb;AACA,mBAAO,CAAC,EAAkB;AAC1B,gBAAgB,mBAAO,CAAC,EAAa;AACrC,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;AC3Ca;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;AChFa;;AAEb,uBAAuB,mBAAO,CAAC,EAAoB;;AAEnD;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;;AAEA,sBAAsB,wBAAwB;AAC9C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,eAAe;AACf;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7Ha;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,eAAe,mBAAO,CAAC,CAAoB;;AAE3C;AACA;;AAEA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,WAAW;AAC9B;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC9Fa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,kBAAkB;;AAElB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,eAAe,gBAAgB;AAC/B;AACA;AACA;;AAEA,yBAAyB;AACzB;AACA,aAAa,iBAAi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AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,0BAA0B,sBAAsB;AAChD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,oCAAoC,SAAS;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,eAAe,mBAAO,CAAC,EAAa;AACpC,kBAAkB,mBAAO,CAAC,EAAwB;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACxjBa;;AAEb,kBAAkB,mBAAO,CAAC,EAAe;AACzC,YAAY,mBAAO,CAAC,EAAS;AAC7B,eAAe,mBAAO,CAAC,EAAY;AACnC,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,6EAA6E,UAAU;AACvF,yFAAyF,UAAU;;AAEnG;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,6BAA6B;AAC7B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACnRa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AChJa;;AAEb;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA,WAAW,YAAY;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACvDa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wDAAwD,WAAW;AACnE;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,QAAQ;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,aAAa,8BAA8B;AAC3C;AACA;AACA;AACA;AACA,+CAA+C,SAAS;AACxD;AACA;AACA,cAAc;AACd;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,SAAS;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,+BAA+B;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC7Qa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACxHa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,cAAc,mBAAO,CAAC,EAAc;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;AC5Ga;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACzGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;AClBY;;AAEb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;AC/Ba;;AAEb;AACA,gBAAgB,QAAQ;AACxB;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;;AAEA;AACA,gBAAgB,QAAQ;;AAExB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;;;;;;;AClGa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,uBAAuB,mBAAO,CAAC,EAAmB;AAClD,qBAAqB,mBAAO,CAAC,EAAiB;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC/Ha;;AAEb,aAAa,mBAAO,CAAC,CAAW;AAChC,QAAQ,mBAAO,CAAC,CAAe;;AAE/B;AACA;AACA;;AAEA;AACA;AACA,wCAAwC,mBAAmB;AAC3D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;;AAEA;;;;;;;;ACpCa;;AAEb;;AAEA,QAAQ,mBAAO,CAAC,CAAe;AAC/B,aAAa,mBAAO,CAAC,CAAW;;AAEhC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AChKa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,kBAAkB,mBAAO,CAAC,CAAgB;AAC1C,aAAa,mBAAO,CAAC,CAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,OAAO;AAC7C;AACA,oBAAoB,6CAA6C;AACjE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,4BAA4B,gBAAgB;AAC5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,sBAAsB;AACvC;AACA;AACA;;AAEA,4BAA4B,oBAAoB;AAChD;AACA;;AAEA;AACA;;AAEA;AACA;AACA,8BAA8B,aAAa;AAC3C;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,kBAAkB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACnVA;AACA;AACA;;AAEA;AACA,QAAQ,IAA0C;AAClD,QAAQ,iCAA6B,CAAC,uBAAY,CAAC,oCAAE,OAAO;AAAA;AAAA;AAAA,oGAAC;AAC7D,KAAK,MAAM,EAIN;AACL,CAAC;AACD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,MAAM;AACzB,oBAAoB,MAAM;AAC1B;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA,CAAC;;;;;;;ACzMD;AACA;AACA;;AAEA;AACA,QAAQ,IAA0C;AAClD,QAAQ,iCAAqB,EAAE,oCAAE,OAAO;AAAA;AAAA;AAAA,oGAAC;AACzC,KAAK,MAAM,EAIN;AACL,CAAC;AACD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,wBAAwB;AAC3C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA,CAAC;;;;;;;;AC9IY;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,sBAAsB;AAC1D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,8BAA8B;AAC9B;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5Ja;;AAEb,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;ACba;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe;;AAEf;;AAEA,uCAAuC,eAAe;;AAEtD;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA;;AAEA,wCAAwC,eAAe;;AAEvD,mBAAmB,gBAAgB;AACnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,SAAS;AAC1B;;AAEA,mBAAmB,qBAAqB;AACxC;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClMa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACVa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5Da;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qCAAqC,mBAAmB;AACxD;;AAEA;AACA,qCAAqC,4BAA4B;AACjE;AACA;AACA,8BAA8B,4BAA4B;AAC1D;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD;AACA;AACA,8BAA8B,gBAAgB;AAC9C;AACA;;AAEA;AACA,8BAA8B,aAAa;AAC3C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AClLa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,cAAc,mBAAO,CAAC,EAAoB;AAC1C,YAAY,mBAAO,CAAC,CAAU;AAC9B,gBAAgB,mBAAO,CAAC,CAAO;AAC/B,cAAc,mBAAO,CAAC,EAAc;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gDAAgD,aAAa;AAC7D;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B,mBAAmB,qBAAqB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,6BAA6B,0BAA0B;AACvD;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA,iBAAiB;AACjB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,eAAe,0BAA0B;AACzC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB;;AAEjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,SAAS;AAC9C;AACA;AACA,GAAG;AACH,yCAAyC;AACzC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,gDAAgD,QAAQ;;AAExD;AACA;;AAEA;AACA,gDAAgD,QAAQ;;AAExD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;AC7wBa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;AC/Fa;;AAEb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,6BAA6B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,4BAA4B,QAAQ;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,4BAA4B;AAC7C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,uBAAuB;AACpC;AACA;AACA;AACA,2BAA2B,sBAAsB;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnIa;;AAEb,mBAAmB,mBAAO,CAAC,EAA4B;;AAEvD;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB;AACpB;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,yCAAyC,iBAAiB;AAC1D,8BAA8B,kBAAkB;;AAEhD,yCAAyC,iBAAiB;AAC1D,sCAAsC,6BAA6B;;AAEnE;AACA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,wBAAwB;AACxB,+CAA+C,EAAE;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;;AAGA;;AAEA;;AAEA,UAAU;AACV,UAAU;AACV,UAAU;AACV;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA,qBAAqB,YAAY;AACjC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,qBAAqB,YAAY;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,eAAe;AACf;AACA,cAAc,wDAAwD;AACtE,cAAc,0BAA0B;AACxC;AACA;AACA;AACA;;AAEA;;AAEA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,mBAAmB,WAAW;AAC9B;AACA;;AAEA;;AAEA,OAAO;AACP;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,sBAAsB,UAAU;AAChC;AACA;;;AAGA;;AAEA;AACA;;AAEA;AACA;;AAEA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB,oBAAoB;AACpB,cAAc;AACd,gBAAgB;AAChB,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,UAAU;AACV;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,WAAW;AACX;AACA,wBAAwB,gDAAgD;AACxE;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,SAAS;AACT,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,WAAW;AACX;AACA,wBAAwB,gDAAgD;AACxE;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,sCAAsC,EAAE;AACxC;AACA;AACA;AACA,SAAS;AACT;;AAEA;;AAEA;AACA;;AAEA;AACA,+CAA+C,yGAAyG,EAAE;;AAE1J;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,SAAS;AACT;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE,UAAU;AACvB;AACA;AACA,KAAK;AACL;AACA;;AAEA;;;;;;;;AC1vBa;;AAEb;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,aAAa,oBAAoB;AACjC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC1Ca;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,eAAe,mBAAO,CAAC,CAAoB;;AAE3C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA","file":"rollbar.named-amd.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n","'use strict';\n\nvar merge = require('./merge');\n\nvar RollbarJSON = {};\nfunction setupJSON(polyfillJSON) {\n if (isFunction(RollbarJSON.stringify) && isFunction(RollbarJSON.parse)) {\n return;\n }\n\n if (isDefined(JSON)) {\n // If polyfill is provided, prefer it over existing non-native shims.\n if(polyfillJSON) {\n if (isNativeFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isNativeFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n } else { // else accept any interface that is present.\n if (isFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n }\n }\n if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {\n polyfillJSON && polyfillJSON(RollbarJSON);\n }\n}\n\n/*\n * isType - Given a Javascript value and a string, returns true if the type of the value matches the\n * given string.\n *\n * @param x - any value\n * @param t - a lowercase string containing one of the following type names:\n * - undefined\n * - null\n * - error\n * - number\n * - boolean\n * - string\n * - symbol\n * - function\n * - object\n * - array\n * @returns true if x is of type t, otherwise false\n */\nfunction isType(x, t) {\n return t === typeName(x);\n}\n\n/*\n * typeName - Given a Javascript value, returns the type of the object as a string\n */\nfunction typeName(x) {\n var name = typeof x;\n if (name !== 'object') {\n return name;\n }\n if (!x) {\n return 'null';\n }\n if (x instanceof Error) {\n return 'error';\n }\n return ({}).toString.call(x).match(/\\s([a-zA-Z]+)/)[1].toLowerCase();\n}\n\n/* isFunction - a convenience function for checking if a value is a function\n *\n * @param f - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isFunction(f) {\n return isType(f, 'function');\n}\n\n/* isNativeFunction - a convenience function for checking if a value is a native JS function\n *\n * @param f - any value\n * @returns true if f is a native JS function, otherwise false\n */\nfunction isNativeFunction(f) {\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n var funcMatchString = Function.prototype.toString.call(Object.prototype.hasOwnProperty)\n .replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?');\n var reIsNative = RegExp('^' + funcMatchString + '$');\n return isObject(f) && reIsNative.test(f);\n}\n\n/* isObject - Checks if the argument is an object\n *\n * @param value - any value\n * @returns true is value is an object function is an object)\n*/\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/* isString - Checks if the argument is a string\n *\n * @param value - any value\n * @returns true if value is a string\n*/\nfunction isString(value) {\n return typeof value === 'string' || value instanceof String\n}\n\n/**\n * isFiniteNumber - determines whether the passed value is a finite number\n *\n * @param {*} n - any value\n * @returns true if value is a finite number\n */\n function isFiniteNumber(n) {\n return Number.isFinite(n);\n}\n\n/*\n * isDefined - a convenience function for checking if a value is not equal to undefined\n *\n * @param u - any value\n * @returns true if u is anything other than undefined\n */\nfunction isDefined(u) {\n return !isType(u, 'undefined');\n}\n\n/*\n * isIterable - convenience function for checking if a value can be iterated, essentially\n * whether it is an object or an array.\n *\n * @param i - any value\n * @returns true if i is an object or an array as determined by `typeName`\n */\nfunction isIterable(i) {\n var type = typeName(i);\n return (type === 'object' || type === 'array');\n}\n\n/*\n * isError - convenience function for checking if a value is of an error type\n *\n * @param e - any value\n * @returns true if e is an error\n */\nfunction isError(e) {\n // Detect both Error and Firefox Exception type\n return isType(e, 'error') || isType(e, 'exception');\n}\n\n/* isPromise - a convenience function for checking if a value is a promise\n *\n * @param p - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isPromise(p) {\n return isObject(p) && isType(p.then, 'function');\n}\n\nfunction redact() {\n return '********';\n}\n\n// from http://stackoverflow.com/a/8809472/1138191\nfunction uuid4() {\n var d = now();\n var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n var r = (d + Math.random() * 16) % 16 | 0;\n d = Math.floor(d / 16);\n return (c === 'x' ? r : (r & 0x7 | 0x8)).toString(16);\n });\n return uuid;\n}\n\nvar LEVELS = {\n debug: 0,\n info: 1,\n warning: 2,\n error: 3,\n critical: 4\n};\n\nfunction sanitizeUrl(url) {\n var baseUrlParts = parseUri(url);\n if (!baseUrlParts) {\n return '(unknown)';\n }\n\n // remove a trailing # if there is no anchor\n if (baseUrlParts.anchor === '') {\n baseUrlParts.source = baseUrlParts.source.replace('#', '');\n }\n\n url = baseUrlParts.source.replace('?' + baseUrlParts.query, '');\n return url;\n}\n\nvar parseUriOptions = {\n strictMode: false,\n key: [\n 'source',\n 'protocol',\n 'authority',\n 'userInfo',\n 'user',\n 'password',\n 'host',\n 'port',\n 'relative',\n 'path',\n 'directory',\n 'file',\n 'query',\n 'anchor'\n ],\n q: {\n name: 'queryKey',\n parser: /(?:^|&)([^&=]*)=?([^&]*)/g\n },\n parser: {\n strict: /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n loose: /^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/\n }\n};\n\nfunction parseUri(str) {\n if (!isType(str, 'string')) {\n return undefined;\n }\n\n var o = parseUriOptions;\n var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);\n var uri = {};\n\n for (var i = 0, l = o.key.length; i < l; ++i) {\n uri[o.key[i]] = m[i] || '';\n }\n\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) {\n uri[o.q.name][$1] = $2;\n }\n });\n\n return uri;\n}\n\nfunction addParamsAndAccessTokenToPath(accessToken, options, params) {\n params = params || {};\n params.access_token = accessToken;\n var paramsArray = [];\n var k;\n for (k in params) {\n if (Object.prototype.hasOwnProperty.call(params, k)) {\n paramsArray.push([k, params[k]].join('='));\n }\n }\n var query = '?' + paramsArray.sort().join('&');\n\n options = options || {};\n options.path = options.path || '';\n var qs = options.path.indexOf('?');\n var h = options.path.indexOf('#');\n var p;\n if (qs !== -1 && (h === -1 || h > qs)) {\n p = options.path;\n options.path = p.substring(0,qs) + query + '&' + p.substring(qs+1);\n } else {\n if (h !== -1) {\n p = options.path;\n options.path = p.substring(0,h) + query + p.substring(h);\n } else {\n options.path = options.path + query;\n }\n }\n}\n\nfunction formatUrl(u, protocol) {\n protocol = protocol || u.protocol;\n if (!protocol && u.port) {\n if (u.port === 80) {\n protocol = 'http:';\n } else if (u.port === 443) {\n protocol = 'https:';\n }\n }\n protocol = protocol || 'https:';\n\n if (!u.hostname) {\n return null;\n }\n var result = protocol + '//' + u.hostname;\n if (u.port) {\n result = result + ':' + u.port;\n }\n if (u.path) {\n result = result + u.path;\n }\n return result;\n}\n\nfunction stringify(obj, backup) {\n var value, error;\n try {\n value = RollbarJSON.stringify(obj);\n } catch (jsonError) {\n if (backup && isFunction(backup)) {\n try {\n value = backup(obj);\n } catch (backupError) {\n error = backupError;\n }\n } else {\n error = jsonError;\n }\n }\n return {error: error, value: value};\n}\n\nfunction maxByteSize(string) {\n // The transport will use utf-8, so assume utf-8 encoding.\n //\n // This minimal implementation will accurately count bytes for all UCS-2 and\n // single code point UTF-16. If presented with multi code point UTF-16,\n // which should be rare, it will safely overcount, not undercount.\n //\n // While robust utf-8 encoders exist, this is far smaller and far more performant.\n // For quickly counting payload size for truncation, smaller is better.\n\n var count = 0;\n var length = string.length;\n\n for (var i = 0; i < length; i++) {\n var code = string.charCodeAt(i);\n if (code < 128) { // up to 7 bits\n count = count + 1;\n } else if (code < 2048) { // up to 11 bits\n count = count + 2;\n } else if (code < 65536) { // up to 16 bits\n count = count + 3;\n }\n }\n\n return count;\n}\n\nfunction jsonParse(s) {\n var value, error;\n try {\n value = RollbarJSON.parse(s);\n } catch (e) {\n error = e;\n }\n return {error: error, value: value};\n}\n\nfunction makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n mode,\n backupMessage,\n errorParser\n) {\n var location = {\n url: url || '',\n line: lineno,\n column: colno\n };\n location.func = errorParser.guessFunctionName(location.url, location.line);\n location.context = errorParser.gatherContext(location.url, location.line);\n var href = typeof document !== 'undefined' && document && document.location && document.location.href;\n var useragent = typeof window !== 'undefined' && window && window.navigator && window.navigator.userAgent;\n return {\n 'mode': mode,\n 'message': error ? String(error) : (message || backupMessage),\n 'url': href,\n 'stack': [location],\n 'useragent': useragent\n };\n}\n\nfunction wrapCallback(logger, f) {\n return function(err, resp) {\n try {\n f(err, resp);\n } catch (e) {\n logger.error(e);\n }\n };\n}\n\nfunction nonCircularClone(obj) {\n var seen = [obj];\n\n function clone(obj, seen) {\n var value, name, newSeen, result = {};\n\n try {\n for (name in obj) {\n value = obj[name];\n\n if (value && (isType(value, 'object') || isType(value, 'array'))) {\n if (seen.includes(value)) {\n result[name] = 'Removed circular reference: ' + typeName(value);\n } else {\n newSeen = seen.slice();\n newSeen.push(value);\n result[name] = clone(value, newSeen);\n }\n continue;\n }\n\n result[name] = value;\n }\n } catch (e) {\n result = 'Failed cloning custom data: ' + e.message;\n }\n return result;\n }\n return clone(obj, seen);\n}\n\nfunction createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\n var diagnostic = {};\n var argTypes = [];\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n argTypes.push(typ);\n switch (typ) {\n case 'undefined':\n break;\n case 'string':\n message ? extraArgs.push(arg) : message = arg;\n break;\n case 'function':\n callback = wrapCallback(logger, arg);\n break;\n case 'date':\n extraArgs.push(arg);\n break;\n case 'error':\n case 'domexception':\n case 'exception': // Firefox Exception type\n err ? extraArgs.push(arg) : err = arg;\n break;\n case 'object':\n case 'array':\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n if (requestKeys && typ === 'object' && !request) {\n for (var j = 0, len = requestKeys.length; j < len; ++j) {\n if (arg[requestKeys[j]] !== undefined) {\n request = arg;\n break;\n }\n }\n if (request) {\n break;\n }\n }\n custom ? extraArgs.push(arg) : custom = arg;\n break;\n default:\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n extraArgs.push(arg);\n }\n }\n\n // if custom is an array this turns it into an object with integer keys\n if (custom) custom = nonCircularClone(custom);\n\n if (extraArgs.length > 0) {\n if (!custom) custom = nonCircularClone({});\n custom.extraArgs = nonCircularClone(extraArgs);\n }\n\n var item = {\n message: message,\n err: err,\n custom: custom,\n timestamp: now(),\n callback: callback,\n notifier: notifier,\n diagnostic: diagnostic,\n uuid: uuid4()\n };\n\n setCustomItemKeys(item, custom);\n\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n item.diagnostic.original_arg_types = argTypes;\n return item;\n}\n\nfunction setCustomItemKeys(item, custom) {\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (custom && custom.skipFrames !== undefined) {\n item.skipFrames = custom.skipFrames;\n delete custom.skipFrames;\n }\n}\n\nfunction addErrorContext(item, errors) {\n var custom = item.data.custom || {};\n var contextAdded = false;\n\n try {\n for (var i = 0; i < errors.length; ++i) {\n if (errors[i].hasOwnProperty('rollbarContext')) {\n custom = merge(custom, nonCircularClone(errors[i].rollbarContext));\n contextAdded = true;\n }\n }\n\n // Avoid adding an empty object to the data.\n if (contextAdded) {\n item.data.custom = custom;\n }\n } catch (e) {\n item.diagnostic.error_context = 'Failed: ' + e.message;\n }\n}\n\nvar TELEMETRY_TYPES = ['log', 'network', 'dom', 'navigation', 'error', 'manual'];\nvar TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];\n\nfunction arrayIncludes(arr, val) {\n for (var k = 0; k < arr.length; ++k) {\n if (arr[k] === val) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction createTelemetryEvent(args) {\n var type, metadata, level;\n var arg;\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n switch (typ) {\n case 'string':\n if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {\n type = arg;\n } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {\n level = arg;\n }\n break;\n case 'object':\n metadata = arg;\n break;\n default:\n break;\n }\n }\n var event = {\n type: type || 'manual',\n metadata: metadata || {},\n level: level\n };\n\n return event;\n}\n\n/*\n * get - given an obj/array and a keypath, return the value at that keypath or\n * undefined if not possible.\n *\n * @param obj - an object or array\n * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'\n * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`\n */\nfunction get(obj, path) {\n if (!obj) {\n return undefined;\n }\n var keys = path.split('.');\n var result = obj;\n try {\n for (var i = 0, len = keys.length; i < len; ++i) {\n result = result[keys[i]];\n }\n } catch (e) {\n result = undefined;\n }\n return result;\n}\n\nfunction set(obj, path, value) {\n if (!obj) {\n return;\n }\n var keys = path.split('.');\n var len = keys.length;\n if (len < 1) {\n return;\n }\n if (len === 1) {\n obj[keys[0]] = value;\n return;\n }\n try {\n var temp = obj[keys[0]] || {};\n var replacement = temp;\n for (var i = 1; i < len - 1; ++i) {\n temp[keys[i]] = temp[keys[i]] || {};\n temp = temp[keys[i]];\n }\n temp[keys[len-1]] = value;\n obj[keys[0]] = replacement;\n } catch (e) {\n return;\n }\n}\n\nfunction formatArgsAsString(args) {\n var i, len, arg;\n var result = [];\n for (i = 0, len = args.length; i < len; ++i) {\n arg = args[i];\n switch (typeName(arg)) {\n case 'object':\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500) {\n arg = arg.substr(0, 497) + '...';\n }\n break;\n case 'null':\n arg = 'null';\n break;\n case 'undefined':\n arg = 'undefined';\n break;\n case 'symbol':\n arg = arg.toString();\n break;\n }\n result.push(arg);\n }\n return result.join(' ');\n}\n\nfunction now() {\n if (Date.now) {\n return +Date.now();\n }\n return +new Date();\n}\n\nfunction filterIp(requestData, captureIp) {\n if (!requestData || !requestData['user_ip'] || captureIp === true) {\n return;\n }\n var newIp = requestData['user_ip'];\n if (!captureIp) {\n newIp = null;\n } else {\n try {\n var parts;\n if (newIp.indexOf('.') !== -1) {\n parts = newIp.split('.');\n parts.pop();\n parts.push('0');\n newIp = parts.join('.');\n } else if (newIp.indexOf(':') !== -1) {\n parts = newIp.split(':');\n if (parts.length > 2) {\n var beginning = parts.slice(0, 3);\n var slashIdx = beginning[2].indexOf('/');\n if (slashIdx !== -1) {\n beginning[2] = beginning[2].substring(0, slashIdx);\n }\n var terminal = '0000:0000:0000:0000:0000';\n newIp = beginning.concat(terminal).join(':');\n }\n } else {\n newIp = null;\n }\n } catch (e) {\n newIp = null;\n }\n }\n requestData['user_ip'] = newIp;\n}\n\nfunction handleOptions(current, input, payload, logger) {\n var result = merge(current, input, payload);\n result = updateDeprecatedOptions(result, logger);\n if (!input || input.overwriteScrubFields) {\n return result;\n }\n if (input.scrubFields) {\n result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);\n }\n return result;\n}\n\nfunction updateDeprecatedOptions(options, logger) {\n if(options.hostWhiteList && !options.hostSafeList) {\n options.hostSafeList = options.hostWhiteList;\n options.hostWhiteList = undefined;\n logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');\n }\n if(options.hostBlackList && !options.hostBlockList) {\n options.hostBlockList = options.hostBlackList;\n options.hostBlackList = undefined;\n logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');\n }\n return options;\n}\n\nmodule.exports = {\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n createItem: createItem,\n addErrorContext: addErrorContext,\n createTelemetryEvent: createTelemetryEvent,\n filterIp: filterIp,\n formatArgsAsString: formatArgsAsString,\n formatUrl: formatUrl,\n get: get,\n handleOptions: handleOptions,\n isError: isError,\n isFiniteNumber: isFiniteNumber,\n isFunction: isFunction,\n isIterable: isIterable,\n isNativeFunction: isNativeFunction,\n isObject: isObject,\n isString: isString,\n isType: isType,\n isPromise: isPromise,\n jsonParse: jsonParse,\n LEVELS: LEVELS,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n merge: merge,\n now: now,\n redact: redact,\n RollbarJSON: RollbarJSON,\n sanitizeUrl: sanitizeUrl,\n set: set,\n setupJSON: setupJSON,\n stringify: stringify,\n maxByteSize: maxByteSize,\n typeName: typeName,\n uuid4: uuid4\n};\n","'use strict';\n\n/* eslint-disable no-console */\nrequire('console-polyfill');\nvar detection = require('./detection');\nvar _ = require('../utility');\n\nfunction error() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.error(_.formatArgsAsString(args));\n } else {\n console.error.apply(console, args);\n }\n}\n\nfunction info() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.info(_.formatArgsAsString(args));\n } else {\n console.info.apply(console, args);\n }\n}\n\nfunction log() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.log(_.formatArgsAsString(args));\n } else {\n console.log.apply(console, args);\n }\n}\n\n/* eslint-enable no-console */\n\nmodule.exports = {\n error: error,\n info: info,\n log: log\n};\n","'use strict';\n\n// See https://nodejs.org/docs/latest/api/url.html\nfunction parse(url) {\n var result = {\n protocol: null, auth: null, host: null, path: null,\n hash: null, href: url, hostname: null, port: null,\n pathname: null, search: null, query: null\n };\n\n var i, last;\n i = url.indexOf('//');\n if (i !== -1) {\n result.protocol = url.substring(0,i);\n last = i+2;\n } else {\n last = 0;\n }\n \n i = url.indexOf('@', last);\n if (i !== -1) {\n result.auth = url.substring(last, i);\n last = i+1;\n }\n\n i = url.indexOf('/', last);\n if (i === -1) {\n i = url.indexOf('?', last);\n if (i === -1) {\n i = url.indexOf('#', last);\n if (i === -1) {\n result.host = url.substring(last);\n } else {\n result.host = url.substring(last, i);\n result.hash = url.substring(i);\n }\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n return result;\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n\n i = url.indexOf('#', last);\n if (i === -1) {\n result.path = url.substring(last);\n } else {\n result.path = url.substring(last, i);\n result.hash = url.substring(i);\n }\n\n if (result.path) {\n var pathParts = result.path.split('?');\n result.pathname = pathParts[0];\n result.query = pathParts[1];\n result.search = result.query ? '?' + result.query : null;\n }\n return result;\n}\n\nmodule.exports = {\n parse: parse\n};\n","'use strict';\n\nvar ErrorStackParser = require('error-stack-parser');\n\nvar UNKNOWN_FUNCTION = '?';\nvar ERR_CLASS_REGEXP = new RegExp('^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ');\n\nfunction guessFunctionName() {\n return UNKNOWN_FUNCTION;\n}\n\n\nfunction gatherContext() {\n return null;\n}\n\n\nfunction Frame(stackFrame) {\n var data = {};\n\n data._stackFrame = stackFrame;\n\n data.url = stackFrame.fileName;\n data.line = stackFrame.lineNumber;\n data.func = stackFrame.functionName;\n data.column = stackFrame.columnNumber;\n data.args = stackFrame.args;\n\n data.context = gatherContext();\n\n return data;\n}\n\n\nfunction Stack(exception, skip) {\n function getStack() {\n var parserStack = [];\n\n skip = skip || 0;\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch(e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = skip; i < parserStack.length; i++) {\n stack.push(new Frame(parserStack[i]));\n }\n\n return stack;\n }\n\n return {\n stack: getStack(),\n message: exception.message,\n name: _mostSpecificErrorName(exception),\n rawStack: exception.stack,\n rawException: exception\n };\n}\n\n\nfunction parse(e, skip) {\n var err = e;\n\n if (err.nested || err.cause) {\n var traceChain = [];\n while (err) {\n traceChain.push(new Stack(err, skip));\n err = err.nested || err.cause;\n\n skip = 0; // Only apply skip value to primary error\n }\n\n // Return primary error with full trace chain attached.\n traceChain[0].traceChain = traceChain;\n return traceChain[0];\n } else {\n return new Stack(err, skip);\n }\n}\n\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg || !errMsg.match) {\n return ['Unknown error. There was no error message to display.', ''];\n }\n var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);\n var errClass = '(unknown)';\n\n if (errClassMatch) {\n errClass = errClassMatch[errClassMatch.length - 1];\n errMsg = errMsg.replace((errClassMatch[errClassMatch.length - 2] || '') + errClass + ':', '');\n errMsg = errMsg.replace(/(^[\\s]+|[\\s]+$)/g, '');\n }\n return [errClass, errMsg];\n}\n\n// * Prefers any value over an empty string\n// * Prefers any value over 'Error' where possible\n// * Prefers name over constructor.name when both are more specific than 'Error'\nfunction _mostSpecificErrorName(error) {\n var name = error.name && error.name.length && error.name;\n var constructorName = error.constructor.name && error.constructor.name.length && error.constructor.name;\n\n if (!name || !constructorName) {\n return name || constructorName;\n }\n\n if (name === 'Error') {\n return constructorName;\n }\n return name;\n}\n\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame\n};\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction scrub(data, scrubFields, scrubPaths) {\n scrubFields = scrubFields || [];\n\n if (scrubPaths) {\n for (var i = 0; i < scrubPaths.length; ++i) {\n scrubPath(data, scrubPaths[i]);\n }\n }\n\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart) {\n return paramPart + _.redact();\n }\n\n function paramScrubber(v) {\n var i;\n if (_.isType(v, 'string')) {\n for (i = 0; i < queryRes.length; ++i) {\n v = v.replace(queryRes[i], redactQueryParam);\n }\n }\n return v;\n }\n\n function valScrubber(k, v) {\n var i;\n for (i = 0; i < paramRes.length; ++i) {\n if (paramRes[i].test(k)) {\n v = _.redact();\n break;\n }\n }\n return v;\n }\n\n function scrubber(k, v, seen) {\n var tmpV = valScrubber(k, v);\n if (tmpV === v) {\n if (_.isType(v, 'object') || _.isType(v, 'array')) {\n return traverse(v, scrubber, seen);\n }\n return paramScrubber(tmpV);\n } else {\n return tmpV;\n }\n }\n\n return traverse(data, scrubber);\n}\n\nfunction scrubPath(obj, path) {\n var keys = path.split('.');\n var last = keys.length - 1;\n try {\n for (var i = 0; i <= last; ++i) {\n if (i < last) {\n obj = obj[keys[i]];\n } else {\n obj[keys[i]] = _.redact();\n }\n }\n } catch (e) {\n // Missing key is OK;\n }\n}\n\nfunction _getScrubFieldRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '^\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?$';\n ret.push(new RegExp(pat, 'i'));\n }\n return ret;\n}\n\n\nfunction _getScrubQueryParamRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?';\n ret.push(new RegExp('(' + pat + '=)([^&\\\\n]+)', 'igm'));\n }\n return ret;\n}\n\nmodule.exports = scrub;\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction traverse(obj, func, seen) {\n var k, v, i;\n var isObj = _.isType(obj, 'object');\n var isArray = _.isType(obj, 'array');\n var keys = [];\n var seenIndex;\n\n // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.\n seen = seen || { obj: [], mapped: []};\n\n if (isObj) {\n seenIndex = seen.obj.indexOf(obj);\n\n if (isObj && seenIndex !== -1) {\n // Prefer the mapped object if there is one.\n return seen.mapped[seenIndex] || seen.obj[seenIndex];\n }\n\n seen.obj.push(obj);\n seenIndex = seen.obj.length - 1;\n }\n\n if (isObj) {\n for (k in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, k)) {\n keys.push(k);\n }\n }\n } else if (isArray) {\n for (i = 0; i < obj.length; ++i) {\n keys.push(i);\n }\n }\n\n var result = isObj ? {} : [];\n var same = true;\n for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n result[k] = func(k, v, seen);\n same = same && result[k] === obj[k];\n }\n\n if (isObj && !same) {\n seen.mapped[seenIndex] = result;\n }\n\n return !same ? result : obj;\n}\n\nmodule.exports = traverse;\n","'use strict';\n\nvar rollbar = require('../rollbar');\n\nvar options = (typeof window !== 'undefined') && window._rollbarConfig;\nvar alias = options && options.globalAlias || 'Rollbar';\nvar shimRunning = (typeof window !== 'undefined') && window[alias] && typeof window[alias].shimId === 'function' && window[alias].shimId() !== undefined;\n\nif ((typeof window !== 'undefined') && !window._rollbarStartTime) {\n window._rollbarStartTime = (new Date()).getTime();\n}\n\nif (!shimRunning && options) {\n var Rollbar = new rollbar(options);\n window[alias] = Rollbar;\n} else if (typeof window !== 'undefined') {\n window.rollbar = rollbar;\n window._rollbarDidLoad = true;\n} else if (typeof self !== 'undefined') {\n self.rollbar = rollbar;\n self._rollbarDidLoad = true;\n}\n\nmodule.exports = rollbar;\n","'use strict';\n\nvar Rollbar = require('./core');\nvar telemeter = require('../telemetry');\nvar instrumenter = require('./telemetry');\nvar polyfillJSON = require('../utility/polyfillJSON');\nvar wrapGlobals = require('./wrapGlobals');\nvar scrub = require('../scrub');\nvar truncation = require('../truncation');\n\nRollbar.setComponents({\n telemeter: telemeter,\n instrumenter: instrumenter,\n polyfillJSON: polyfillJSON,\n wrapGlobals: wrapGlobals,\n scrub: scrub,\n truncation: truncation\n});\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar Client = require('../rollbar');\nvar _ = require('../utility');\nvar API = require('../api');\nvar logger = require('./logger');\nvar globals = require('./globalSetup');\n\nvar Transport = require('./transport');\nvar urllib = require('./url');\n\nvar transforms = require('./transforms');\nvar sharedTransforms = require('../transforms');\nvar predicates = require('./predicates');\nvar sharedPredicates = require('../predicates');\nvar errorParser = require('../errorParser');\n\nfunction Rollbar(options, client) {\n this.options = _.handleOptions(defaultOptions, options, null, logger);\n this.options._configuredOptions = options;\n var Telemeter = this.components.telemeter;\n var Instrumenter = this.components.instrumenter;\n var polyfillJSON = this.components.polyfillJSON;\n this.wrapGlobals = this.components.wrapGlobals;\n this.scrub = this.components.scrub;\n var truncation = this.components.truncation;\n\n var transport = new Transport(truncation);\n var api = new API(this.options, transport, urllib, truncation);\n if (Telemeter) {\n this.telemeter = new Telemeter(this.options);\n }\n this.client = client || new Client(this.options, api, logger, this.telemeter, 'browser');\n var gWindow = _gWindow();\n var gDocument = (typeof document != 'undefined') && document;\n this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers\n this.anonymousErrorsPending = 0;\n addTransformsToNotifier(this.client.notifier, this, gWindow);\n addPredicatesToQueue(this.client.queue);\n this.setupUnhandledCapture();\n if (Instrumenter) {\n this.instrumenter = new Instrumenter(this.options, this.client.telemeter, this, gWindow, gDocument);\n this.instrumenter.instrument();\n }\n _.setupJSON(polyfillJSON);\n\n // Used with rollbar-react for rollbar-react-native compatibility.\n this.rollbar = this;\n}\n\nvar _instance = null;\nRollbar.init = function(options, client) {\n if (_instance) {\n return _instance.global(options).configure(options);\n }\n _instance = new Rollbar(options, client);\n return _instance;\n};\n\nRollbar.prototype.components = {};\n\nRollbar.setComponents = function(components) {\n Rollbar.prototype.components = components;\n}\n\nfunction handleUninitialized(maybeCallback) {\n var message = 'Rollbar is not initialized';\n logger.error(message);\n if (maybeCallback) {\n maybeCallback(new Error(message));\n }\n}\n\nRollbar.prototype.global = function(options) {\n this.client.global(options);\n return this;\n};\nRollbar.global = function(options) {\n if (_instance) {\n return _instance.global(options);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.configure = function(options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = {payload: payloadData};\n }\n this.options = _.handleOptions(oldOptions, options, payload, logger);\n this.options._configuredOptions = _.handleOptions(oldOptions._configuredOptions, options, payload);\n this.client.configure(this.options, payloadData);\n this.instrumenter && this.instrumenter.configure(this.options);\n this.setupUnhandledCapture();\n return this;\n};\nRollbar.configure = function(options, payloadData) {\n if (_instance) {\n return _instance.configure(options, payloadData);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.lastError = function() {\n return this.client.lastError;\n};\nRollbar.lastError = function() {\n if (_instance) {\n return _instance.lastError();\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.log = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.log(item);\n return {uuid: uuid};\n};\nRollbar.log = function() {\n if (_instance) {\n return _instance.log.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.debug = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.debug(item);\n return {uuid: uuid};\n};\nRollbar.debug = function() {\n if (_instance) {\n return _instance.debug.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.info = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.info(item);\n return {uuid: uuid};\n};\nRollbar.info = function() {\n if (_instance) {\n return _instance.info.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warn = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warn(item);\n return {uuid: uuid};\n};\nRollbar.warn = function() {\n if (_instance) {\n return _instance.warn.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warning = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warning(item);\n return {uuid: uuid};\n};\nRollbar.warning = function() {\n if (_instance) {\n return _instance.warning.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.error = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.error(item);\n return {uuid: uuid};\n};\nRollbar.error = function() {\n if (_instance) {\n return _instance.error.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.critical = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.critical(item);\n return {uuid: uuid};\n};\nRollbar.critical = function() {\n if (_instance) {\n return _instance.critical.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.buildJsonPayload = function(item) {\n return this.client.buildJsonPayload(item);\n};\nRollbar.buildJsonPayload = function() {\n if (_instance) {\n return _instance.buildJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.sendJsonPayload = function(jsonPayload) {\n return this.client.sendJsonPayload(jsonPayload);\n};\nRollbar.sendJsonPayload = function() {\n if (_instance) {\n return _instance.sendJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.setupUnhandledCapture = function() {\n var gWindow = _gWindow();\n\n if (!this.unhandledExceptionsInitialized) {\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(gWindow, this);\n if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {\n this.wrapGlobals(gWindow, this);\n }\n this.unhandledExceptionsInitialized = true;\n }\n }\n if (!this.unhandledRejectionsInitialized) {\n if (this.options.captureUnhandledRejections || this.options.handleUnhandledRejections) {\n globals.captureUnhandledRejections(gWindow, this);\n this.unhandledRejectionsInitialized = true;\n }\n }\n};\n\nRollbar.prototype.handleUncaughtException = function(message, url, lineno, colno, error, context) {\n if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {\n return;\n }\n\n // Chrome will always send 5+ arguments and error will be valid or null, not undefined.\n // If error is undefined, we have a different caller.\n // Chrome also sends errors from web workers with null error, but does not invoke\n // prepareStackTrace() for these. Test for empty url to skip them.\n if (this.options.inspectAnonymousErrors && this.isChrome && error === null && url === '') {\n return 'anonymous';\n }\n\n var item;\n var stackInfo = _.makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n 'onerror',\n 'uncaught exception',\n errorParser\n );\n if (_.isError(error)) {\n item = this._createItem([message, error, context]);\n item._unhandledStackInfo = stackInfo;\n } else if (_.isError(url)) {\n item = this._createItem([message, url, context]);\n item._unhandledStackInfo = stackInfo;\n } else {\n item = this._createItem([message, context]);\n item.stackInfo = stackInfo;\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n this.client.log(item);\n};\n\n/**\n * Chrome only. Other browsers will ignore.\n *\n * Use Error.prepareStackTrace to extract information about errors that\n * do not have a valid error object in onerror().\n *\n * In tested version of Chrome, onerror is called first but has no way\n * to communicate with prepareStackTrace. Use a counter to let this\n * handler know which errors to send to Rollbar.\n *\n * In config options, set inspectAnonymousErrors to enable.\n */\nRollbar.prototype.handleAnonymousErrors = function() {\n if (!this.options.inspectAnonymousErrors || !this.isChrome) {\n return;\n }\n\n var r = this;\n function prepareStackTrace(error, _stack) { // eslint-disable-line no-unused-vars\n if (r.options.inspectAnonymousErrors) {\n if (r.anonymousErrorsPending) {\n // This is the only known way to detect that onerror saw an anonymous error.\n // It depends on onerror reliably being called before Error.prepareStackTrace,\n // which so far holds true on tested versions of Chrome. If versions of Chrome\n // are tested that behave differently, this logic will need to be updated\n // accordingly.\n r.anonymousErrorsPending -= 1;\n\n if (!error) {\n // Not likely to get here, but calling handleUncaughtException from here\n // without an error object would throw off the anonymousErrorsPending counter,\n // so return now.\n return;\n }\n\n // Allow this to be tracked later.\n error._isAnonymous = true;\n\n // url, lineno, colno shouldn't be needed for these errors.\n // If that changes, update this accordingly, using the unused\n // _stack param as needed (rather than parse error.toString()).\n r.handleUncaughtException(error.message, null, null, null, error);\n }\n }\n\n // Workaround to ensure stack is preserved for normal errors.\n return error.stack;\n }\n\n // https://v8.dev/docs/stack-trace-api\n try {\n Error.prepareStackTrace = prepareStackTrace;\n } catch (e) {\n this.options.inspectAnonymousErrors = false;\n this.error('anonymous error handler failed', e);\n }\n}\n\nRollbar.prototype.handleUnhandledRejection = function(reason, promise) {\n if (!this.options.captureUnhandledRejections && !this.options.handleUnhandledRejections) {\n return;\n }\n\n var message = 'unhandled rejection was null or undefined!';\n if (reason) {\n if (reason.message) {\n message = reason.message;\n } else {\n var reasonResult = _.stringify(reason);\n if (reasonResult.value) {\n message = reasonResult.value;\n }\n }\n }\n var context = (reason && reason._rollbarContext) || (promise && promise._rollbarContext);\n\n var item;\n if (_.isError(reason)) {\n item = this._createItem([message, reason, context]);\n } else {\n item = this._createItem([message, reason, context]);\n item.stackInfo = _.makeUnhandledStackInfo(\n message,\n '',\n 0,\n 0,\n null,\n 'unhandledrejection',\n '',\n errorParser\n );\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n item._originalArgs = item._originalArgs || [];\n item._originalArgs.push(promise);\n this.client.log(item);\n};\n\nRollbar.prototype.wrap = function(f, context, _before) {\n try {\n var ctxFn;\n if(_.isFunction(context)) {\n ctxFn = context;\n } else {\n ctxFn = function() { return context || {}; };\n }\n\n if (!_.isFunction(f)) {\n return f;\n }\n\n if (f._isWrap) {\n return f;\n }\n\n if (!f._rollbar_wrapped) {\n f._rollbar_wrapped = function () {\n if (_before && _.isFunction(_before)) {\n _before.apply(this, arguments);\n }\n try {\n return f.apply(this, arguments);\n } catch(exc) {\n var e = exc;\n if (e && window._rollbarWrappedError !== e) {\n if (_.isType(e, 'string')) {\n e = new String(e);\n }\n e._rollbarContext = ctxFn() || {};\n e._rollbarContext._wrappedSource = f.toString();\n\n window._rollbarWrappedError = e;\n }\n throw e;\n }\n };\n\n f._rollbar_wrapped._isWrap = true;\n\n if (f.hasOwnProperty) {\n for (var prop in f) {\n if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {\n f._rollbar_wrapped[prop] = f[prop];\n }\n }\n }\n }\n\n return f._rollbar_wrapped;\n } catch (e) {\n // Return the original function if the wrap fails.\n return f;\n }\n};\nRollbar.wrap = function(f, context) {\n if (_instance) {\n return _instance.wrap(f, context);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.captureEvent = function() {\n var event = _.createTelemetryEvent(arguments);\n return this.client.captureEvent(event.type, event.metadata, event.level);\n};\nRollbar.captureEvent = function() {\n if (_instance) {\n return _instance.captureEvent.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\n// The following two methods are used internally and are not meant for public use\nRollbar.prototype.captureDomContentLoaded = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureLoad(ts);\n};\n\n/* Internal */\n\nfunction addTransformsToNotifier(notifier, rollbar, gWindow) {\n notifier\n .addTransform(transforms.handleDomException)\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(gWindow))\n .addTransform(transforms.addClientInfo(gWindow))\n .addTransform(transforms.addPluginInfo(gWindow))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(sharedTransforms.addConfigToPayload)\n .addTransform(transforms.addScrubber(rollbar.scrub))\n .addTransform(sharedTransforms.addPayloadOptions)\n .addTransform(sharedTransforms.userTransform(logger))\n .addTransform(sharedTransforms.addConfiguredOptions)\n .addTransform(sharedTransforms.addDiagnosticKeys)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(sharedPredicates.checkLevel)\n .addPredicate(predicates.checkIgnore)\n .addPredicate(sharedPredicates.userCheckIgnore(logger))\n .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))\n .addPredicate(sharedPredicates.urlIsSafeListed(logger))\n .addPredicate(sharedPredicates.messageIsIgnored(logger));\n}\n\nRollbar.prototype.loadFull = function() {\n logger.info('Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.');\n};\n\nRollbar.prototype._createItem = function(args) {\n return _.createItem(args, logger, this);\n};\n\nfunction _getFirstFunction(args) {\n for (var i = 0, len = args.length; i < len; ++i) {\n if (_.isFunction(args[i])) {\n return args[i];\n }\n }\n return undefined;\n}\n\nfunction _gWindow() {\n return ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n}\n\nvar defaults = require('../defaults');\nvar scrubFields = require('./defaults/scrubFields');\n\nvar defaultOptions = {\n version: defaults.version,\n scrubFields: scrubFields.scrubFields,\n logLevel: defaults.logLevel,\n reportLevel: defaults.reportLevel,\n uncaughtErrorLevel: defaults.uncaughtErrorLevel,\n endpoint: defaults.endpoint,\n verbose: false,\n enabled: true,\n transmit: true,\n sendConfig: false,\n includeItemsInTelemetry: true,\n captureIp: true,\n inspectAnonymousErrors: true,\n ignoreDuplicateErrors: true,\n wrapGlobalEventHandlers: false\n};\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar _ = require('./utility');\n\n/*\n * Rollbar - the interface to Rollbar\n *\n * @param options\n * @param api\n * @param logger\n */\nfunction Rollbar(options, api, logger, telemeter, platform) {\n this.options = _.merge(options);\n this.logger = logger;\n Rollbar.rateLimiter.configureGlobal(this.options);\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.api = api;\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n\n // This must happen before the Notifier is created\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = telemeter;\n setStackTraceLimit(options);\n this.lastError = null;\n this.lastErrorHash = 'none';\n}\n\nvar defaultOptions = {\n maxItems: 0,\n itemsPerMinute: 60\n};\n\nRollbar.rateLimiter = new RateLimiter(defaultOptions);\n\nRollbar.prototype.global = function (options) {\n Rollbar.rateLimiter.configureGlobal(options);\n return this;\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n\n this.options = _.merge(oldOptions, options, payload);\n\n // This must happen before the Notifier is configured\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier && this.notifier.configure(this.options);\n this.telemeter && this.telemeter.configure(this.options);\n setStackTraceLimit(options);\n this.global(this.options);\n\n if (validateTracer(options.tracer)) {\n this.tracer = options.tracer\n }\n\n return this;\n};\n\nRollbar.prototype.log = function (item) {\n var level = this._defaultLogLevel();\n return this._log(level, item);\n};\n\nRollbar.prototype.debug = function (item) {\n this._log('debug', item);\n};\n\nRollbar.prototype.info = function (item) {\n this._log('info', item);\n};\n\nRollbar.prototype.warn = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.warning = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.error = function (item) {\n this._log('error', item);\n};\n\nRollbar.prototype.critical = function (item) {\n this._log('critical', item);\n};\n\nRollbar.prototype.wait = function (callback) {\n this.queue.wait(callback);\n};\n\nRollbar.prototype.captureEvent = function (type, metadata, level) {\n return this.telemeter && this.telemeter.captureEvent(type, metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function (ts) {\n return this.telemeter && this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (ts) {\n return this.telemeter && this.telemeter.captureLoad(ts);\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.api.buildJsonPayload(item);\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n this.api.postJsonPayload(jsonPayload);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function (defaultLevel, item) {\n var callback;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {\n if (callback) {\n var error = new Error('ignored identical item');\n error.item = item;\n callback(error);\n }\n return;\n }\n try {\n this._addTracingInfo(item);\n item.level = item.level || defaultLevel;\n this.telemeter && this.telemeter._captureRollbarItem(item);\n item.telemetryEvents = (this.telemeter && this.telemeter.copyEvents()) || [];\n this.notifier.log(item, callback);\n } catch (e) {\n if (callback) {\n callback(e);\n }\n this.logger.error(e);\n }\n};\n\nRollbar.prototype._defaultLogLevel = function () {\n return this.options.logLevel || 'debug';\n};\n\nRollbar.prototype._sameAsLastError = function (item) {\n if (!item._isUncaught) {\n return false;\n }\n var itemHash = generateItemHash(item);\n if (this.lastErrorHash === itemHash) {\n return true;\n }\n this.lastError = item.err;\n this.lastErrorHash = itemHash;\n return false;\n};\n\nRollbar.prototype._addTracingInfo = function (item) {\n // Tracer validation occurs in the constructor\n // or in the Rollbar.prototype.configure methods\n if (this.tracer) {\n // add rollbar occurrence uuid to span\n var span = this.tracer.scope().active();\n\n if (validateSpan(span)) {\n span.setTag('rollbar.error_uuid', item.uuid);\n span.setTag('rollbar.has_error', true);\n span.setTag('error', true);\n span.setTag('rollbar.item_url', `https://rollbar.com/item/uuid/?uuid=${item.uuid}`);\n span.setTag('rollbar.occurrence_url', `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`);\n\n // add span ID & trace ID to occurrence\n var opentracingSpanId = span.context().toSpanId();\n var opentracingTraceId = span.context().toTraceId();\n\n if (item.custom) {\n item.custom.opentracing_span_id = opentracingSpanId;\n item.custom.opentracing_trace_id = opentracingTraceId;\n } else {\n item.custom = {\n opentracing_span_id: opentracingSpanId,\n opentracing_trace_id: opentracingTraceId\n };\n }\n }\n }\n}\n\nfunction generateItemHash(item) {\n var message = item.message || '';\n var stack = (item.err || {}).stack || String(item.err);\n return message + '::' + stack;\n}\n\n// Node.js, Chrome, Safari, and some other browsers support this property\n// which globally sets the number of stack frames returned in an Error object.\n// If a browser can't use it, no harm done.\nfunction setStackTraceLimit(options) {\n if (options.stackTraceLimit) {\n Error.stackTraceLimit = options.stackTraceLimit;\n }\n}\n\n/**\n * Validate the Tracer object provided to the Client\n * is valid for our Opentracing use case.\n * @param {opentracer.Tracer} tracer\n */\nfunction validateTracer(tracer) {\n if (!tracer) {\n return false;\n }\n\n if (!tracer.scope || typeof tracer.scope !== 'function') {\n return false;\n }\n\n var scope = tracer.scope();\n\n if (!scope || !scope.active || typeof scope.active !== 'function') {\n return false;\n }\n\n return true;\n}\n\n/**\n * Validate the Span object provided\n * @param {opentracer.Span} span\n */\nfunction validateSpan(span) {\n if (!span || !span.context || typeof span.context !== 'function') {\n return false;\n }\n\n var spanContext = span.context();\n\n if (!spanContext\n || !spanContext.toSpanId\n || !spanContext.toTraceId\n || typeof spanContext.toSpanId !== 'function'\n || typeof spanContext.toTraceId !== 'function') {\n return false\n }\n\n return true;\n}\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar\n *\n * @param options - the same options that are accepted by configureGlobal offered as a convenience\n */\nfunction RateLimiter(options) {\n this.startTime = _.now();\n this.counter = 0;\n this.perMinCounter = 0;\n this.platform = null;\n this.platformOptions = {};\n this.configureGlobal(options);\n}\n\nRateLimiter.globalSettings = {\n startTime: _.now(),\n maxItems: undefined,\n itemsPerMinute: undefined\n};\n\n/*\n * configureGlobal - set the global rate limiter options\n *\n * @param options - Only the following values are recognized:\n * startTime: a timestamp of the form returned by (new Date()).getTime()\n * maxItems: the maximum items\n * itemsPerMinute: the max number of items to send in a given minute\n */\nRateLimiter.prototype.configureGlobal = function(options) {\n if (options.startTime !== undefined) {\n RateLimiter.globalSettings.startTime = options.startTime;\n }\n if (options.maxItems !== undefined) {\n RateLimiter.globalSettings.maxItems = options.maxItems;\n }\n if (options.itemsPerMinute !== undefined) {\n RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;\n }\n};\n\n/*\n * shouldSend - determine if we should send a given item based on rate limit settings\n *\n * @param item - the item we are about to send\n * @returns An object with the following structure:\n * error: (Error|null)\n * shouldSend: bool\n * payload: (Object|null)\n * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and\n * exactly one of error or payload will be non-null. If error is non-null, the returned Error will\n * describe the situation, but it means that we were already over a rate limit (either globally or\n * per minute) when this item was checked. If error is null, and therefore payload is non-null, it\n * means this item put us over the global rate limit and the payload should be sent to Rollbar in\n * place of the passed in item.\n */\nRateLimiter.prototype.shouldSend = function(item, now) {\n now = now || _.now();\n var elapsedTime = now - this.startTime;\n if (elapsedTime < 0 || elapsedTime >= 60000) {\n this.startTime = now;\n this.perMinCounter = 0;\n }\n\n var globalRateLimit = RateLimiter.globalSettings.maxItems;\n var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;\n\n if (checkRate(item, globalRateLimit, this.counter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimit + ' max items reached', false);\n } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimitPerMin + ' items per minute reached', false);\n }\n this.counter++;\n this.perMinCounter++;\n\n var shouldSend = !checkRate(item, globalRateLimit, this.counter);\n var perMinute = shouldSend;\n shouldSend = shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);\n return shouldSendValue(this.platform, this.platformOptions, null, shouldSend, globalRateLimit, globalRateLimitPerMin, perMinute);\n};\n\nRateLimiter.prototype.setPlatformOptions = function(platform, options) {\n this.platform = platform;\n this.platformOptions = options;\n};\n\n/* Helpers */\n\nfunction checkRate(item, limit, counter) {\n return !item.ignoreRateLimit && limit >= 1 && counter > limit;\n}\n\nfunction shouldSendValue(platform, options, error, shouldSend, globalRateLimit, limitPerMin, perMinute) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute);\n }\n return {error: error, shouldSend: shouldSend, payload: payload};\n}\n\nfunction rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute) {\n var environment = options.environment || (options.payload && options.payload.environment);\n var msg;\n if (perMinute) {\n msg = 'item per minute limit reached, ignoring errors until timeout';\n } else {\n msg = 'maxItems has been hit, ignoring errors until reset.';\n }\n var item = {\n body: {\n message: {\n body: msg,\n extra: {\n maxItems: globalRateLimit,\n itemsPerMinute: limitPerMin\n }\n }\n },\n language: 'javascript',\n environment: environment,\n notifier: {\n version: (options.notifier && options.notifier.version) || options.version\n }\n };\n if (platform === 'browser') {\n item.platform = 'browser';\n item.framework = 'browser-js';\n item.notifier.name = 'rollbar-browser-js';\n } else if (platform === 'server') {\n item.framework = options.framework || 'node-js';\n item.notifier.name = options.notifier.name;\n } else if (platform === 'react-native') {\n item.framework = options.framework || 'react-native';\n item.notifier.name = options.notifier.name;\n }\n return item;\n}\n\nmodule.exports = RateLimiter;\n","'use strict';\n\n'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isPlainObject = function isPlainObject(obj) {\n\tif (!obj || toStr.call(obj) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tvar hasOwnConstructor = hasOwn.call(obj, 'constructor');\n\tvar hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n\t// Not own constructor property must be Object\n\tif (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n\t\treturn false;\n\t}\n\n\t// Own properties are enumerated firstly, so to speed up,\n\t// if last one is own, then all properties are own.\n\tvar key;\n\tfor (key in obj) {/**/}\n\n\treturn typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\nfunction merge() {\n var i, src, copy, clone, name,\n result = {},\n current = null,\n length = arguments.length;\n\n for (i=0; i < length; i++) {\n current = arguments[i];\n if (current == null) {\n continue;\n }\n\n for (name in current) {\n src = result[name];\n copy = current[name];\n if (result !== copy) {\n if (copy && isPlainObject(copy)) {\n clone = src && isPlainObject(src) ? src : {};\n result[name] = merge(clone, copy);\n } else if (typeof copy !== 'undefined') {\n result[name] = copy;\n }\n }\n }\n }\n return result;\n}\n\nmodule.exports = merge;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Queue - an object which handles which handles a queue of items to be sent to Rollbar.\n * This object handles rate limiting via a passed in rate limiter, retries based on connection\n * errors, and filtering of items based on a set of configurable predicates. The communication to\n * the backend is performed via a given API object.\n *\n * @param rateLimiter - An object which conforms to the interface\n * rateLimiter.shouldSend(item) -> bool\n * @param api - An object which conforms to the interface\n * api.postItem(payload, function(err, response))\n * @param logger - An object used to log verbose messages if desired\n * @param options - see Queue.prototype.configure\n */\nfunction Queue(rateLimiter, api, logger, options) {\n this.rateLimiter = rateLimiter;\n this.api = api;\n this.logger = logger;\n this.options = options;\n this.predicates = [];\n this.pendingItems = [];\n this.pendingRequests = [];\n this.retryQueue = [];\n this.retryHandle = null;\n this.waitCallback = null;\n this.waitIntervalID = null;\n}\n\n/*\n * configure - updates the options this queue uses\n *\n * @param options\n */\nQueue.prototype.configure = function(options) {\n this.api && this.api.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addPredicate - adds a predicate to the end of the list of predicates for this queue\n *\n * @param predicate - function(item, options) -> (bool|{err: Error})\n * Returning true means that this predicate passes and the item is okay to go on the queue\n * Returning false means do not add the item to the queue, but it is not an error\n * Returning {err: Error} means do not add the item to the queue, and the given error explains why\n * Returning {err: undefined} is equivalent to returning true but don't do that\n */\nQueue.prototype.addPredicate = function(predicate) {\n if (_.isFunction(predicate)) {\n this.predicates.push(predicate);\n }\n return this;\n};\n\nQueue.prototype.addPendingItem = function(item) {\n this.pendingItems.push(item);\n};\n\nQueue.prototype.removePendingItem = function(item) {\n var idx = this.pendingItems.indexOf(item);\n if (idx !== -1) {\n this.pendingItems.splice(idx, 1);\n }\n};\n\n/*\n * addItem - Send an item to the Rollbar API if all of the predicates are satisfied\n *\n * @param item - The payload to send to the backend\n * @param callback - function(error, repsonse) which will be called with the response from the API\n * in the case of a success, otherwise response will be null and error will have a value. If both\n * error and response are null then the item was stopped by a predicate which did not consider this\n * to be an error condition, but nonetheless did not send the item to the API.\n * @param originalError - The original error before any transformations that is to be logged if any\n */\nQueue.prototype.addItem = function(item, callback, originalError, originalItem) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() { return; };\n }\n var predicateResult = this._applyPredicates(item);\n if (predicateResult.stop) {\n this.removePendingItem(originalItem);\n callback(predicateResult.err);\n return;\n }\n this._maybeLog(item, originalError);\n this.removePendingItem(originalItem);\n if (!this.options.transmit) {\n callback(new Error('Transmit disabled'));\n return;\n }\n this.pendingRequests.push(item);\n try {\n this._makeApiRequest(item, function(err, resp) {\n this._dequeuePendingRequest(item);\n callback(err, resp);\n }.bind(this));\n } catch (e) {\n this._dequeuePendingRequest(item);\n callback(e);\n }\n};\n\n/*\n * wait - Stop any further errors from being added to the queue, and get called back when all items\n * currently processing have finished sending to the backend.\n *\n * @param callback - function() called when all pending items have been sent\n */\nQueue.prototype.wait = function(callback) {\n if (!_.isFunction(callback)) {\n return;\n }\n this.waitCallback = callback;\n if (this._maybeCallWait()) {\n return;\n }\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitIntervalID = setInterval(function() {\n this._maybeCallWait();\n }.bind(this), 500);\n};\n\n/* _applyPredicates - Sequentially applies the predicates that have been added to the queue to the\n * given item with the currently configured options.\n *\n * @param item - An item in the queue\n * @returns {stop: bool, err: (Error|null)} - stop being true means do not add item to the queue,\n * the error value should be passed up to a callbak if we are stopping.\n */\nQueue.prototype._applyPredicates = function(item) {\n var p = null;\n for (var i = 0, len = this.predicates.length; i < len; i++) {\n p = this.predicates[i](item, this.options);\n if (!p || p.err !== undefined) {\n return {stop: true, err: p.err};\n }\n }\n return {stop: false, err: null};\n};\n\n/*\n * _makeApiRequest - Send an item to Rollbar, callback when done, if there is an error make an\n * effort to retry if we are configured to do so.\n *\n * @param item - an item ready to send to the backend\n * @param callback - function(err, response)\n */\nQueue.prototype._makeApiRequest = function(item, callback) {\n var rateLimitResponse = this.rateLimiter.shouldSend(item);\n if (rateLimitResponse.shouldSend) {\n this.api.postItem(item, function(err, resp) {\n if (err) {\n this._maybeRetry(err, item, callback);\n } else {\n callback(err, resp);\n }\n }.bind(this));\n } else if (rateLimitResponse.error) {\n callback(rateLimitResponse.error);\n } else {\n this.api.postItem(rateLimitResponse.payload, callback);\n }\n};\n\n// These are errors basically mean there is no internet connection\nvar RETRIABLE_ERRORS = ['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED', 'EHOSTUNREACH', 'EPIPE', 'EAI_AGAIN'];\n\n/*\n * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback\n * with the error.\n *\n * @param err - an error returned by the API transport\n * @param item - the item that was trying to be sent when this error occured\n * @param callback - function(err, response)\n */\nQueue.prototype._maybeRetry = function(err, item, callback) {\n var shouldRetry = false;\n if (this.options.retryInterval) {\n for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {\n if (err.code === RETRIABLE_ERRORS[i]) {\n shouldRetry = true;\n break;\n }\n }\n if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {\n item.retries = item.retries ? item.retries + 1 : 1;\n if (item.retries > this.options.maxRetries) {\n shouldRetry = false;\n }\n }\n }\n if (shouldRetry) {\n this._retryApiRequest(item, callback);\n } else {\n callback(err);\n }\n};\n\n/*\n * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process\n * that queue based on the retryInterval in the options for this queue.\n *\n * @param item - an item that failed to send due to an error we deem retriable\n * @param callback - function(err, response)\n */\nQueue.prototype._retryApiRequest = function(item, callback) {\n this.retryQueue.push({item: item, callback: callback});\n\n if (!this.retryHandle) {\n this.retryHandle = setInterval(function() {\n while (this.retryQueue.length) {\n var retryObject = this.retryQueue.shift();\n this._makeApiRequest(retryObject.item, retryObject.callback);\n }\n }.bind(this), this.options.retryInterval);\n }\n};\n\n/*\n * _dequeuePendingRequest - Removes the item from the pending request queue, this queue is used to\n * enable to functionality of providing a callback that clients can pass to `wait` to be notified\n * when the pending request queue has been emptied. This must be called when the API finishes\n * processing this item. If a `wait` callback is configured, it is called by this function.\n *\n * @param item - the item previously added to the pending request queue\n */\nQueue.prototype._dequeuePendingRequest = function(item) {\n var idx = this.pendingRequests.indexOf(item);\n if (idx !== -1) {\n this.pendingRequests.splice(idx, 1);\n this._maybeCallWait();\n }\n};\n\nQueue.prototype._maybeLog = function(data, originalError) {\n if (this.logger && this.options.verbose) {\n var message = originalError;\n message = message || _.get(data, 'body.trace.exception.message');\n message = message || _.get(data, 'body.trace_chain.0.exception.message');\n if (message) {\n this.logger.error(message);\n return;\n }\n message = _.get(data, 'body.message.body');\n if (message) {\n this.logger.log(message);\n }\n }\n};\n\nQueue.prototype._maybeCallWait = function() {\n if (_.isFunction(this.waitCallback) && this.pendingItems.length === 0 && this.pendingRequests.length === 0) {\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitCallback();\n return true;\n }\n return false;\n};\n\nmodule.exports = Queue;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Notifier - the internal object responsible for delegating between the client exposed API, the\n * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the\n * queue which handles the communcation with the Rollbar API servers.\n *\n * @param queue - an object that conforms to the interface: addItem(item, callback)\n * @param options - an object representing the options to be set for this notifier, this should have\n * any defaults already set by the caller\n */\nfunction Notifier(queue, options) {\n this.queue = queue;\n this.options = options;\n this.transforms = [];\n this.diagnostic = {};\n}\n\n/*\n * configure - updates the options for this notifier with the passed in object\n *\n * @param options - an object which gets merged with the current options set on this notifier\n * @returns this\n */\nNotifier.prototype.configure = function(options) {\n this.queue && this.queue.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addTransform - adds a transform onto the end of the queue of transforms for this notifier\n *\n * @param transform - a function which takes three arguments:\n * * item: An Object representing the data to eventually be sent to Rollbar\n * * options: The current value of the options for this notifier\n * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this\n * callback with a null value for error if it wants the processing chain to continue, otherwise\n * with an error to terminate the processing. The item should be the updated item after this\n * transform is finished modifying it.\n */\nNotifier.prototype.addTransform = function(transform) {\n if (_.isFunction(transform)) {\n this.transforms.push(transform);\n }\n return this;\n};\n\n/*\n * log - the internal log function which applies the configured transforms and then pushes onto the\n * queue to be sent to the backend.\n *\n * @param item - An object with the following structure:\n * message [String] - An optional string to be sent to rollbar\n * error [Error] - An optional error\n *\n * @param callback - A function of type function(err, resp) which will be called with exactly one\n * null argument and one non-null argument. The callback will be called once, either during the\n * transform stage if an error occurs inside a transform, or in response to the communication with\n * the backend. The second argument will be the response from the backend in case of success.\n */\nNotifier.prototype.log = function(item, callback) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!this.options.enabled) {\n return callback(new Error('Rollbar is not enabled'));\n }\n\n this.queue.addPendingItem(item);\n var originalError = item.err;\n this._applyTransforms(item, function(err, i) {\n if (err) {\n this.queue.removePendingItem(item);\n return callback(err, null);\n }\n this.queue.addItem(i, callback, originalError, item);\n }.bind(this));\n};\n\n/* Internal */\n\n/*\n * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See\n * `addTransform` for more information.\n *\n * @param item - An item to be transformed\n * @param callback - A function of type function(err, item) which will be called with a non-null\n * error and a null item in the case of a transform failure, or a null error and non-null item after\n * all transforms have been applied.\n */\nNotifier.prototype._applyTransforms = function(item, callback) {\n var transformIndex = -1;\n var transformsLength = this.transforms.length;\n var transforms = this.transforms;\n var options = this.options;\n\n var cb = function(err, i) {\n if (err) {\n callback(err, null);\n return;\n }\n\n transformIndex++;\n\n if (transformIndex === transformsLength) {\n callback(null, i);\n return;\n }\n\n transforms[transformIndex](i, options, cb);\n };\n\n cb(null, item);\n};\n\nmodule.exports = Notifier;\n","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1/item/',\n search: null,\n version: '1',\n protocol: 'https:',\n port: 443\n};\n\n/**\n * Api is an object that encapsulates methods of communicating with\n * the Rollbar API. It is a standard interface with some parts implemented\n * differently for server or browser contexts. It is an object that should\n * be instantiated when used so it can contain non-global options that may\n * be different for another instance of RollbarApi.\n *\n * @param options {\n * accessToken: the accessToken to use for posting items to rollbar\n * endpoint: an alternative endpoint to send errors to\n * must be a valid, fully qualified URL.\n * The default is: https://api.rollbar.com/api/1/item\n * proxy: if you wish to proxy requests provide an object\n * with the following keys:\n * host or hostname (required): foo.example.com\n * port (optional): 123\n * protocol (optional): https\n * }\n */\nfunction Api(options, transport, urllib, truncation, jsonBackup) {\n this.options = options;\n this.transport = transport;\n this.url = urllib;\n this.truncation = truncation;\n this.jsonBackup = jsonBackup;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, urllib);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function(data, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n var self = this;\n\n // ensure the network request is scheduled after the current tick.\n setTimeout(function() {\n self.transport.post(self.accessToken, transportOptions, payload, callback);\n }, 0);\n};\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.buildJsonPayload = function(data, callback) {\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n\n if (stringifyResult.error) {\n if (callback) {\n callback(stringifyResult.error);\n }\n return null;\n }\n\n return stringifyResult.value;\n};\n\n/**\n *\n * @param jsonPayload\n * @param callback\n */\nApi.prototype.postJsonPayload = function(jsonPayload, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n this.transport.postJsonPayload(this.accessToken, transportOptions, jsonPayload, callback);\n};\n\nApi.prototype.configure = function(options) {\n var oldOptions = this.oldOptions;\n this.options = _.merge(oldOptions, options);\n this.transportOptions = _getTransport(this.options, this.url);\n if (this.options.accessToken !== undefined) {\n this.accessToken = this.options.accessToken;\n }\n return this;\n};\n\nfunction _getTransport(options, url) {\n return helpers.getTransportFromOptions(options, defaultOptions, url);\n}\n\nmodule.exports = Api;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (!_.isType(data.context, 'string')) {\n var contextResult = _.stringify(data.context, jsonBackup);\n if (contextResult.error) {\n data.context = 'Error: could not serialize \\'context\\'';\n } else {\n data.context = contextResult.value || '';\n }\n if (data.context.length > 255) {\n data.context = data.context.substr(0, 255);\n }\n }\n return {\n access_token: accessToken,\n data: data\n };\n}\n\nfunction getTransportFromOptions(options, defaults, url) {\n var hostname = defaults.hostname;\n var protocol = defaults.protocol;\n var port = defaults.port;\n var path = defaults.path;\n var search = defaults.search;\n var timeout = options.timeout;\n var transport = detectTransport(options)\n\n var proxy = options.proxy;\n if (options.endpoint) {\n var opts = url.parse(options.endpoint);\n hostname = opts.hostname;\n protocol = opts.protocol;\n port = opts.port;\n path = opts.pathname;\n search = opts.search;\n }\n return {\n timeout: timeout,\n hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy,\n transport: transport\n };\n}\n\nfunction detectTransport(options) {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var transport = options.defaultTransport || 'xhr';\n if (typeof gWindow.fetch === 'undefined') transport = 'xhr';\n if (typeof gWindow.XMLHttpRequest === 'undefined') transport = 'fetch';\n return transport;\n}\n\nfunction transportOptions(transport, method) {\n var protocol = transport.protocol || 'https:';\n var port = transport.port || (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);\n var hostname = transport.hostname;\n var path = transport.path;\n var timeout = transport.timeout;\n var transportAPI = transport.transport;\n if (transport.search) {\n path = path + transport.search;\n }\n if (transport.proxy) {\n path = protocol + '//' + hostname + path;\n hostname = transport.proxy.host || transport.proxy.hostname;\n port = transport.proxy.port;\n protocol = transport.proxy.protocol || protocol;\n }\n return {\n timeout: timeout,\n protocol: protocol,\n hostname: hostname,\n path: path,\n port: port,\n method: method,\n transport: transportAPI\n };\n}\n\nfunction appendPathToPath(base, path) {\n var baseTrailingSlash = /\\/$/.test(base);\n var pathBeginningSlash = /^\\//.test(path);\n\n if (baseTrailingSlash && pathBeginningSlash) {\n path = path.substring(1);\n } else if (!baseTrailingSlash && !pathBeginningSlash) {\n path = '/' + path;\n }\n\n return base + path;\n}\n\nmodule.exports = {\n buildPayload: buildPayload,\n getTransportFromOptions: getTransportFromOptions,\n transportOptions: transportOptions,\n appendPathToPath: appendPathToPath\n};\n","// Console-polyfill. MIT license.\n// https://github.com/paulmillr/console-polyfill\n// Make it safe to do console.log() always.\n(function(global) {\n 'use strict';\n if (!global.console) {\n global.console = {};\n }\n var con = global.console;\n var prop, method;\n var dummy = function() {};\n var properties = ['memory'];\n var methods = ('assert,clear,count,debug,dir,dirxml,error,exception,group,' +\n 'groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,' +\n 'show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn').split(',');\n while (prop = properties.pop()) if (!con[prop]) con[prop] = {};\n while (method = methods.pop()) if (!con[method]) con[method] = dummy;\n // Using `this` for web workers & supports Browserify / Webpack.\n})(typeof window === 'undefined' ? this : window);\n","'use strict';\n\n// This detection.js module is used to encapsulate any ugly browser/feature\n// detection we may need to do.\n\n// Figure out which version of IE we're using, if any.\n// This is gleaned from http://stackoverflow.com/questions/5574842/best-way-to-check-for-ie-less-than-9-in-javascript-without-library\n// Will return an integer on IE (i.e. 8)\n// Will return undefined otherwise\nfunction getIEVersion() {\n\tvar undef;\n\tif (typeof document === 'undefined') {\n\t\treturn undef;\n\t}\n\n var v = 3,\n div = document.createElement('div'),\n all = div.getElementsByTagName('i');\n\n while (\n div.innerHTML = '',\n all[0]\n );\n\n return v > 4 ? v : undef;\n}\n\nvar Detection = {\n ieVersion: getIEVersion\n};\n\nmodule.exports = Detection;\n","'use strict';\n\nfunction captureUncaughtExceptions(window, handler, shim) {\n if (!window) { return; }\n var oldOnError;\n\n if (typeof handler._rollbarOldOnError === 'function') {\n oldOnError = handler._rollbarOldOnError;\n } else if (window.onerror) {\n oldOnError = window.onerror;\n while (oldOnError._rollbarOldOnError) {\n oldOnError = oldOnError._rollbarOldOnError;\n }\n handler._rollbarOldOnError = oldOnError;\n }\n\n handler.handleAnonymousErrors();\n\n var fn = function() {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n if (shim) {\n fn._rollbarOldOnError = oldOnError;\n }\n window.onerror = fn;\n}\n\nfunction _rollbarWindowOnError(window, r, old, args) {\n if (window._rollbarWrappedError) {\n if (!args[4]) {\n args[4] = window._rollbarWrappedError;\n }\n if (!args[5]) {\n args[5] = window._rollbarWrappedError._rollbarContext;\n }\n window._rollbarWrappedError = null;\n }\n\n var ret = r.handleUncaughtException.apply(r, args);\n\n if (old) {\n old.apply(window, args);\n }\n\n // Let other chained onerror handlers above run before setting this.\n // If an error is thrown and caught within a chained onerror handler,\n // Error.prepareStackTrace() will see that one before the one we want.\n if (ret === 'anonymous') {\n r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()\n }\n}\n\nfunction captureUnhandledRejections(window, handler, shim) {\n if (!window) { return; }\n\n if (typeof window._rollbarURH === 'function' && window._rollbarURH.belongsToShim) {\n window.removeEventListener('unhandledrejection', window._rollbarURH);\n }\n\n var rejectionHandler = function (evt) {\n var reason, promise, detail;\n try {\n reason = evt.reason;\n } catch (e) {\n reason = undefined;\n }\n try {\n promise = evt.promise;\n } catch (e) {\n promise = '[unhandledrejection] error getting `promise` from event';\n }\n try {\n detail = evt.detail;\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\n }\n } catch (e) {\n // Ignore\n }\n if (!reason) {\n reason = '[unhandledrejection] error getting `reason` from event';\n }\n\n if (handler && handler.handleUnhandledRejection) {\n handler.handleUnhandledRejection(reason, promise);\n }\n };\n rejectionHandler.belongsToShim = shim;\n window._rollbarURH = rejectionHandler;\n window.addEventListener('unhandledrejection', rejectionHandler);\n}\n\n\nmodule.exports = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections\n};\n","'use strict';\n\nvar _ = require('../utility');\nvar makeFetchRequest = require('./transport/fetch');\nvar makeXhrRequest = require('./transport/xhr');\n\n/*\n * accessToken may be embedded in payload but that should not\n * be assumed\n *\n * options: {\n * hostname\n * protocol\n * path\n * port\n * method\n * transport ('xhr' | 'fetch')\n * }\n *\n * params is an object containing key/value pairs. These\n * will be appended to the path as 'key=value&key=value'\n *\n * payload is an unserialized object\n */\nfunction Transport(truncation) {\n this.truncation = truncation;\n}\n\nTransport.prototype.get = function(accessToken, options, params, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n _.addParamsAndAccessTokenToPath(accessToken, options, params);\n\n var method = 'GET';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken, url, method, null, callback, requestFactory, options.timeout, options.transport\n );\n}\n\nTransport.prototype.post = function(accessToken, options, payload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!payload) {\n return callback(new Error('Cannot send empty request'));\n }\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n if (stringifyResult.error) {\n return callback(stringifyResult.error);\n }\n\n var writeData = stringifyResult.value;\n var method = 'POST';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken, url, method, writeData, callback, requestFactory, options.timeout, options.transport\n );\n}\n\nTransport.prototype.postJsonPayload = function (accessToken, options, jsonPayload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n var method = 'POST';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken, url, method, jsonPayload, callback, requestFactory, options.timeout, options.transport\n );\n}\n\n\n// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope\n// so Angular change detection isn't triggered on each API call.\n// This is the equivalent of runOutsideAngular().\n//\nTransport.prototype._makeZoneRequest = function () {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;\n var args = Array.prototype.slice.call(arguments);\n\n if (currentZone && currentZone._name === 'angular') {\n var rootZone = currentZone._parent;\n var self = this;\n rootZone.run(function () {\n self._makeRequest.apply(undefined, args);\n });\n } else {\n this._makeRequest.apply(undefined, args);\n }\n}\n\nTransport.prototype._makeRequest = function (\n accessToken, url, method, data, callback, requestFactory, timeout, transport\n) {\n if (typeof RollbarProxy !== 'undefined') {\n return _proxyRequest(data, callback);\n }\n\n if (transport === 'fetch') {\n makeFetchRequest(accessToken, url, method, data, callback, timeout)\n } else {\n makeXhrRequest(accessToken, url, method, data, callback, requestFactory, timeout)\n }\n}\n\n/* global RollbarProxy */\nfunction _proxyRequest(json, callback) {\n var rollbarProxy = new RollbarProxy();\n rollbarProxy.sendJsonPayload(\n json,\n function(_msg) { /* do nothing */ }, // eslint-disable-line no-unused-vars\n function(err) {\n callback(new Error(err));\n }\n );\n}\n\nmodule.exports = Transport;\n","'use strict';\n\nvar logger = require('../logger');\nvar _ = require('../../utility');\n\nfunction makeFetchRequest(accessToken, url, method, data, callback, timeout) {\n var controller;\n var timeoutId;\n\n if(_.isFiniteNumber(timeout)) {\n controller = new AbortController();\n timeoutId = setTimeout(function () {controller.abort()}, timeout);\n }\n\n fetch(url, {\n method: method,\n headers: {\n 'Content-Type': 'application/json',\n 'X-Rollbar-Access-Token': accessToken,\n signal: controller && controller.signal\n },\n body: data,\n })\n .then(function (response) {\n if (timeoutId) clearTimeout(timeoutId);\n return response.json();\n })\n .then(function (data) {\n callback(null, data);\n })\n .catch(function (error) {\n logger.error(error.message);\n callback(error);\n });\n}\n\nmodule.exports = makeFetchRequest;\n","'use strict';\n\n/*global XDomainRequest*/\n\nvar _ = require('../../utility');\nvar logger = require('../logger');\n\nfunction makeXhrRequest(accessToken, url, method, data, callback, requestFactory, timeout) {\n var request;\n if (requestFactory) {\n request = requestFactory();\n } else {\n request = _createXMLHTTPObject();\n }\n if (!request) {\n // Give up, no way to send requests\n return callback(new Error('No way to send a request'));\n }\n try {\n try {\n var onreadystatechange = function() {\n try {\n if (onreadystatechange && request.readyState === 4) {\n onreadystatechange = undefined;\n\n var parseResponse = _.jsonParse(request.responseText);\n if (_isSuccess(request)) {\n callback(parseResponse.error, parseResponse.value);\n return;\n } else if (_isNormalFailure(request)) {\n if (request.status === 403) {\n // likely caused by using a server access token\n var message = parseResponse.value && parseResponse.value.message;\n logger.error(message);\n }\n // return valid http status codes\n callback(new Error(String(request.status)));\n } else {\n // IE will return a status 12000+ on some sort of connection failure,\n // so we return a blank error\n // http://msdn.microsoft.com/en-us/library/aa383770%28VS.85%29.aspx\n var msg = 'XHR response had no status code (likely connection failure)';\n callback(_newRetriableError(msg));\n }\n }\n } catch (ex) {\n //jquery source mentions firefox may error out while accessing the\n //request members if there is a network error\n //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111\n var exc;\n if (ex && ex.stack) {\n exc = ex;\n } else {\n exc = new Error(ex);\n }\n callback(exc);\n }\n };\n\n request.open(method, url, true);\n if (request.setRequestHeader) {\n request.setRequestHeader('Content-Type', 'application/json');\n request.setRequestHeader('X-Rollbar-Access-Token', accessToken);\n }\n\n if(_.isFiniteNumber(timeout)) {\n request.timeout = timeout;\n }\n\n request.onreadystatechange = onreadystatechange;\n request.send(data);\n } catch (e1) {\n // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest\n if (typeof XDomainRequest !== 'undefined') {\n\n // Assume we are in a really old browser which has a bunch of limitations:\n // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx\n\n // Extreme paranoia: if we have XDomainRequest then we have a window, but just in case\n if (!window || !window.location) {\n return callback(new Error('No window available during request, unknown environment'));\n }\n\n // If the current page is http, try and send over http\n if (window.location.href.substring(0, 5) === 'http:' && url.substring(0, 5) === 'https') {\n url = 'http' + url.substring(5);\n }\n\n var xdomainrequest = new XDomainRequest();\n xdomainrequest.onprogress = function() {};\n xdomainrequest.ontimeout = function() {\n var msg = 'Request timed out';\n var code = 'ETIMEDOUT';\n callback(_newRetriableError(msg, code));\n };\n xdomainrequest.onerror = function() {\n callback(new Error('Error during request'));\n };\n xdomainrequest.onload = function() {\n var parseResponse = _.jsonParse(xdomainrequest.responseText);\n callback(parseResponse.error, parseResponse.value);\n };\n xdomainrequest.open(method, url, true);\n xdomainrequest.send(data);\n } else {\n callback(new Error('Cannot find a method to transport a request'));\n }\n }\n } catch (e2) {\n callback(e2);\n }\n}\n\nfunction _createXMLHTTPObject() {\n /* global ActiveXObject:false */\n\n var factories = [\n function () {\n return new XMLHttpRequest();\n },\n function () {\n return new ActiveXObject('Msxml2.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Msxml3.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Microsoft.XMLHTTP');\n }\n ];\n var xmlhttp;\n var i;\n var numFactories = factories.length;\n for (i = 0; i < numFactories; i++) {\n /* eslint-disable no-empty */\n try {\n xmlhttp = factories[i]();\n break;\n } catch (e) {\n // pass\n }\n /* eslint-enable no-empty */\n }\n return xmlhttp;\n}\n\nfunction _isSuccess(r) {\n return r && r.status && r.status === 200;\n}\n\nfunction _isNormalFailure(r) {\n return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;\n}\n\nfunction _newRetriableError(message, code) {\n var err = new Error(message);\n err.code = code || 'ENOTFOUND';\n return err;\n}\n\nmodule.exports = makeXhrRequest;\n","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('../errorParser');\nvar logger = require('./logger');\n\nfunction handleDomException(item, options, callback) {\n if(item.err && errorParser.Stack(item.err).name === 'DOMException') {\n var originalError = new Error();\n originalError.name = item.err.name;\n originalError.message = item.err.message;\n originalError.stack = item.err.stack;\n originalError.nested = item.err;\n item.err = originalError;\n }\n callback(null, item);\n}\n\nfunction handleItemWithError(item, options, callback) {\n item.data = item.data || {};\n if (item.err) {\n try {\n item.stackInfo = item.err._savedStackTrace || errorParser.parse(item.err, item.skipFrames);\n\n if (options.addErrorContext) {\n addErrorContext(item);\n }\n } catch (e) {\n logger.error('Error while parsing the error object.', e);\n try {\n item.message = item.err.message || item.err.description || item.message || String(item.err);\n } catch (e2) {\n item.message = String(item.err) || String(e2);\n }\n delete item.err;\n }\n }\n callback(null, item);\n}\n\nfunction addErrorContext(item) {\n var chain = [];\n var err = item.err;\n\n chain.push(err);\n\n while (err.nested || err.cause) {\n err = err.nested || err.cause;\n chain.push(err);\n }\n\n _.addErrorContext(item, chain);\n}\n\nfunction ensureItemHasSomethingToSay(item, options, callback) {\n if (!item.message && !item.stackInfo && !item.custom) {\n callback(new Error('No message, stack info, or custom data'), null);\n }\n callback(null, item);\n}\n\nfunction addBaseInfo(item, options, callback) {\n var environment = (options.payload && options.payload.environment) || options.environment;\n item.data = _.merge(item.data, {\n environment: environment,\n level: item.level,\n endpoint: options.endpoint,\n platform: 'browser',\n framework: 'browser-js',\n language: 'javascript',\n server: {},\n uuid: item.uuid,\n notifier: {\n name: 'rollbar-browser-js',\n version: options.version\n },\n custom: item.custom\n });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function(item, options, callback) {\n var requestInfo = {};\n\n if (window && window.location) {\n requestInfo.url = window.location.href;\n requestInfo.query_string = window.location.search;\n }\n\n var remoteString = '$remote_ip';\n if (!options.captureIp) {\n remoteString = null;\n } else if (options.captureIp !== true) {\n remoteString += '_anonymize';\n }\n if (remoteString) requestInfo.user_ip = remoteString;\n\n if (Object.keys(requestInfo).length > 0) {\n _.set(item, 'data.request', requestInfo);\n }\n\n callback(null, item);\n };\n}\n\nfunction addClientInfo(window) {\n return function(item, options, callback) {\n if (!window) {\n return callback(null, item);\n }\n var nav = window.navigator || {};\n var scr = window.screen || {};\n _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: nav.userAgent,\n language: nav.language,\n cookie_enabled: nav.cookieEnabled,\n screen: {\n width: scr.width,\n height: scr.height\n }\n }\n });\n callback(null, item);\n };\n}\n\nfunction addPluginInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.navigator) {\n return callback(null, item);\n }\n var plugins = [];\n var navPlugins = window.navigator.plugins || [];\n var cur;\n for (var i=0, l=navPlugins.length; i < l; ++i) {\n cur = navPlugins[i];\n plugins.push({name: cur.name, description: cur.description});\n }\n _.set(item, 'data.client.javascript.plugins', plugins);\n callback(null, item);\n };\n}\n\nfunction addBody(item, options, callback) {\n if (item.stackInfo) {\n if (item.stackInfo.traceChain) {\n addBodyTraceChain(item, options, callback);\n } else {\n addBodyTrace(item, options, callback);\n }\n } else {\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction addBodyMessage(item, options, callback) {\n var message = item.message;\n var custom = item.custom;\n\n if (!message) {\n message = 'Item sent with null or missing arguments.';\n }\n var result = {\n body: message\n };\n\n if (custom) {\n result.extra = _.merge(custom);\n }\n\n _.set(item, 'data.body', {message: result});\n callback(null, item);\n}\n\nfunction stackFromItem(item) {\n // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = item.stackInfo.stack;\n if (stack && stack.length === 0 && item._unhandledStackInfo && item._unhandledStackInfo.stack) {\n stack = item._unhandledStackInfo.stack;\n }\n return stack;\n}\n\nfunction addBodyTraceChain(item, options, callback) {\n var traceChain = item.stackInfo.traceChain;\n var traces = [];\n\n var traceChainLength = traceChain.length;\n for (var i = 0; i < traceChainLength; i++) {\n var trace = buildTrace(item, traceChain[i], options);\n traces.push(trace);\n }\n\n _.set(item, 'data.body', {trace_chain: traces});\n callback(null, item);\n}\n\nfunction addBodyTrace(item, options, callback) {\n var stack = stackFromItem(item);\n\n if (stack) {\n var trace = buildTrace(item, item.stackInfo, options);\n _.set(item, 'data.body', {trace: trace});\n callback(null, item);\n } else {\n var stackInfo = item.stackInfo;\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction buildTrace(item, stackInfo, options) {\n var description = item && item.data.description;\n var custom = item && item.custom;\n var stack = stackFromItem(item);\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n var trace = {\n exception: {\n 'class': className,\n message: message\n }\n };\n\n if (description) {\n trace.exception.description = description;\n }\n\n if (stack) {\n if (stack.length === 0) {\n trace.exception.stack = stackInfo.rawStack;\n trace.exception.raw = String(stackInfo.rawException);\n }\n var stackFrame;\n var frame;\n var code;\n var pre;\n var post;\n var contextLength;\n var i, mid;\n\n trace.frames = [];\n for (i = 0; i < stack.length; ++i) {\n stackFrame = stack[i];\n frame = {\n filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',\n lineno: stackFrame.line || null,\n method: (!stackFrame.func || stackFrame.func === '?') ? '[anonymous]' : stackFrame.func,\n colno: stackFrame.column\n };\n if (options.sendFrameUrl) {\n frame.url = stackFrame.url;\n }\n if (frame.method && frame.method.endsWith && frame.method.endsWith('_rollbar_wrapped')) {\n continue;\n }\n\n code = pre = post = null;\n contextLength = stackFrame.context ? stackFrame.context.length : 0;\n if (contextLength) {\n mid = Math.floor(contextLength / 2);\n pre = stackFrame.context.slice(0, mid);\n code = stackFrame.context[mid];\n post = stackFrame.context.slice(mid);\n }\n\n if (code) {\n frame.code = code;\n }\n\n if (pre || post) {\n frame.context = {};\n if (pre && pre.length) {\n frame.context.pre = pre;\n }\n if (post && post.length) {\n frame.context.post = post;\n }\n }\n\n if (stackFrame.args) {\n frame.args = stackFrame.args;\n }\n\n trace.frames.push(frame);\n }\n\n // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last\n trace.frames.reverse();\n\n if (custom) {\n trace.extra = _.merge(custom);\n }\n }\n\n return trace;\n}\n\nfunction errorClass(stackInfo, guess, options) {\n if (stackInfo.name) {\n return stackInfo.name;\n } else if (options.guessErrorClass) {\n return guess;\n } else {\n return '(unknown)';\n }\n}\n\nfunction addScrubber(scrubFn) {\n return function (item, options, callback) {\n if (scrubFn) {\n var scrubFields = options.scrubFields || [];\n var scrubPaths = options.scrubPaths || [];\n item.data = scrubFn(item.data, scrubFields, scrubPaths);\n }\n callback(null, item);\n }\n}\n\nmodule.exports = {\n handleDomException: handleDomException,\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n addScrubber: addScrubber\n};\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('error-stack-parser', ['stackframe'], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory(require('stackframe'));\n } else {\n root.ErrorStackParser = factory(root.StackFrame);\n }\n}(this, function ErrorStackParser(StackFrame) {\n 'use strict';\n\n var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\\S+:\\d+/;\n var CHROME_IE_STACK_REGEXP = /^\\s*at .*(\\S+:\\d+|\\(native\\))/m;\n var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\\[native code])?$/;\n\n return {\n /**\n * Given an Error object, extract the most information from it.\n *\n * @param {Error} error object\n * @return {Array} of StackFrames\n */\n parse: function ErrorStackParser$$parse(error) {\n if (typeof error.stacktrace !== 'undefined' || typeof error['opera#sourceloc'] !== 'undefined') {\n return this.parseOpera(error);\n } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {\n return this.parseV8OrIE(error);\n } else if (error.stack) {\n return this.parseFFOrSafari(error);\n } else {\n throw new Error('Cannot parse given Error object');\n }\n },\n\n // Separate line and column numbers from a string of the form: (URI:Line:Column)\n extractLocation: function ErrorStackParser$$extractLocation(urlLike) {\n // Fail-fast but return locations like \"(native)\"\n if (urlLike.indexOf(':') === -1) {\n return [urlLike];\n }\n\n var regExp = /(.+?)(?::(\\d+))?(?::(\\d+))?$/;\n var parts = regExp.exec(urlLike.replace(/[()]/g, ''));\n return [parts[1], parts[2] || undefined, parts[3] || undefined];\n },\n\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(CHROME_IE_STACK_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n if (line.indexOf('(eval ') > -1) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n line = line.replace(/eval code/g, 'eval').replace(/(\\(eval at [^()]*)|(,.*$)/g, '');\n }\n var sanitizedLine = line.replace(/^\\s+/, '').replace(/\\(eval code/g, '(').replace(/^.*?\\s+/, '');\n\n // capture and preseve the parenthesized location \"(/foo/my bar.js:12:87)\" in\n // case it has spaces in it, as the string is split on \\s+ later on\n var location = sanitizedLine.match(/ (\\(.+\\)$)/);\n\n // remove the parenthesized location from the line, if it was matched\n sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;\n\n // if a location was matched, pass it to extractLocation() otherwise pass all sanitizedLine\n // because this line doesn't have function name\n var locationParts = this.extractLocation(location ? location[1] : sanitizedLine);\n var functionName = location && sanitizedLine || undefined;\n var fileName = ['eval', ''].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];\n\n return new StackFrame({\n functionName: functionName,\n fileName: fileName,\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n },\n\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n if (line.indexOf(' > eval') > -1) {\n line = line.replace(/ line (\\d+)(?: > eval line \\d+)* > eval:\\d+:\\d+/g, ':$1');\n }\n\n if (line.indexOf('@') === -1 && line.indexOf(':') === -1) {\n // Safari eval frames only have function names and nothing else\n return new StackFrame({\n functionName: line\n });\n } else {\n var functionNameRegex = /((.*\".+\"[^@]*)?[^@]*)(?:@)/;\n var matches = line.match(functionNameRegex);\n var functionName = matches && matches[1] ? matches[1] : undefined;\n var locationParts = this.extractLocation(line.replace(functionNameRegex, ''));\n\n return new StackFrame({\n functionName: functionName,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }\n }, this);\n },\n\n parseOpera: function ErrorStackParser$$parseOpera(e) {\n if (!e.stacktrace || (e.message.indexOf('\\n') > -1 &&\n e.message.split('\\n').length > e.stacktrace.split('\\n').length)) {\n return this.parseOpera9(e);\n } else if (!e.stack) {\n return this.parseOpera10(e);\n } else {\n return this.parseOpera11(e);\n }\n },\n\n parseOpera9: function ErrorStackParser$$parseOpera9(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)/i;\n var lines = e.message.split('\\n');\n var result = [];\n\n for (var i = 2, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(new StackFrame({\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n }));\n }\n }\n\n return result;\n },\n\n parseOpera10: function ErrorStackParser$$parseOpera10(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)(?:: In function (\\S+))?$/i;\n var lines = e.stacktrace.split('\\n');\n var result = [];\n\n for (var i = 0, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(\n new StackFrame({\n functionName: match[3] || undefined,\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n })\n );\n }\n }\n\n return result;\n },\n\n // Opera 10.65+ Error.stack very similar to FF/Safari\n parseOpera11: function ErrorStackParser$$parseOpera11(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);\n }, this);\n\n return filtered.map(function(line) {\n var tokens = line.split('@');\n var locationParts = this.extractLocation(tokens.pop());\n var functionCall = (tokens.shift() || '');\n var functionName = functionCall\n .replace(//, '$2')\n .replace(/\\([^)]*\\)/g, '') || undefined;\n var argsRaw;\n if (functionCall.match(/\\(([^)]*)\\)/)) {\n argsRaw = functionCall.replace(/^[^(]+\\(([^)]*)\\)$/, '$1');\n }\n var args = (argsRaw === undefined || argsRaw === '[arguments not available]') ?\n undefined : argsRaw.split(',');\n\n return new StackFrame({\n functionName: functionName,\n args: args,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n }\n };\n}));\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('stackframe', [], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.StackFrame = factory();\n }\n}(this, function() {\n 'use strict';\n function _isNumber(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n }\n\n function _capitalize(str) {\n return str.charAt(0).toUpperCase() + str.substring(1);\n }\n\n function _getter(p) {\n return function() {\n return this[p];\n };\n }\n\n var booleanProps = ['isConstructor', 'isEval', 'isNative', 'isToplevel'];\n var numericProps = ['columnNumber', 'lineNumber'];\n var stringProps = ['fileName', 'functionName', 'source'];\n var arrayProps = ['args'];\n var objectProps = ['evalOrigin'];\n\n var props = booleanProps.concat(numericProps, stringProps, arrayProps, objectProps);\n\n function StackFrame(obj) {\n if (!obj) return;\n for (var i = 0; i < props.length; i++) {\n if (obj[props[i]] !== undefined) {\n this['set' + _capitalize(props[i])](obj[props[i]]);\n }\n }\n }\n\n StackFrame.prototype = {\n getArgs: function() {\n return this.args;\n },\n setArgs: function(v) {\n if (Object.prototype.toString.call(v) !== '[object Array]') {\n throw new TypeError('Args must be an Array');\n }\n this.args = v;\n },\n\n getEvalOrigin: function() {\n return this.evalOrigin;\n },\n setEvalOrigin: function(v) {\n if (v instanceof StackFrame) {\n this.evalOrigin = v;\n } else if (v instanceof Object) {\n this.evalOrigin = new StackFrame(v);\n } else {\n throw new TypeError('Eval Origin must be an Object or StackFrame');\n }\n },\n\n toString: function() {\n var fileName = this.getFileName() || '';\n var lineNumber = this.getLineNumber() || '';\n var columnNumber = this.getColumnNumber() || '';\n var functionName = this.getFunctionName() || '';\n if (this.getIsEval()) {\n if (fileName) {\n return '[eval] (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return '[eval]:' + lineNumber + ':' + columnNumber;\n }\n if (functionName) {\n return functionName + ' (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return fileName + ':' + lineNumber + ':' + columnNumber;\n }\n };\n\n StackFrame.fromString = function StackFrame$$fromString(str) {\n var argsStartIndex = str.indexOf('(');\n var argsEndIndex = str.lastIndexOf(')');\n\n var functionName = str.substring(0, argsStartIndex);\n var args = str.substring(argsStartIndex + 1, argsEndIndex).split(',');\n var locationString = str.substring(argsEndIndex + 1);\n\n if (locationString.indexOf('@') === 0) {\n var parts = /@(.+?)(?::(\\d+))?(?::(\\d+))?$/.exec(locationString, '');\n var fileName = parts[1];\n var lineNumber = parts[2];\n var columnNumber = parts[3];\n }\n\n return new StackFrame({\n functionName: functionName,\n args: args || undefined,\n fileName: fileName,\n lineNumber: lineNumber || undefined,\n columnNumber: columnNumber || undefined\n });\n };\n\n for (var i = 0; i < booleanProps.length; i++) {\n StackFrame.prototype['get' + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);\n StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function(p) {\n return function(v) {\n this[p] = Boolean(v);\n };\n })(booleanProps[i]);\n }\n\n for (var j = 0; j < numericProps.length; j++) {\n StackFrame.prototype['get' + _capitalize(numericProps[j])] = _getter(numericProps[j]);\n StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function(p) {\n return function(v) {\n if (!_isNumber(v)) {\n throw new TypeError(p + ' must be a Number');\n }\n this[p] = Number(v);\n };\n })(numericProps[j]);\n }\n\n for (var k = 0; k < stringProps.length; k++) {\n StackFrame.prototype['get' + _capitalize(stringProps[k])] = _getter(stringProps[k]);\n StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function(p) {\n return function(v) {\n this[p] = String(v);\n };\n })(stringProps[k]);\n }\n\n return StackFrame;\n}));\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction itemToPayload(item, options, callback) {\n var data = item.data;\n\n if (item._isUncaught) {\n data._isUncaught = true;\n }\n if (item._originalArgs) {\n data._originalArgs = item._originalArgs;\n }\n callback(null, data);\n}\n\nfunction addPayloadOptions(item, options, callback) {\n var payloadOptions = options.payload || {};\n if (payloadOptions.body) {\n delete payloadOptions.body;\n }\n\n item.data = _.merge(item.data, payloadOptions);\n callback(null, item);\n}\n\nfunction addTelemetryData(item, options, callback) {\n if (item.telemetryEvents) {\n _.set(item, 'data.body.telemetry', item.telemetryEvents);\n }\n callback(null, item);\n}\n\nfunction addMessageWithError(item, options, callback) {\n if (!item.message) {\n callback(null, item);\n return;\n }\n var tracePath = 'data.body.trace_chain.0';\n var trace = _.get(item, tracePath);\n if (!trace) {\n tracePath = 'data.body.trace';\n trace = _.get(item, tracePath);\n }\n if (trace) {\n if (!(trace.exception && trace.exception.description)) {\n _.set(item, tracePath+'.exception.description', item.message);\n callback(null, item);\n return;\n }\n var extra = _.get(item, tracePath+'.extra') || {};\n var newExtra = _.merge(extra, {message: item.message});\n _.set(item, tracePath+'.extra', newExtra);\n }\n callback(null, item);\n}\n\nfunction userTransform(logger) {\n return function(item, options, callback) {\n var newItem = _.merge(item);\n var response = null;\n try {\n if (_.isFunction(options.transform)) {\n response = options.transform(newItem.data, item);\n }\n } catch (e) {\n options.transform = null;\n logger.error('Error while calling custom transform() function. Removing custom transform().', e);\n callback(null, item);\n return;\n }\n if(_.isPromise(response)) {\n response.then(function (promisedItem) {\n if(promisedItem) {\n newItem.data = promisedItem;\n }\n callback(null, newItem);\n }, function (error) {\n callback(error, item);\n });\n } else {\n callback(null, newItem);\n }\n }\n}\n\nfunction addConfigToPayload(item, options, callback) {\n if (!options.sendConfig) {\n return callback(null, item);\n }\n var configKey = '_rollbarConfig';\n var custom = _.get(item, 'data.custom') || {};\n custom[configKey] = options;\n item.data.custom = custom;\n callback(null, item);\n}\n\nfunction addFunctionOption(options, name) {\n if(_.isFunction(options[name])) {\n options[name] = options[name].toString();\n }\n}\n\nfunction addConfiguredOptions(item, options, callback) {\n var configuredOptions = options._configuredOptions;\n\n // These must be stringified or they'll get dropped during serialization.\n addFunctionOption(configuredOptions, 'transform');\n addFunctionOption(configuredOptions, 'checkIgnore');\n addFunctionOption(configuredOptions, 'onSendCallback');\n\n delete configuredOptions.accessToken;\n item.data.notifier.configured_options = configuredOptions;\n callback(null, item);\n}\n\nfunction addDiagnosticKeys(item, options, callback) {\n var diagnostic = _.merge(item.notifier.client.notifier.diagnostic, item.diagnostic);\n\n if (_.get(item, 'err._isAnonymous')) {\n diagnostic.is_anonymous = true;\n }\n\n if (item._isUncaught) {\n diagnostic.is_uncaught = item._isUncaught;\n }\n\n if (item.err) {\n try {\n diagnostic.raw_error = {\n message: item.err.message,\n name: item.err.name,\n constructor_name: item.err.constructor && item.err.constructor.name,\n filename: item.err.fileName,\n line: item.err.lineNumber,\n column: item.err.columnNumber,\n stack: item.err.stack\n };\n } catch (e) {\n diagnostic.raw_error = { failed: String(e) };\n }\n }\n\n item.data.notifier.diagnostic = _.merge(item.data.notifier.diagnostic, diagnostic);\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addPayloadOptions: addPayloadOptions,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError,\n userTransform: userTransform,\n addConfigToPayload: addConfigToPayload,\n addConfiguredOptions: addConfiguredOptions,\n addDiagnosticKeys: addDiagnosticKeys\n};\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction checkIgnore(item, settings) {\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore\n};\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction checkLevel(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = settings.reportLevel;\n var reportLevelVal = _.LEVELS[reportLevel] || 0;\n\n if (levelVal < reportLevelVal) {\n return false;\n }\n return true;\n}\n\nfunction userCheckIgnore(logger) {\n return function(item, settings) {\n var isUncaught = !!item._isUncaught;\n delete item._isUncaught;\n var args = item._originalArgs;\n delete item._originalArgs;\n try {\n if (_.isFunction(settings.onSendCallback)) {\n settings.onSendCallback(isUncaught, args, item);\n }\n } catch (e) {\n settings.onSendCallback = null;\n logger.error('Error while calling onSendCallback, removing', e);\n }\n try {\n if (_.isFunction(settings.checkIgnore) && settings.checkIgnore(isUncaught, args, item)) {\n return false;\n }\n } catch (e) {\n settings.checkIgnore = null;\n logger.error('Error while calling custom checkIgnore(), removing', e);\n }\n return true;\n }\n}\n\nfunction urlIsNotBlockListed(logger) {\n return function(item, settings) {\n return !urlIsOnAList(item, settings, 'blocklist', logger);\n }\n}\n\nfunction urlIsSafeListed(logger) {\n return function(item, settings) {\n return urlIsOnAList(item, settings, 'safelist', logger);\n }\n}\n\nfunction matchFrames(trace, list, block) {\n if (!trace) { return !block }\n\n var frames = trace.frames;\n\n if (!frames || frames.length === 0) { return !block; }\n\n var frame, filename, url, urlRegex;\n var listLength = list.length;\n var frameLength = frames.length;\n for (var i = 0; i < frameLength; i++) {\n frame = frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) { return !block; }\n\n for (var j = 0; j < listLength; j++) {\n url = list[j];\n urlRegex = new RegExp(url);\n\n if (urlRegex.test(filename)) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction urlIsOnAList(item, settings, safeOrBlock, logger) {\n // safelist is the default\n var block = false;\n if (safeOrBlock === 'blocklist') {\n block = true;\n }\n\n var list, traces;\n try {\n list = block ? settings.hostBlockList : settings.hostSafeList;\n traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];\n\n // These two checks are important to come first as they are defaults\n // in case the list is missing or the trace is missing or not well-formed\n if (!list || list.length === 0) {\n return !block;\n }\n if (traces.length === 0 || !traces[0]) {\n return !block;\n }\n\n var tracesLength = traces.length;\n for (var i = 0; i < tracesLength; i++) {\n if(matchFrames(traces[i], list, block)) {\n return true;\n }\n }\n } catch (e)\n /* istanbul ignore next */\n {\n if (block) {\n settings.hostBlockList = null;\n } else {\n settings.hostSafeList = null;\n }\n var listName = block ? 'hostBlockList' : 'hostSafeList';\n logger.error('Error while reading your configuration\\'s ' + listName + ' option. Removing custom ' + listName + '.', e);\n return !block;\n }\n return false;\n}\n\nfunction messageIsIgnored(logger) {\n return function(item, settings) {\n var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n messages = messagesFromItem(item);\n\n if (messages.length === 0){\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n\n for (j = 0; j < messages.length; j++) {\n messageIsIgnored = rIgnoredMessage.test(messages[j]);\n\n if (messageIsIgnored) {\n return false;\n }\n }\n }\n } catch(e)\n /* istanbul ignore next */\n {\n settings.ignoredMessages = null;\n logger.error('Error while reading your configuration\\'s ignoredMessages option. Removing custom ignoredMessages.');\n }\n\n return true;\n }\n}\n\nfunction messagesFromItem(item) {\n var body = item.body;\n var messages = [];\n\n // The payload schema only allows one of trace_chain, message, or trace.\n // However, existing test cases are based on having both trace and message present.\n // So here we preserve the ability to collect strings from any combination of these keys.\n if (body.trace_chain) {\n var traceChain = body.trace_chain;\n for (var i = 0; i < traceChain.length; i++) {\n var trace = traceChain[i];\n messages.push(_.get(trace, 'exception.message'));\n }\n }\n if (body.trace) {\n messages.push(_.get(body, 'trace.exception.message'));\n }\n if (body.message) {\n messages.push(_.get(body, 'message.body'));\n }\n return messages;\n}\n\nmodule.exports = {\n checkLevel: checkLevel,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlockListed: urlIsNotBlockListed,\n urlIsSafeListed: urlIsSafeListed,\n messageIsIgnored: messageIsIgnored\n};\n","'use strict';\n\nmodule.exports = {\n version: '2.26.3',\n endpoint: 'api.rollbar.com/api/1/item/',\n logLevel: 'debug',\n reportLevel: 'debug',\n uncaughtErrorLevel: 'error',\n maxItems: 0,\n itemsPerMin: 60\n}\n","'use strict';\n\nmodule.exports = {\n scrubFields: [\n 'pw',\n 'pass',\n 'passwd',\n 'password',\n 'secret',\n 'confirm_password',\n 'confirmPassword',\n 'password_confirmation',\n 'passwordConfirmation',\n 'access_token',\n 'accessToken',\n 'X-Rollbar-Access-Token',\n 'secret_key',\n 'secretKey',\n 'secretToken',\n 'cc-number',\n 'card number',\n 'cardnumber',\n 'cardnum',\n 'ccnum',\n 'ccnumber',\n 'cc num',\n 'creditcardnumber',\n 'credit card number',\n 'newcreditcardnumber',\n 'new credit card',\n 'creditcardno',\n 'credit card no',\n 'card#',\n 'card #',\n 'cc-csc',\n 'cvc',\n 'cvc2',\n 'cvv2',\n 'ccv2',\n 'security code',\n 'card verification',\n 'name on credit card',\n 'name on card',\n 'nameoncard',\n 'cardholder',\n 'card holder',\n 'name des karteninhabers',\n 'ccname',\n 'card type',\n 'cardtype',\n 'cc type',\n 'cctype',\n 'payment type',\n 'expiration date',\n 'expirationdate',\n 'expdate',\n 'cc-exp',\n 'ccmonth',\n 'ccyear'\n ]\n}\n","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.merge(options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n}\n\nTelemeter.prototype.configure = function(options) {\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n var deleteCount = 0;\n if (this.queue.length > newMaxEvents) {\n deleteCount = this.queue.length - newMaxEvents;\n }\n this.maxQueueSize = newMaxEvents;\n this.queue.splice(0, deleteCount);\n};\n\nTelemeter.prototype.copyEvents = function() {\n var events = Array.prototype.slice.call(this.queue, 0);\n if (_.isFunction(this.options.filterTelemetry)) {\n try {\n var i = events.length;\n while (i--) {\n if (this.options.filterTelemetry(events[i])) {\n events.splice(i, 1);\n }\n }\n } catch (e) {\n this.options.filterTelemetry = null;\n }\n }\n return events;\n};\n\nTelemeter.prototype.capture = function(type, metadata, level, rollbarUUID, timestamp) {\n var e = {\n level: getLevel(type, level),\n type: type,\n timestamp_ms: timestamp || _.now(),\n body: metadata,\n source: 'client'\n };\n if (rollbarUUID) {\n e.uuid = rollbarUUID;\n }\n\n try {\n if (_.isFunction(this.options.filterTelemetry) && this.options.filterTelemetry(e)) {\n return false;\n }\n } catch (exc) {\n this.options.filterTelemetry = null;\n }\n\n this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function(type, metadata, level, rollbarUUID) {\n return this.capture(type, metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.captureError = function(err, level, rollbarUUID, timestamp) {\n var metadata = {\n message: err.message || String(err)\n };\n if (err.stack) {\n metadata.stack = err.stack;\n }\n return this.capture('error', metadata, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureLog = function(message, level, rollbarUUID, timestamp) {\n return this.capture('log', {\n message: message\n }, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID, requestData) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\n if (requestData) {\n metadata.request = requestData;\n }\n var level = this.levelFromStatus(metadata.status_code);\n return this.capture('network', metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.levelFromStatus = function(statusCode) {\n if (statusCode >= 200 && statusCode < 400) {\n return 'info';\n }\n if (statusCode === 0 || statusCode >= 400) {\n return 'error';\n }\n return 'info';\n};\n\nTelemeter.prototype.captureDom = function(subtype, element, value, checked, rollbarUUID) {\n var metadata = {\n subtype: subtype,\n element: element\n };\n if (value !== undefined) {\n metadata.value = value;\n }\n if (checked !== undefined) {\n metadata.checked = checked;\n }\n return this.capture('dom', metadata, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureNavigation = function(from, to, rollbarUUID) {\n return this.capture('navigation', {from: from, to: to}, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureDomContentLoaded = function(ts) {\n return this.capture('navigation', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n */\n};\nTelemeter.prototype.captureLoad = function(ts) {\n return this.capture('navigation', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n */\n};\n\nTelemeter.prototype.captureConnectivityChange = function(type, rollbarUUID) {\n return this.captureNetwork({change: type}, 'connectivity', rollbarUUID);\n};\n\n// Only intended to be used internally by the notifier\nTelemeter.prototype._captureRollbarItem = function(item) {\n if (!this.options.includeItemsInTelemetry) {\n return;\n }\n if (item.err) {\n return this.captureError(item.err, item.level, item.uuid, item.timestamp);\n }\n if (item.message) {\n return this.captureLog(item.message, item.level, item.uuid, item.timestamp);\n }\n if (item.custom) {\n return this.capture('log', item.custom, item.level, item.uuid, item.timestamp);\n }\n};\n\nTelemeter.prototype.push = function(e) {\n this.queue.push(e);\n if (this.queue.length > this.maxQueueSize) {\n this.queue.shift();\n }\n};\n\nfunction getLevel(type, level) {\n if (level) {\n return level;\n }\n var defaultLevel = {\n error: 'error',\n manual: 'info'\n };\n return defaultLevel[type] || 'info';\n}\n\nmodule.exports = Telemeter;\n","'use strict';\n\nvar _ = require('../utility');\nvar headers = require('../utility/headers');\nvar scrub = require('../scrub');\nvar urlparser = require('./url');\nvar domUtil = require('./domUtility');\n\nvar defaults = {\n network: true,\n networkResponseHeaders: false,\n networkResponseBody: false,\n networkRequestHeaders: false,\n networkRequestBody: false,\n networkErrorOnHttp5xx: false,\n networkErrorOnHttp4xx: false,\n networkErrorOnHttp0: false,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true,\n contentSecurityPolicy: true,\n errorOnContentSecurityPolicy: false\n};\n\nfunction replace(obj, name, replacement, replacements, type) {\n var orig = obj[name];\n obj[name] = replacement(orig);\n if (replacements) {\n replacements[type].push([obj, name, orig]);\n }\n}\n\nfunction restore(replacements, type) {\n var b;\n while (replacements[type].length) {\n b = replacements[type].shift();\n b[0][b[1]] = b[2];\n }\n}\n\nfunction nameFromDescription(description) {\n if (!description || !description.attributes) { return null; }\n var attrs = description.attributes;\n for (var a = 0; a < attrs.length; ++a) {\n if (attrs[a].key === 'name') {\n return attrs[a].value;\n }\n }\n return null;\n}\n\nfunction defaultValueScrubber(scrubFields) {\n var patterns = [];\n for (var i = 0; i < scrubFields.length; ++i) {\n patterns.push(new RegExp(scrubFields[i], 'i'));\n }\n return function(description) {\n var name = nameFromDescription(description);\n if (!name) { return false; }\n for (var i = 0; i < patterns.length; ++i) {\n if (patterns[i].test(name)) {\n return true;\n }\n }\n return false;\n };\n}\n\nfunction Instrumenter(options, telemeter, rollbar, _window, _document) {\n this.options = options;\n var autoInstrument = options.autoInstrument;\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);\n this.telemeter = telemeter;\n this.rollbar = rollbar;\n this.diagnostic = rollbar.client.notifier.diagnostic;\n this._window = _window || {};\n this._document = _document || {};\n this.replacements = {\n network: [],\n log: [],\n navigation: [],\n connectivity: []\n };\n this.eventRemovers = {\n dom: [],\n connectivity: [],\n contentsecuritypolicy: []\n };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function(options) {\n this.options = _.merge(this.options, options);\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.merge(this.autoInstrument);\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n if (options.scrubTelemetryInputs !== undefined) {\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n }\n if (options.telemetryScrubber !== undefined) {\n this.telemetryScrubber = options.telemetryScrubber;\n }\n};\n\n// eslint-disable-next-line complexity\nInstrumenter.prototype.instrument = function(oldSettings) {\n if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {\n this.instrumentNetwork();\n } else if (!this.autoInstrument.network && oldSettings && oldSettings.network) {\n this.deinstrumentNetwork();\n }\n\n if (this.autoInstrument.log && !(oldSettings && oldSettings.log)) {\n this.instrumentConsole();\n } else if (!this.autoInstrument.log && oldSettings && oldSettings.log) {\n this.deinstrumentConsole();\n }\n\n if (this.autoInstrument.dom && !(oldSettings && oldSettings.dom)) {\n this.instrumentDom();\n } else if (!this.autoInstrument.dom && oldSettings && oldSettings.dom) {\n this.deinstrumentDom();\n }\n\n if (this.autoInstrument.navigation && !(oldSettings && oldSettings.navigation)) {\n this.instrumentNavigation();\n } else if (!this.autoInstrument.navigation && oldSettings && oldSettings.navigation) {\n this.deinstrumentNavigation();\n }\n\n if (this.autoInstrument.connectivity && !(oldSettings && oldSettings.connectivity)) {\n this.instrumentConnectivity();\n } else if (!this.autoInstrument.connectivity && oldSettings && oldSettings.connectivity) {\n this.deinstrumentConnectivity();\n }\n\n if (this.autoInstrument.contentSecurityPolicy && !(oldSettings && oldSettings.contentSecurityPolicy)) {\n this.instrumentContentSecurityPolicy();\n } else if (!this.autoInstrument.contentSecurityPolicy && oldSettings && oldSettings.contentSecurityPolicy) {\n this.deinstrumentContentSecurityPolicy();\n }\n};\n\nInstrumenter.prototype.deinstrumentNetwork = function() {\n restore(this.replacements, 'network');\n};\n\nInstrumenter.prototype.instrumentNetwork = function() {\n var self = this;\n\n function wrapProp(prop, xhr) {\n if (prop in xhr && _.isFunction(xhr[prop])) {\n replace(xhr, prop, function(orig) {\n return self.rollbar.wrap(orig);\n });\n }\n }\n\n if ('XMLHttpRequest' in this._window) {\n var xhrp = this._window.XMLHttpRequest.prototype;\n replace(xhrp, 'open', function(orig) {\n return function(method, url) {\n var isUrlObject = _isUrlObject(url)\n if (_.isType(url, 'string') || isUrlObject) {\n url = isUrlObject ? url.toString() : url;\n if (this.__rollbar_xhr) {\n this.__rollbar_xhr.method = method;\n this.__rollbar_xhr.url = url;\n this.__rollbar_xhr.status_code = null;\n this.__rollbar_xhr.start_time_ms = _.now();\n this.__rollbar_xhr.end_time_ms = null;\n } else {\n this.__rollbar_xhr = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'setRequestHeader', function(orig) {\n return function(header, value) {\n // If xhr.open is async, __rollbar_xhr may not be initialized yet.\n if (!this.__rollbar_xhr) {\n this.__rollbar_xhr = {};\n }\n if (_.isType(header, 'string') && _.isType(value, 'string')) {\n if (self.autoInstrument.networkRequestHeaders) {\n if (!this.__rollbar_xhr.request_headers) {\n this.__rollbar_xhr.request_headers = {};\n }\n this.__rollbar_xhr.request_headers[header] = value;\n }\n // We want the content type even if request header telemetry is off.\n if (header.toLowerCase() === 'content-type') {\n this.__rollbar_xhr.request_content_type = value;\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'send', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(data) {\n /* eslint-enable no-unused-vars */\n var xhr = this;\n\n function onreadystatechangeHandler() {\n if (xhr.__rollbar_xhr) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n if (self.autoInstrument.networkRequestBody) {\n xhr.__rollbar_xhr.request = data;\n }\n xhr.__rollbar_event = self.captureNetwork(xhr.__rollbar_xhr, 'xhr', undefined);\n }\n if (xhr.readyState < 2) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n }\n if (xhr.readyState > 3) {\n xhr.__rollbar_xhr.end_time_ms = _.now();\n\n var headers = null;\n xhr.__rollbar_xhr.response_content_type = xhr.getResponseHeader('Content-Type');\n if (self.autoInstrument.networkResponseHeaders) {\n var headersConfig = self.autoInstrument.networkResponseHeaders;\n headers = {};\n try {\n var header, i;\n if (headersConfig === true) {\n var allHeaders = xhr.getAllResponseHeaders();\n if (allHeaders) {\n var arr = allHeaders.trim().split(/[\\r\\n]+/);\n var parts, value;\n for (i=0; i < arr.length; i++) {\n parts = arr[i].split(': ');\n header = parts.shift();\n value = parts.join(': ');\n headers[header] = value;\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n header = headersConfig[i];\n headers[header] = xhr.getResponseHeader(header);\n }\n }\n } catch (e) {\n /* we ignore the errors here that could come from different\n * browser issues with the xhr methods */\n }\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n try {\n body = xhr.responseText;\n } catch (e) {\n /* ignore errors from reading responseText */\n }\n }\n var response = null;\n if (body || headers) {\n response = {};\n if (body) {\n if (self.isJsonContentType(xhr.__rollbar_xhr.response_content_type)) {\n response.body = self.scrubJson(body);\n } else {\n response.body = body;\n }\n }\n if (headers) {\n response.headers = headers;\n }\n }\n if (response) {\n xhr.__rollbar_xhr.response = response;\n }\n try {\n var code = xhr.status;\n code = code === 1223 ? 204 : code;\n xhr.__rollbar_xhr.status_code = code;\n xhr.__rollbar_event.level = self.telemeter.levelFromStatus(code);\n self.errorOnHttpStatus(xhr.__rollbar_xhr);\n } catch (e) {\n /* ignore possible exception from xhr.status */\n }\n }\n }\n }\n\n wrapProp('onload', xhr);\n wrapProp('onerror', xhr);\n wrapProp('onprogress', xhr);\n\n if ('onreadystatechange' in xhr && _.isFunction(xhr.onreadystatechange)) {\n replace(xhr, 'onreadystatechange', function(orig) {\n return self.rollbar.wrap(orig, undefined, onreadystatechangeHandler);\n });\n } else {\n xhr.onreadystatechange = onreadystatechangeHandler;\n }\n if (xhr.__rollbar_xhr && self.trackHttpErrors()) {\n xhr.__rollbar_xhr.stack = (new Error()).stack;\n }\n return orig.apply(this, arguments);\n }\n }, this.replacements, 'network');\n }\n\n if ('fetch' in this._window) {\n replace(this._window, 'fetch', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(fn, t) {\n /* eslint-enable no-unused-vars */\n var args = new Array(arguments.length);\n for (var i=0, len=args.length; i < len; i++) {\n args[i] = arguments[i];\n }\n var input = args[0];\n var method = 'GET';\n var url;\n var isUrlObject = _isUrlObject(input)\n if (_.isType(input, 'string') || isUrlObject) {\n url = isUrlObject ? input.toString() : input;\n } else if (input) {\n url = input.url;\n if (input.method) {\n method = input.method;\n }\n }\n if (args[1] && args[1].method) {\n method = args[1].method;\n }\n var metadata = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n if (args[1] && args[1].headers) {\n // Argument may be a Headers object, or plain object. Ensure here that\n // we are working with a Headers object with case-insensitive keys.\n var reqHeaders = headers(args[1].headers);\n\n metadata.request_content_type = reqHeaders.get('Content-Type');\n\n if (self.autoInstrument.networkRequestHeaders) {\n metadata.request_headers = self.fetchHeaders(reqHeaders, self.autoInstrument.networkRequestHeaders)\n }\n }\n\n if (self.autoInstrument.networkRequestBody) {\n if (args[1] && args[1].body) {\n metadata.request = args[1].body;\n } else if (args[0] && !_.isType(args[0], 'string') && args[0].body) {\n metadata.request = args[0].body;\n }\n }\n self.captureNetwork(metadata, 'fetch', undefined);\n if (self.trackHttpErrors()) {\n metadata.stack = (new Error()).stack;\n }\n\n // Start our handler before returning the promise. This allows resp.clone()\n // to execute before other handlers touch the response.\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n metadata.response_content_type = resp.headers.get('Content-Type');\n var headers = null;\n if (self.autoInstrument.networkResponseHeaders) {\n headers = self.fetchHeaders(resp.headers, self.autoInstrument.networkResponseHeaders);\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n if (typeof resp.text === 'function') { // Response.text() is not implemented on some platforms\n // The response must be cloned to prevent reading (and locking) the original stream.\n // This must be done before other handlers touch the response.\n body = resp.clone().text(); //returns a Promise\n }\n }\n if (headers || body) {\n metadata.response = {};\n if (body) {\n // Test to ensure body is a Promise, which it should always be.\n if (typeof body.then === 'function') {\n body.then(function (text) {\n if (text && self.isJsonContentType(metadata.response_content_type)) {\n metadata.response.body = self.scrubJson(text);\n } else {\n metadata.response.body = text;\n }\n });\n } else {\n metadata.response.body = body;\n }\n }\n if (headers) {\n metadata.response.headers = headers;\n }\n }\n self.errorOnHttpStatus(metadata);\n return resp;\n });\n };\n }, this.replacements, 'network');\n }\n};\n\nInstrumenter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID) {\n if (metadata.request && this.isJsonContentType(metadata.request_content_type)) {\n metadata.request = this.scrubJson(metadata.request);\n }\n return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);\n};\n\nInstrumenter.prototype.isJsonContentType = function(contentType) {\n return (contentType && _.isType(contentType, 'string') && contentType.toLowerCase().includes('json')) ? true : false;\n}\n\nInstrumenter.prototype.scrubJson = function(json) {\n return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));\n}\n\nInstrumenter.prototype.fetchHeaders = function(inHeaders, headersConfig) {\n var outHeaders = {};\n try {\n var i;\n if (headersConfig === true) {\n if (typeof inHeaders.entries === 'function') { // Headers.entries() is not implemented in IE\n var allHeaders = inHeaders.entries();\n var currentHeader = allHeaders.next();\n while (!currentHeader.done) {\n outHeaders[currentHeader.value[0]] = currentHeader.value[1];\n currentHeader = allHeaders.next();\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n var header = headersConfig[i];\n outHeaders[header] = inHeaders.get(header);\n }\n }\n } catch (e) {\n /* ignore probable IE errors */\n }\n return outHeaders;\n}\n\nInstrumenter.prototype.trackHttpErrors = function() {\n return this.autoInstrument.networkErrorOnHttp5xx ||\n this.autoInstrument.networkErrorOnHttp4xx ||\n this.autoInstrument.networkErrorOnHttp0;\n}\n\nInstrumenter.prototype.errorOnHttpStatus = function(metadata) {\n var status = metadata.status_code;\n\n if ((status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||\n (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||\n (status === 0 && this.autoInstrument.networkErrorOnHttp0)) {\n var error = new Error('HTTP request failed with Status ' + status);\n error.stack = metadata.stack;\n this.rollbar.error(error, { skipFrames: 1 });\n }\n}\n\nInstrumenter.prototype.deinstrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n var b;\n while (this.replacements['log'].length) {\n b = this.replacements['log'].shift();\n this._window.console[b[0]] = b[1];\n }\n};\n\nInstrumenter.prototype.instrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n\n var self = this;\n var c = this._window.console;\n\n function wrapConsole(method) {\n 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778\n\n var orig = c[method];\n var origConsole = c;\n var level = method === 'warn' ? 'warning' : method;\n c[method] = function() {\n var args = Array.prototype.slice.call(arguments);\n var message = _.formatArgsAsString(args);\n self.telemeter.captureLog(message, level);\n if (orig) {\n Function.prototype.apply.call(orig, origConsole, args);\n }\n };\n self.replacements['log'].push([method, orig]);\n }\n var methods = ['debug','info','warn','error','log'];\n try {\n for (var i=0, len=methods.length; i < len; i++) {\n wrapConsole(methods[i]);\n }\n } catch (e) {\n this.diagnostic.instrumentConsole = { error: e.message };\n }\n};\n\nInstrumenter.prototype.deinstrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n this.removeListeners('dom');\n};\n\nInstrumenter.prototype.instrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n var clickHandler = this.handleClick.bind(this);\n var blurHandler = this.handleBlur.bind(this);\n this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);\n this.addListener('dom', this._window, 'blur', 'onfocusout', blurHandler, true);\n};\n\nInstrumenter.prototype.handleClick = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n var hasTag = e && e.tagName;\n var anchorOrButton = domUtil.isDescribedElement(e, 'a') || domUtil.isDescribedElement(e, 'button');\n if (hasTag && (anchorOrButton || domUtil.isDescribedElement(e, 'input', ['button', 'submit']))) {\n this.captureDomEvent('click', e);\n } else if (domUtil.isDescribedElement(e, 'input', ['checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value, e.checked);\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleBlur = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n if (e && e.tagName) {\n if (domUtil.isDescribedElement(e, 'textarea')) {\n this.captureDomEvent('input', e, e.value);\n } else if (domUtil.isDescribedElement(e, 'select') && e.options && e.options.length) {\n this.handleSelectInputChanged(e);\n } else if (domUtil.isDescribedElement(e, 'input') && !domUtil.isDescribedElement(e, 'input', ['button', 'submit', 'hidden', 'checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value);\n }\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleSelectInputChanged = function(elem) {\n if (elem.multiple) {\n for (var i = 0; i < elem.options.length; i++) {\n if (elem.options[i].selected) {\n this.captureDomEvent('input', elem, elem.options[i].value);\n }\n }\n } else if (elem.selectedIndex >= 0 && elem.options[elem.selectedIndex]) {\n this.captureDomEvent('input', elem, elem.options[elem.selectedIndex].value);\n }\n};\n\nInstrumenter.prototype.captureDomEvent = function(subtype, element, value, isChecked) {\n if (value !== undefined) {\n if (this.scrubTelemetryInputs || (domUtil.getElementType(element) === 'password')) {\n value = '[scrubbed]';\n } else {\n var description = domUtil.describeElement(element);\n if (this.telemetryScrubber) {\n if (this.telemetryScrubber(description)) {\n value = '[scrubbed]';\n }\n } else if (this.defaultValueScrubber(description)) {\n value = '[scrubbed]';\n }\n }\n }\n var elementString = domUtil.elementArrayToString(domUtil.treeToArray(element));\n this.telemeter.captureDom(subtype, elementString, value, isChecked);\n};\n\nInstrumenter.prototype.deinstrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n restore(this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.instrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n var self = this;\n replace(this._window, 'onpopstate', function(orig) {\n return function() {\n var current = self._location.href;\n self.handleUrlChange(self._lastHref, current);\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n }, this.replacements, 'navigation');\n\n replace(this._window.history, 'pushState', function(orig) {\n return function() {\n var url = arguments.length > 2 ? arguments[2] : undefined;\n if (url) {\n self.handleUrlChange(self._lastHref, url + '');\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.handleUrlChange = function(from, to) {\n var parsedHref = urlparser.parse(this._location.href);\n var parsedTo = urlparser.parse(to);\n var parsedFrom = urlparser.parse(from);\n this._lastHref = to;\n if (parsedHref.protocol === parsedTo.protocol && parsedHref.host === parsedTo.host) {\n to = parsedTo.path + (parsedTo.hash || '');\n }\n if (parsedHref.protocol === parsedFrom.protocol && parsedHref.host === parsedFrom.host) {\n from = parsedFrom.path + (parsedFrom.hash || '');\n }\n this.telemeter.captureNavigation(from, to);\n};\n\nInstrumenter.prototype.deinstrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.removeListeners('connectivity');\n } else {\n restore(this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.instrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.addListener('connectivity', this._window, 'online', undefined, function() {\n this.telemeter.captureConnectivityChange('online');\n }.bind(this), true);\n this.addListener('connectivity', this._window, 'offline', undefined, function() {\n this.telemeter.captureConnectivityChange('offline');\n }.bind(this), true);\n } else {\n var self = this;\n replace(this._document.body, 'ononline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('online');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n replace(this._document.body, 'onoffline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('offline');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.handleCspEvent = function(cspEvent) {\n var message = 'Security Policy Violation: ' +\n 'blockedURI: ' + cspEvent.blockedURI + ', ' +\n 'violatedDirective: ' + cspEvent.violatedDirective + ', ' +\n 'effectiveDirective: ' + cspEvent.effectiveDirective + ', ';\n\n if (cspEvent.sourceFile) {\n message += 'location: ' + cspEvent.sourceFile + ', ' +\n 'line: ' + cspEvent.lineNumber + ', ' +\n 'col: ' + cspEvent.columnNumber + ', ';\n }\n\n message += 'originalPolicy: ' + cspEvent.originalPolicy;\n\n this.telemeter.captureLog(message, 'error');\n this.handleCspError(message);\n}\n\nInstrumenter.prototype.handleCspError = function(message) {\n if (this.autoInstrument.errorOnContentSecurityPolicy) {\n this.rollbar.error(message);\n }\n}\n\nInstrumenter.prototype.deinstrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._document)) { return; }\n\n this.removeListeners('contentsecuritypolicy');\n};\n\nInstrumenter.prototype.instrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._document)) { return; }\n\n var cspHandler = this.handleCspEvent.bind(this);\n this.addListener('contentsecuritypolicy', this._document, 'securitypolicyviolation', null, cspHandler, false);\n};\n\nInstrumenter.prototype.addListener = function(section, obj, type, altType, handler, capture) {\n if (obj.addEventListener) {\n obj.addEventListener(type, handler, capture);\n this.eventRemovers[section].push(function() {\n obj.removeEventListener(type, handler, capture);\n });\n } else if (altType) {\n obj.attachEvent(altType, handler);\n this.eventRemovers[section].push(function() {\n obj.detachEvent(altType, handler);\n });\n }\n};\n\nInstrumenter.prototype.removeListeners = function(section) {\n var r;\n while (this.eventRemovers[section].length) {\n r = this.eventRemovers[section].shift();\n r();\n }\n};\n\nfunction _isUrlObject(input) {\n return typeof URL !== 'undefined' && input instanceof URL\n}\n\nmodule.exports = Instrumenter;\n","'use strict';\n\n/*\n * headers - Detect when fetch Headers are undefined and use a partial polyfill.\n *\n * A full polyfill is not used in order to keep package size as small as possible.\n * Since this is only used internally and is not added to the window object,\n * the full interface doesn't need to be supported.\n *\n * This implementation is modified from whatwg-fetch:\n * https://github.com/github/fetch\n */\nfunction headers(headers) {\n if (typeof Headers === 'undefined') {\n return new FetchHeaders(headers);\n }\n\n return new Headers(headers);\n}\n\nfunction normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name)\n }\n return name.toLowerCase()\n}\n\nfunction normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value)\n }\n return value\n}\n\nfunction iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n return iterator\n}\n\nfunction FetchHeaders(headers) {\n this.map = {}\n\n if (headers instanceof FetchHeaders) {\n headers.forEach(function(value, name) {\n this.append(name, value)\n }, this)\n } else if (Array.isArray(headers)) {\n headers.forEach(function(header) {\n this.append(header[0], header[1])\n }, this)\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function(name) {\n this.append(name, headers[name])\n }, this)\n }\n}\n\nFetchHeaders.prototype.append = function(name, value) {\n name = normalizeName(name)\n value = normalizeValue(value)\n var oldValue = this.map[name]\n this.map[name] = oldValue ? oldValue + ', ' + value : value\n}\n\nFetchHeaders.prototype.get = function(name) {\n name = normalizeName(name)\n return this.has(name) ? this.map[name] : null\n}\n\nFetchHeaders.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n}\n\nFetchHeaders.prototype.forEach = function(callback, thisArg) {\n for (var name in this.map) {\n if (this.map.hasOwnProperty(name)) {\n callback.call(thisArg, this.map[name], name, this)\n }\n }\n}\n\nFetchHeaders.prototype.entries = function() {\n var items = []\n this.forEach(function(value, name) {\n items.push([name, value])\n })\n return iteratorFor(items)\n}\n\nmodule.exports = headers;\n","'use strict';\n\nfunction getElementType(e) {\n return (e.getAttribute('type') || '').toLowerCase();\n}\n\nfunction isDescribedElement(element, type, subtypes) {\n if (element.tagName.toLowerCase() !== type.toLowerCase()) {\n return false;\n }\n if (!subtypes) {\n return true;\n }\n element = getElementType(element);\n for (var i = 0; i < subtypes.length; i++) {\n if (subtypes[i] === element) {\n return true;\n }\n }\n return false;\n}\n\nfunction getElementFromEvent(evt, doc) {\n if (evt.target) {\n return evt.target;\n }\n if (doc && doc.elementFromPoint) {\n return doc.elementFromPoint(evt.clientX, evt.clientY);\n }\n return undefined;\n}\n\nfunction treeToArray(elem) {\n var MAX_HEIGHT = 5;\n var out = [];\n var nextDescription;\n for (var height = 0; elem && height < MAX_HEIGHT; height++) {\n nextDescription = describeElement(elem);\n if (nextDescription.tagName === 'html') {\n break;\n }\n out.unshift(nextDescription);\n elem = elem.parentNode;\n }\n return out;\n}\n\nfunction elementArrayToString(a) {\n var MAX_LENGTH = 80;\n var separator = ' > ', separatorLength = separator.length;\n var out = [], len = 0, nextStr, totalLength;\n\n for (var i = a.length - 1; i >= 0; i--) {\n nextStr = descriptionToString(a[i]);\n totalLength = len + (out.length * separatorLength) + nextStr.length;\n if (i < a.length - 1 && totalLength >= MAX_LENGTH + 3) {\n out.unshift('...');\n break;\n }\n out.unshift(nextStr);\n len += nextStr.length;\n }\n return out.join(separator);\n}\n\nfunction descriptionToString(desc) {\n if (!desc || !desc.tagName) {\n return '';\n }\n var out = [desc.tagName];\n if (desc.id) {\n out.push('#' + desc.id);\n }\n if (desc.classes) {\n out.push('.' + desc.classes.join('.'));\n }\n for (var i = 0; i < desc.attributes.length; i++) {\n out.push('[' + desc.attributes[i].key + '=\"' + desc.attributes[i].value + '\"]');\n }\n\n return out.join('');\n}\n\n/**\n * Input: a dom element\n * Output: null if tagName is falsey or input is falsey, else\n * {\n * tagName: String,\n * id: String | undefined,\n * classes: [String] | undefined,\n * attributes: [\n * {\n * key: OneOf(type, name, title, alt),\n * value: String\n * }\n * ]\n * }\n */\nfunction describeElement(elem) {\n if (!elem || !elem.tagName) {\n return null;\n }\n var out = {}, className, key, attr, i;\n out.tagName = elem.tagName.toLowerCase();\n if (elem.id) {\n out.id = elem.id;\n }\n className = elem.className;\n if (className && (typeof className === 'string')) {\n out.classes = className.split(/\\s+/);\n }\n var attributes = ['type', 'name', 'title', 'alt'];\n out.attributes = [];\n for (i = 0; i < attributes.length; i++) {\n key = attributes[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.attributes.push({key: key, value: attr});\n }\n }\n return out;\n}\n\nmodule.exports = {\n describeElement: describeElement,\n descriptionToString: descriptionToString,\n elementArrayToString: elementArrayToString,\n treeToArray: treeToArray,\n getElementFromEvent: getElementFromEvent,\n isDescribedElement: isDescribedElement,\n getElementType: getElementType\n};\n","'use strict';\n\nvar polyfillJSON = require('../../vendor/JSON-js/json3');\n\nmodule.exports = polyfillJSON;\n","// json3.js\n// 2017-02-21\n// Public Domain.\n// NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.\n// See http://www.JSON.org/js.html\n// This code should be minified before deployment.\n// See http://javascript.crockford.com/jsmin.html\n\n// USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO\n// NOT CONTROL.\n\n// This file creates a global JSON object containing two methods: stringify\n// and parse. This file provides the ES5 JSON capability to ES3 systems.\n// If a project might run on IE8 or earlier, then this file should be included.\n// This file does nothing on ES5 systems.\n\n// JSON.stringify(value, replacer, space)\n// value any JavaScript value, usually an object or array.\n// replacer an optional parameter that determines how object\n// values are stringified for objects. It can be a\n// function or an array of strings.\n// space an optional parameter that specifies the indentation\n// of nested structures. If it is omitted, the text will\n// be packed without extra whitespace. If it is a number,\n// it will specify the number of spaces to indent at each\n// level. If it is a string (such as \"\\t\" or \" \"),\n// it contains the characters used to indent at each level.\n// This method produces a JSON text from a JavaScript value.\n// When an object value is found, if the object contains a toJSON\n// method, its toJSON method will be called and the result will be\n// stringified. A toJSON method does not serialize: it returns the\n// value represented by the name/value pair that should be serialized,\n// or undefined if nothing should be serialized. The toJSON method\n// will be passed the key associated with the value, and this will be\n// bound to the value.\n\n// For example, this would serialize Dates as ISO strings.\n\n// Date.prototype.toJSON = function (key) {\n// function f(n) {\n// // Format integers to have at least two digits.\n// return (n < 10)\n// ? \"0\" + n\n// : n;\n// }\n// return this.getUTCFullYear() + \"-\" +\n// f(this.getUTCMonth() + 1) + \"-\" +\n// f(this.getUTCDate()) + \"T\" +\n// f(this.getUTCHours()) + \":\" +\n// f(this.getUTCMinutes()) + \":\" +\n// f(this.getUTCSeconds()) + \"Z\";\n// };\n\n// You can provide an optional replacer method. It will be passed the\n// key and value of each member, with this bound to the containing\n// object. The value that is returned from your method will be\n// serialized. If your method returns undefined, then the member will\n// be excluded from the serialization.\n\n// If the replacer parameter is an array of strings, then it will be\n// used to select the members to be serialized. It filters the results\n// such that only members with keys listed in the replacer array are\n// stringified.\n\n// Values that do not have JSON representations, such as undefined or\n// functions, will not be serialized. Such values in objects will be\n// dropped; in arrays they will be replaced with null. You can use\n// a replacer function to replace those with JSON values.\n\n// JSON.stringify(undefined) returns undefined.\n\n// The optional space parameter produces a stringification of the\n// value that is filled with line breaks and indentation to make it\n// easier to read.\n\n// If the space parameter is a non-empty string, then that string will\n// be used for indentation. If the space parameter is a number, then\n// the indentation will be that many spaces.\n\n// Example:\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}]);\n// // text is '[\"e\",{\"pluribus\":\"unum\"}]'\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}], null, \"\\t\");\n// // text is '[\\n\\t\"e\",\\n\\t{\\n\\t\\t\"pluribus\": \"unum\"\\n\\t}\\n]'\n\n// text = JSON.stringify([new Date()], function (key, value) {\n// return this[key] instanceof Date\n// ? \"Date(\" + this[key] + \")\"\n// : value;\n// });\n// // text is '[\"Date(---current time---)\"]'\n\n// JSON.parse(text, reviver)\n// This method parses a JSON text to produce an object or array.\n// It can throw a SyntaxError exception.\n// This has been modified to use JSON-js/json_parse_state.js as the\n// parser instead of the one built around eval found in JSON-js/json2.js\n\n// The optional reviver parameter is a function that can filter and\n// transform the results. It receives each of the keys and values,\n// and its return value is used instead of the original value.\n// If it returns what it received, then the structure is not modified.\n// If it returns undefined then the member is deleted.\n\n// Example:\n\n// // Parse the text. Values that look like ISO date strings will\n// // be converted to Date objects.\n\n// myData = JSON.parse(text, function (key, value) {\n// var a;\n// if (typeof value === \"string\") {\n// a =\n// /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2}(?:\\.\\d*)?)Z$/.exec(value);\n// if (a) {\n// return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],\n// +a[5], +a[6]));\n// }\n// }\n// return value;\n// });\n\n// myData = JSON.parse('[\"Date(09/09/2001)\"]', function (key, value) {\n// var d;\n// if (typeof value === \"string\" &&\n// value.slice(0, 5) === \"Date(\" &&\n// value.slice(-1) === \")\") {\n// d = new Date(value.slice(5, -1));\n// if (d) {\n// return d;\n// }\n// }\n// return value;\n// });\n\n// This is a reference implementation. You are free to copy, modify, or\n// redistribute.\n\n/*jslint\n for, this\n */\n\n/*property\n JSON, apply, call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,\n getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,\n lastIndex, length, parse, prototype, push, replace, slice, stringify,\n test, toJSON, toString, valueOf\n */\n\nvar setupCustomJSON = function(JSON) {\n\n var rx_one = /^[\\],:{}\\s]*$/;\n var rx_two = /\\\\(?:[\"\\\\\\/bfnrt]|u[0-9a-fA-F]{4})/g;\n var rx_three = /\"[^\"\\\\\\n\\r]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g;\n var rx_four = /(?:^|:|,)(?:\\s*\\[)+/g;\n var rx_escapable = /[\\\\\"\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n var rx_dangerous = /[\\u0000\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n\n function f(n) {\n // Format integers to have at least two digits.\n return n < 10\n ? \"0\" + n\n : n;\n }\n\n function this_value() {\n return this.valueOf();\n }\n\n if (typeof Date.prototype.toJSON !== \"function\") {\n\n Date.prototype.toJSON = function () {\n\n return isFinite(this.valueOf())\n ? this.getUTCFullYear() + \"-\" +\n f(this.getUTCMonth() + 1) + \"-\" +\n f(this.getUTCDate()) + \"T\" +\n f(this.getUTCHours()) + \":\" +\n f(this.getUTCMinutes()) + \":\" +\n f(this.getUTCSeconds()) + \"Z\"\n : null;\n };\n\n Boolean.prototype.toJSON = this_value;\n Number.prototype.toJSON = this_value;\n String.prototype.toJSON = this_value;\n }\n\n var gap;\n var indent;\n var meta;\n var rep;\n\n\n function quote(string) {\n\n // If the string contains no control characters, no quote characters, and no\n // backslash characters, then we can safely slap some quotes around it.\n // Otherwise we must also replace the offending characters with safe escape\n // sequences.\n\n rx_escapable.lastIndex = 0;\n return rx_escapable.test(string)\n ? \"\\\"\" + string.replace(rx_escapable, function (a) {\n var c = meta[a];\n return typeof c === \"string\"\n ? c\n : \"\\\\u\" + (\"0000\" + a.charCodeAt(0).toString(16)).slice(-4);\n }) + \"\\\"\"\n : \"\\\"\" + string + \"\\\"\";\n }\n\n\n function str(key, holder) {\n\n // Produce a string from holder[key].\n\n var i; // The loop counter.\n var k; // The member key.\n var v; // The member value.\n var length;\n var mind = gap;\n var partial;\n var value = holder[key];\n\n // If the value has a toJSON method, call it to obtain a replacement value.\n\n if (value && typeof value === \"object\" &&\n typeof value.toJSON === \"function\") {\n value = value.toJSON(key);\n }\n\n // If we were called with a replacer function, then call the replacer to\n // obtain a replacement value.\n\n if (typeof rep === \"function\") {\n value = rep.call(holder, key, value);\n }\n\n // What happens next depends on the value's type.\n\n switch (typeof value) {\n case \"string\":\n return quote(value);\n\n case \"number\":\n\n // JSON numbers must be finite. Encode non-finite numbers as null.\n\n return isFinite(value)\n ? String(value)\n : \"null\";\n\n case \"boolean\":\n case \"null\":\n\n // If the value is a boolean or null, convert it to a string. Note:\n // typeof null does not produce \"null\". The case is included here in\n // the remote chance that this gets fixed someday.\n\n return String(value);\n\n // If the type is \"object\", we might be dealing with an object or an array or\n // null.\n\n case \"object\":\n\n // Due to a specification blunder in ECMAScript, typeof null is \"object\",\n // so watch out for that case.\n\n if (!value) {\n return \"null\";\n }\n\n // Make an array to hold the partial results of stringifying this object value.\n\n gap += indent;\n partial = [];\n\n // Is the value an array?\n\n if (Object.prototype.toString.apply(value) === \"[object Array]\") {\n\n // The value is an array. Stringify every element. Use null as a placeholder\n // for non-JSON values.\n\n length = value.length;\n for (i = 0; i < length; i += 1) {\n partial[i] = str(i, value) || \"null\";\n }\n\n // Join all of the elements together, separated with commas, and wrap them in\n // brackets.\n\n v = partial.length === 0\n ? \"[]\"\n : gap\n ? \"[\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"]\"\n : \"[\" + partial.join(\",\") + \"]\";\n gap = mind;\n return v;\n }\n\n // If the replacer is an array, use it to select the members to be stringified.\n\n if (rep && typeof rep === \"object\") {\n length = rep.length;\n for (i = 0; i < length; i += 1) {\n if (typeof rep[i] === \"string\") {\n k = rep[i];\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n } else {\n\n // Otherwise, iterate through all of the keys in the object.\n\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(value, k)) {\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n }\n\n // Join all of the member texts together, separated with commas,\n // and wrap them in braces.\n\n v = partial.length === 0\n ? \"{}\"\n : gap\n ? \"{\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"}\"\n : \"{\" + partial.join(\",\") + \"}\";\n gap = mind;\n return v;\n }\n }\n\n // If the JSON object does not yet have a stringify method, give it one.\n\n if (typeof JSON.stringify !== \"function\") {\n meta = { // table of character substitutions\n \"\\b\": \"\\\\b\",\n \"\\t\": \"\\\\t\",\n \"\\n\": \"\\\\n\",\n \"\\f\": \"\\\\f\",\n \"\\r\": \"\\\\r\",\n \"\\\"\": \"\\\\\\\"\",\n \"\\\\\": \"\\\\\\\\\"\n };\n JSON.stringify = function (value, replacer, space) {\n\n // The stringify method takes a value and an optional replacer, and an optional\n // space parameter, and returns a JSON text. The replacer can be a function\n // that can replace values, or an array of strings that will select the keys.\n // A default replacer method can be provided. Use of the space parameter can\n // produce text that is more easily readable.\n\n var i;\n gap = \"\";\n indent = \"\";\n\n // If the space parameter is a number, make an indent string containing that\n // many spaces.\n\n if (typeof space === \"number\") {\n for (i = 0; i < space; i += 1) {\n indent += \" \";\n }\n\n // If the space parameter is a string, it will be used as the indent string.\n\n } else if (typeof space === \"string\") {\n indent = space;\n }\n\n // If there is a replacer, it must be a function or an array.\n // Otherwise, throw an error.\n\n rep = replacer;\n if (replacer && typeof replacer !== \"function\" &&\n (typeof replacer !== \"object\" ||\n typeof replacer.length !== \"number\")) {\n throw new Error(\"JSON.stringify\");\n }\n\n // Make a fake root object containing our value under the key of \"\".\n // Return the result of stringifying the value.\n\n return str(\"\", {\"\": value});\n };\n }\n\n\n // If the JSON object does not yet have a parse method, give it one.\n\n if (typeof JSON.parse !== \"function\") {\n JSON.parse = (function () {\n\n // This function creates a JSON parse function that uses a state machine rather\n // than the dangerous eval function to parse a JSON text.\n\n var state; // The state of the parser, one of\n // 'go' The starting state\n // 'ok' The final, accepting state\n // 'firstokey' Ready for the first key of the object or\n // the closing of an empty object\n // 'okey' Ready for the next key of the object\n // 'colon' Ready for the colon\n // 'ovalue' Ready for the value half of a key/value pair\n // 'ocomma' Ready for a comma or closing }\n // 'firstavalue' Ready for the first value of an array or\n // an empty array\n // 'avalue' Ready for the next value of an array\n // 'acomma' Ready for a comma or closing ]\n var stack; // The stack, for controlling nesting.\n var container; // The current container object or array\n var key; // The current key\n var value; // The current value\n var escapes = { // Escapement translation table\n \"\\\\\": \"\\\\\",\n \"\\\"\": \"\\\"\",\n \"/\": \"/\",\n \"t\": \"\\t\",\n \"n\": \"\\n\",\n \"r\": \"\\r\",\n \"f\": \"\\f\",\n \"b\": \"\\b\"\n };\n var string = { // The actions for string tokens\n go: function () {\n state = \"ok\";\n },\n firstokey: function () {\n key = value;\n state = \"colon\";\n },\n okey: function () {\n key = value;\n state = \"colon\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var number = { // The actions for number tokens\n go: function () {\n state = \"ok\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var action = {\n\n // The action table describes the behavior of the machine. It contains an\n // object for each token. Each object contains a method that is called when\n // a token is matched in a state. An object will lack a method for illegal\n // states.\n\n \"{\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = {};\n state = \"firstokey\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = {};\n state = \"firstokey\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n }\n },\n \"}\": {\n firstokey: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n ocomma: function () {\n var pop = stack.pop();\n container[key] = value;\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \"[\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = [];\n state = \"firstavalue\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = [];\n state = \"firstavalue\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n }\n },\n \"]\": {\n firstavalue: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n acomma: function () {\n var pop = stack.pop();\n container.push(value);\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \":\": {\n colon: function () {\n if (Object.hasOwnProperty.call(container, key)) {\n throw new SyntaxError(\"Duplicate key '\" + key + \"\\\"\");\n }\n state = \"ovalue\";\n }\n },\n \",\": {\n ocomma: function () {\n container[key] = value;\n state = \"okey\";\n },\n acomma: function () {\n container.push(value);\n state = \"avalue\";\n }\n },\n \"true\": {\n go: function () {\n value = true;\n state = \"ok\";\n },\n ovalue: function () {\n value = true;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = true;\n state = \"acomma\";\n },\n avalue: function () {\n value = true;\n state = \"acomma\";\n }\n },\n \"false\": {\n go: function () {\n value = false;\n state = \"ok\";\n },\n ovalue: function () {\n value = false;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = false;\n state = \"acomma\";\n },\n avalue: function () {\n value = false;\n state = \"acomma\";\n }\n },\n \"null\": {\n go: function () {\n value = null;\n state = \"ok\";\n },\n ovalue: function () {\n value = null;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = null;\n state = \"acomma\";\n },\n avalue: function () {\n value = null;\n state = \"acomma\";\n }\n }\n };\n\n function debackslashify(text) {\n\n // Remove and replace any backslash escapement.\n\n return text.replace(/\\\\(?:u(.{4})|([^u]))/g, function (ignore, b, c) {\n return b\n ? String.fromCharCode(parseInt(b, 16))\n : escapes[c];\n });\n }\n\n return function (source, reviver) {\n\n // A regular expression is used to extract tokens from the JSON text.\n // The extraction process is cautious.\n\n var result;\n var tx = /^[\\u0020\\t\\n\\r]*(?:([,:\\[\\]{}]|true|false|null)|(-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?)|\"((?:[^\\r\\n\\t\\\\\\\"]|\\\\(?:[\"\\\\\\/trnfb]|u[0-9a-fA-F]{4}))*)\")/;\n\n // Set the starting state.\n\n state = \"go\";\n\n // The stack records the container, key, and state for each object or array\n // that contains another object or array while processing nested structures.\n\n stack = [];\n\n // If any error occurs, we will catch it and ultimately throw a syntax error.\n\n try {\n\n // For each token...\n\n while (true) {\n result = tx.exec(source);\n if (!result) {\n break;\n }\n\n // result is the result array from matching the tokenizing regular expression.\n // result[0] contains everything that matched, including any initial whitespace.\n // result[1] contains any punctuation that was matched, or true, false, or null.\n // result[2] contains a matched number, still in string form.\n // result[3] contains a matched string, without quotes but with escapement.\n\n if (result[1]) {\n\n // Token: Execute the action for this state and token.\n\n action[result[1]][state]();\n\n } else if (result[2]) {\n\n // Number token: Convert the number string into a number value and execute\n // the action for this state and number.\n\n value = +result[2];\n number[state]();\n } else {\n\n // String token: Replace the escapement sequences and execute the action for\n // this state and string.\n\n value = debackslashify(result[3]);\n string[state]();\n }\n\n // Remove the token from the string. The loop will continue as long as there\n // are tokens. This is a slow process, but it allows the use of ^ matching,\n // which assures that no illegal tokens slip through.\n\n source = source.slice(result[0].length);\n }\n\n // If we find a state/token combination that is illegal, then the action will\n // cause an error. We handle the error by simply changing the state.\n\n } catch (e) {\n state = e;\n }\n\n // The parsing is finished. If we are not in the final \"ok\" state, or if the\n // remaining source contains anything except whitespace, then we did not have\n //a well-formed JSON text.\n\n if (state !== \"ok\" || (/[^\\u0020\\t\\n\\r]/.test(source))) {\n throw (state instanceof SyntaxError)\n ? state\n : new SyntaxError(\"JSON\");\n }\n\n // If there is a reviver function, we recursively walk the new structure,\n // passing each name/value pair to the reviver function for possible\n // transformation, starting with a temporary root object that holds the current\n // value in an empty key. If there is not a reviver function, we simply return\n // that value.\n\n return (typeof reviver === \"function\")\n ? (function walk(holder, key) {\n var k;\n var v;\n var val = holder[key];\n if (val && typeof val === \"object\") {\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(val, k)) {\n v = walk(val, k);\n if (v !== undefined) {\n val[k] = v;\n } else {\n delete val[k];\n }\n }\n }\n }\n return reviver.call(holder, key, val);\n }({\"\": value}, \"\"))\n : value;\n };\n }());\n }\n}\n\nmodule.exports = setupCustomJSON;\n","'use strict';\n\nfunction wrapGlobals(window, handler, shim) {\n if (!window) { return; }\n // Adapted from https://github.com/bugsnag/bugsnag-js\n var globals = 'EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload'.split(',');\n var i, global;\n for (i = 0; i < globals.length; ++i) {\n global = globals[i];\n\n if (window[global] && window[global].prototype) {\n _extendListenerPrototype(handler, window[global].prototype, shim);\n }\n }\n}\n\nfunction _extendListenerPrototype(handler, prototype, shim) {\n if (prototype.hasOwnProperty && prototype.hasOwnProperty('addEventListener')) {\n var oldAddEventListener = prototype.addEventListener;\n while (oldAddEventListener._rollbarOldAdd && oldAddEventListener.belongsToShim) {\n oldAddEventListener = oldAddEventListener._rollbarOldAdd;\n }\n var addFn = function(event, callback, bubble) {\n oldAddEventListener.call(this, event, handler.wrap(callback), bubble);\n };\n addFn._rollbarOldAdd = oldAddEventListener;\n addFn.belongsToShim = shim;\n prototype.addEventListener = addFn;\n\n var oldRemoveEventListener = prototype.removeEventListener;\n while (oldRemoveEventListener._rollbarOldRemove && oldRemoveEventListener.belongsToShim) {\n oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;\n }\n var removeFn = function(event, callback, bubble) {\n oldRemoveEventListener.call(this, event, callback && callback._rollbar_wrapped || callback, bubble);\n };\n removeFn._rollbarOldRemove = oldRemoveEventListener;\n removeFn.belongsToShim = shim;\n prototype.removeEventListener = removeFn;\n }\n}\n\nmodule.exports = wrapGlobals;\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction raw(payload, jsonBackup) {\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction selectFrames(frames, range) {\n var len = frames.length;\n if (len > range * 2) {\n return frames.slice(0, range).concat(frames.slice(len - range));\n }\n return frames;\n}\n\nfunction truncateFrames(payload, jsonBackup, range) {\n range = (typeof range === 'undefined') ? 30 : range;\n var body = payload.data.body;\n var frames;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n frames = chain[i].frames;\n frames = selectFrames(frames, range);\n chain[i].frames = frames;\n }\n } else if (body.trace) {\n frames = body.trace.frames;\n frames = selectFrames(frames, range);\n body.trace.frames = frames;\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction maybeTruncateValue(len, val) {\n if (!val) {\n return val;\n }\n if (val.length > len) {\n return val.slice(0, len - 3).concat('...');\n }\n return val;\n}\n\nfunction truncateStrings(len, payload, jsonBackup) {\n function truncator(k, v, seen) {\n switch (_.typeName(v)) {\n case 'string':\n return maybeTruncateValue(len, v);\n case 'object':\n case 'array':\n return traverse(v, truncator, seen);\n default:\n return v;\n }\n }\n payload = traverse(payload, truncator);\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction truncateTraceData(traceData) {\n if (traceData.exception) {\n delete traceData.exception.description;\n traceData.exception.message = maybeTruncateValue(255, traceData.exception.message);\n }\n traceData.frames = selectFrames(traceData.frames, 1);\n return traceData;\n}\n\nfunction minBody(payload, jsonBackup) {\n var body = payload.data.body;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n chain[i] = truncateTraceData(chain[i]);\n }\n } else if (body.trace) {\n body.trace = truncateTraceData(body.trace);\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction needsTruncation(payload, maxSize) {\n return _.maxByteSize(payload) > maxSize;\n}\n\nfunction truncate(payload, jsonBackup, maxSize) {\n maxSize = (typeof maxSize === 'undefined') ? (512 * 1024) : maxSize;\n var strategies = [\n raw,\n truncateFrames,\n truncateStrings.bind(null, 1024),\n truncateStrings.bind(null, 512),\n truncateStrings.bind(null, 256),\n minBody\n ];\n var strategy, results, result;\n\n while ((strategy = strategies.shift())) {\n results = strategy(payload, jsonBackup);\n payload = results[0];\n result = results[1];\n if (result.error || !needsTruncation(result.value, maxSize)) {\n return result;\n }\n }\n return result;\n}\n\nmodule.exports = {\n truncate: truncate,\n\n /* for testing */\n raw: raw,\n truncateFrames: truncateFrames,\n truncateStrings: truncateStrings,\n maybeTruncateValue: maybeTruncateValue\n};\n"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/rollbar.named-amd.min.js b/dist/rollbar.named-amd.min.js index 39af01e49..0978c09bb 100644 --- a/dist/rollbar.named-amd.min.js +++ b/dist/rollbar.named-amd.min.js @@ -1,2 +1 @@ -define("rollbar",[],(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=6)}([function(t,e,r){"use strict";var n=r(12),o={};function i(t,e){return e===s(t)}function s(t){var e=typeof t;return"object"!==e?e:t?t instanceof Error?"error":{}.toString.call(t).match(/\s([a-zA-Z]+)/)[1].toLowerCase():"null"}function a(t){return i(t,"function")}function u(t){var e=Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?"),r=RegExp("^"+e+"$");return c(t)&&r.test(t)}function c(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function l(){var t=y();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var r=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?r:7&r|8).toString(16)}))}var p={strictMode:!1,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};function f(t,e){var r,n;try{r=o.stringify(t)}catch(o){if(e&&a(e))try{r=e(t)}catch(t){n=t}else n=o}return{error:n,value:r}}function h(t,e){return function(r,n){try{e(r,n)}catch(e){t.error(e)}}}function d(t){return function t(e,r){var n,o,a,u={};try{for(o in e)(n=e[o])&&(i(n,"object")||i(n,"array"))?r.includes(n)?u[o]="Removed circular reference: "+s(n):((a=r.slice()).push(n),u[o]=t(n,a)):u[o]=n}catch(t){u="Failed cloning custom data: "+t.message}return u}(t,[t])}var m=["log","network","dom","navigation","error","manual"],g=["critical","error","warning","info","debug"];function v(t,e){for(var r=0;ra)?(s=e.path,e.path=s.substring(0,a)+i+"&"+s.substring(a+1)):-1!==u?(s=e.path,e.path=s.substring(0,u)+i+s.substring(u)):e.path=e.path+i},createItem:function(t,e,r,n,o){for(var i,a,u,c,p,f,m=[],g=[],v=0,b=t.length;v0&&(u||(u=d({})),u.extraArgs=d(m));var k={message:i,err:a,custom:u,timestamp:y(),callback:c,notifier:r,diagnostic:{},uuid:l()};return function(t,e){e&&void 0!==e.level&&(t.level=e.level,delete e.level);e&&void 0!==e.skipFrames&&(t.skipFrames=e.skipFrames,delete e.skipFrames)}(k,u),n&&p&&(k.request=p),o&&(k.lambdaContext=o),k._originalArgs=t,k.diagnostic.original_arg_types=g,k},addErrorContext:function(t,e){var r=t.data.custom||{},o=!1;try{for(var i=0;i2){var o=n.slice(0,3),i=o[2].indexOf("/");-1!==i&&(o[2]=o[2].substring(0,i));r=o.concat("0000:0000:0000:0000:0000").join(":")}}else r=null}catch(t){r=null}else r=null;t.user_ip=r}},formatArgsAsString:function(t){var e,r,n,o=[];for(e=0,r=t.length;e500&&(n=n.substr(0,497)+"...");break;case"null":n="null";break;case"undefined":n="undefined";break;case"symbol":n=n.toString()}o.push(n)}return o.join(" ")},formatUrl:function(t,e){if(!(e=e||t.protocol)&&t.port&&(80===t.port?e="http:":443===t.port&&(e="https:")),e=e||"https:",!t.hostname)return null;var r=e+"//"+t.hostname;return t.port&&(r=r+":"+t.port),t.path&&(r+=t.path),r},get:function(t,e){if(t){var r=e.split("."),n=t;try{for(var o=0,i=r.length;o=1&&r>e}function s(t,e,r,n,o,i,s){var a=null;return r&&(r=new Error(r)),r||n||(a=function(t,e,r,n,o){var i,s=e.environment||e.payload&&e.payload.environment;i=o?"item per minute limit reached, ignoring errors until timeout":"maxItems has been hit, ignoring errors until reset.";var a={body:{message:{body:i,extra:{maxItems:r,itemsPerMinute:n}}},language:"javascript",environment:s,notifier:{version:e.notifier&&e.notifier.version||e.version}};"browser"===t?(a.platform="browser",a.framework="browser-js",a.notifier.name="rollbar-browser-js"):"server"===t?(a.framework=e.framework||"node-js",a.notifier.name=e.notifier.name):"react-native"===t&&(a.framework=e.framework||"react-native",a.notifier.name=e.notifier.name);return a}(t,e,o,i,s)),{error:r,shouldSend:n,payload:a}}o.globalSettings={startTime:n.now(),maxItems:void 0,itemsPerMinute:void 0},o.prototype.configureGlobal=function(t){void 0!==t.startTime&&(o.globalSettings.startTime=t.startTime),void 0!==t.maxItems&&(o.globalSettings.maxItems=t.maxItems),void 0!==t.itemsPerMinute&&(o.globalSettings.itemsPerMinute=t.itemsPerMinute)},o.prototype.shouldSend=function(t,e){var r=(e=e||n.now())-this.startTime;(r<0||r>=6e4)&&(this.startTime=e,this.perMinCounter=0);var a=o.globalSettings.maxItems,u=o.globalSettings.itemsPerMinute;if(i(t,a,this.counter))return s(this.platform,this.platformOptions,a+" max items reached",!1);if(i(t,u,this.perMinCounter))return s(this.platform,this.platformOptions,u+" items per minute reached",!1);this.counter++,this.perMinCounter++;var c=!i(t,a,this.counter),l=c;return c=c&&!i(t,u,this.perMinCounter),s(this.platform,this.platformOptions,null,c,a,u,l)},o.prototype.setPlatformOptions=function(t,e){this.platform=t,this.platformOptions=e},t.exports=o},function(t,e,r){"use strict";var n=Object.prototype.hasOwnProperty,o=Object.prototype.toString,i=function(t){if(!t||"[object Object]"!==o.call(t))return!1;var e,r=n.call(t,"constructor"),i=t.constructor&&t.constructor.prototype&&n.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!r&&!i)return!1;for(e in t);return void 0===e||n.call(t,e)};t.exports=function t(){var e,r,n,o,s,a={},u=null,c=arguments.length;for(e=0;ethis.options.maxRetries&&(o=!1))}o?this._retryApiRequest(e,r):r(t)},o.prototype._retryApiRequest=function(t,e){this.retryQueue.push({item:t,callback:e}),this.retryHandle||(this.retryHandle=setInterval(function(){for(;this.retryQueue.length;){var t=this.retryQueue.shift();this._makeApiRequest(t.item,t.callback)}}.bind(this),this.options.retryInterval))},o.prototype._dequeuePendingRequest=function(t){var e=this.pendingRequests.indexOf(t);-1!==e&&(this.pendingRequests.splice(e,1),this._maybeCallWait())},o.prototype._maybeLog=function(t,e){if(this.logger&&this.options.verbose){var r=e;if(r=(r=r||n.get(t,"body.trace.exception.message"))||n.get(t,"body.trace_chain.0.exception.message"))return void this.logger.error(r);(r=n.get(t,"body.message.body"))&&this.logger.log(r)}},o.prototype._maybeCallWait=function(){return!(!n.isFunction(this.waitCallback)||0!==this.pendingItems.length||0!==this.pendingRequests.length)&&(this.waitIntervalID&&(this.waitIntervalID=clearInterval(this.waitIntervalID)),this.waitCallback(),!0)},t.exports=o},function(t,e,r){"use strict";var n=r(0);function o(t,e){this.queue=t,this.options=e,this.transforms=[],this.diagnostic={}}o.prototype.configure=function(t){this.queue&&this.queue.configure(t);var e=this.options;return this.options=n.merge(e,t),this},o.prototype.addTransform=function(t){return n.isFunction(t)&&this.transforms.push(t),this},o.prototype.log=function(t,e){if(e&&n.isFunction(e)||(e=function(){}),!this.options.enabled)return e(new Error("Rollbar is not enabled"));this.queue.addPendingItem(t);var r=t.err;this._applyTransforms(t,function(n,o){if(n)return this.queue.removePendingItem(t),e(n,null);this.queue.addItem(o,e,r,t)}.bind(this))},o.prototype._applyTransforms=function(t,e){var r=-1,n=this.transforms.length,o=this.transforms,i=this.options,s=function(t,a){t?e(t,null):++r!==n?o[r](a,i,s):e(null,a)};s(null,t)},t.exports=o},function(t,e,r){"use strict";var n=r(0),o=r(16),i={hostname:"api.rollbar.com",path:"/api/1/item/",search:null,version:"1",protocol:"https:",port:443};function s(t,e,r,n,o){this.options=t,this.transport=e,this.url=r,this.truncation=n,this.jsonBackup=o,this.accessToken=t.accessToken,this.transportOptions=a(t,r)}function a(t,e){return o.getTransportFromOptions(t,i,e)}s.prototype.postItem=function(t,e){var r=o.transportOptions(this.transportOptions,"POST"),n=o.buildPayload(this.accessToken,t,this.jsonBackup),i=this;setTimeout((function(){i.transport.post(i.accessToken,r,n,e)}),0)},s.prototype.buildJsonPayload=function(t,e){var r,i=o.buildPayload(this.accessToken,t,this.jsonBackup);return(r=this.truncation?this.truncation.truncate(i):n.stringify(i)).error?(e&&e(r.error),null):r.value},s.prototype.postJsonPayload=function(t,e){var r=o.transportOptions(this.transportOptions,"POST");this.transport.postJsonPayload(this.accessToken,r,t,e)},s.prototype.configure=function(t){var e=this.oldOptions;return this.options=n.merge(e,t),this.transportOptions=a(this.options,this.url),void 0!==this.options.accessToken&&(this.accessToken=this.options.accessToken),this},t.exports=s},function(t,e,r){"use strict";var n=r(0);t.exports={buildPayload:function(t,e,r){if(!n.isType(e.context,"string")){var o=n.stringify(e.context,r);o.error?e.context="Error: could not serialize 'context'":e.context=o.value||"",e.context.length>255&&(e.context=e.context.substr(0,255))}return{access_token:t,data:e}},getTransportFromOptions:function(t,e,r){var n=e.hostname,o=e.protocol,i=e.port,s=e.path,a=e.search,u=t.timeout,c=function(t){var e="undefined"!=typeof window&&window||"undefined"!=typeof self&&self,r=t.defaultTransport||"xhr";void 0===e.fetch&&(r="xhr");void 0===e.XMLHttpRequest&&(r="fetch");return r}(t),l=t.proxy;if(t.endpoint){var p=r.parse(t.endpoint);n=p.hostname,o=p.protocol,i=p.port,s=p.pathname,a=p.search}return{timeout:u,hostname:n,protocol:o,port:i,path:s,search:a,proxy:l,transport:c}},transportOptions:function(t,e){var r=t.protocol||"https:",n=t.port||("http:"===r?80:"https:"===r?443:void 0),o=t.hostname,i=t.path,s=t.timeout,a=t.transport;return t.search&&(i+=t.search),t.proxy&&(i=r+"//"+o+i,o=t.proxy.host||t.proxy.hostname,n=t.proxy.port,r=t.proxy.protocol||r),{timeout:s,protocol:r,hostname:o,path:i,port:n,method:e,transport:a}},appendPathToPath:function(t,e){var r=/\/$/.test(t),n=/^\//.test(e);return r&&n?e=e.substring(1):r||n||(e="/"+e),t+e}}},function(t,e){!function(t){"use strict";t.console||(t.console={});for(var e,r,n=t.console,o=function(){},i=["memory"],s="assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(",");e=i.pop();)n[e]||(n[e]={});for(;r=s.pop();)n[r]||(n[r]=o)}("undefined"==typeof window?this:window)},function(t,e,r){"use strict";var n={ieVersion:function(){if("undefined"!=typeof document){for(var t=3,e=document.createElement("div"),r=e.getElementsByTagName("i");e.innerHTML="\x3c!--[if gt IE "+ ++t+"]>4?t:void 0}}};t.exports=n},function(t,e,r){"use strict";function n(t,e,r,n){t._rollbarWrappedError&&(n[4]||(n[4]=t._rollbarWrappedError),n[5]||(n[5]=t._rollbarWrappedError._rollbarContext),t._rollbarWrappedError=null);var o=e.handleUncaughtException.apply(e,n);r&&r.apply(t,n),"anonymous"===o&&(e.anonymousErrorsPending+=1)}t.exports={captureUncaughtExceptions:function(t,e,r){if(t){var o;if("function"==typeof e._rollbarOldOnError)o=e._rollbarOldOnError;else if(t.onerror){for(o=t.onerror;o._rollbarOldOnError;)o=o._rollbarOldOnError;e._rollbarOldOnError=o}e.handleAnonymousErrors();var i=function(){var r=Array.prototype.slice.call(arguments,0);n(t,e,o,r)};r&&(i._rollbarOldOnError=o),t.onerror=i}},captureUnhandledRejections:function(t,e,r){if(t){"function"==typeof t._rollbarURH&&t._rollbarURH.belongsToShim&&t.removeEventListener("unhandledrejection",t._rollbarURH);var n=function(t){var r,n,o;try{r=t.reason}catch(t){r=void 0}try{n=t.promise}catch(t){n="[unhandledrejection] error getting `promise` from event"}try{o=t.detail,!r&&o&&(r=o.reason,n=o.promise)}catch(t){}r||(r="[unhandledrejection] error getting `reason` from event"),e&&e.handleUnhandledRejection&&e.handleUnhandledRejection(r,n)};n.belongsToShim=r,t._rollbarURH=n,t.addEventListener("unhandledrejection",n)}}}},function(t,e,r){"use strict";var n=r(0),o=r(21),i=r(22);function s(t){this.truncation=t}s.prototype.get=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){}),n.addParamsAndAccessTokenToPath(t,e,r);var s=n.formatUrl(e);this._makeZoneRequest(t,s,"GET",null,o,i,e.timeout,e.transport)},s.prototype.post=function(t,e,r,o,i){if(o&&n.isFunction(o)||(o=function(){}),!r)return o(new Error("Cannot send empty request"));var s;if((s=this.truncation?this.truncation.truncate(r):n.stringify(r)).error)return o(s.error);var a=s.value,u=n.formatUrl(e);this._makeZoneRequest(t,u,"POST",a,o,i,e.timeout,e.transport)},s.prototype.postJsonPayload=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){});var s=n.formatUrl(e);this._makeZoneRequest(t,s,"POST",r,o,i,e.timeout,e.transport)},s.prototype._makeZoneRequest=function(){var t="undefined"!=typeof window&&window||void 0!==o&&o,e=t&&t.Zone&&t.Zone.current,r=Array.prototype.slice.call(arguments);if(e&&"angular"===e._name){var n=e._parent,o=this;n.run((function(){o._makeRequest.apply(void 0,r)}))}else this._makeRequest.apply(void 0,r)},s.prototype._makeRequest=function(t,e,r,n,s,a,u,c){if("undefined"!=typeof RollbarProxy)return function(t,e){(new RollbarProxy).sendJsonPayload(t,(function(t){}),(function(t){e(new Error(t))}))}(n,s);"fetch"===c?o(t,e,r,n,s,u):i(t,e,r,n,s,a,u)},t.exports=s},function(t,e,r){"use strict";var n=r(1),o=r(0);t.exports=function(t,e,r,i,s,a){var u,c;o.isFiniteNumber(a)&&(u=new AbortController,c=setTimeout((function(){u.abort()}),a)),fetch(e,{method:r,headers:{"Content-Type":"application/json","X-Rollbar-Access-Token":t,signal:u&&u.signal},body:i}).then((function(t){return c&&clearTimeout(c),t.json()})).then((function(t){s(null,t)})).catch((function(t){n.error(t.message),s(t)}))}},function(t,e,r){"use strict";var n=r(0),o=r(1);function i(t,e){var r=new Error(t);return r.code=e||"ENOTFOUND",r}t.exports=function(t,e,r,s,a,u,c){var l;if(!(l=u?u():function(){var t,e,r=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],n=r.length;for(e=0;e=400&&t.status<600}(l)){if(403===l.status){var e=t.value&&t.value.message;o.error(e)}a(new Error(String(l.status)))}else{a(i("XHR response had no status code (likely connection failure)"))}}}catch(t){var r;r=t&&t.stack?t:new Error(t),a(r)}var s};l.open(r,e,!0),l.setRequestHeader&&(l.setRequestHeader("Content-Type","application/json"),l.setRequestHeader("X-Rollbar-Access-Token",t)),n.isFiniteNumber(c)&&(l.timeout=c),l.onreadystatechange=p,l.send(s)}catch(t){if("undefined"!=typeof XDomainRequest){if(!window||!window.location)return a(new Error("No window available during request, unknown environment"));"http:"===window.location.href.substring(0,5)&&"https"===e.substring(0,5)&&(e="http"+e.substring(5));var f=new XDomainRequest;f.onprogress=function(){},f.ontimeout=function(){a(i("Request timed out","ETIMEDOUT"))},f.onerror=function(){a(new Error("Error during request"))},f.onload=function(){var t=n.jsonParse(f.responseText);a(t.error,t.value)},f.open(r,e,!0),f.send(s)}else a(new Error("Cannot find a method to transport a request"))}}catch(t){a(t)}}},function(t,e,r){"use strict";var n=r(0),o=r(3),i=r(1);function s(t,e,r){var o=t.message,i=t.custom;o||(o="Item sent with null or missing arguments.");var s={body:o};i&&(s.extra=n.merge(i)),n.set(t,"data.body",{message:s}),r(null,t)}function a(t){var e=t.stackInfo.stack;return e&&0===e.length&&t._unhandledStackInfo&&t._unhandledStackInfo.stack&&(e=t._unhandledStackInfo.stack),e}function u(t,e,r){var i=t&&t.data.description,s=t&&t.custom,u=a(t),l=o.guessErrorClass(e.message),p={exception:{class:c(e,l[0],r),message:l[1]}};if(i&&(p.exception.description=i),u){var f,h,d,m,g,v,y,b;for(0===u.length&&(p.exception.stack=e.rawStack,p.exception.raw=String(e.rawException)),p.frames=[],y=0;y0&&n.set(e,"data.request",i),o(null,e)}},addClientInfo:function(t){return function(e,r,o){if(!t)return o(null,e);var i=t.navigator||{},s=t.screen||{};n.set(e,"data.client",{runtime_ms:e.timestamp-t._rollbarStartTime,timestamp:Math.round(e.timestamp/1e3),javascript:{browser:i.userAgent,language:i.language,cookie_enabled:i.cookieEnabled,screen:{width:s.width,height:s.height}}}),o(null,e)}},addPluginInfo:function(t){return function(e,r,o){if(!t||!t.navigator)return o(null,e);for(var i,s=[],a=t.navigator.plugins||[],u=0,c=a.length;u-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));var r=e.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),n=r.match(/ (\(.+\)$)/);r=n?r.replace(n[0],""):r;var o=this.extractLocation(n?n[1]:r),i=n&&r||void 0,s=["eval",""].indexOf(o[0])>-1?void 0:o[0];return new t({functionName:i,fileName:s,lineNumber:o[1],columnNumber:o[2],source:e})}),this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter((function(t){return!t.match(n)}),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 t({functionName:e});var r=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(r),o=n&&n[1]?n[1]:void 0,i=this.extractLocation(e.replace(r,""));return new t({functionName:o,fileName:i[0],lineNumber:i[1],columnNumber:i[2],source:e})}),this)},parseOpera:function(t){return!t.stacktrace||t.message.indexOf("\n")>-1&&t.message.split("\n").length>t.stacktrace.split("\n").length?this.parseOpera9(t):t.stack?this.parseOpera11(t):this.parseOpera10(t)},parseOpera9:function(e){for(var r=/Line (\d+).*script (?:in )?(\S+)/i,n=e.message.split("\n"),o=[],i=2,s=n.length;i/,"$2").replace(/\([^)]*\)/g,"")||void 0;i.match(/\(([^)]*)\)/)&&(r=i.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var a=void 0===r||"[arguments not available]"===r?void 0:r.split(",");return new t({functionName:s,args:a,fileName:o[0],lineNumber:o[1],columnNumber:o[2],source:e})}),this)}}})?n.apply(e,o):n)||(t.exports=i)}()},function(t,e,r){var n,o,i;!function(r,s){"use strict";o=[],void 0===(i="function"==typeof(n=function(){function t(t){return t.charAt(0).toUpperCase()+t.substring(1)}function e(t){return function(){return this[t]}}var r=["isConstructor","isEval","isNative","isToplevel"],n=["columnNumber","lineNumber"],o=["fileName","functionName","source"],i=r.concat(n,o,["args"],["evalOrigin"]);function s(e){if(e)for(var r=0;ro&&(i=this.queue.length-o),this.maxQueueSize=o,this.queue.splice(0,i)},o.prototype.copyEvents=function(){var t=Array.prototype.slice.call(this.queue,0);if(n.isFunction(this.options.filterTelemetry))try{for(var e=t.length;e--;)this.options.filterTelemetry(t[e])&&t.splice(e,1)}catch(t){this.options.filterTelemetry=null}return t},o.prototype.capture=function(t,e,r,o,s){var a={level:i(t,r),type:t,timestamp_ms:s||n.now(),body:e,source:"client"};o&&(a.uuid=o);try{if(n.isFunction(this.options.filterTelemetry)&&this.options.filterTelemetry(a))return!1}catch(t){this.options.filterTelemetry=null}return this.push(a),a},o.prototype.captureEvent=function(t,e,r,n){return this.capture(t,e,r,n)},o.prototype.captureError=function(t,e,r,n){var o={message:t.message||String(t)};return t.stack&&(o.stack=t.stack),this.capture("error",o,e,r,n)},o.prototype.captureLog=function(t,e,r,n){return this.capture("log",{message:t},e,r,n)},o.prototype.captureNetwork=function(t,e,r,n){e=e||"xhr",t.subtype=t.subtype||e,n&&(t.request=n);var o=this.levelFromStatus(t.status_code);return this.capture("network",t,o,r)},o.prototype.levelFromStatus=function(t){return t>=200&&t<400?"info":0===t||t>=400?"error":"info"},o.prototype.captureDom=function(t,e,r,n,o){var i={subtype:t,element:e};return void 0!==r&&(i.value=r),void 0!==n&&(i.checked=n),this.capture("dom",i,"info",o)},o.prototype.captureNavigation=function(t,e,r){return this.capture("navigation",{from:t,to:e},"info",r)},o.prototype.captureDomContentLoaded=function(t){return this.capture("navigation",{subtype:"DOMContentLoaded"},"info",void 0,t&&t.getTime())},o.prototype.captureLoad=function(t){return this.capture("navigation",{subtype:"load"},"info",void 0,t&&t.getTime())},o.prototype.captureConnectivityChange=function(t,e){return this.captureNetwork({change:t},"connectivity",e)},o.prototype._captureRollbarItem=function(t){if(this.options.includeItemsInTelemetry)return t.err?this.captureError(t.err,t.level,t.uuid,t.timestamp):t.message?this.captureLog(t.message,t.level,t.uuid,t.timestamp):t.custom?this.capture("log",t.custom,t.level,t.uuid,t.timestamp):void 0},o.prototype.push=function(t){this.queue.push(t),this.queue.length>this.maxQueueSize&&this.queue.shift()},t.exports=o},function(t,e,r){"use strict";var n=r(0),o=r(33),i=r(4),s=r(2),a=r(34),u={network:!0,networkResponseHeaders:!1,networkResponseBody:!1,networkRequestHeaders:!1,networkRequestBody:!1,networkErrorOnHttp5xx:!1,networkErrorOnHttp4xx:!1,networkErrorOnHttp0:!1,log:!0,dom:!0,navigation:!0,connectivity:!0,contentSecurityPolicy:!0,errorOnContentSecurityPolicy:!1};function c(t,e,r,n,o){var i=t[e];t[e]=r(i),n&&n[o].push([t,e,i])}function l(t,e){for(var r;t[e].length;)(r=t[e].shift())[0][r[1]]=r[2]}function p(t,e,r,o,i){this.options=t;var s=t.autoInstrument;!1===t.enabled||!1===s?this.autoInstrument={}:(n.isType(s,"object")||(s=u),this.autoInstrument=n.merge(u,s)),this.scrubTelemetryInputs=!!t.scrubTelemetryInputs,this.telemetryScrubber=t.telemetryScrubber,this.defaultValueScrubber=function(t){for(var e=[],r=0;r3)){i.__rollbar_xhr.end_time_ms=n.now();var e=null;if(i.__rollbar_xhr.response_content_type=i.getResponseHeader("Content-Type"),t.autoInstrument.networkResponseHeaders){var r=t.autoInstrument.networkResponseHeaders;e={};try{var s,a;if(!0===r){var u=i.getAllResponseHeaders();if(u){var c,l,p=u.trim().split(/[\r\n]+/);for(a=0;a=500&&this.autoInstrument.networkErrorOnHttp5xx||e>=400&&this.autoInstrument.networkErrorOnHttp4xx||0===e&&this.autoInstrument.networkErrorOnHttp0){var r=new Error("HTTP request failed with Status "+e);r.stack=t.stack,this.rollbar.error(r,{skipFrames:1})}},p.prototype.deinstrumentConsole=function(){if("console"in this._window&&this._window.console.log)for(var t;this.replacements.log.length;)t=this.replacements.log.shift(),this._window.console[t[0]]=t[1]},p.prototype.instrumentConsole=function(){if("console"in this._window&&this._window.console.log){var t=this,e=this._window.console,r=["debug","info","warn","error","log"];try{for(var o=0,i=r.length;o=0&&t.options[t.selectedIndex]&&this.captureDomEvent("input",t,t.options[t.selectedIndex].value)},p.prototype.captureDomEvent=function(t,e,r,n){if(void 0!==r)if(this.scrubTelemetryInputs||"password"===a.getElementType(e))r="[scrubbed]";else{var o=a.describeElement(e);this.telemetryScrubber?this.telemetryScrubber(o)&&(r="[scrubbed]"):this.defaultValueScrubber(o)&&(r="[scrubbed]")}var i=a.elementArrayToString(a.treeToArray(e));this.telemeter.captureDom(t,i,r,n)},p.prototype.deinstrumentNavigation=function(){var t=this._window.chrome;!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState&&l(this.replacements,"navigation")},p.prototype.instrumentNavigation=function(){var t=this._window.chrome;if(!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState){var e=this;c(this._window,"onpopstate",(function(t){return function(){var r=e._location.href;e.handleUrlChange(e._lastHref,r),t&&t.apply(this,arguments)}}),this.replacements,"navigation"),c(this._window.history,"pushState",(function(t){return function(){var r=arguments.length>2?arguments[2]:void 0;return r&&e.handleUrlChange(e._lastHref,r+""),t.apply(this,arguments)}}),this.replacements,"navigation")}},p.prototype.handleUrlChange=function(t,e){var r=s.parse(this._location.href),n=s.parse(e),o=s.parse(t);this._lastHref=e,r.protocol===n.protocol&&r.host===n.host&&(e=n.path+(n.hash||"")),r.protocol===o.protocol&&r.host===o.host&&(t=o.path+(o.hash||"")),this.telemeter.captureNavigation(t,e)},p.prototype.deinstrumentConnectivity=function(){("addEventListener"in this._window||"body"in this._document)&&(this._window.addEventListener?this.removeListeners("connectivity"):l(this.replacements,"connectivity"))},p.prototype.instrumentConnectivity=function(){if("addEventListener"in this._window||"body"in this._document)if(this._window.addEventListener)this.addListener("connectivity",this._window,"online",void 0,function(){this.telemeter.captureConnectivityChange("online")}.bind(this),!0),this.addListener("connectivity",this._window,"offline",void 0,function(){this.telemeter.captureConnectivityChange("offline")}.bind(this),!0);else{var t=this;c(this._document.body,"ononline",(function(e){return function(){t.telemeter.captureConnectivityChange("online"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity"),c(this._document.body,"onoffline",(function(e){return function(){t.telemeter.captureConnectivityChange("offline"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity")}},p.prototype.handleCspEvent=function(t){var e="Security Policy Violation: blockedURI: "+t.blockedURI+", violatedDirective: "+t.violatedDirective+", effectiveDirective: "+t.effectiveDirective+", ";t.sourceFile&&(e+="location: "+t.sourceFile+", line: "+t.lineNumber+", col: "+t.columnNumber+", "),e+="originalPolicy: "+t.originalPolicy,this.telemeter.captureLog(e,"error"),this.handleCspError(e)},p.prototype.handleCspError=function(t){this.autoInstrument.errorOnContentSecurityPolicy&&this.rollbar.error(t)},p.prototype.deinstrumentContentSecurityPolicy=function(){"addEventListener"in this._document&&this.removeListeners("contentsecuritypolicy")},p.prototype.instrumentContentSecurityPolicy=function(){if("addEventListener"in this._document){var t=this.handleCspEvent.bind(this);this.addListener("contentsecuritypolicy",this._document,"securitypolicyviolation",null,t,!1)}},p.prototype.addListener=function(t,e,r,n,o,i){e.addEventListener?(e.addEventListener(r,o,i),this.eventRemovers[t].push((function(){e.removeEventListener(r,o,i)}))):n&&(e.attachEvent(n,o),this.eventRemovers[t].push((function(){e.detachEvent(n,o)})))},p.prototype.removeListeners=function(t){for(;this.eventRemovers[t].length;)this.eventRemovers[t].shift()()},t.exports=p},function(t,e,r){"use strict";function n(t){return"string"!=typeof t&&(t=String(t)),t.toLowerCase()}function o(t){this.map={},t instanceof o?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}o.prototype.append=function(t,e){t=n(t),e=function(t){return"string"!=typeof t&&(t=String(t)),t}(e);var r=this.map[t];this.map[t]=r?r+", "+e:e},o.prototype.get=function(t){return t=n(t),this.has(t)?this.map[t]:null},o.prototype.has=function(t){return this.map.hasOwnProperty(n(t))},o.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},o.prototype.entries=function(){var t=[];return this.forEach((function(e,r){t.push([r,e])})),function(t){return{next:function(){var e=t.shift();return{done:void 0===e,value:e}}}}(t)},t.exports=function(t){return"undefined"==typeof Headers?new o(t):new Headers(t)}},function(t,e,r){"use strict";function n(t){return(t.getAttribute("type")||"").toLowerCase()}function o(t){if(!t||!t.tagName)return"";var e=[t.tagName];t.id&&e.push("#"+t.id),t.classes&&e.push("."+t.classes.join("."));for(var r=0;r=0;a--){if(e=o(t[a]),r=s+i.length*n+e.length,a=83){i.unshift("...");break}i.unshift(e),s+=e.length}return i.join(" > ")},treeToArray:function(t){for(var e,r=[],n=0;t&&n<5&&"html"!==(e=i(t)).tagName;n++)r.unshift(e),t=t.parentNode;return r},getElementFromEvent:function(t,e){return t.target?t.target:e&&e.elementFromPoint?e.elementFromPoint(t.clientX,t.clientY):void 0},isDescribedElement:function(t,e,r){if(t.tagName.toLowerCase()!==e.toLowerCase())return!1;if(!r)return!0;t=n(t);for(var o=0;o2*e?t.slice(0,e).concat(t.slice(r-e)):t}function a(t,e,r){r=void 0===r?30:r;var o,i=t.data.body;if(i.trace_chain)for(var a=i.trace_chain,u=0;ut?e.slice(0,t-3).concat("..."):e}function c(t,e,r){return[e=o(e,(function e(r,i,s){switch(n.typeName(i)){case"string":return u(t,i);case"object":case"array":return o(i,e,s);default:return i}})),n.stringify(e,r)]}function l(t){return t.exception&&(delete t.exception.description,t.exception.message=u(255,t.exception.message)),t.frames=s(t.frames,1),t}function p(t,e){var r=t.data.body;if(r.trace_chain)for(var o=r.trace_chain,i=0;ie}t.exports={truncate:function(t,e,r){r=void 0===r?524288:r;for(var n,o,s,u=[i,a,c.bind(null,1024),c.bind(null,512),c.bind(null,256),p];n=u.shift();)if(t=(o=n(t,e))[0],(s=o[1]).error||!f(s.value,r))return s;return s},raw:i,truncateFrames:a,truncateStrings:c,maybeTruncateValue:u}}])})); -//# sourceMappingURL=rollbar.named-amd.min.js.map \ No newline at end of file +define("rollbar",[],(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=6)}([function(t,e,r){"use strict";var n=r(12),o={};function i(t,e){return e===s(t)}function s(t){var e=typeof t;return"object"!==e?e:t?t instanceof Error?"error":{}.toString.call(t).match(/\s([a-zA-Z]+)/)[1].toLowerCase():"null"}function a(t){return i(t,"function")}function u(t){var e=Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?"),r=RegExp("^"+e+"$");return c(t)&&r.test(t)}function c(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function l(){var t=y();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var r=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?r:7&r|8).toString(16)}))}var p={strictMode:!1,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};function f(t,e){var r,n;try{r=o.stringify(t)}catch(o){if(e&&a(e))try{r=e(t)}catch(t){n=t}else n=o}return{error:n,value:r}}function h(t,e){return function(r,n){try{e(r,n)}catch(e){t.error(e)}}}function d(t){return function t(e,r){var n,o,a,u={};try{for(o in e)(n=e[o])&&(i(n,"object")||i(n,"array"))?r.includes(n)?u[o]="Removed circular reference: "+s(n):((a=r.slice()).push(n),u[o]=t(n,a)):u[o]=n}catch(t){u="Failed cloning custom data: "+t.message}return u}(t,[t])}var m=["log","network","dom","navigation","error","manual"],g=["critical","error","warning","info","debug"];function v(t,e){for(var r=0;ra)?(s=e.path,e.path=s.substring(0,a)+i+"&"+s.substring(a+1)):-1!==u?(s=e.path,e.path=s.substring(0,u)+i+s.substring(u)):e.path=e.path+i},createItem:function(t,e,r,n,o){for(var i,a,u,c,p,f,m=[],g=[],v=0,b=t.length;v0&&(u||(u=d({})),u.extraArgs=d(m));var k={message:i,err:a,custom:u,timestamp:y(),callback:c,notifier:r,diagnostic:{},uuid:l()};return function(t,e){e&&void 0!==e.level&&(t.level=e.level,delete e.level);e&&void 0!==e.skipFrames&&(t.skipFrames=e.skipFrames,delete e.skipFrames)}(k,u),n&&p&&(k.request=p),o&&(k.lambdaContext=o),k._originalArgs=t,k.diagnostic.original_arg_types=g,k},addErrorContext:function(t,e){var r=t.data.custom||{},o=!1;try{for(var i=0;i2){var o=n.slice(0,3),i=o[2].indexOf("/");-1!==i&&(o[2]=o[2].substring(0,i));r=o.concat("0000:0000:0000:0000:0000").join(":")}}else r=null}catch(t){r=null}else r=null;t.user_ip=r}},formatArgsAsString:function(t){var e,r,n,o=[];for(e=0,r=t.length;e500&&(n=n.substr(0,497)+"...");break;case"null":n="null";break;case"undefined":n="undefined";break;case"symbol":n=n.toString()}o.push(n)}return o.join(" ")},formatUrl:function(t,e){if(!(e=e||t.protocol)&&t.port&&(80===t.port?e="http:":443===t.port&&(e="https:")),e=e||"https:",!t.hostname)return null;var r=e+"//"+t.hostname;return t.port&&(r=r+":"+t.port),t.path&&(r+=t.path),r},get:function(t,e){if(t){var r=e.split("."),n=t;try{for(var o=0,i=r.length;o=1&&r>e}function s(t,e,r,n,o,i,s){var a=null;return r&&(r=new Error(r)),r||n||(a=function(t,e,r,n,o){var i,s=e.environment||e.payload&&e.payload.environment;i=o?"item per minute limit reached, ignoring errors until timeout":"maxItems has been hit, ignoring errors until reset.";var a={body:{message:{body:i,extra:{maxItems:r,itemsPerMinute:n}}},language:"javascript",environment:s,notifier:{version:e.notifier&&e.notifier.version||e.version}};"browser"===t?(a.platform="browser",a.framework="browser-js",a.notifier.name="rollbar-browser-js"):"server"===t?(a.framework=e.framework||"node-js",a.notifier.name=e.notifier.name):"react-native"===t&&(a.framework=e.framework||"react-native",a.notifier.name=e.notifier.name);return a}(t,e,o,i,s)),{error:r,shouldSend:n,payload:a}}o.globalSettings={startTime:n.now(),maxItems:void 0,itemsPerMinute:void 0},o.prototype.configureGlobal=function(t){void 0!==t.startTime&&(o.globalSettings.startTime=t.startTime),void 0!==t.maxItems&&(o.globalSettings.maxItems=t.maxItems),void 0!==t.itemsPerMinute&&(o.globalSettings.itemsPerMinute=t.itemsPerMinute)},o.prototype.shouldSend=function(t,e){var r=(e=e||n.now())-this.startTime;(r<0||r>=6e4)&&(this.startTime=e,this.perMinCounter=0);var a=o.globalSettings.maxItems,u=o.globalSettings.itemsPerMinute;if(i(t,a,this.counter))return s(this.platform,this.platformOptions,a+" max items reached",!1);if(i(t,u,this.perMinCounter))return s(this.platform,this.platformOptions,u+" items per minute reached",!1);this.counter++,this.perMinCounter++;var c=!i(t,a,this.counter),l=c;return c=c&&!i(t,u,this.perMinCounter),s(this.platform,this.platformOptions,null,c,a,u,l)},o.prototype.setPlatformOptions=function(t,e){this.platform=t,this.platformOptions=e},t.exports=o},function(t,e,r){"use strict";var n=Object.prototype.hasOwnProperty,o=Object.prototype.toString,i=function(t){if(!t||"[object Object]"!==o.call(t))return!1;var e,r=n.call(t,"constructor"),i=t.constructor&&t.constructor.prototype&&n.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!r&&!i)return!1;for(e in t);return void 0===e||n.call(t,e)};t.exports=function t(){var e,r,n,o,s,a={},u=null,c=arguments.length;for(e=0;ethis.options.maxRetries&&(o=!1))}o?this._retryApiRequest(e,r):r(t)},o.prototype._retryApiRequest=function(t,e){this.retryQueue.push({item:t,callback:e}),this.retryHandle||(this.retryHandle=setInterval(function(){for(;this.retryQueue.length;){var t=this.retryQueue.shift();this._makeApiRequest(t.item,t.callback)}}.bind(this),this.options.retryInterval))},o.prototype._dequeuePendingRequest=function(t){var e=this.pendingRequests.indexOf(t);-1!==e&&(this.pendingRequests.splice(e,1),this._maybeCallWait())},o.prototype._maybeLog=function(t,e){if(this.logger&&this.options.verbose){var r=e;if(r=(r=r||n.get(t,"body.trace.exception.message"))||n.get(t,"body.trace_chain.0.exception.message"))return void this.logger.error(r);(r=n.get(t,"body.message.body"))&&this.logger.log(r)}},o.prototype._maybeCallWait=function(){return!(!n.isFunction(this.waitCallback)||0!==this.pendingItems.length||0!==this.pendingRequests.length)&&(this.waitIntervalID&&(this.waitIntervalID=clearInterval(this.waitIntervalID)),this.waitCallback(),!0)},t.exports=o},function(t,e,r){"use strict";var n=r(0);function o(t,e){this.queue=t,this.options=e,this.transforms=[],this.diagnostic={}}o.prototype.configure=function(t){this.queue&&this.queue.configure(t);var e=this.options;return this.options=n.merge(e,t),this},o.prototype.addTransform=function(t){return n.isFunction(t)&&this.transforms.push(t),this},o.prototype.log=function(t,e){if(e&&n.isFunction(e)||(e=function(){}),!this.options.enabled)return e(new Error("Rollbar is not enabled"));this.queue.addPendingItem(t);var r=t.err;this._applyTransforms(t,function(n,o){if(n)return this.queue.removePendingItem(t),e(n,null);this.queue.addItem(o,e,r,t)}.bind(this))},o.prototype._applyTransforms=function(t,e){var r=-1,n=this.transforms.length,o=this.transforms,i=this.options,s=function(t,a){t?e(t,null):++r!==n?o[r](a,i,s):e(null,a)};s(null,t)},t.exports=o},function(t,e,r){"use strict";var n=r(0),o=r(16),i={hostname:"api.rollbar.com",path:"/api/1/item/",search:null,version:"1",protocol:"https:",port:443};function s(t,e,r,n,o){this.options=t,this.transport=e,this.url=r,this.truncation=n,this.jsonBackup=o,this.accessToken=t.accessToken,this.transportOptions=a(t,r)}function a(t,e){return o.getTransportFromOptions(t,i,e)}s.prototype.postItem=function(t,e){var r=o.transportOptions(this.transportOptions,"POST"),n=o.buildPayload(this.accessToken,t,this.jsonBackup),i=this;setTimeout((function(){i.transport.post(i.accessToken,r,n,e)}),0)},s.prototype.buildJsonPayload=function(t,e){var r,i=o.buildPayload(this.accessToken,t,this.jsonBackup);return(r=this.truncation?this.truncation.truncate(i):n.stringify(i)).error?(e&&e(r.error),null):r.value},s.prototype.postJsonPayload=function(t,e){var r=o.transportOptions(this.transportOptions,"POST");this.transport.postJsonPayload(this.accessToken,r,t,e)},s.prototype.configure=function(t){var e=this.oldOptions;return this.options=n.merge(e,t),this.transportOptions=a(this.options,this.url),void 0!==this.options.accessToken&&(this.accessToken=this.options.accessToken),this},t.exports=s},function(t,e,r){"use strict";var n=r(0);t.exports={buildPayload:function(t,e,r){if(!n.isType(e.context,"string")){var o=n.stringify(e.context,r);o.error?e.context="Error: could not serialize 'context'":e.context=o.value||"",e.context.length>255&&(e.context=e.context.substr(0,255))}return{access_token:t,data:e}},getTransportFromOptions:function(t,e,r){var n=e.hostname,o=e.protocol,i=e.port,s=e.path,a=e.search,u=t.timeout,c=function(t){var e="undefined"!=typeof window&&window||"undefined"!=typeof self&&self,r=t.defaultTransport||"xhr";void 0===e.fetch&&(r="xhr");void 0===e.XMLHttpRequest&&(r="fetch");return r}(t),l=t.proxy;if(t.endpoint){var p=r.parse(t.endpoint);n=p.hostname,o=p.protocol,i=p.port,s=p.pathname,a=p.search}return{timeout:u,hostname:n,protocol:o,port:i,path:s,search:a,proxy:l,transport:c}},transportOptions:function(t,e){var r=t.protocol||"https:",n=t.port||("http:"===r?80:"https:"===r?443:void 0),o=t.hostname,i=t.path,s=t.timeout,a=t.transport;return t.search&&(i+=t.search),t.proxy&&(i=r+"//"+o+i,o=t.proxy.host||t.proxy.hostname,n=t.proxy.port,r=t.proxy.protocol||r),{timeout:s,protocol:r,hostname:o,path:i,port:n,method:e,transport:a}},appendPathToPath:function(t,e){var r=/\/$/.test(t),n=/^\//.test(e);return r&&n?e=e.substring(1):r||n||(e="/"+e),t+e}}},function(t,e){!function(t){"use strict";t.console||(t.console={});for(var e,r,n=t.console,o=function(){},i=["memory"],s="assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(",");e=i.pop();)n[e]||(n[e]={});for(;r=s.pop();)n[r]||(n[r]=o)}("undefined"==typeof window?this:window)},function(t,e,r){"use strict";var n={ieVersion:function(){if("undefined"!=typeof document){for(var t=3,e=document.createElement("div"),r=e.getElementsByTagName("i");e.innerHTML="\x3c!--[if gt IE "+ ++t+"]>4?t:void 0}}};t.exports=n},function(t,e,r){"use strict";function n(t,e,r,n){t._rollbarWrappedError&&(n[4]||(n[4]=t._rollbarWrappedError),n[5]||(n[5]=t._rollbarWrappedError._rollbarContext),t._rollbarWrappedError=null);var o=e.handleUncaughtException.apply(e,n);r&&r.apply(t,n),"anonymous"===o&&(e.anonymousErrorsPending+=1)}t.exports={captureUncaughtExceptions:function(t,e,r){if(t){var o;if("function"==typeof e._rollbarOldOnError)o=e._rollbarOldOnError;else if(t.onerror){for(o=t.onerror;o._rollbarOldOnError;)o=o._rollbarOldOnError;e._rollbarOldOnError=o}e.handleAnonymousErrors();var i=function(){var r=Array.prototype.slice.call(arguments,0);n(t,e,o,r)};r&&(i._rollbarOldOnError=o),t.onerror=i}},captureUnhandledRejections:function(t,e,r){if(t){"function"==typeof t._rollbarURH&&t._rollbarURH.belongsToShim&&t.removeEventListener("unhandledrejection",t._rollbarURH);var n=function(t){var r,n,o;try{r=t.reason}catch(t){r=void 0}try{n=t.promise}catch(t){n="[unhandledrejection] error getting `promise` from event"}try{o=t.detail,!r&&o&&(r=o.reason,n=o.promise)}catch(t){}r||(r="[unhandledrejection] error getting `reason` from event"),e&&e.handleUnhandledRejection&&e.handleUnhandledRejection(r,n)};n.belongsToShim=r,t._rollbarURH=n,t.addEventListener("unhandledrejection",n)}}}},function(t,e,r){"use strict";var n=r(0),o=r(21),i=r(22);function s(t){this.truncation=t}s.prototype.get=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){}),n.addParamsAndAccessTokenToPath(t,e,r);var s=n.formatUrl(e);this._makeZoneRequest(t,s,"GET",null,o,i,e.timeout,e.transport)},s.prototype.post=function(t,e,r,o,i){if(o&&n.isFunction(o)||(o=function(){}),!r)return o(new Error("Cannot send empty request"));var s;if((s=this.truncation?this.truncation.truncate(r):n.stringify(r)).error)return o(s.error);var a=s.value,u=n.formatUrl(e);this._makeZoneRequest(t,u,"POST",a,o,i,e.timeout,e.transport)},s.prototype.postJsonPayload=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){});var s=n.formatUrl(e);this._makeZoneRequest(t,s,"POST",r,o,i,e.timeout,e.transport)},s.prototype._makeZoneRequest=function(){var t="undefined"!=typeof window&&window||void 0!==o&&o,e=t&&t.Zone&&t.Zone.current,r=Array.prototype.slice.call(arguments);if(e&&"angular"===e._name){var n=e._parent,o=this;n.run((function(){o._makeRequest.apply(void 0,r)}))}else this._makeRequest.apply(void 0,r)},s.prototype._makeRequest=function(t,e,r,n,s,a,u,c){if("undefined"!=typeof RollbarProxy)return function(t,e){(new RollbarProxy).sendJsonPayload(t,(function(t){}),(function(t){e(new Error(t))}))}(n,s);"fetch"===c?o(t,e,r,n,s,u):i(t,e,r,n,s,a,u)},t.exports=s},function(t,e,r){"use strict";var n=r(1),o=r(0);t.exports=function(t,e,r,i,s,a){var u,c;o.isFiniteNumber(a)&&(u=new AbortController,c=setTimeout((function(){u.abort()}),a)),fetch(e,{method:r,headers:{"Content-Type":"application/json","X-Rollbar-Access-Token":t,signal:u&&u.signal},body:i}).then((function(t){return c&&clearTimeout(c),t.json()})).then((function(t){s(null,t)})).catch((function(t){n.error(t.message),s(t)}))}},function(t,e,r){"use strict";var n=r(0),o=r(1);function i(t,e){var r=new Error(t);return r.code=e||"ENOTFOUND",r}t.exports=function(t,e,r,s,a,u,c){var l;if(!(l=u?u():function(){var t,e,r=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],n=r.length;for(e=0;e=400&&t.status<600}(l)){if(403===l.status){var e=t.value&&t.value.message;o.error(e)}a(new Error(String(l.status)))}else{a(i("XHR response had no status code (likely connection failure)"))}}}catch(t){var r;r=t&&t.stack?t:new Error(t),a(r)}var s};l.open(r,e,!0),l.setRequestHeader&&(l.setRequestHeader("Content-Type","application/json"),l.setRequestHeader("X-Rollbar-Access-Token",t)),n.isFiniteNumber(c)&&(l.timeout=c),l.onreadystatechange=p,l.send(s)}catch(t){if("undefined"!=typeof XDomainRequest){if(!window||!window.location)return a(new Error("No window available during request, unknown environment"));"http:"===window.location.href.substring(0,5)&&"https"===e.substring(0,5)&&(e="http"+e.substring(5));var f=new XDomainRequest;f.onprogress=function(){},f.ontimeout=function(){a(i("Request timed out","ETIMEDOUT"))},f.onerror=function(){a(new Error("Error during request"))},f.onload=function(){var t=n.jsonParse(f.responseText);a(t.error,t.value)},f.open(r,e,!0),f.send(s)}else a(new Error("Cannot find a method to transport a request"))}}catch(t){a(t)}}},function(t,e,r){"use strict";var n=r(0),o=r(3),i=r(1);function s(t,e,r){var o=t.message,i=t.custom;o||(o="Item sent with null or missing arguments.");var s={body:o};i&&(s.extra=n.merge(i)),n.set(t,"data.body",{message:s}),r(null,t)}function a(t){var e=t.stackInfo.stack;return e&&0===e.length&&t._unhandledStackInfo&&t._unhandledStackInfo.stack&&(e=t._unhandledStackInfo.stack),e}function u(t,e,r){var i=t&&t.data.description,s=t&&t.custom,u=a(t),l=o.guessErrorClass(e.message),p={exception:{class:c(e,l[0],r),message:l[1]}};if(i&&(p.exception.description=i),u){var f,h,d,m,g,v,y,b;for(0===u.length&&(p.exception.stack=e.rawStack,p.exception.raw=String(e.rawException)),p.frames=[],y=0;y0&&n.set(e,"data.request",i),o(null,e)}},addClientInfo:function(t){return function(e,r,o){if(!t)return o(null,e);var i=t.navigator||{},s=t.screen||{};n.set(e,"data.client",{runtime_ms:e.timestamp-t._rollbarStartTime,timestamp:Math.round(e.timestamp/1e3),javascript:{browser:i.userAgent,language:i.language,cookie_enabled:i.cookieEnabled,screen:{width:s.width,height:s.height}}}),o(null,e)}},addPluginInfo:function(t){return function(e,r,o){if(!t||!t.navigator)return o(null,e);for(var i,s=[],a=t.navigator.plugins||[],u=0,c=a.length;u-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));var r=e.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),n=r.match(/ (\(.+\)$)/);r=n?r.replace(n[0],""):r;var o=this.extractLocation(n?n[1]:r),i=n&&r||void 0,s=["eval",""].indexOf(o[0])>-1?void 0:o[0];return new t({functionName:i,fileName:s,lineNumber:o[1],columnNumber:o[2],source:e})}),this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter((function(t){return!t.match(n)}),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 t({functionName:e});var r=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(r),o=n&&n[1]?n[1]:void 0,i=this.extractLocation(e.replace(r,""));return new t({functionName:o,fileName:i[0],lineNumber:i[1],columnNumber:i[2],source:e})}),this)},parseOpera:function(t){return!t.stacktrace||t.message.indexOf("\n")>-1&&t.message.split("\n").length>t.stacktrace.split("\n").length?this.parseOpera9(t):t.stack?this.parseOpera11(t):this.parseOpera10(t)},parseOpera9:function(e){for(var r=/Line (\d+).*script (?:in )?(\S+)/i,n=e.message.split("\n"),o=[],i=2,s=n.length;i/,"$2").replace(/\([^)]*\)/g,"")||void 0;i.match(/\(([^)]*)\)/)&&(r=i.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var a=void 0===r||"[arguments not available]"===r?void 0:r.split(",");return new t({functionName:s,args:a,fileName:o[0],lineNumber:o[1],columnNumber:o[2],source:e})}),this)}}})?n.apply(e,o):n)||(t.exports=i)}()},function(t,e,r){var n,o,i;!function(r,s){"use strict";o=[],void 0===(i="function"==typeof(n=function(){function t(t){return t.charAt(0).toUpperCase()+t.substring(1)}function e(t){return function(){return this[t]}}var r=["isConstructor","isEval","isNative","isToplevel"],n=["columnNumber","lineNumber"],o=["fileName","functionName","source"],i=r.concat(n,o,["args"],["evalOrigin"]);function s(e){if(e)for(var r=0;ro&&(i=this.queue.length-o),this.maxQueueSize=o,this.queue.splice(0,i)},o.prototype.copyEvents=function(){var t=Array.prototype.slice.call(this.queue,0);if(n.isFunction(this.options.filterTelemetry))try{for(var e=t.length;e--;)this.options.filterTelemetry(t[e])&&t.splice(e,1)}catch(t){this.options.filterTelemetry=null}return t},o.prototype.capture=function(t,e,r,o,s){var a={level:i(t,r),type:t,timestamp_ms:s||n.now(),body:e,source:"client"};o&&(a.uuid=o);try{if(n.isFunction(this.options.filterTelemetry)&&this.options.filterTelemetry(a))return!1}catch(t){this.options.filterTelemetry=null}return this.push(a),a},o.prototype.captureEvent=function(t,e,r,n){return this.capture(t,e,r,n)},o.prototype.captureError=function(t,e,r,n){var o={message:t.message||String(t)};return t.stack&&(o.stack=t.stack),this.capture("error",o,e,r,n)},o.prototype.captureLog=function(t,e,r,n){return this.capture("log",{message:t},e,r,n)},o.prototype.captureNetwork=function(t,e,r,n){e=e||"xhr",t.subtype=t.subtype||e,n&&(t.request=n);var o=this.levelFromStatus(t.status_code);return this.capture("network",t,o,r)},o.prototype.levelFromStatus=function(t){return t>=200&&t<400?"info":0===t||t>=400?"error":"info"},o.prototype.captureDom=function(t,e,r,n,o){var i={subtype:t,element:e};return void 0!==r&&(i.value=r),void 0!==n&&(i.checked=n),this.capture("dom",i,"info",o)},o.prototype.captureNavigation=function(t,e,r){return this.capture("navigation",{from:t,to:e},"info",r)},o.prototype.captureDomContentLoaded=function(t){return this.capture("navigation",{subtype:"DOMContentLoaded"},"info",void 0,t&&t.getTime())},o.prototype.captureLoad=function(t){return this.capture("navigation",{subtype:"load"},"info",void 0,t&&t.getTime())},o.prototype.captureConnectivityChange=function(t,e){return this.captureNetwork({change:t},"connectivity",e)},o.prototype._captureRollbarItem=function(t){if(this.options.includeItemsInTelemetry)return t.err?this.captureError(t.err,t.level,t.uuid,t.timestamp):t.message?this.captureLog(t.message,t.level,t.uuid,t.timestamp):t.custom?this.capture("log",t.custom,t.level,t.uuid,t.timestamp):void 0},o.prototype.push=function(t){this.queue.push(t),this.queue.length>this.maxQueueSize&&this.queue.shift()},t.exports=o},function(t,e,r){"use strict";var n=r(0),o=r(33),i=r(4),s=r(2),a=r(34),u={network:!0,networkResponseHeaders:!1,networkResponseBody:!1,networkRequestHeaders:!1,networkRequestBody:!1,networkErrorOnHttp5xx:!1,networkErrorOnHttp4xx:!1,networkErrorOnHttp0:!1,log:!0,dom:!0,navigation:!0,connectivity:!0,contentSecurityPolicy:!0,errorOnContentSecurityPolicy:!1};function c(t,e,r,n,o){var i=t[e];t[e]=r(i),n&&n[o].push([t,e,i])}function l(t,e){for(var r;t[e].length;)(r=t[e].shift())[0][r[1]]=r[2]}function p(t,e,r,o,i){this.options=t;var s=t.autoInstrument;!1===t.enabled||!1===s?this.autoInstrument={}:(n.isType(s,"object")||(s=u),this.autoInstrument=n.merge(u,s)),this.scrubTelemetryInputs=!!t.scrubTelemetryInputs,this.telemetryScrubber=t.telemetryScrubber,this.defaultValueScrubber=function(t){for(var e=[],r=0;r3)){i.__rollbar_xhr.end_time_ms=n.now();var e=null;if(i.__rollbar_xhr.response_content_type=i.getResponseHeader("Content-Type"),t.autoInstrument.networkResponseHeaders){var r=t.autoInstrument.networkResponseHeaders;e={};try{var s,a;if(!0===r){var u=i.getAllResponseHeaders();if(u){var c,l,p=u.trim().split(/[\r\n]+/);for(a=0;a=500&&this.autoInstrument.networkErrorOnHttp5xx||e>=400&&this.autoInstrument.networkErrorOnHttp4xx||0===e&&this.autoInstrument.networkErrorOnHttp0){var r=new Error("HTTP request failed with Status "+e);r.stack=t.stack,this.rollbar.error(r,{skipFrames:1})}},p.prototype.deinstrumentConsole=function(){if("console"in this._window&&this._window.console.log)for(var t;this.replacements.log.length;)t=this.replacements.log.shift(),this._window.console[t[0]]=t[1]},p.prototype.instrumentConsole=function(){if("console"in this._window&&this._window.console.log){var t=this,e=this._window.console,r=["debug","info","warn","error","log"];try{for(var o=0,i=r.length;o=0&&t.options[t.selectedIndex]&&this.captureDomEvent("input",t,t.options[t.selectedIndex].value)},p.prototype.captureDomEvent=function(t,e,r,n){if(void 0!==r)if(this.scrubTelemetryInputs||"password"===a.getElementType(e))r="[scrubbed]";else{var o=a.describeElement(e);this.telemetryScrubber?this.telemetryScrubber(o)&&(r="[scrubbed]"):this.defaultValueScrubber(o)&&(r="[scrubbed]")}var i=a.elementArrayToString(a.treeToArray(e));this.telemeter.captureDom(t,i,r,n)},p.prototype.deinstrumentNavigation=function(){var t=this._window.chrome;!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState&&l(this.replacements,"navigation")},p.prototype.instrumentNavigation=function(){var t=this._window.chrome;if(!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState){var e=this;c(this._window,"onpopstate",(function(t){return function(){var r=e._location.href;e.handleUrlChange(e._lastHref,r),t&&t.apply(this,arguments)}}),this.replacements,"navigation"),c(this._window.history,"pushState",(function(t){return function(){var r=arguments.length>2?arguments[2]:void 0;return r&&e.handleUrlChange(e._lastHref,r+""),t.apply(this,arguments)}}),this.replacements,"navigation")}},p.prototype.handleUrlChange=function(t,e){var r=s.parse(this._location.href),n=s.parse(e),o=s.parse(t);this._lastHref=e,r.protocol===n.protocol&&r.host===n.host&&(e=n.path+(n.hash||"")),r.protocol===o.protocol&&r.host===o.host&&(t=o.path+(o.hash||"")),this.telemeter.captureNavigation(t,e)},p.prototype.deinstrumentConnectivity=function(){("addEventListener"in this._window||"body"in this._document)&&(this._window.addEventListener?this.removeListeners("connectivity"):l(this.replacements,"connectivity"))},p.prototype.instrumentConnectivity=function(){if("addEventListener"in this._window||"body"in this._document)if(this._window.addEventListener)this.addListener("connectivity",this._window,"online",void 0,function(){this.telemeter.captureConnectivityChange("online")}.bind(this),!0),this.addListener("connectivity",this._window,"offline",void 0,function(){this.telemeter.captureConnectivityChange("offline")}.bind(this),!0);else{var t=this;c(this._document.body,"ononline",(function(e){return function(){t.telemeter.captureConnectivityChange("online"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity"),c(this._document.body,"onoffline",(function(e){return function(){t.telemeter.captureConnectivityChange("offline"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity")}},p.prototype.handleCspEvent=function(t){var e="Security Policy Violation: blockedURI: "+t.blockedURI+", violatedDirective: "+t.violatedDirective+", effectiveDirective: "+t.effectiveDirective+", ";t.sourceFile&&(e+="location: "+t.sourceFile+", line: "+t.lineNumber+", col: "+t.columnNumber+", "),e+="originalPolicy: "+t.originalPolicy,this.telemeter.captureLog(e,"error"),this.handleCspError(e)},p.prototype.handleCspError=function(t){this.autoInstrument.errorOnContentSecurityPolicy&&this.rollbar.error(t)},p.prototype.deinstrumentContentSecurityPolicy=function(){"addEventListener"in this._document&&this.removeListeners("contentsecuritypolicy")},p.prototype.instrumentContentSecurityPolicy=function(){if("addEventListener"in this._document){var t=this.handleCspEvent.bind(this);this.addListener("contentsecuritypolicy",this._document,"securitypolicyviolation",null,t,!1)}},p.prototype.addListener=function(t,e,r,n,o,i){e.addEventListener?(e.addEventListener(r,o,i),this.eventRemovers[t].push((function(){e.removeEventListener(r,o,i)}))):n&&(e.attachEvent(n,o),this.eventRemovers[t].push((function(){e.detachEvent(n,o)})))},p.prototype.removeListeners=function(t){for(;this.eventRemovers[t].length;)this.eventRemovers[t].shift()()},t.exports=p},function(t,e,r){"use strict";function n(t){return"string"!=typeof t&&(t=String(t)),t.toLowerCase()}function o(t){this.map={},t instanceof o?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}o.prototype.append=function(t,e){t=n(t),e=function(t){return"string"!=typeof t&&(t=String(t)),t}(e);var r=this.map[t];this.map[t]=r?r+", "+e:e},o.prototype.get=function(t){return t=n(t),this.has(t)?this.map[t]:null},o.prototype.has=function(t){return this.map.hasOwnProperty(n(t))},o.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},o.prototype.entries=function(){var t=[];return this.forEach((function(e,r){t.push([r,e])})),function(t){return{next:function(){var e=t.shift();return{done:void 0===e,value:e}}}}(t)},t.exports=function(t){return"undefined"==typeof Headers?new o(t):new Headers(t)}},function(t,e,r){"use strict";function n(t){return(t.getAttribute("type")||"").toLowerCase()}function o(t){if(!t||!t.tagName)return"";var e=[t.tagName];t.id&&e.push("#"+t.id),t.classes&&e.push("."+t.classes.join("."));for(var r=0;r=0;a--){if(e=o(t[a]),r=s+i.length*n+e.length,a=83){i.unshift("...");break}i.unshift(e),s+=e.length}return i.join(" > ")},treeToArray:function(t){for(var e,r=[],n=0;t&&n<5&&"html"!==(e=i(t)).tagName;n++)r.unshift(e),t=t.parentNode;return r},getElementFromEvent:function(t,e){return t.target?t.target:e&&e.elementFromPoint?e.elementFromPoint(t.clientX,t.clientY):void 0},isDescribedElement:function(t,e,r){if(t.tagName.toLowerCase()!==e.toLowerCase())return!1;if(!r)return!0;t=n(t);for(var o=0;o2*e?t.slice(0,e).concat(t.slice(r-e)):t}function a(t,e,r){r=void 0===r?30:r;var o,i=t.data.body;if(i.trace_chain)for(var a=i.trace_chain,u=0;ut?e.slice(0,t-3).concat("..."):e}function c(t,e,r){return[e=o(e,(function e(r,i,s){switch(n.typeName(i)){case"string":return u(t,i);case"object":case"array":return o(i,e,s);default:return i}})),n.stringify(e,r)]}function l(t){return t.exception&&(delete t.exception.description,t.exception.message=u(255,t.exception.message)),t.frames=s(t.frames,1),t}function p(t,e){var r=t.data.body;if(r.trace_chain)for(var o=r.trace_chain,i=0;ie}t.exports={truncate:function(t,e,r){r=void 0===r?524288:r;for(var n,o,s,u=[i,a,c.bind(null,1024),c.bind(null,512),c.bind(null,256),p];n=u.shift();)if(t=(o=n(t,e))[0],(s=o[1]).error||!f(s.value,r))return s;return s},raw:i,truncateFrames:a,truncateStrings:c,maybeTruncateValue:u}}])})); \ No newline at end of file diff --git a/dist/rollbar.noconflict.umd.js b/dist/rollbar.noconflict.umd.js index 5c00e9958..15dcefefd 100644 --- a/dist/rollbar.noconflict.umd.js +++ b/dist/rollbar.noconflict.umd.js @@ -4690,7 +4690,7 @@ module.exports = { module.exports = { - version: '2.26.2', + version: '2.26.3', endpoint: 'api.rollbar.com/api/1/item/', logLevel: 'debug', reportLevel: 'debug', @@ -5142,7 +5142,9 @@ Instrumenter.prototype.instrumentNetwork = function() { var xhrp = this._window.XMLHttpRequest.prototype; replace(xhrp, 'open', function(orig) { return function(method, url) { - if (_.isType(url, 'string')) { + var isUrlObject = _isUrlObject(url) + if (_.isType(url, 'string') || isUrlObject) { + url = isUrlObject ? url.toString() : url; if (this.__rollbar_xhr) { this.__rollbar_xhr.method = method; this.__rollbar_xhr.url = url; @@ -5305,8 +5307,9 @@ Instrumenter.prototype.instrumentNetwork = function() { var input = args[0]; var method = 'GET'; var url; - if (_.isType(input, 'string')) { - url = input; + var isUrlObject = _isUrlObject(input) + if (_.isType(input, 'string') || isUrlObject) { + url = isUrlObject ? input.toString() : input; } else if (input) { url = input.url; if (input.method) { @@ -5733,6 +5736,10 @@ Instrumenter.prototype.removeListeners = function(section) { } }; +function _isUrlObject(input) { + return typeof URL !== 'undefined' && input instanceof URL +} + module.exports = Instrumenter; diff --git a/dist/rollbar.noconflict.umd.js.map b/dist/rollbar.noconflict.umd.js.map index b7b6d35bf..43725022d 100644 --- a/dist/rollbar.noconflict.umd.js.map +++ b/dist/rollbar.noconflict.umd.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://rollbar/webpack/universalModuleDefinition","webpack://rollbar/webpack/bootstrap","webpack://rollbar/./src/utility.js","webpack://rollbar/./src/browser/logger.js","webpack://rollbar/./src/browser/url.js","webpack://rollbar/./src/errorParser.js","webpack://rollbar/./src/scrub.js","webpack://rollbar/./src/utility/traverse.js","webpack://rollbar/./src/browser/bundles/rollbar.noconflict.js","webpack://rollbar/./src/browser/rollbar.js","webpack://rollbar/./src/browser/core.js","webpack://rollbar/./src/rollbar.js","webpack://rollbar/./src/rateLimiter.js","webpack://rollbar/./src/merge.js","webpack://rollbar/./src/queue.js","webpack://rollbar/./src/notifier.js","webpack://rollbar/./src/api.js","webpack://rollbar/./src/apiUtility.js","webpack://rollbar/./node_modules/console-polyfill/index.js","webpack://rollbar/./src/browser/detection.js","webpack://rollbar/./src/browser/globalSetup.js","webpack://rollbar/./src/browser/transport.js","webpack://rollbar/./src/browser/transport/fetch.js","webpack://rollbar/./src/browser/transport/xhr.js","webpack://rollbar/./src/browser/transforms.js","webpack://rollbar/./node_modules/error-stack-parser/error-stack-parser.js","webpack://rollbar/./node_modules/error-stack-parser/node_modules/stackframe/stackframe.js","webpack://rollbar/./src/transforms.js","webpack://rollbar/./src/browser/predicates.js","webpack://rollbar/./src/predicates.js","webpack://rollbar/./src/defaults.js","webpack://rollbar/./src/browser/defaults/scrubFields.js","webpack://rollbar/./src/telemetry.js","webpack://rollbar/./src/browser/telemetry.js","webpack://rollbar/./src/utility/headers.js","webpack://rollbar/./src/browser/domUtility.js","webpack://rollbar/./src/utility/polyfillJSON.js","webpack://rollbar/./vendor/JSON-js/json3.js","webpack://rollbar/./src/browser/wrapGlobals.js","webpack://rollbar/./src/truncation.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;QCVA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;AClFa;;AAEb,YAAY,mBAAO,CAAC,EAAS;;AAE7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,OAAO;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,EAAE;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,mCAAmC,OAAO;AAC1C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,iBAAiB,YAAY;AAC7B;AACA,qBAAqB;AACrB;AACA,KAAK,wBAAwB;AAC7B;AACA,KAAK,yBAAyB;AAC9B;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kCAAkC,OAAO;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,SAAS;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,kCAAkC,OAAO;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,SAAS,UAAU,YAAY,GAAG;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,aAAa;AAChC;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5wBa;;AAEb;AACA,mBAAO,CAAC,EAAkB;AAC1B,gBAAgB,mBAAO,CAAC,EAAa;AACrC,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;AC3Ca;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;AChFa;;AAEb,uBAAuB,mBAAO,CAAC,EAAoB;;AAEnD;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;;AAEA,sBAAsB,wBAAwB;AAC9C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,eAAe;AACf;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7Ha;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,eAAe,mBAAO,CAAC,CAAoB;;AAE3C;AACA;;AAEA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,WAAW;AAC9B;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC9Fa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,kBAAkB;;AAElB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,eAAe,gBAAgB;AAC/B;AACA;AACA;;AAEA,yBAAyB;AACzB;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;;;;ACtDa;;AAEb,cAAc,mBAAO,CAAC,CAAY;;AAElC;AACA;AACA;;AAEA;;;;;;;;ACRa;;AAEb,cAAc,mBAAO,CAAC,CAAQ;AAC9B,gBAAgB,mBAAO,CAAC,EAAc;AACtC,mBAAmB,mBAAO,CAAC,EAAa;AACxC,mBAAmB,mBAAO,CAAC,EAAyB;AACpD,kBAAkB,mBAAO,CAAC,EAAe;AACzC,YAAY,mBAAO,CAAC,CAAU;AAC9B,iBAAiB,mBAAO,CAAC,EAAe;;AAExC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;;;;;;;ACnBa;;AAEb,aAAa,mBAAO,CAAC,EAAY;AACjC,QAAQ,mBAAO,CAAC,CAAY;AAC5B,UAAU,mBAAO,CAAC,EAAQ;AAC1B,aAAa,mBAAO,CAAC,CAAU;AAC/B,cAAc,mBAAO,CAAC,EAAe;;AAErC,gBAAgB,mBAAO,CAAC,EAAa;AACrC,aAAa,mBAAO,CAAC,CAAO;;AAE5B,iBAAiB,mBAAO,CAAC,EAAc;AACvC,uBAAuB,mBAAO,CAAC,EAAe;AAC9C,iBAAiB,mBAAO,CAAC,EAAc;AACvC,uBAAuB,mBAAO,CAAC,EAAe;AAC9C,kBAAkB,mBAAO,CAAC,CAAgB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,0BAA0B,sBAAsB;AAChD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,oCAAoC,SAAS;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,eAAe,mBAAO,CAAC,EAAa;AACpC,kBAAkB,mBAAO,CAAC,EAAwB;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACxjBa;;AAEb,kBAAkB,mBAAO,CAAC,EAAe;AACzC,YAAY,mBAAO,CAAC,EAAS;AAC7B,eAAe,mBAAO,CAAC,EAAY;AACnC,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,6EAA6E,UAAU;AACvF,yFAAyF,UAAU;;AAEnG;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,6BAA6B;AAC7B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACnRa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AChJa;;AAEb;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA,WAAW,YAAY;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACvDa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wDAAwD,WAAW;AACnE;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,QAAQ;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,aAAa,8BAA8B;AAC3C;AACA;AACA;AACA;AACA,+CAA+C,SAAS;AACxD;AACA;AACA,cAAc;AACd;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,SAAS;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,+BAA+B;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC7Qa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACxHa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,cAAc,mBAAO,CAAC,EAAc;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;AC5Ga;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACzGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;AClBY;;AAEb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;AC/Ba;;AAEb;AACA,gBAAgB,QAAQ;AACxB;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;;AAEA;AACA,gBAAgB,QAAQ;;AAExB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;;;;;;;AClGa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,uBAAuB,mBAAO,CAAC,EAAmB;AAClD,qBAAqB,mBAAO,CAAC,EAAiB;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC/Ha;;AAEb,aAAa,mBAAO,CAAC,CAAW;AAChC,QAAQ,mBAAO,CAAC,CAAe;;AAE/B;AACA;AACA;;AAEA;AACA;AACA,wCAAwC,mBAAmB;AAC3D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;;AAEA;;;;;;;;ACpCa;;AAEb;;AAEA,QAAQ,mBAAO,CAAC,CAAe;AAC/B,aAAa,mBAAO,CAAC,CAAW;;AAEhC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AChKa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,kBAAkB,mBAAO,CAAC,CAAgB;AAC1C,aAAa,mBAAO,CAAC,CAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,OAAO;AAC7C;AACA,oBAAoB,6CAA6C;AACjE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,4BAA4B,gBAAgB;AAC5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,sBAAsB;AACvC;AACA;AACA;;AAEA,4BAA4B,oBAAoB;AAChD;AACA;;AAEA;AACA;;AAEA;AACA;AACA,8BAA8B,aAAa;AAC3C;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,kBAAkB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACnVA;AACA;AACA;;AAEA;AACA,QAAQ,IAA0C;AAClD,QAAQ,iCAA6B,CAAC,uBAAY,CAAC,oCAAE,OAAO;AAAA;AAAA;AAAA,oGAAC;AAC7D,KAAK,MAAM,EAIN;AACL,CAAC;AACD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,MAAM;AACzB,oBAAoB,MAAM;AAC1B;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA,CAAC;;;;;;;ACzMD;AACA;AACA;;AAEA;AACA,QAAQ,IAA0C;AAClD,QAAQ,iCAAqB,EAAE,oCAAE,OAAO;AAAA;AAAA;AAAA,oGAAC;AACzC,KAAK,MAAM,EAIN;AACL,CAAC;AACD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,wBAAwB;AAC3C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA,CAAC;;;;;;;;AC9IY;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,sBAAsB;AAC1D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,8BAA8B;AAC9B;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5Ja;;AAEb,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;ACba;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe;;AAEf;;AAEA,uCAAuC,eAAe;;AAEtD;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA;;AAEA,wCAAwC,eAAe;;AAEvD,mBAAmB,gBAAgB;AACnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,SAAS;AAC1B;;AAEA,mBAAmB,qBAAqB;AACxC;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClMa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACVa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5Da;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qCAAqC,mBAAmB;AACxD;;AAEA;AACA,qCAAqC,4BAA4B;AACjE;AACA;AACA,8BAA8B,4BAA4B;AAC1D;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD;AACA;AACA,8BAA8B,gBAAgB;AAC9C;AACA;;AAEA;AACA,8BAA8B,aAAa;AAC3C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AClLa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,cAAc,mBAAO,CAAC,EAAoB;AAC1C,YAAY,mBAAO,CAAC,CAAU;AAC9B,gBAAgB,mBAAO,CAAC,CAAO;AAC/B,cAAc,mBAAO,CAAC,EAAc;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gDAAgD,aAAa;AAC7D;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B,mBAAmB,qBAAqB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,6BAA6B,0BAA0B;AACvD;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA,iBAAiB;AACjB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,eAAe,0BAA0B;AACzC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB;;AAEjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,SAAS;AAC9C;AACA;AACA,GAAG;AACH,yCAAyC;AACzC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,gDAAgD,QAAQ;;AAExD;AACA;;AAEA;AACA,gDAAgD,QAAQ;;AAExD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACtwBa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;AC/Fa;;AAEb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,6BAA6B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,4BAA4B,QAAQ;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,4BAA4B;AAC7C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,uBAAuB;AACpC;AACA;AACA;AACA,2BAA2B,sBAAsB;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnIa;;AAEb,mBAAmB,mBAAO,CAAC,EAA4B;;AAEvD;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB;AACpB;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,yCAAyC,iBAAiB;AAC1D,8BAA8B,kBAAkB;;AAEhD,yCAAyC,iBAAiB;AAC1D,sCAAsC,6BAA6B;;AAEnE;AACA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,wBAAwB;AACxB,+CAA+C,EAAE;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;;AAGA;;AAEA;;AAEA,UAAU;AACV,UAAU;AACV,UAAU;AACV;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA,qBAAqB,YAAY;AACjC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,qBAAqB,YAAY;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,eAAe;AACf;AACA,cAAc,wDAAwD;AACtE,cAAc,0BAA0B;AACxC;AACA;AACA;AACA;;AAEA;;AAEA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,mBAAmB,WAAW;AAC9B;AACA;;AAEA;;AAEA,OAAO;AACP;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,sBAAsB,UAAU;AAChC;AACA;;;AAGA;;AAEA;AACA;;AAEA;AACA;;AAEA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB,oBAAoB;AACpB,cAAc;AACd,gBAAgB;AAChB,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,UAAU;AACV;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,WAAW;AACX;AACA,wBAAwB,gDAAgD;AACxE;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,SAAS;AACT,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,WAAW;AACX;AACA,wBAAwB,gDAAgD;AACxE;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,sCAAsC,EAAE;AACxC;AACA;AACA;AACA,SAAS;AACT;;AAEA;;AAEA;AACA;;AAEA;AACA,+CAA+C,yGAAyG,EAAE;;AAE1J;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,SAAS;AACT;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE,UAAU;AACvB;AACA;AACA,KAAK;AACL;AACA;;AAEA;;;;;;;;AC1vBa;;AAEb;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,aAAa,oBAAoB;AACjC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC1Ca;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,eAAe,mBAAO,CAAC,CAAoB;;AAE3C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA","file":"rollbar.noconflict.umd.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"rollbar\"] = factory();\n\telse\n\t\troot[\"rollbar\"] = factory();\n})(this, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n","'use strict';\n\nvar merge = require('./merge');\n\nvar RollbarJSON = {};\nfunction setupJSON(polyfillJSON) {\n if (isFunction(RollbarJSON.stringify) && isFunction(RollbarJSON.parse)) {\n return;\n }\n\n if (isDefined(JSON)) {\n // If polyfill is provided, prefer it over existing non-native shims.\n if(polyfillJSON) {\n if (isNativeFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isNativeFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n } else { // else accept any interface that is present.\n if (isFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n }\n }\n if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {\n polyfillJSON && polyfillJSON(RollbarJSON);\n }\n}\n\n/*\n * isType - Given a Javascript value and a string, returns true if the type of the value matches the\n * given string.\n *\n * @param x - any value\n * @param t - a lowercase string containing one of the following type names:\n * - undefined\n * - null\n * - error\n * - number\n * - boolean\n * - string\n * - symbol\n * - function\n * - object\n * - array\n * @returns true if x is of type t, otherwise false\n */\nfunction isType(x, t) {\n return t === typeName(x);\n}\n\n/*\n * typeName - Given a Javascript value, returns the type of the object as a string\n */\nfunction typeName(x) {\n var name = typeof x;\n if (name !== 'object') {\n return name;\n }\n if (!x) {\n return 'null';\n }\n if (x instanceof Error) {\n return 'error';\n }\n return ({}).toString.call(x).match(/\\s([a-zA-Z]+)/)[1].toLowerCase();\n}\n\n/* isFunction - a convenience function for checking if a value is a function\n *\n * @param f - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isFunction(f) {\n return isType(f, 'function');\n}\n\n/* isNativeFunction - a convenience function for checking if a value is a native JS function\n *\n * @param f - any value\n * @returns true if f is a native JS function, otherwise false\n */\nfunction isNativeFunction(f) {\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n var funcMatchString = Function.prototype.toString.call(Object.prototype.hasOwnProperty)\n .replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?');\n var reIsNative = RegExp('^' + funcMatchString + '$');\n return isObject(f) && reIsNative.test(f);\n}\n\n/* isObject - Checks if the argument is an object\n *\n * @param value - any value\n * @returns true is value is an object function is an object)\n*/\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/* isString - Checks if the argument is a string\n *\n * @param value - any value\n * @returns true if value is a string\n*/\nfunction isString(value) {\n return typeof value === 'string' || value instanceof String\n}\n\n/**\n * isFiniteNumber - determines whether the passed value is a finite number\n *\n * @param {*} n - any value\n * @returns true if value is a finite number\n */\n function isFiniteNumber(n) {\n return Number.isFinite(n);\n}\n\n/*\n * isDefined - a convenience function for checking if a value is not equal to undefined\n *\n * @param u - any value\n * @returns true if u is anything other than undefined\n */\nfunction isDefined(u) {\n return !isType(u, 'undefined');\n}\n\n/*\n * isIterable - convenience function for checking if a value can be iterated, essentially\n * whether it is an object or an array.\n *\n * @param i - any value\n * @returns true if i is an object or an array as determined by `typeName`\n */\nfunction isIterable(i) {\n var type = typeName(i);\n return (type === 'object' || type === 'array');\n}\n\n/*\n * isError - convenience function for checking if a value is of an error type\n *\n * @param e - any value\n * @returns true if e is an error\n */\nfunction isError(e) {\n // Detect both Error and Firefox Exception type\n return isType(e, 'error') || isType(e, 'exception');\n}\n\n/* isPromise - a convenience function for checking if a value is a promise\n *\n * @param p - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isPromise(p) {\n return isObject(p) && isType(p.then, 'function');\n}\n\nfunction redact() {\n return '********';\n}\n\n// from http://stackoverflow.com/a/8809472/1138191\nfunction uuid4() {\n var d = now();\n var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n var r = (d + Math.random() * 16) % 16 | 0;\n d = Math.floor(d / 16);\n return (c === 'x' ? r : (r & 0x7 | 0x8)).toString(16);\n });\n return uuid;\n}\n\nvar LEVELS = {\n debug: 0,\n info: 1,\n warning: 2,\n error: 3,\n critical: 4\n};\n\nfunction sanitizeUrl(url) {\n var baseUrlParts = parseUri(url);\n if (!baseUrlParts) {\n return '(unknown)';\n }\n\n // remove a trailing # if there is no anchor\n if (baseUrlParts.anchor === '') {\n baseUrlParts.source = baseUrlParts.source.replace('#', '');\n }\n\n url = baseUrlParts.source.replace('?' + baseUrlParts.query, '');\n return url;\n}\n\nvar parseUriOptions = {\n strictMode: false,\n key: [\n 'source',\n 'protocol',\n 'authority',\n 'userInfo',\n 'user',\n 'password',\n 'host',\n 'port',\n 'relative',\n 'path',\n 'directory',\n 'file',\n 'query',\n 'anchor'\n ],\n q: {\n name: 'queryKey',\n parser: /(?:^|&)([^&=]*)=?([^&]*)/g\n },\n parser: {\n strict: /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n loose: /^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/\n }\n};\n\nfunction parseUri(str) {\n if (!isType(str, 'string')) {\n return undefined;\n }\n\n var o = parseUriOptions;\n var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);\n var uri = {};\n\n for (var i = 0, l = o.key.length; i < l; ++i) {\n uri[o.key[i]] = m[i] || '';\n }\n\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) {\n uri[o.q.name][$1] = $2;\n }\n });\n\n return uri;\n}\n\nfunction addParamsAndAccessTokenToPath(accessToken, options, params) {\n params = params || {};\n params.access_token = accessToken;\n var paramsArray = [];\n var k;\n for (k in params) {\n if (Object.prototype.hasOwnProperty.call(params, k)) {\n paramsArray.push([k, params[k]].join('='));\n }\n }\n var query = '?' + paramsArray.sort().join('&');\n\n options = options || {};\n options.path = options.path || '';\n var qs = options.path.indexOf('?');\n var h = options.path.indexOf('#');\n var p;\n if (qs !== -1 && (h === -1 || h > qs)) {\n p = options.path;\n options.path = p.substring(0,qs) + query + '&' + p.substring(qs+1);\n } else {\n if (h !== -1) {\n p = options.path;\n options.path = p.substring(0,h) + query + p.substring(h);\n } else {\n options.path = options.path + query;\n }\n }\n}\n\nfunction formatUrl(u, protocol) {\n protocol = protocol || u.protocol;\n if (!protocol && u.port) {\n if (u.port === 80) {\n protocol = 'http:';\n } else if (u.port === 443) {\n protocol = 'https:';\n }\n }\n protocol = protocol || 'https:';\n\n if (!u.hostname) {\n return null;\n }\n var result = protocol + '//' + u.hostname;\n if (u.port) {\n result = result + ':' + u.port;\n }\n if (u.path) {\n result = result + u.path;\n }\n return result;\n}\n\nfunction stringify(obj, backup) {\n var value, error;\n try {\n value = RollbarJSON.stringify(obj);\n } catch (jsonError) {\n if (backup && isFunction(backup)) {\n try {\n value = backup(obj);\n } catch (backupError) {\n error = backupError;\n }\n } else {\n error = jsonError;\n }\n }\n return {error: error, value: value};\n}\n\nfunction maxByteSize(string) {\n // The transport will use utf-8, so assume utf-8 encoding.\n //\n // This minimal implementation will accurately count bytes for all UCS-2 and\n // single code point UTF-16. If presented with multi code point UTF-16,\n // which should be rare, it will safely overcount, not undercount.\n //\n // While robust utf-8 encoders exist, this is far smaller and far more performant.\n // For quickly counting payload size for truncation, smaller is better.\n\n var count = 0;\n var length = string.length;\n\n for (var i = 0; i < length; i++) {\n var code = string.charCodeAt(i);\n if (code < 128) { // up to 7 bits\n count = count + 1;\n } else if (code < 2048) { // up to 11 bits\n count = count + 2;\n } else if (code < 65536) { // up to 16 bits\n count = count + 3;\n }\n }\n\n return count;\n}\n\nfunction jsonParse(s) {\n var value, error;\n try {\n value = RollbarJSON.parse(s);\n } catch (e) {\n error = e;\n }\n return {error: error, value: value};\n}\n\nfunction makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n mode,\n backupMessage,\n errorParser\n) {\n var location = {\n url: url || '',\n line: lineno,\n column: colno\n };\n location.func = errorParser.guessFunctionName(location.url, location.line);\n location.context = errorParser.gatherContext(location.url, location.line);\n var href = typeof document !== 'undefined' && document && document.location && document.location.href;\n var useragent = typeof window !== 'undefined' && window && window.navigator && window.navigator.userAgent;\n return {\n 'mode': mode,\n 'message': error ? String(error) : (message || backupMessage),\n 'url': href,\n 'stack': [location],\n 'useragent': useragent\n };\n}\n\nfunction wrapCallback(logger, f) {\n return function(err, resp) {\n try {\n f(err, resp);\n } catch (e) {\n logger.error(e);\n }\n };\n}\n\nfunction nonCircularClone(obj) {\n var seen = [obj];\n\n function clone(obj, seen) {\n var value, name, newSeen, result = {};\n\n try {\n for (name in obj) {\n value = obj[name];\n\n if (value && (isType(value, 'object') || isType(value, 'array'))) {\n if (seen.includes(value)) {\n result[name] = 'Removed circular reference: ' + typeName(value);\n } else {\n newSeen = seen.slice();\n newSeen.push(value);\n result[name] = clone(value, newSeen);\n }\n continue;\n }\n\n result[name] = value;\n }\n } catch (e) {\n result = 'Failed cloning custom data: ' + e.message;\n }\n return result;\n }\n return clone(obj, seen);\n}\n\nfunction createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\n var diagnostic = {};\n var argTypes = [];\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n argTypes.push(typ);\n switch (typ) {\n case 'undefined':\n break;\n case 'string':\n message ? extraArgs.push(arg) : message = arg;\n break;\n case 'function':\n callback = wrapCallback(logger, arg);\n break;\n case 'date':\n extraArgs.push(arg);\n break;\n case 'error':\n case 'domexception':\n case 'exception': // Firefox Exception type\n err ? extraArgs.push(arg) : err = arg;\n break;\n case 'object':\n case 'array':\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n if (requestKeys && typ === 'object' && !request) {\n for (var j = 0, len = requestKeys.length; j < len; ++j) {\n if (arg[requestKeys[j]] !== undefined) {\n request = arg;\n break;\n }\n }\n if (request) {\n break;\n }\n }\n custom ? extraArgs.push(arg) : custom = arg;\n break;\n default:\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n extraArgs.push(arg);\n }\n }\n\n // if custom is an array this turns it into an object with integer keys\n if (custom) custom = nonCircularClone(custom);\n\n if (extraArgs.length > 0) {\n if (!custom) custom = nonCircularClone({});\n custom.extraArgs = nonCircularClone(extraArgs);\n }\n\n var item = {\n message: message,\n err: err,\n custom: custom,\n timestamp: now(),\n callback: callback,\n notifier: notifier,\n diagnostic: diagnostic,\n uuid: uuid4()\n };\n\n setCustomItemKeys(item, custom);\n\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n item.diagnostic.original_arg_types = argTypes;\n return item;\n}\n\nfunction setCustomItemKeys(item, custom) {\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (custom && custom.skipFrames !== undefined) {\n item.skipFrames = custom.skipFrames;\n delete custom.skipFrames;\n }\n}\n\nfunction addErrorContext(item, errors) {\n var custom = item.data.custom || {};\n var contextAdded = false;\n\n try {\n for (var i = 0; i < errors.length; ++i) {\n if (errors[i].hasOwnProperty('rollbarContext')) {\n custom = merge(custom, nonCircularClone(errors[i].rollbarContext));\n contextAdded = true;\n }\n }\n\n // Avoid adding an empty object to the data.\n if (contextAdded) {\n item.data.custom = custom;\n }\n } catch (e) {\n item.diagnostic.error_context = 'Failed: ' + e.message;\n }\n}\n\nvar TELEMETRY_TYPES = ['log', 'network', 'dom', 'navigation', 'error', 'manual'];\nvar TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];\n\nfunction arrayIncludes(arr, val) {\n for (var k = 0; k < arr.length; ++k) {\n if (arr[k] === val) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction createTelemetryEvent(args) {\n var type, metadata, level;\n var arg;\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n switch (typ) {\n case 'string':\n if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {\n type = arg;\n } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {\n level = arg;\n }\n break;\n case 'object':\n metadata = arg;\n break;\n default:\n break;\n }\n }\n var event = {\n type: type || 'manual',\n metadata: metadata || {},\n level: level\n };\n\n return event;\n}\n\n/*\n * get - given an obj/array and a keypath, return the value at that keypath or\n * undefined if not possible.\n *\n * @param obj - an object or array\n * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'\n * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`\n */\nfunction get(obj, path) {\n if (!obj) {\n return undefined;\n }\n var keys = path.split('.');\n var result = obj;\n try {\n for (var i = 0, len = keys.length; i < len; ++i) {\n result = result[keys[i]];\n }\n } catch (e) {\n result = undefined;\n }\n return result;\n}\n\nfunction set(obj, path, value) {\n if (!obj) {\n return;\n }\n var keys = path.split('.');\n var len = keys.length;\n if (len < 1) {\n return;\n }\n if (len === 1) {\n obj[keys[0]] = value;\n return;\n }\n try {\n var temp = obj[keys[0]] || {};\n var replacement = temp;\n for (var i = 1; i < len - 1; ++i) {\n temp[keys[i]] = temp[keys[i]] || {};\n temp = temp[keys[i]];\n }\n temp[keys[len-1]] = value;\n obj[keys[0]] = replacement;\n } catch (e) {\n return;\n }\n}\n\nfunction formatArgsAsString(args) {\n var i, len, arg;\n var result = [];\n for (i = 0, len = args.length; i < len; ++i) {\n arg = args[i];\n switch (typeName(arg)) {\n case 'object':\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500) {\n arg = arg.substr(0, 497) + '...';\n }\n break;\n case 'null':\n arg = 'null';\n break;\n case 'undefined':\n arg = 'undefined';\n break;\n case 'symbol':\n arg = arg.toString();\n break;\n }\n result.push(arg);\n }\n return result.join(' ');\n}\n\nfunction now() {\n if (Date.now) {\n return +Date.now();\n }\n return +new Date();\n}\n\nfunction filterIp(requestData, captureIp) {\n if (!requestData || !requestData['user_ip'] || captureIp === true) {\n return;\n }\n var newIp = requestData['user_ip'];\n if (!captureIp) {\n newIp = null;\n } else {\n try {\n var parts;\n if (newIp.indexOf('.') !== -1) {\n parts = newIp.split('.');\n parts.pop();\n parts.push('0');\n newIp = parts.join('.');\n } else if (newIp.indexOf(':') !== -1) {\n parts = newIp.split(':');\n if (parts.length > 2) {\n var beginning = parts.slice(0, 3);\n var slashIdx = beginning[2].indexOf('/');\n if (slashIdx !== -1) {\n beginning[2] = beginning[2].substring(0, slashIdx);\n }\n var terminal = '0000:0000:0000:0000:0000';\n newIp = beginning.concat(terminal).join(':');\n }\n } else {\n newIp = null;\n }\n } catch (e) {\n newIp = null;\n }\n }\n requestData['user_ip'] = newIp;\n}\n\nfunction handleOptions(current, input, payload, logger) {\n var result = merge(current, input, payload);\n result = updateDeprecatedOptions(result, logger);\n if (!input || input.overwriteScrubFields) {\n return result;\n }\n if (input.scrubFields) {\n result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);\n }\n return result;\n}\n\nfunction updateDeprecatedOptions(options, logger) {\n if(options.hostWhiteList && !options.hostSafeList) {\n options.hostSafeList = options.hostWhiteList;\n options.hostWhiteList = undefined;\n logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');\n }\n if(options.hostBlackList && !options.hostBlockList) {\n options.hostBlockList = options.hostBlackList;\n options.hostBlackList = undefined;\n logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');\n }\n return options;\n}\n\nmodule.exports = {\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n createItem: createItem,\n addErrorContext: addErrorContext,\n createTelemetryEvent: createTelemetryEvent,\n filterIp: filterIp,\n formatArgsAsString: formatArgsAsString,\n formatUrl: formatUrl,\n get: get,\n handleOptions: handleOptions,\n isError: isError,\n isFiniteNumber: isFiniteNumber,\n isFunction: isFunction,\n isIterable: isIterable,\n isNativeFunction: isNativeFunction,\n isObject: isObject,\n isString: isString,\n isType: isType,\n isPromise: isPromise,\n jsonParse: jsonParse,\n LEVELS: LEVELS,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n merge: merge,\n now: now,\n redact: redact,\n RollbarJSON: RollbarJSON,\n sanitizeUrl: sanitizeUrl,\n set: set,\n setupJSON: setupJSON,\n stringify: stringify,\n maxByteSize: maxByteSize,\n typeName: typeName,\n uuid4: uuid4\n};\n","'use strict';\n\n/* eslint-disable no-console */\nrequire('console-polyfill');\nvar detection = require('./detection');\nvar _ = require('../utility');\n\nfunction error() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.error(_.formatArgsAsString(args));\n } else {\n console.error.apply(console, args);\n }\n}\n\nfunction info() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.info(_.formatArgsAsString(args));\n } else {\n console.info.apply(console, args);\n }\n}\n\nfunction log() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.log(_.formatArgsAsString(args));\n } else {\n console.log.apply(console, args);\n }\n}\n\n/* eslint-enable no-console */\n\nmodule.exports = {\n error: error,\n info: info,\n log: log\n};\n","'use strict';\n\n// See https://nodejs.org/docs/latest/api/url.html\nfunction parse(url) {\n var result = {\n protocol: null, auth: null, host: null, path: null,\n hash: null, href: url, hostname: null, port: null,\n pathname: null, search: null, query: null\n };\n\n var i, last;\n i = url.indexOf('//');\n if (i !== -1) {\n result.protocol = url.substring(0,i);\n last = i+2;\n } else {\n last = 0;\n }\n \n i = url.indexOf('@', last);\n if (i !== -1) {\n result.auth = url.substring(last, i);\n last = i+1;\n }\n\n i = url.indexOf('/', last);\n if (i === -1) {\n i = url.indexOf('?', last);\n if (i === -1) {\n i = url.indexOf('#', last);\n if (i === -1) {\n result.host = url.substring(last);\n } else {\n result.host = url.substring(last, i);\n result.hash = url.substring(i);\n }\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n return result;\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n\n i = url.indexOf('#', last);\n if (i === -1) {\n result.path = url.substring(last);\n } else {\n result.path = url.substring(last, i);\n result.hash = url.substring(i);\n }\n\n if (result.path) {\n var pathParts = result.path.split('?');\n result.pathname = pathParts[0];\n result.query = pathParts[1];\n result.search = result.query ? '?' + result.query : null;\n }\n return result;\n}\n\nmodule.exports = {\n parse: parse\n};\n","'use strict';\n\nvar ErrorStackParser = require('error-stack-parser');\n\nvar UNKNOWN_FUNCTION = '?';\nvar ERR_CLASS_REGEXP = new RegExp('^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ');\n\nfunction guessFunctionName() {\n return UNKNOWN_FUNCTION;\n}\n\n\nfunction gatherContext() {\n return null;\n}\n\n\nfunction Frame(stackFrame) {\n var data = {};\n\n data._stackFrame = stackFrame;\n\n data.url = stackFrame.fileName;\n data.line = stackFrame.lineNumber;\n data.func = stackFrame.functionName;\n data.column = stackFrame.columnNumber;\n data.args = stackFrame.args;\n\n data.context = gatherContext();\n\n return data;\n}\n\n\nfunction Stack(exception, skip) {\n function getStack() {\n var parserStack = [];\n\n skip = skip || 0;\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch(e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = skip; i < parserStack.length; i++) {\n stack.push(new Frame(parserStack[i]));\n }\n\n return stack;\n }\n\n return {\n stack: getStack(),\n message: exception.message,\n name: _mostSpecificErrorName(exception),\n rawStack: exception.stack,\n rawException: exception\n };\n}\n\n\nfunction parse(e, skip) {\n var err = e;\n\n if (err.nested || err.cause) {\n var traceChain = [];\n while (err) {\n traceChain.push(new Stack(err, skip));\n err = err.nested || err.cause;\n\n skip = 0; // Only apply skip value to primary error\n }\n\n // Return primary error with full trace chain attached.\n traceChain[0].traceChain = traceChain;\n return traceChain[0];\n } else {\n return new Stack(err, skip);\n }\n}\n\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg || !errMsg.match) {\n return ['Unknown error. There was no error message to display.', ''];\n }\n var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);\n var errClass = '(unknown)';\n\n if (errClassMatch) {\n errClass = errClassMatch[errClassMatch.length - 1];\n errMsg = errMsg.replace((errClassMatch[errClassMatch.length - 2] || '') + errClass + ':', '');\n errMsg = errMsg.replace(/(^[\\s]+|[\\s]+$)/g, '');\n }\n return [errClass, errMsg];\n}\n\n// * Prefers any value over an empty string\n// * Prefers any value over 'Error' where possible\n// * Prefers name over constructor.name when both are more specific than 'Error'\nfunction _mostSpecificErrorName(error) {\n var name = error.name && error.name.length && error.name;\n var constructorName = error.constructor.name && error.constructor.name.length && error.constructor.name;\n\n if (!name || !constructorName) {\n return name || constructorName;\n }\n\n if (name === 'Error') {\n return constructorName;\n }\n return name;\n}\n\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame\n};\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction scrub(data, scrubFields, scrubPaths) {\n scrubFields = scrubFields || [];\n\n if (scrubPaths) {\n for (var i = 0; i < scrubPaths.length; ++i) {\n scrubPath(data, scrubPaths[i]);\n }\n }\n\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart) {\n return paramPart + _.redact();\n }\n\n function paramScrubber(v) {\n var i;\n if (_.isType(v, 'string')) {\n for (i = 0; i < queryRes.length; ++i) {\n v = v.replace(queryRes[i], redactQueryParam);\n }\n }\n return v;\n }\n\n function valScrubber(k, v) {\n var i;\n for (i = 0; i < paramRes.length; ++i) {\n if (paramRes[i].test(k)) {\n v = _.redact();\n break;\n }\n }\n return v;\n }\n\n function scrubber(k, v, seen) {\n var tmpV = valScrubber(k, v);\n if (tmpV === v) {\n if (_.isType(v, 'object') || _.isType(v, 'array')) {\n return traverse(v, scrubber, seen);\n }\n return paramScrubber(tmpV);\n } else {\n return tmpV;\n }\n }\n\n return traverse(data, scrubber);\n}\n\nfunction scrubPath(obj, path) {\n var keys = path.split('.');\n var last = keys.length - 1;\n try {\n for (var i = 0; i <= last; ++i) {\n if (i < last) {\n obj = obj[keys[i]];\n } else {\n obj[keys[i]] = _.redact();\n }\n }\n } catch (e) {\n // Missing key is OK;\n }\n}\n\nfunction _getScrubFieldRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '^\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?$';\n ret.push(new RegExp(pat, 'i'));\n }\n return ret;\n}\n\n\nfunction _getScrubQueryParamRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?';\n ret.push(new RegExp('(' + pat + '=)([^&\\\\n]+)', 'igm'));\n }\n return ret;\n}\n\nmodule.exports = scrub;\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction traverse(obj, func, seen) {\n var k, v, i;\n var isObj = _.isType(obj, 'object');\n var isArray = _.isType(obj, 'array');\n var keys = [];\n var seenIndex;\n\n // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.\n seen = seen || { obj: [], mapped: []};\n\n if (isObj) {\n seenIndex = seen.obj.indexOf(obj);\n\n if (isObj && seenIndex !== -1) {\n // Prefer the mapped object if there is one.\n return seen.mapped[seenIndex] || seen.obj[seenIndex];\n }\n\n seen.obj.push(obj);\n seenIndex = seen.obj.length - 1;\n }\n\n if (isObj) {\n for (k in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, k)) {\n keys.push(k);\n }\n }\n } else if (isArray) {\n for (i = 0; i < obj.length; ++i) {\n keys.push(i);\n }\n }\n\n var result = isObj ? {} : [];\n var same = true;\n for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n result[k] = func(k, v, seen);\n same = same && result[k] === obj[k];\n }\n\n if (isObj && !same) {\n seen.mapped[seenIndex] = result;\n }\n\n return !same ? result : obj;\n}\n\nmodule.exports = traverse;\n","'use strict';\n\nvar rollbar = require('../rollbar');\n\nif ((typeof window !== 'undefined') && !window._rollbarStartTime) {\n window._rollbarStartTime = (new Date()).getTime();\n}\n\nmodule.exports = rollbar;\n","'use strict';\n\nvar Rollbar = require('./core');\nvar telemeter = require('../telemetry');\nvar instrumenter = require('./telemetry');\nvar polyfillJSON = require('../utility/polyfillJSON');\nvar wrapGlobals = require('./wrapGlobals');\nvar scrub = require('../scrub');\nvar truncation = require('../truncation');\n\nRollbar.setComponents({\n telemeter: telemeter,\n instrumenter: instrumenter,\n polyfillJSON: polyfillJSON,\n wrapGlobals: wrapGlobals,\n scrub: scrub,\n truncation: truncation\n});\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar Client = require('../rollbar');\nvar _ = require('../utility');\nvar API = require('../api');\nvar logger = require('./logger');\nvar globals = require('./globalSetup');\n\nvar Transport = require('./transport');\nvar urllib = require('./url');\n\nvar transforms = require('./transforms');\nvar sharedTransforms = require('../transforms');\nvar predicates = require('./predicates');\nvar sharedPredicates = require('../predicates');\nvar errorParser = require('../errorParser');\n\nfunction Rollbar(options, client) {\n this.options = _.handleOptions(defaultOptions, options, null, logger);\n this.options._configuredOptions = options;\n var Telemeter = this.components.telemeter;\n var Instrumenter = this.components.instrumenter;\n var polyfillJSON = this.components.polyfillJSON;\n this.wrapGlobals = this.components.wrapGlobals;\n this.scrub = this.components.scrub;\n var truncation = this.components.truncation;\n\n var transport = new Transport(truncation);\n var api = new API(this.options, transport, urllib, truncation);\n if (Telemeter) {\n this.telemeter = new Telemeter(this.options);\n }\n this.client = client || new Client(this.options, api, logger, this.telemeter, 'browser');\n var gWindow = _gWindow();\n var gDocument = (typeof document != 'undefined') && document;\n this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers\n this.anonymousErrorsPending = 0;\n addTransformsToNotifier(this.client.notifier, this, gWindow);\n addPredicatesToQueue(this.client.queue);\n this.setupUnhandledCapture();\n if (Instrumenter) {\n this.instrumenter = new Instrumenter(this.options, this.client.telemeter, this, gWindow, gDocument);\n this.instrumenter.instrument();\n }\n _.setupJSON(polyfillJSON);\n\n // Used with rollbar-react for rollbar-react-native compatibility.\n this.rollbar = this;\n}\n\nvar _instance = null;\nRollbar.init = function(options, client) {\n if (_instance) {\n return _instance.global(options).configure(options);\n }\n _instance = new Rollbar(options, client);\n return _instance;\n};\n\nRollbar.prototype.components = {};\n\nRollbar.setComponents = function(components) {\n Rollbar.prototype.components = components;\n}\n\nfunction handleUninitialized(maybeCallback) {\n var message = 'Rollbar is not initialized';\n logger.error(message);\n if (maybeCallback) {\n maybeCallback(new Error(message));\n }\n}\n\nRollbar.prototype.global = function(options) {\n this.client.global(options);\n return this;\n};\nRollbar.global = function(options) {\n if (_instance) {\n return _instance.global(options);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.configure = function(options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = {payload: payloadData};\n }\n this.options = _.handleOptions(oldOptions, options, payload, logger);\n this.options._configuredOptions = _.handleOptions(oldOptions._configuredOptions, options, payload);\n this.client.configure(this.options, payloadData);\n this.instrumenter && this.instrumenter.configure(this.options);\n this.setupUnhandledCapture();\n return this;\n};\nRollbar.configure = function(options, payloadData) {\n if (_instance) {\n return _instance.configure(options, payloadData);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.lastError = function() {\n return this.client.lastError;\n};\nRollbar.lastError = function() {\n if (_instance) {\n return _instance.lastError();\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.log = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.log(item);\n return {uuid: uuid};\n};\nRollbar.log = function() {\n if (_instance) {\n return _instance.log.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.debug = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.debug(item);\n return {uuid: uuid};\n};\nRollbar.debug = function() {\n if (_instance) {\n return _instance.debug.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.info = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.info(item);\n return {uuid: uuid};\n};\nRollbar.info = function() {\n if (_instance) {\n return _instance.info.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warn = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warn(item);\n return {uuid: uuid};\n};\nRollbar.warn = function() {\n if (_instance) {\n return _instance.warn.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warning = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warning(item);\n return {uuid: uuid};\n};\nRollbar.warning = function() {\n if (_instance) {\n return _instance.warning.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.error = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.error(item);\n return {uuid: uuid};\n};\nRollbar.error = function() {\n if (_instance) {\n return _instance.error.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.critical = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.critical(item);\n return {uuid: uuid};\n};\nRollbar.critical = function() {\n if (_instance) {\n return _instance.critical.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.buildJsonPayload = function(item) {\n return this.client.buildJsonPayload(item);\n};\nRollbar.buildJsonPayload = function() {\n if (_instance) {\n return _instance.buildJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.sendJsonPayload = function(jsonPayload) {\n return this.client.sendJsonPayload(jsonPayload);\n};\nRollbar.sendJsonPayload = function() {\n if (_instance) {\n return _instance.sendJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.setupUnhandledCapture = function() {\n var gWindow = _gWindow();\n\n if (!this.unhandledExceptionsInitialized) {\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(gWindow, this);\n if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {\n this.wrapGlobals(gWindow, this);\n }\n this.unhandledExceptionsInitialized = true;\n }\n }\n if (!this.unhandledRejectionsInitialized) {\n if (this.options.captureUnhandledRejections || this.options.handleUnhandledRejections) {\n globals.captureUnhandledRejections(gWindow, this);\n this.unhandledRejectionsInitialized = true;\n }\n }\n};\n\nRollbar.prototype.handleUncaughtException = function(message, url, lineno, colno, error, context) {\n if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {\n return;\n }\n\n // Chrome will always send 5+ arguments and error will be valid or null, not undefined.\n // If error is undefined, we have a different caller.\n // Chrome also sends errors from web workers with null error, but does not invoke\n // prepareStackTrace() for these. Test for empty url to skip them.\n if (this.options.inspectAnonymousErrors && this.isChrome && error === null && url === '') {\n return 'anonymous';\n }\n\n var item;\n var stackInfo = _.makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n 'onerror',\n 'uncaught exception',\n errorParser\n );\n if (_.isError(error)) {\n item = this._createItem([message, error, context]);\n item._unhandledStackInfo = stackInfo;\n } else if (_.isError(url)) {\n item = this._createItem([message, url, context]);\n item._unhandledStackInfo = stackInfo;\n } else {\n item = this._createItem([message, context]);\n item.stackInfo = stackInfo;\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n this.client.log(item);\n};\n\n/**\n * Chrome only. Other browsers will ignore.\n *\n * Use Error.prepareStackTrace to extract information about errors that\n * do not have a valid error object in onerror().\n *\n * In tested version of Chrome, onerror is called first but has no way\n * to communicate with prepareStackTrace. Use a counter to let this\n * handler know which errors to send to Rollbar.\n *\n * In config options, set inspectAnonymousErrors to enable.\n */\nRollbar.prototype.handleAnonymousErrors = function() {\n if (!this.options.inspectAnonymousErrors || !this.isChrome) {\n return;\n }\n\n var r = this;\n function prepareStackTrace(error, _stack) { // eslint-disable-line no-unused-vars\n if (r.options.inspectAnonymousErrors) {\n if (r.anonymousErrorsPending) {\n // This is the only known way to detect that onerror saw an anonymous error.\n // It depends on onerror reliably being called before Error.prepareStackTrace,\n // which so far holds true on tested versions of Chrome. If versions of Chrome\n // are tested that behave differently, this logic will need to be updated\n // accordingly.\n r.anonymousErrorsPending -= 1;\n\n if (!error) {\n // Not likely to get here, but calling handleUncaughtException from here\n // without an error object would throw off the anonymousErrorsPending counter,\n // so return now.\n return;\n }\n\n // Allow this to be tracked later.\n error._isAnonymous = true;\n\n // url, lineno, colno shouldn't be needed for these errors.\n // If that changes, update this accordingly, using the unused\n // _stack param as needed (rather than parse error.toString()).\n r.handleUncaughtException(error.message, null, null, null, error);\n }\n }\n\n // Workaround to ensure stack is preserved for normal errors.\n return error.stack;\n }\n\n // https://v8.dev/docs/stack-trace-api\n try {\n Error.prepareStackTrace = prepareStackTrace;\n } catch (e) {\n this.options.inspectAnonymousErrors = false;\n this.error('anonymous error handler failed', e);\n }\n}\n\nRollbar.prototype.handleUnhandledRejection = function(reason, promise) {\n if (!this.options.captureUnhandledRejections && !this.options.handleUnhandledRejections) {\n return;\n }\n\n var message = 'unhandled rejection was null or undefined!';\n if (reason) {\n if (reason.message) {\n message = reason.message;\n } else {\n var reasonResult = _.stringify(reason);\n if (reasonResult.value) {\n message = reasonResult.value;\n }\n }\n }\n var context = (reason && reason._rollbarContext) || (promise && promise._rollbarContext);\n\n var item;\n if (_.isError(reason)) {\n item = this._createItem([message, reason, context]);\n } else {\n item = this._createItem([message, reason, context]);\n item.stackInfo = _.makeUnhandledStackInfo(\n message,\n '',\n 0,\n 0,\n null,\n 'unhandledrejection',\n '',\n errorParser\n );\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n item._originalArgs = item._originalArgs || [];\n item._originalArgs.push(promise);\n this.client.log(item);\n};\n\nRollbar.prototype.wrap = function(f, context, _before) {\n try {\n var ctxFn;\n if(_.isFunction(context)) {\n ctxFn = context;\n } else {\n ctxFn = function() { return context || {}; };\n }\n\n if (!_.isFunction(f)) {\n return f;\n }\n\n if (f._isWrap) {\n return f;\n }\n\n if (!f._rollbar_wrapped) {\n f._rollbar_wrapped = function () {\n if (_before && _.isFunction(_before)) {\n _before.apply(this, arguments);\n }\n try {\n return f.apply(this, arguments);\n } catch(exc) {\n var e = exc;\n if (e && window._rollbarWrappedError !== e) {\n if (_.isType(e, 'string')) {\n e = new String(e);\n }\n e._rollbarContext = ctxFn() || {};\n e._rollbarContext._wrappedSource = f.toString();\n\n window._rollbarWrappedError = e;\n }\n throw e;\n }\n };\n\n f._rollbar_wrapped._isWrap = true;\n\n if (f.hasOwnProperty) {\n for (var prop in f) {\n if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {\n f._rollbar_wrapped[prop] = f[prop];\n }\n }\n }\n }\n\n return f._rollbar_wrapped;\n } catch (e) {\n // Return the original function if the wrap fails.\n return f;\n }\n};\nRollbar.wrap = function(f, context) {\n if (_instance) {\n return _instance.wrap(f, context);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.captureEvent = function() {\n var event = _.createTelemetryEvent(arguments);\n return this.client.captureEvent(event.type, event.metadata, event.level);\n};\nRollbar.captureEvent = function() {\n if (_instance) {\n return _instance.captureEvent.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\n// The following two methods are used internally and are not meant for public use\nRollbar.prototype.captureDomContentLoaded = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureLoad(ts);\n};\n\n/* Internal */\n\nfunction addTransformsToNotifier(notifier, rollbar, gWindow) {\n notifier\n .addTransform(transforms.handleDomException)\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(gWindow))\n .addTransform(transforms.addClientInfo(gWindow))\n .addTransform(transforms.addPluginInfo(gWindow))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(sharedTransforms.addConfigToPayload)\n .addTransform(transforms.addScrubber(rollbar.scrub))\n .addTransform(sharedTransforms.addPayloadOptions)\n .addTransform(sharedTransforms.userTransform(logger))\n .addTransform(sharedTransforms.addConfiguredOptions)\n .addTransform(sharedTransforms.addDiagnosticKeys)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(sharedPredicates.checkLevel)\n .addPredicate(predicates.checkIgnore)\n .addPredicate(sharedPredicates.userCheckIgnore(logger))\n .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))\n .addPredicate(sharedPredicates.urlIsSafeListed(logger))\n .addPredicate(sharedPredicates.messageIsIgnored(logger));\n}\n\nRollbar.prototype.loadFull = function() {\n logger.info('Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.');\n};\n\nRollbar.prototype._createItem = function(args) {\n return _.createItem(args, logger, this);\n};\n\nfunction _getFirstFunction(args) {\n for (var i = 0, len = args.length; i < len; ++i) {\n if (_.isFunction(args[i])) {\n return args[i];\n }\n }\n return undefined;\n}\n\nfunction _gWindow() {\n return ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n}\n\nvar defaults = require('../defaults');\nvar scrubFields = require('./defaults/scrubFields');\n\nvar defaultOptions = {\n version: defaults.version,\n scrubFields: scrubFields.scrubFields,\n logLevel: defaults.logLevel,\n reportLevel: defaults.reportLevel,\n uncaughtErrorLevel: defaults.uncaughtErrorLevel,\n endpoint: defaults.endpoint,\n verbose: false,\n enabled: true,\n transmit: true,\n sendConfig: false,\n includeItemsInTelemetry: true,\n captureIp: true,\n inspectAnonymousErrors: true,\n ignoreDuplicateErrors: true,\n wrapGlobalEventHandlers: false\n};\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar _ = require('./utility');\n\n/*\n * Rollbar - the interface to Rollbar\n *\n * @param options\n * @param api\n * @param logger\n */\nfunction Rollbar(options, api, logger, telemeter, platform) {\n this.options = _.merge(options);\n this.logger = logger;\n Rollbar.rateLimiter.configureGlobal(this.options);\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.api = api;\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n\n // This must happen before the Notifier is created\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = telemeter;\n setStackTraceLimit(options);\n this.lastError = null;\n this.lastErrorHash = 'none';\n}\n\nvar defaultOptions = {\n maxItems: 0,\n itemsPerMinute: 60\n};\n\nRollbar.rateLimiter = new RateLimiter(defaultOptions);\n\nRollbar.prototype.global = function (options) {\n Rollbar.rateLimiter.configureGlobal(options);\n return this;\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n\n this.options = _.merge(oldOptions, options, payload);\n\n // This must happen before the Notifier is configured\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier && this.notifier.configure(this.options);\n this.telemeter && this.telemeter.configure(this.options);\n setStackTraceLimit(options);\n this.global(this.options);\n\n if (validateTracer(options.tracer)) {\n this.tracer = options.tracer\n }\n\n return this;\n};\n\nRollbar.prototype.log = function (item) {\n var level = this._defaultLogLevel();\n return this._log(level, item);\n};\n\nRollbar.prototype.debug = function (item) {\n this._log('debug', item);\n};\n\nRollbar.prototype.info = function (item) {\n this._log('info', item);\n};\n\nRollbar.prototype.warn = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.warning = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.error = function (item) {\n this._log('error', item);\n};\n\nRollbar.prototype.critical = function (item) {\n this._log('critical', item);\n};\n\nRollbar.prototype.wait = function (callback) {\n this.queue.wait(callback);\n};\n\nRollbar.prototype.captureEvent = function (type, metadata, level) {\n return this.telemeter && this.telemeter.captureEvent(type, metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function (ts) {\n return this.telemeter && this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (ts) {\n return this.telemeter && this.telemeter.captureLoad(ts);\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.api.buildJsonPayload(item);\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n this.api.postJsonPayload(jsonPayload);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function (defaultLevel, item) {\n var callback;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {\n if (callback) {\n var error = new Error('ignored identical item');\n error.item = item;\n callback(error);\n }\n return;\n }\n try {\n this._addTracingInfo(item);\n item.level = item.level || defaultLevel;\n this.telemeter && this.telemeter._captureRollbarItem(item);\n item.telemetryEvents = (this.telemeter && this.telemeter.copyEvents()) || [];\n this.notifier.log(item, callback);\n } catch (e) {\n if (callback) {\n callback(e);\n }\n this.logger.error(e);\n }\n};\n\nRollbar.prototype._defaultLogLevel = function () {\n return this.options.logLevel || 'debug';\n};\n\nRollbar.prototype._sameAsLastError = function (item) {\n if (!item._isUncaught) {\n return false;\n }\n var itemHash = generateItemHash(item);\n if (this.lastErrorHash === itemHash) {\n return true;\n }\n this.lastError = item.err;\n this.lastErrorHash = itemHash;\n return false;\n};\n\nRollbar.prototype._addTracingInfo = function (item) {\n // Tracer validation occurs in the constructor\n // or in the Rollbar.prototype.configure methods\n if (this.tracer) {\n // add rollbar occurrence uuid to span\n var span = this.tracer.scope().active();\n\n if (validateSpan(span)) {\n span.setTag('rollbar.error_uuid', item.uuid);\n span.setTag('rollbar.has_error', true);\n span.setTag('error', true);\n span.setTag('rollbar.item_url', `https://rollbar.com/item/uuid/?uuid=${item.uuid}`);\n span.setTag('rollbar.occurrence_url', `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`);\n\n // add span ID & trace ID to occurrence\n var opentracingSpanId = span.context().toSpanId();\n var opentracingTraceId = span.context().toTraceId();\n\n if (item.custom) {\n item.custom.opentracing_span_id = opentracingSpanId;\n item.custom.opentracing_trace_id = opentracingTraceId;\n } else {\n item.custom = {\n opentracing_span_id: opentracingSpanId,\n opentracing_trace_id: opentracingTraceId\n };\n }\n }\n }\n}\n\nfunction generateItemHash(item) {\n var message = item.message || '';\n var stack = (item.err || {}).stack || String(item.err);\n return message + '::' + stack;\n}\n\n// Node.js, Chrome, Safari, and some other browsers support this property\n// which globally sets the number of stack frames returned in an Error object.\n// If a browser can't use it, no harm done.\nfunction setStackTraceLimit(options) {\n if (options.stackTraceLimit) {\n Error.stackTraceLimit = options.stackTraceLimit;\n }\n}\n\n/**\n * Validate the Tracer object provided to the Client\n * is valid for our Opentracing use case.\n * @param {opentracer.Tracer} tracer\n */\nfunction validateTracer(tracer) {\n if (!tracer) {\n return false;\n }\n\n if (!tracer.scope || typeof tracer.scope !== 'function') {\n return false;\n }\n\n var scope = tracer.scope();\n\n if (!scope || !scope.active || typeof scope.active !== 'function') {\n return false;\n }\n\n return true;\n}\n\n/**\n * Validate the Span object provided\n * @param {opentracer.Span} span\n */\nfunction validateSpan(span) {\n if (!span || !span.context || typeof span.context !== 'function') {\n return false;\n }\n\n var spanContext = span.context();\n\n if (!spanContext\n || !spanContext.toSpanId\n || !spanContext.toTraceId\n || typeof spanContext.toSpanId !== 'function'\n || typeof spanContext.toTraceId !== 'function') {\n return false\n }\n\n return true;\n}\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar\n *\n * @param options - the same options that are accepted by configureGlobal offered as a convenience\n */\nfunction RateLimiter(options) {\n this.startTime = _.now();\n this.counter = 0;\n this.perMinCounter = 0;\n this.platform = null;\n this.platformOptions = {};\n this.configureGlobal(options);\n}\n\nRateLimiter.globalSettings = {\n startTime: _.now(),\n maxItems: undefined,\n itemsPerMinute: undefined\n};\n\n/*\n * configureGlobal - set the global rate limiter options\n *\n * @param options - Only the following values are recognized:\n * startTime: a timestamp of the form returned by (new Date()).getTime()\n * maxItems: the maximum items\n * itemsPerMinute: the max number of items to send in a given minute\n */\nRateLimiter.prototype.configureGlobal = function(options) {\n if (options.startTime !== undefined) {\n RateLimiter.globalSettings.startTime = options.startTime;\n }\n if (options.maxItems !== undefined) {\n RateLimiter.globalSettings.maxItems = options.maxItems;\n }\n if (options.itemsPerMinute !== undefined) {\n RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;\n }\n};\n\n/*\n * shouldSend - determine if we should send a given item based on rate limit settings\n *\n * @param item - the item we are about to send\n * @returns An object with the following structure:\n * error: (Error|null)\n * shouldSend: bool\n * payload: (Object|null)\n * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and\n * exactly one of error or payload will be non-null. If error is non-null, the returned Error will\n * describe the situation, but it means that we were already over a rate limit (either globally or\n * per minute) when this item was checked. If error is null, and therefore payload is non-null, it\n * means this item put us over the global rate limit and the payload should be sent to Rollbar in\n * place of the passed in item.\n */\nRateLimiter.prototype.shouldSend = function(item, now) {\n now = now || _.now();\n var elapsedTime = now - this.startTime;\n if (elapsedTime < 0 || elapsedTime >= 60000) {\n this.startTime = now;\n this.perMinCounter = 0;\n }\n\n var globalRateLimit = RateLimiter.globalSettings.maxItems;\n var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;\n\n if (checkRate(item, globalRateLimit, this.counter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimit + ' max items reached', false);\n } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimitPerMin + ' items per minute reached', false);\n }\n this.counter++;\n this.perMinCounter++;\n\n var shouldSend = !checkRate(item, globalRateLimit, this.counter);\n var perMinute = shouldSend;\n shouldSend = shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);\n return shouldSendValue(this.platform, this.platformOptions, null, shouldSend, globalRateLimit, globalRateLimitPerMin, perMinute);\n};\n\nRateLimiter.prototype.setPlatformOptions = function(platform, options) {\n this.platform = platform;\n this.platformOptions = options;\n};\n\n/* Helpers */\n\nfunction checkRate(item, limit, counter) {\n return !item.ignoreRateLimit && limit >= 1 && counter > limit;\n}\n\nfunction shouldSendValue(platform, options, error, shouldSend, globalRateLimit, limitPerMin, perMinute) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute);\n }\n return {error: error, shouldSend: shouldSend, payload: payload};\n}\n\nfunction rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute) {\n var environment = options.environment || (options.payload && options.payload.environment);\n var msg;\n if (perMinute) {\n msg = 'item per minute limit reached, ignoring errors until timeout';\n } else {\n msg = 'maxItems has been hit, ignoring errors until reset.';\n }\n var item = {\n body: {\n message: {\n body: msg,\n extra: {\n maxItems: globalRateLimit,\n itemsPerMinute: limitPerMin\n }\n }\n },\n language: 'javascript',\n environment: environment,\n notifier: {\n version: (options.notifier && options.notifier.version) || options.version\n }\n };\n if (platform === 'browser') {\n item.platform = 'browser';\n item.framework = 'browser-js';\n item.notifier.name = 'rollbar-browser-js';\n } else if (platform === 'server') {\n item.framework = options.framework || 'node-js';\n item.notifier.name = options.notifier.name;\n } else if (platform === 'react-native') {\n item.framework = options.framework || 'react-native';\n item.notifier.name = options.notifier.name;\n }\n return item;\n}\n\nmodule.exports = RateLimiter;\n","'use strict';\n\n'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isPlainObject = function isPlainObject(obj) {\n\tif (!obj || toStr.call(obj) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tvar hasOwnConstructor = hasOwn.call(obj, 'constructor');\n\tvar hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n\t// Not own constructor property must be Object\n\tif (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n\t\treturn false;\n\t}\n\n\t// Own properties are enumerated firstly, so to speed up,\n\t// if last one is own, then all properties are own.\n\tvar key;\n\tfor (key in obj) {/**/}\n\n\treturn typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\nfunction merge() {\n var i, src, copy, clone, name,\n result = {},\n current = null,\n length = arguments.length;\n\n for (i=0; i < length; i++) {\n current = arguments[i];\n if (current == null) {\n continue;\n }\n\n for (name in current) {\n src = result[name];\n copy = current[name];\n if (result !== copy) {\n if (copy && isPlainObject(copy)) {\n clone = src && isPlainObject(src) ? src : {};\n result[name] = merge(clone, copy);\n } else if (typeof copy !== 'undefined') {\n result[name] = copy;\n }\n }\n }\n }\n return result;\n}\n\nmodule.exports = merge;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Queue - an object which handles which handles a queue of items to be sent to Rollbar.\n * This object handles rate limiting via a passed in rate limiter, retries based on connection\n * errors, and filtering of items based on a set of configurable predicates. The communication to\n * the backend is performed via a given API object.\n *\n * @param rateLimiter - An object which conforms to the interface\n * rateLimiter.shouldSend(item) -> bool\n * @param api - An object which conforms to the interface\n * api.postItem(payload, function(err, response))\n * @param logger - An object used to log verbose messages if desired\n * @param options - see Queue.prototype.configure\n */\nfunction Queue(rateLimiter, api, logger, options) {\n this.rateLimiter = rateLimiter;\n this.api = api;\n this.logger = logger;\n this.options = options;\n this.predicates = [];\n this.pendingItems = [];\n this.pendingRequests = [];\n this.retryQueue = [];\n this.retryHandle = null;\n this.waitCallback = null;\n this.waitIntervalID = null;\n}\n\n/*\n * configure - updates the options this queue uses\n *\n * @param options\n */\nQueue.prototype.configure = function(options) {\n this.api && this.api.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addPredicate - adds a predicate to the end of the list of predicates for this queue\n *\n * @param predicate - function(item, options) -> (bool|{err: Error})\n * Returning true means that this predicate passes and the item is okay to go on the queue\n * Returning false means do not add the item to the queue, but it is not an error\n * Returning {err: Error} means do not add the item to the queue, and the given error explains why\n * Returning {err: undefined} is equivalent to returning true but don't do that\n */\nQueue.prototype.addPredicate = function(predicate) {\n if (_.isFunction(predicate)) {\n this.predicates.push(predicate);\n }\n return this;\n};\n\nQueue.prototype.addPendingItem = function(item) {\n this.pendingItems.push(item);\n};\n\nQueue.prototype.removePendingItem = function(item) {\n var idx = this.pendingItems.indexOf(item);\n if (idx !== -1) {\n this.pendingItems.splice(idx, 1);\n }\n};\n\n/*\n * addItem - Send an item to the Rollbar API if all of the predicates are satisfied\n *\n * @param item - The payload to send to the backend\n * @param callback - function(error, repsonse) which will be called with the response from the API\n * in the case of a success, otherwise response will be null and error will have a value. If both\n * error and response are null then the item was stopped by a predicate which did not consider this\n * to be an error condition, but nonetheless did not send the item to the API.\n * @param originalError - The original error before any transformations that is to be logged if any\n */\nQueue.prototype.addItem = function(item, callback, originalError, originalItem) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() { return; };\n }\n var predicateResult = this._applyPredicates(item);\n if (predicateResult.stop) {\n this.removePendingItem(originalItem);\n callback(predicateResult.err);\n return;\n }\n this._maybeLog(item, originalError);\n this.removePendingItem(originalItem);\n if (!this.options.transmit) {\n callback(new Error('Transmit disabled'));\n return;\n }\n this.pendingRequests.push(item);\n try {\n this._makeApiRequest(item, function(err, resp) {\n this._dequeuePendingRequest(item);\n callback(err, resp);\n }.bind(this));\n } catch (e) {\n this._dequeuePendingRequest(item);\n callback(e);\n }\n};\n\n/*\n * wait - Stop any further errors from being added to the queue, and get called back when all items\n * currently processing have finished sending to the backend.\n *\n * @param callback - function() called when all pending items have been sent\n */\nQueue.prototype.wait = function(callback) {\n if (!_.isFunction(callback)) {\n return;\n }\n this.waitCallback = callback;\n if (this._maybeCallWait()) {\n return;\n }\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitIntervalID = setInterval(function() {\n this._maybeCallWait();\n }.bind(this), 500);\n};\n\n/* _applyPredicates - Sequentially applies the predicates that have been added to the queue to the\n * given item with the currently configured options.\n *\n * @param item - An item in the queue\n * @returns {stop: bool, err: (Error|null)} - stop being true means do not add item to the queue,\n * the error value should be passed up to a callbak if we are stopping.\n */\nQueue.prototype._applyPredicates = function(item) {\n var p = null;\n for (var i = 0, len = this.predicates.length; i < len; i++) {\n p = this.predicates[i](item, this.options);\n if (!p || p.err !== undefined) {\n return {stop: true, err: p.err};\n }\n }\n return {stop: false, err: null};\n};\n\n/*\n * _makeApiRequest - Send an item to Rollbar, callback when done, if there is an error make an\n * effort to retry if we are configured to do so.\n *\n * @param item - an item ready to send to the backend\n * @param callback - function(err, response)\n */\nQueue.prototype._makeApiRequest = function(item, callback) {\n var rateLimitResponse = this.rateLimiter.shouldSend(item);\n if (rateLimitResponse.shouldSend) {\n this.api.postItem(item, function(err, resp) {\n if (err) {\n this._maybeRetry(err, item, callback);\n } else {\n callback(err, resp);\n }\n }.bind(this));\n } else if (rateLimitResponse.error) {\n callback(rateLimitResponse.error);\n } else {\n this.api.postItem(rateLimitResponse.payload, callback);\n }\n};\n\n// These are errors basically mean there is no internet connection\nvar RETRIABLE_ERRORS = ['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED', 'EHOSTUNREACH', 'EPIPE', 'EAI_AGAIN'];\n\n/*\n * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback\n * with the error.\n *\n * @param err - an error returned by the API transport\n * @param item - the item that was trying to be sent when this error occured\n * @param callback - function(err, response)\n */\nQueue.prototype._maybeRetry = function(err, item, callback) {\n var shouldRetry = false;\n if (this.options.retryInterval) {\n for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {\n if (err.code === RETRIABLE_ERRORS[i]) {\n shouldRetry = true;\n break;\n }\n }\n if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {\n item.retries = item.retries ? item.retries + 1 : 1;\n if (item.retries > this.options.maxRetries) {\n shouldRetry = false;\n }\n }\n }\n if (shouldRetry) {\n this._retryApiRequest(item, callback);\n } else {\n callback(err);\n }\n};\n\n/*\n * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process\n * that queue based on the retryInterval in the options for this queue.\n *\n * @param item - an item that failed to send due to an error we deem retriable\n * @param callback - function(err, response)\n */\nQueue.prototype._retryApiRequest = function(item, callback) {\n this.retryQueue.push({item: item, callback: callback});\n\n if (!this.retryHandle) {\n this.retryHandle = setInterval(function() {\n while (this.retryQueue.length) {\n var retryObject = this.retryQueue.shift();\n this._makeApiRequest(retryObject.item, retryObject.callback);\n }\n }.bind(this), this.options.retryInterval);\n }\n};\n\n/*\n * _dequeuePendingRequest - Removes the item from the pending request queue, this queue is used to\n * enable to functionality of providing a callback that clients can pass to `wait` to be notified\n * when the pending request queue has been emptied. This must be called when the API finishes\n * processing this item. If a `wait` callback is configured, it is called by this function.\n *\n * @param item - the item previously added to the pending request queue\n */\nQueue.prototype._dequeuePendingRequest = function(item) {\n var idx = this.pendingRequests.indexOf(item);\n if (idx !== -1) {\n this.pendingRequests.splice(idx, 1);\n this._maybeCallWait();\n }\n};\n\nQueue.prototype._maybeLog = function(data, originalError) {\n if (this.logger && this.options.verbose) {\n var message = originalError;\n message = message || _.get(data, 'body.trace.exception.message');\n message = message || _.get(data, 'body.trace_chain.0.exception.message');\n if (message) {\n this.logger.error(message);\n return;\n }\n message = _.get(data, 'body.message.body');\n if (message) {\n this.logger.log(message);\n }\n }\n};\n\nQueue.prototype._maybeCallWait = function() {\n if (_.isFunction(this.waitCallback) && this.pendingItems.length === 0 && this.pendingRequests.length === 0) {\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitCallback();\n return true;\n }\n return false;\n};\n\nmodule.exports = Queue;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Notifier - the internal object responsible for delegating between the client exposed API, the\n * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the\n * queue which handles the communcation with the Rollbar API servers.\n *\n * @param queue - an object that conforms to the interface: addItem(item, callback)\n * @param options - an object representing the options to be set for this notifier, this should have\n * any defaults already set by the caller\n */\nfunction Notifier(queue, options) {\n this.queue = queue;\n this.options = options;\n this.transforms = [];\n this.diagnostic = {};\n}\n\n/*\n * configure - updates the options for this notifier with the passed in object\n *\n * @param options - an object which gets merged with the current options set on this notifier\n * @returns this\n */\nNotifier.prototype.configure = function(options) {\n this.queue && this.queue.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addTransform - adds a transform onto the end of the queue of transforms for this notifier\n *\n * @param transform - a function which takes three arguments:\n * * item: An Object representing the data to eventually be sent to Rollbar\n * * options: The current value of the options for this notifier\n * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this\n * callback with a null value for error if it wants the processing chain to continue, otherwise\n * with an error to terminate the processing. The item should be the updated item after this\n * transform is finished modifying it.\n */\nNotifier.prototype.addTransform = function(transform) {\n if (_.isFunction(transform)) {\n this.transforms.push(transform);\n }\n return this;\n};\n\n/*\n * log - the internal log function which applies the configured transforms and then pushes onto the\n * queue to be sent to the backend.\n *\n * @param item - An object with the following structure:\n * message [String] - An optional string to be sent to rollbar\n * error [Error] - An optional error\n *\n * @param callback - A function of type function(err, resp) which will be called with exactly one\n * null argument and one non-null argument. The callback will be called once, either during the\n * transform stage if an error occurs inside a transform, or in response to the communication with\n * the backend. The second argument will be the response from the backend in case of success.\n */\nNotifier.prototype.log = function(item, callback) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!this.options.enabled) {\n return callback(new Error('Rollbar is not enabled'));\n }\n\n this.queue.addPendingItem(item);\n var originalError = item.err;\n this._applyTransforms(item, function(err, i) {\n if (err) {\n this.queue.removePendingItem(item);\n return callback(err, null);\n }\n this.queue.addItem(i, callback, originalError, item);\n }.bind(this));\n};\n\n/* Internal */\n\n/*\n * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See\n * `addTransform` for more information.\n *\n * @param item - An item to be transformed\n * @param callback - A function of type function(err, item) which will be called with a non-null\n * error and a null item in the case of a transform failure, or a null error and non-null item after\n * all transforms have been applied.\n */\nNotifier.prototype._applyTransforms = function(item, callback) {\n var transformIndex = -1;\n var transformsLength = this.transforms.length;\n var transforms = this.transforms;\n var options = this.options;\n\n var cb = function(err, i) {\n if (err) {\n callback(err, null);\n return;\n }\n\n transformIndex++;\n\n if (transformIndex === transformsLength) {\n callback(null, i);\n return;\n }\n\n transforms[transformIndex](i, options, cb);\n };\n\n cb(null, item);\n};\n\nmodule.exports = Notifier;\n","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1/item/',\n search: null,\n version: '1',\n protocol: 'https:',\n port: 443\n};\n\n/**\n * Api is an object that encapsulates methods of communicating with\n * the Rollbar API. It is a standard interface with some parts implemented\n * differently for server or browser contexts. It is an object that should\n * be instantiated when used so it can contain non-global options that may\n * be different for another instance of RollbarApi.\n *\n * @param options {\n * accessToken: the accessToken to use for posting items to rollbar\n * endpoint: an alternative endpoint to send errors to\n * must be a valid, fully qualified URL.\n * The default is: https://api.rollbar.com/api/1/item\n * proxy: if you wish to proxy requests provide an object\n * with the following keys:\n * host or hostname (required): foo.example.com\n * port (optional): 123\n * protocol (optional): https\n * }\n */\nfunction Api(options, transport, urllib, truncation, jsonBackup) {\n this.options = options;\n this.transport = transport;\n this.url = urllib;\n this.truncation = truncation;\n this.jsonBackup = jsonBackup;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, urllib);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function(data, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n var self = this;\n\n // ensure the network request is scheduled after the current tick.\n setTimeout(function() {\n self.transport.post(self.accessToken, transportOptions, payload, callback);\n }, 0);\n};\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.buildJsonPayload = function(data, callback) {\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n\n if (stringifyResult.error) {\n if (callback) {\n callback(stringifyResult.error);\n }\n return null;\n }\n\n return stringifyResult.value;\n};\n\n/**\n *\n * @param jsonPayload\n * @param callback\n */\nApi.prototype.postJsonPayload = function(jsonPayload, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n this.transport.postJsonPayload(this.accessToken, transportOptions, jsonPayload, callback);\n};\n\nApi.prototype.configure = function(options) {\n var oldOptions = this.oldOptions;\n this.options = _.merge(oldOptions, options);\n this.transportOptions = _getTransport(this.options, this.url);\n if (this.options.accessToken !== undefined) {\n this.accessToken = this.options.accessToken;\n }\n return this;\n};\n\nfunction _getTransport(options, url) {\n return helpers.getTransportFromOptions(options, defaultOptions, url);\n}\n\nmodule.exports = Api;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (!_.isType(data.context, 'string')) {\n var contextResult = _.stringify(data.context, jsonBackup);\n if (contextResult.error) {\n data.context = 'Error: could not serialize \\'context\\'';\n } else {\n data.context = contextResult.value || '';\n }\n if (data.context.length > 255) {\n data.context = data.context.substr(0, 255);\n }\n }\n return {\n access_token: accessToken,\n data: data\n };\n}\n\nfunction getTransportFromOptions(options, defaults, url) {\n var hostname = defaults.hostname;\n var protocol = defaults.protocol;\n var port = defaults.port;\n var path = defaults.path;\n var search = defaults.search;\n var timeout = options.timeout;\n var transport = detectTransport(options)\n\n var proxy = options.proxy;\n if (options.endpoint) {\n var opts = url.parse(options.endpoint);\n hostname = opts.hostname;\n protocol = opts.protocol;\n port = opts.port;\n path = opts.pathname;\n search = opts.search;\n }\n return {\n timeout: timeout,\n hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy,\n transport: transport\n };\n}\n\nfunction detectTransport(options) {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var transport = options.defaultTransport || 'xhr';\n if (typeof gWindow.fetch === 'undefined') transport = 'xhr';\n if (typeof gWindow.XMLHttpRequest === 'undefined') transport = 'fetch';\n return transport;\n}\n\nfunction transportOptions(transport, method) {\n var protocol = transport.protocol || 'https:';\n var port = transport.port || (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);\n var hostname = transport.hostname;\n var path = transport.path;\n var timeout = transport.timeout;\n var transportAPI = transport.transport;\n if (transport.search) {\n path = path + transport.search;\n }\n if (transport.proxy) {\n path = protocol + '//' + hostname + path;\n hostname = transport.proxy.host || transport.proxy.hostname;\n port = transport.proxy.port;\n protocol = transport.proxy.protocol || protocol;\n }\n return {\n timeout: timeout,\n protocol: protocol,\n hostname: hostname,\n path: path,\n port: port,\n method: method,\n transport: transportAPI\n };\n}\n\nfunction appendPathToPath(base, path) {\n var baseTrailingSlash = /\\/$/.test(base);\n var pathBeginningSlash = /^\\//.test(path);\n\n if (baseTrailingSlash && pathBeginningSlash) {\n path = path.substring(1);\n } else if (!baseTrailingSlash && !pathBeginningSlash) {\n path = '/' + path;\n }\n\n return base + path;\n}\n\nmodule.exports = {\n buildPayload: buildPayload,\n getTransportFromOptions: getTransportFromOptions,\n transportOptions: transportOptions,\n appendPathToPath: appendPathToPath\n};\n","// Console-polyfill. MIT license.\n// https://github.com/paulmillr/console-polyfill\n// Make it safe to do console.log() always.\n(function(global) {\n 'use strict';\n if (!global.console) {\n global.console = {};\n }\n var con = global.console;\n var prop, method;\n var dummy = function() {};\n var properties = ['memory'];\n var methods = ('assert,clear,count,debug,dir,dirxml,error,exception,group,' +\n 'groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,' +\n 'show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn').split(',');\n while (prop = properties.pop()) if (!con[prop]) con[prop] = {};\n while (method = methods.pop()) if (!con[method]) con[method] = dummy;\n // Using `this` for web workers & supports Browserify / Webpack.\n})(typeof window === 'undefined' ? this : window);\n","'use strict';\n\n// This detection.js module is used to encapsulate any ugly browser/feature\n// detection we may need to do.\n\n// Figure out which version of IE we're using, if any.\n// This is gleaned from http://stackoverflow.com/questions/5574842/best-way-to-check-for-ie-less-than-9-in-javascript-without-library\n// Will return an integer on IE (i.e. 8)\n// Will return undefined otherwise\nfunction getIEVersion() {\n\tvar undef;\n\tif (typeof document === 'undefined') {\n\t\treturn undef;\n\t}\n\n var v = 3,\n div = document.createElement('div'),\n all = div.getElementsByTagName('i');\n\n while (\n div.innerHTML = '',\n all[0]\n );\n\n return v > 4 ? v : undef;\n}\n\nvar Detection = {\n ieVersion: getIEVersion\n};\n\nmodule.exports = Detection;\n","'use strict';\n\nfunction captureUncaughtExceptions(window, handler, shim) {\n if (!window) { return; }\n var oldOnError;\n\n if (typeof handler._rollbarOldOnError === 'function') {\n oldOnError = handler._rollbarOldOnError;\n } else if (window.onerror) {\n oldOnError = window.onerror;\n while (oldOnError._rollbarOldOnError) {\n oldOnError = oldOnError._rollbarOldOnError;\n }\n handler._rollbarOldOnError = oldOnError;\n }\n\n handler.handleAnonymousErrors();\n\n var fn = function() {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n if (shim) {\n fn._rollbarOldOnError = oldOnError;\n }\n window.onerror = fn;\n}\n\nfunction _rollbarWindowOnError(window, r, old, args) {\n if (window._rollbarWrappedError) {\n if (!args[4]) {\n args[4] = window._rollbarWrappedError;\n }\n if (!args[5]) {\n args[5] = window._rollbarWrappedError._rollbarContext;\n }\n window._rollbarWrappedError = null;\n }\n\n var ret = r.handleUncaughtException.apply(r, args);\n\n if (old) {\n old.apply(window, args);\n }\n\n // Let other chained onerror handlers above run before setting this.\n // If an error is thrown and caught within a chained onerror handler,\n // Error.prepareStackTrace() will see that one before the one we want.\n if (ret === 'anonymous') {\n r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()\n }\n}\n\nfunction captureUnhandledRejections(window, handler, shim) {\n if (!window) { return; }\n\n if (typeof window._rollbarURH === 'function' && window._rollbarURH.belongsToShim) {\n window.removeEventListener('unhandledrejection', window._rollbarURH);\n }\n\n var rejectionHandler = function (evt) {\n var reason, promise, detail;\n try {\n reason = evt.reason;\n } catch (e) {\n reason = undefined;\n }\n try {\n promise = evt.promise;\n } catch (e) {\n promise = '[unhandledrejection] error getting `promise` from event';\n }\n try {\n detail = evt.detail;\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\n }\n } catch (e) {\n // Ignore\n }\n if (!reason) {\n reason = '[unhandledrejection] error getting `reason` from event';\n }\n\n if (handler && handler.handleUnhandledRejection) {\n handler.handleUnhandledRejection(reason, promise);\n }\n };\n rejectionHandler.belongsToShim = shim;\n window._rollbarURH = rejectionHandler;\n window.addEventListener('unhandledrejection', rejectionHandler);\n}\n\n\nmodule.exports = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections\n};\n","'use strict';\n\nvar _ = require('../utility');\nvar makeFetchRequest = require('./transport/fetch');\nvar makeXhrRequest = require('./transport/xhr');\n\n/*\n * accessToken may be embedded in payload but that should not\n * be assumed\n *\n * options: {\n * hostname\n * protocol\n * path\n * port\n * method\n * transport ('xhr' | 'fetch')\n * }\n *\n * params is an object containing key/value pairs. These\n * will be appended to the path as 'key=value&key=value'\n *\n * payload is an unserialized object\n */\nfunction Transport(truncation) {\n this.truncation = truncation;\n}\n\nTransport.prototype.get = function(accessToken, options, params, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n _.addParamsAndAccessTokenToPath(accessToken, options, params);\n\n var method = 'GET';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken, url, method, null, callback, requestFactory, options.timeout, options.transport\n );\n}\n\nTransport.prototype.post = function(accessToken, options, payload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!payload) {\n return callback(new Error('Cannot send empty request'));\n }\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n if (stringifyResult.error) {\n return callback(stringifyResult.error);\n }\n\n var writeData = stringifyResult.value;\n var method = 'POST';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken, url, method, writeData, callback, requestFactory, options.timeout, options.transport\n );\n}\n\nTransport.prototype.postJsonPayload = function (accessToken, options, jsonPayload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n var method = 'POST';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken, url, method, jsonPayload, callback, requestFactory, options.timeout, options.transport\n );\n}\n\n\n// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope\n// so Angular change detection isn't triggered on each API call.\n// This is the equivalent of runOutsideAngular().\n//\nTransport.prototype._makeZoneRequest = function () {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;\n var args = Array.prototype.slice.call(arguments);\n\n if (currentZone && currentZone._name === 'angular') {\n var rootZone = currentZone._parent;\n var self = this;\n rootZone.run(function () {\n self._makeRequest.apply(undefined, args);\n });\n } else {\n this._makeRequest.apply(undefined, args);\n }\n}\n\nTransport.prototype._makeRequest = function (\n accessToken, url, method, data, callback, requestFactory, timeout, transport\n) {\n if (typeof RollbarProxy !== 'undefined') {\n return _proxyRequest(data, callback);\n }\n\n if (transport === 'fetch') {\n makeFetchRequest(accessToken, url, method, data, callback, timeout)\n } else {\n makeXhrRequest(accessToken, url, method, data, callback, requestFactory, timeout)\n }\n}\n\n/* global RollbarProxy */\nfunction _proxyRequest(json, callback) {\n var rollbarProxy = new RollbarProxy();\n rollbarProxy.sendJsonPayload(\n json,\n function(_msg) { /* do nothing */ }, // eslint-disable-line no-unused-vars\n function(err) {\n callback(new Error(err));\n }\n );\n}\n\nmodule.exports = Transport;\n","'use strict';\n\nvar logger = require('../logger');\nvar _ = require('../../utility');\n\nfunction makeFetchRequest(accessToken, url, method, data, callback, timeout) {\n var controller;\n var timeoutId;\n\n if(_.isFiniteNumber(timeout)) {\n controller = new AbortController();\n timeoutId = setTimeout(function () {controller.abort()}, timeout);\n }\n\n fetch(url, {\n method: method,\n headers: {\n 'Content-Type': 'application/json',\n 'X-Rollbar-Access-Token': accessToken,\n signal: controller && controller.signal\n },\n body: data,\n })\n .then(function (response) {\n if (timeoutId) clearTimeout(timeoutId);\n return response.json();\n })\n .then(function (data) {\n callback(null, data);\n })\n .catch(function (error) {\n logger.error(error.message);\n callback(error);\n });\n}\n\nmodule.exports = makeFetchRequest;\n","'use strict';\n\n/*global XDomainRequest*/\n\nvar _ = require('../../utility');\nvar logger = require('../logger');\n\nfunction makeXhrRequest(accessToken, url, method, data, callback, requestFactory, timeout) {\n var request;\n if (requestFactory) {\n request = requestFactory();\n } else {\n request = _createXMLHTTPObject();\n }\n if (!request) {\n // Give up, no way to send requests\n return callback(new Error('No way to send a request'));\n }\n try {\n try {\n var onreadystatechange = function() {\n try {\n if (onreadystatechange && request.readyState === 4) {\n onreadystatechange = undefined;\n\n var parseResponse = _.jsonParse(request.responseText);\n if (_isSuccess(request)) {\n callback(parseResponse.error, parseResponse.value);\n return;\n } else if (_isNormalFailure(request)) {\n if (request.status === 403) {\n // likely caused by using a server access token\n var message = parseResponse.value && parseResponse.value.message;\n logger.error(message);\n }\n // return valid http status codes\n callback(new Error(String(request.status)));\n } else {\n // IE will return a status 12000+ on some sort of connection failure,\n // so we return a blank error\n // http://msdn.microsoft.com/en-us/library/aa383770%28VS.85%29.aspx\n var msg = 'XHR response had no status code (likely connection failure)';\n callback(_newRetriableError(msg));\n }\n }\n } catch (ex) {\n //jquery source mentions firefox may error out while accessing the\n //request members if there is a network error\n //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111\n var exc;\n if (ex && ex.stack) {\n exc = ex;\n } else {\n exc = new Error(ex);\n }\n callback(exc);\n }\n };\n\n request.open(method, url, true);\n if (request.setRequestHeader) {\n request.setRequestHeader('Content-Type', 'application/json');\n request.setRequestHeader('X-Rollbar-Access-Token', accessToken);\n }\n\n if(_.isFiniteNumber(timeout)) {\n request.timeout = timeout;\n }\n\n request.onreadystatechange = onreadystatechange;\n request.send(data);\n } catch (e1) {\n // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest\n if (typeof XDomainRequest !== 'undefined') {\n\n // Assume we are in a really old browser which has a bunch of limitations:\n // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx\n\n // Extreme paranoia: if we have XDomainRequest then we have a window, but just in case\n if (!window || !window.location) {\n return callback(new Error('No window available during request, unknown environment'));\n }\n\n // If the current page is http, try and send over http\n if (window.location.href.substring(0, 5) === 'http:' && url.substring(0, 5) === 'https') {\n url = 'http' + url.substring(5);\n }\n\n var xdomainrequest = new XDomainRequest();\n xdomainrequest.onprogress = function() {};\n xdomainrequest.ontimeout = function() {\n var msg = 'Request timed out';\n var code = 'ETIMEDOUT';\n callback(_newRetriableError(msg, code));\n };\n xdomainrequest.onerror = function() {\n callback(new Error('Error during request'));\n };\n xdomainrequest.onload = function() {\n var parseResponse = _.jsonParse(xdomainrequest.responseText);\n callback(parseResponse.error, parseResponse.value);\n };\n xdomainrequest.open(method, url, true);\n xdomainrequest.send(data);\n } else {\n callback(new Error('Cannot find a method to transport a request'));\n }\n }\n } catch (e2) {\n callback(e2);\n }\n}\n\nfunction _createXMLHTTPObject() {\n /* global ActiveXObject:false */\n\n var factories = [\n function () {\n return new XMLHttpRequest();\n },\n function () {\n return new ActiveXObject('Msxml2.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Msxml3.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Microsoft.XMLHTTP');\n }\n ];\n var xmlhttp;\n var i;\n var numFactories = factories.length;\n for (i = 0; i < numFactories; i++) {\n /* eslint-disable no-empty */\n try {\n xmlhttp = factories[i]();\n break;\n } catch (e) {\n // pass\n }\n /* eslint-enable no-empty */\n }\n return xmlhttp;\n}\n\nfunction _isSuccess(r) {\n return r && r.status && r.status === 200;\n}\n\nfunction _isNormalFailure(r) {\n return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;\n}\n\nfunction _newRetriableError(message, code) {\n var err = new Error(message);\n err.code = code || 'ENOTFOUND';\n return err;\n}\n\nmodule.exports = makeXhrRequest;\n","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('../errorParser');\nvar logger = require('./logger');\n\nfunction handleDomException(item, options, callback) {\n if(item.err && errorParser.Stack(item.err).name === 'DOMException') {\n var originalError = new Error();\n originalError.name = item.err.name;\n originalError.message = item.err.message;\n originalError.stack = item.err.stack;\n originalError.nested = item.err;\n item.err = originalError;\n }\n callback(null, item);\n}\n\nfunction handleItemWithError(item, options, callback) {\n item.data = item.data || {};\n if (item.err) {\n try {\n item.stackInfo = item.err._savedStackTrace || errorParser.parse(item.err, item.skipFrames);\n\n if (options.addErrorContext) {\n addErrorContext(item);\n }\n } catch (e) {\n logger.error('Error while parsing the error object.', e);\n try {\n item.message = item.err.message || item.err.description || item.message || String(item.err);\n } catch (e2) {\n item.message = String(item.err) || String(e2);\n }\n delete item.err;\n }\n }\n callback(null, item);\n}\n\nfunction addErrorContext(item) {\n var chain = [];\n var err = item.err;\n\n chain.push(err);\n\n while (err.nested || err.cause) {\n err = err.nested || err.cause;\n chain.push(err);\n }\n\n _.addErrorContext(item, chain);\n}\n\nfunction ensureItemHasSomethingToSay(item, options, callback) {\n if (!item.message && !item.stackInfo && !item.custom) {\n callback(new Error('No message, stack info, or custom data'), null);\n }\n callback(null, item);\n}\n\nfunction addBaseInfo(item, options, callback) {\n var environment = (options.payload && options.payload.environment) || options.environment;\n item.data = _.merge(item.data, {\n environment: environment,\n level: item.level,\n endpoint: options.endpoint,\n platform: 'browser',\n framework: 'browser-js',\n language: 'javascript',\n server: {},\n uuid: item.uuid,\n notifier: {\n name: 'rollbar-browser-js',\n version: options.version\n },\n custom: item.custom\n });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function(item, options, callback) {\n var requestInfo = {};\n\n if (window && window.location) {\n requestInfo.url = window.location.href;\n requestInfo.query_string = window.location.search;\n }\n\n var remoteString = '$remote_ip';\n if (!options.captureIp) {\n remoteString = null;\n } else if (options.captureIp !== true) {\n remoteString += '_anonymize';\n }\n if (remoteString) requestInfo.user_ip = remoteString;\n\n if (Object.keys(requestInfo).length > 0) {\n _.set(item, 'data.request', requestInfo);\n }\n\n callback(null, item);\n };\n}\n\nfunction addClientInfo(window) {\n return function(item, options, callback) {\n if (!window) {\n return callback(null, item);\n }\n var nav = window.navigator || {};\n var scr = window.screen || {};\n _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: nav.userAgent,\n language: nav.language,\n cookie_enabled: nav.cookieEnabled,\n screen: {\n width: scr.width,\n height: scr.height\n }\n }\n });\n callback(null, item);\n };\n}\n\nfunction addPluginInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.navigator) {\n return callback(null, item);\n }\n var plugins = [];\n var navPlugins = window.navigator.plugins || [];\n var cur;\n for (var i=0, l=navPlugins.length; i < l; ++i) {\n cur = navPlugins[i];\n plugins.push({name: cur.name, description: cur.description});\n }\n _.set(item, 'data.client.javascript.plugins', plugins);\n callback(null, item);\n };\n}\n\nfunction addBody(item, options, callback) {\n if (item.stackInfo) {\n if (item.stackInfo.traceChain) {\n addBodyTraceChain(item, options, callback);\n } else {\n addBodyTrace(item, options, callback);\n }\n } else {\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction addBodyMessage(item, options, callback) {\n var message = item.message;\n var custom = item.custom;\n\n if (!message) {\n message = 'Item sent with null or missing arguments.';\n }\n var result = {\n body: message\n };\n\n if (custom) {\n result.extra = _.merge(custom);\n }\n\n _.set(item, 'data.body', {message: result});\n callback(null, item);\n}\n\nfunction stackFromItem(item) {\n // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = item.stackInfo.stack;\n if (stack && stack.length === 0 && item._unhandledStackInfo && item._unhandledStackInfo.stack) {\n stack = item._unhandledStackInfo.stack;\n }\n return stack;\n}\n\nfunction addBodyTraceChain(item, options, callback) {\n var traceChain = item.stackInfo.traceChain;\n var traces = [];\n\n var traceChainLength = traceChain.length;\n for (var i = 0; i < traceChainLength; i++) {\n var trace = buildTrace(item, traceChain[i], options);\n traces.push(trace);\n }\n\n _.set(item, 'data.body', {trace_chain: traces});\n callback(null, item);\n}\n\nfunction addBodyTrace(item, options, callback) {\n var stack = stackFromItem(item);\n\n if (stack) {\n var trace = buildTrace(item, item.stackInfo, options);\n _.set(item, 'data.body', {trace: trace});\n callback(null, item);\n } else {\n var stackInfo = item.stackInfo;\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction buildTrace(item, stackInfo, options) {\n var description = item && item.data.description;\n var custom = item && item.custom;\n var stack = stackFromItem(item);\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n var trace = {\n exception: {\n 'class': className,\n message: message\n }\n };\n\n if (description) {\n trace.exception.description = description;\n }\n\n if (stack) {\n if (stack.length === 0) {\n trace.exception.stack = stackInfo.rawStack;\n trace.exception.raw = String(stackInfo.rawException);\n }\n var stackFrame;\n var frame;\n var code;\n var pre;\n var post;\n var contextLength;\n var i, mid;\n\n trace.frames = [];\n for (i = 0; i < stack.length; ++i) {\n stackFrame = stack[i];\n frame = {\n filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',\n lineno: stackFrame.line || null,\n method: (!stackFrame.func || stackFrame.func === '?') ? '[anonymous]' : stackFrame.func,\n colno: stackFrame.column\n };\n if (options.sendFrameUrl) {\n frame.url = stackFrame.url;\n }\n if (frame.method && frame.method.endsWith && frame.method.endsWith('_rollbar_wrapped')) {\n continue;\n }\n\n code = pre = post = null;\n contextLength = stackFrame.context ? stackFrame.context.length : 0;\n if (contextLength) {\n mid = Math.floor(contextLength / 2);\n pre = stackFrame.context.slice(0, mid);\n code = stackFrame.context[mid];\n post = stackFrame.context.slice(mid);\n }\n\n if (code) {\n frame.code = code;\n }\n\n if (pre || post) {\n frame.context = {};\n if (pre && pre.length) {\n frame.context.pre = pre;\n }\n if (post && post.length) {\n frame.context.post = post;\n }\n }\n\n if (stackFrame.args) {\n frame.args = stackFrame.args;\n }\n\n trace.frames.push(frame);\n }\n\n // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last\n trace.frames.reverse();\n\n if (custom) {\n trace.extra = _.merge(custom);\n }\n }\n\n return trace;\n}\n\nfunction errorClass(stackInfo, guess, options) {\n if (stackInfo.name) {\n return stackInfo.name;\n } else if (options.guessErrorClass) {\n return guess;\n } else {\n return '(unknown)';\n }\n}\n\nfunction addScrubber(scrubFn) {\n return function (item, options, callback) {\n if (scrubFn) {\n var scrubFields = options.scrubFields || [];\n var scrubPaths = options.scrubPaths || [];\n item.data = scrubFn(item.data, scrubFields, scrubPaths);\n }\n callback(null, item);\n }\n}\n\nmodule.exports = {\n handleDomException: handleDomException,\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n addScrubber: addScrubber\n};\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('error-stack-parser', ['stackframe'], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory(require('stackframe'));\n } else {\n root.ErrorStackParser = factory(root.StackFrame);\n }\n}(this, function ErrorStackParser(StackFrame) {\n 'use strict';\n\n var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\\S+:\\d+/;\n var CHROME_IE_STACK_REGEXP = /^\\s*at .*(\\S+:\\d+|\\(native\\))/m;\n var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\\[native code])?$/;\n\n return {\n /**\n * Given an Error object, extract the most information from it.\n *\n * @param {Error} error object\n * @return {Array} of StackFrames\n */\n parse: function ErrorStackParser$$parse(error) {\n if (typeof error.stacktrace !== 'undefined' || typeof error['opera#sourceloc'] !== 'undefined') {\n return this.parseOpera(error);\n } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {\n return this.parseV8OrIE(error);\n } else if (error.stack) {\n return this.parseFFOrSafari(error);\n } else {\n throw new Error('Cannot parse given Error object');\n }\n },\n\n // Separate line and column numbers from a string of the form: (URI:Line:Column)\n extractLocation: function ErrorStackParser$$extractLocation(urlLike) {\n // Fail-fast but return locations like \"(native)\"\n if (urlLike.indexOf(':') === -1) {\n return [urlLike];\n }\n\n var regExp = /(.+?)(?::(\\d+))?(?::(\\d+))?$/;\n var parts = regExp.exec(urlLike.replace(/[()]/g, ''));\n return [parts[1], parts[2] || undefined, parts[3] || undefined];\n },\n\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(CHROME_IE_STACK_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n if (line.indexOf('(eval ') > -1) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n line = line.replace(/eval code/g, 'eval').replace(/(\\(eval at [^()]*)|(,.*$)/g, '');\n }\n var sanitizedLine = line.replace(/^\\s+/, '').replace(/\\(eval code/g, '(').replace(/^.*?\\s+/, '');\n\n // capture and preseve the parenthesized location \"(/foo/my bar.js:12:87)\" in\n // case it has spaces in it, as the string is split on \\s+ later on\n var location = sanitizedLine.match(/ (\\(.+\\)$)/);\n\n // remove the parenthesized location from the line, if it was matched\n sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;\n\n // if a location was matched, pass it to extractLocation() otherwise pass all sanitizedLine\n // because this line doesn't have function name\n var locationParts = this.extractLocation(location ? location[1] : sanitizedLine);\n var functionName = location && sanitizedLine || undefined;\n var fileName = ['eval', ''].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];\n\n return new StackFrame({\n functionName: functionName,\n fileName: fileName,\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n },\n\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n if (line.indexOf(' > eval') > -1) {\n line = line.replace(/ line (\\d+)(?: > eval line \\d+)* > eval:\\d+:\\d+/g, ':$1');\n }\n\n if (line.indexOf('@') === -1 && line.indexOf(':') === -1) {\n // Safari eval frames only have function names and nothing else\n return new StackFrame({\n functionName: line\n });\n } else {\n var functionNameRegex = /((.*\".+\"[^@]*)?[^@]*)(?:@)/;\n var matches = line.match(functionNameRegex);\n var functionName = matches && matches[1] ? matches[1] : undefined;\n var locationParts = this.extractLocation(line.replace(functionNameRegex, ''));\n\n return new StackFrame({\n functionName: functionName,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }\n }, this);\n },\n\n parseOpera: function ErrorStackParser$$parseOpera(e) {\n if (!e.stacktrace || (e.message.indexOf('\\n') > -1 &&\n e.message.split('\\n').length > e.stacktrace.split('\\n').length)) {\n return this.parseOpera9(e);\n } else if (!e.stack) {\n return this.parseOpera10(e);\n } else {\n return this.parseOpera11(e);\n }\n },\n\n parseOpera9: function ErrorStackParser$$parseOpera9(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)/i;\n var lines = e.message.split('\\n');\n var result = [];\n\n for (var i = 2, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(new StackFrame({\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n }));\n }\n }\n\n return result;\n },\n\n parseOpera10: function ErrorStackParser$$parseOpera10(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)(?:: In function (\\S+))?$/i;\n var lines = e.stacktrace.split('\\n');\n var result = [];\n\n for (var i = 0, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(\n new StackFrame({\n functionName: match[3] || undefined,\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n })\n );\n }\n }\n\n return result;\n },\n\n // Opera 10.65+ Error.stack very similar to FF/Safari\n parseOpera11: function ErrorStackParser$$parseOpera11(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);\n }, this);\n\n return filtered.map(function(line) {\n var tokens = line.split('@');\n var locationParts = this.extractLocation(tokens.pop());\n var functionCall = (tokens.shift() || '');\n var functionName = functionCall\n .replace(//, '$2')\n .replace(/\\([^)]*\\)/g, '') || undefined;\n var argsRaw;\n if (functionCall.match(/\\(([^)]*)\\)/)) {\n argsRaw = functionCall.replace(/^[^(]+\\(([^)]*)\\)$/, '$1');\n }\n var args = (argsRaw === undefined || argsRaw === '[arguments not available]') ?\n undefined : argsRaw.split(',');\n\n return new StackFrame({\n functionName: functionName,\n args: args,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n }\n };\n}));\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('stackframe', [], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.StackFrame = factory();\n }\n}(this, function() {\n 'use strict';\n function _isNumber(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n }\n\n function _capitalize(str) {\n return str.charAt(0).toUpperCase() + str.substring(1);\n }\n\n function _getter(p) {\n return function() {\n return this[p];\n };\n }\n\n var booleanProps = ['isConstructor', 'isEval', 'isNative', 'isToplevel'];\n var numericProps = ['columnNumber', 'lineNumber'];\n var stringProps = ['fileName', 'functionName', 'source'];\n var arrayProps = ['args'];\n var objectProps = ['evalOrigin'];\n\n var props = booleanProps.concat(numericProps, stringProps, arrayProps, objectProps);\n\n function StackFrame(obj) {\n if (!obj) return;\n for (var i = 0; i < props.length; i++) {\n if (obj[props[i]] !== undefined) {\n this['set' + _capitalize(props[i])](obj[props[i]]);\n }\n }\n }\n\n StackFrame.prototype = {\n getArgs: function() {\n return this.args;\n },\n setArgs: function(v) {\n if (Object.prototype.toString.call(v) !== '[object Array]') {\n throw new TypeError('Args must be an Array');\n }\n this.args = v;\n },\n\n getEvalOrigin: function() {\n return this.evalOrigin;\n },\n setEvalOrigin: function(v) {\n if (v instanceof StackFrame) {\n this.evalOrigin = v;\n } else if (v instanceof Object) {\n this.evalOrigin = new StackFrame(v);\n } else {\n throw new TypeError('Eval Origin must be an Object or StackFrame');\n }\n },\n\n toString: function() {\n var fileName = this.getFileName() || '';\n var lineNumber = this.getLineNumber() || '';\n var columnNumber = this.getColumnNumber() || '';\n var functionName = this.getFunctionName() || '';\n if (this.getIsEval()) {\n if (fileName) {\n return '[eval] (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return '[eval]:' + lineNumber + ':' + columnNumber;\n }\n if (functionName) {\n return functionName + ' (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return fileName + ':' + lineNumber + ':' + columnNumber;\n }\n };\n\n StackFrame.fromString = function StackFrame$$fromString(str) {\n var argsStartIndex = str.indexOf('(');\n var argsEndIndex = str.lastIndexOf(')');\n\n var functionName = str.substring(0, argsStartIndex);\n var args = str.substring(argsStartIndex + 1, argsEndIndex).split(',');\n var locationString = str.substring(argsEndIndex + 1);\n\n if (locationString.indexOf('@') === 0) {\n var parts = /@(.+?)(?::(\\d+))?(?::(\\d+))?$/.exec(locationString, '');\n var fileName = parts[1];\n var lineNumber = parts[2];\n var columnNumber = parts[3];\n }\n\n return new StackFrame({\n functionName: functionName,\n args: args || undefined,\n fileName: fileName,\n lineNumber: lineNumber || undefined,\n columnNumber: columnNumber || undefined\n });\n };\n\n for (var i = 0; i < booleanProps.length; i++) {\n StackFrame.prototype['get' + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);\n StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function(p) {\n return function(v) {\n this[p] = Boolean(v);\n };\n })(booleanProps[i]);\n }\n\n for (var j = 0; j < numericProps.length; j++) {\n StackFrame.prototype['get' + _capitalize(numericProps[j])] = _getter(numericProps[j]);\n StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function(p) {\n return function(v) {\n if (!_isNumber(v)) {\n throw new TypeError(p + ' must be a Number');\n }\n this[p] = Number(v);\n };\n })(numericProps[j]);\n }\n\n for (var k = 0; k < stringProps.length; k++) {\n StackFrame.prototype['get' + _capitalize(stringProps[k])] = _getter(stringProps[k]);\n StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function(p) {\n return function(v) {\n this[p] = String(v);\n };\n })(stringProps[k]);\n }\n\n return StackFrame;\n}));\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction itemToPayload(item, options, callback) {\n var data = item.data;\n\n if (item._isUncaught) {\n data._isUncaught = true;\n }\n if (item._originalArgs) {\n data._originalArgs = item._originalArgs;\n }\n callback(null, data);\n}\n\nfunction addPayloadOptions(item, options, callback) {\n var payloadOptions = options.payload || {};\n if (payloadOptions.body) {\n delete payloadOptions.body;\n }\n\n item.data = _.merge(item.data, payloadOptions);\n callback(null, item);\n}\n\nfunction addTelemetryData(item, options, callback) {\n if (item.telemetryEvents) {\n _.set(item, 'data.body.telemetry', item.telemetryEvents);\n }\n callback(null, item);\n}\n\nfunction addMessageWithError(item, options, callback) {\n if (!item.message) {\n callback(null, item);\n return;\n }\n var tracePath = 'data.body.trace_chain.0';\n var trace = _.get(item, tracePath);\n if (!trace) {\n tracePath = 'data.body.trace';\n trace = _.get(item, tracePath);\n }\n if (trace) {\n if (!(trace.exception && trace.exception.description)) {\n _.set(item, tracePath+'.exception.description', item.message);\n callback(null, item);\n return;\n }\n var extra = _.get(item, tracePath+'.extra') || {};\n var newExtra = _.merge(extra, {message: item.message});\n _.set(item, tracePath+'.extra', newExtra);\n }\n callback(null, item);\n}\n\nfunction userTransform(logger) {\n return function(item, options, callback) {\n var newItem = _.merge(item);\n var response = null;\n try {\n if (_.isFunction(options.transform)) {\n response = options.transform(newItem.data, item);\n }\n } catch (e) {\n options.transform = null;\n logger.error('Error while calling custom transform() function. Removing custom transform().', e);\n callback(null, item);\n return;\n }\n if(_.isPromise(response)) {\n response.then(function (promisedItem) {\n if(promisedItem) {\n newItem.data = promisedItem;\n }\n callback(null, newItem);\n }, function (error) {\n callback(error, item);\n });\n } else {\n callback(null, newItem);\n }\n }\n}\n\nfunction addConfigToPayload(item, options, callback) {\n if (!options.sendConfig) {\n return callback(null, item);\n }\n var configKey = '_rollbarConfig';\n var custom = _.get(item, 'data.custom') || {};\n custom[configKey] = options;\n item.data.custom = custom;\n callback(null, item);\n}\n\nfunction addFunctionOption(options, name) {\n if(_.isFunction(options[name])) {\n options[name] = options[name].toString();\n }\n}\n\nfunction addConfiguredOptions(item, options, callback) {\n var configuredOptions = options._configuredOptions;\n\n // These must be stringified or they'll get dropped during serialization.\n addFunctionOption(configuredOptions, 'transform');\n addFunctionOption(configuredOptions, 'checkIgnore');\n addFunctionOption(configuredOptions, 'onSendCallback');\n\n delete configuredOptions.accessToken;\n item.data.notifier.configured_options = configuredOptions;\n callback(null, item);\n}\n\nfunction addDiagnosticKeys(item, options, callback) {\n var diagnostic = _.merge(item.notifier.client.notifier.diagnostic, item.diagnostic);\n\n if (_.get(item, 'err._isAnonymous')) {\n diagnostic.is_anonymous = true;\n }\n\n if (item._isUncaught) {\n diagnostic.is_uncaught = item._isUncaught;\n }\n\n if (item.err) {\n try {\n diagnostic.raw_error = {\n message: item.err.message,\n name: item.err.name,\n constructor_name: item.err.constructor && item.err.constructor.name,\n filename: item.err.fileName,\n line: item.err.lineNumber,\n column: item.err.columnNumber,\n stack: item.err.stack\n };\n } catch (e) {\n diagnostic.raw_error = { failed: String(e) };\n }\n }\n\n item.data.notifier.diagnostic = _.merge(item.data.notifier.diagnostic, diagnostic);\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addPayloadOptions: addPayloadOptions,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError,\n userTransform: userTransform,\n addConfigToPayload: addConfigToPayload,\n addConfiguredOptions: addConfiguredOptions,\n addDiagnosticKeys: addDiagnosticKeys\n};\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction checkIgnore(item, settings) {\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore\n};\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction checkLevel(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = settings.reportLevel;\n var reportLevelVal = _.LEVELS[reportLevel] || 0;\n\n if (levelVal < reportLevelVal) {\n return false;\n }\n return true;\n}\n\nfunction userCheckIgnore(logger) {\n return function(item, settings) {\n var isUncaught = !!item._isUncaught;\n delete item._isUncaught;\n var args = item._originalArgs;\n delete item._originalArgs;\n try {\n if (_.isFunction(settings.onSendCallback)) {\n settings.onSendCallback(isUncaught, args, item);\n }\n } catch (e) {\n settings.onSendCallback = null;\n logger.error('Error while calling onSendCallback, removing', e);\n }\n try {\n if (_.isFunction(settings.checkIgnore) && settings.checkIgnore(isUncaught, args, item)) {\n return false;\n }\n } catch (e) {\n settings.checkIgnore = null;\n logger.error('Error while calling custom checkIgnore(), removing', e);\n }\n return true;\n }\n}\n\nfunction urlIsNotBlockListed(logger) {\n return function(item, settings) {\n return !urlIsOnAList(item, settings, 'blocklist', logger);\n }\n}\n\nfunction urlIsSafeListed(logger) {\n return function(item, settings) {\n return urlIsOnAList(item, settings, 'safelist', logger);\n }\n}\n\nfunction matchFrames(trace, list, block) {\n if (!trace) { return !block }\n\n var frames = trace.frames;\n\n if (!frames || frames.length === 0) { return !block; }\n\n var frame, filename, url, urlRegex;\n var listLength = list.length;\n var frameLength = frames.length;\n for (var i = 0; i < frameLength; i++) {\n frame = frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) { return !block; }\n\n for (var j = 0; j < listLength; j++) {\n url = list[j];\n urlRegex = new RegExp(url);\n\n if (urlRegex.test(filename)) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction urlIsOnAList(item, settings, safeOrBlock, logger) {\n // safelist is the default\n var block = false;\n if (safeOrBlock === 'blocklist') {\n block = true;\n }\n\n var list, traces;\n try {\n list = block ? settings.hostBlockList : settings.hostSafeList;\n traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];\n\n // These two checks are important to come first as they are defaults\n // in case the list is missing or the trace is missing or not well-formed\n if (!list || list.length === 0) {\n return !block;\n }\n if (traces.length === 0 || !traces[0]) {\n return !block;\n }\n\n var tracesLength = traces.length;\n for (var i = 0; i < tracesLength; i++) {\n if(matchFrames(traces[i], list, block)) {\n return true;\n }\n }\n } catch (e)\n /* istanbul ignore next */\n {\n if (block) {\n settings.hostBlockList = null;\n } else {\n settings.hostSafeList = null;\n }\n var listName = block ? 'hostBlockList' : 'hostSafeList';\n logger.error('Error while reading your configuration\\'s ' + listName + ' option. Removing custom ' + listName + '.', e);\n return !block;\n }\n return false;\n}\n\nfunction messageIsIgnored(logger) {\n return function(item, settings) {\n var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n messages = messagesFromItem(item);\n\n if (messages.length === 0){\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n\n for (j = 0; j < messages.length; j++) {\n messageIsIgnored = rIgnoredMessage.test(messages[j]);\n\n if (messageIsIgnored) {\n return false;\n }\n }\n }\n } catch(e)\n /* istanbul ignore next */\n {\n settings.ignoredMessages = null;\n logger.error('Error while reading your configuration\\'s ignoredMessages option. Removing custom ignoredMessages.');\n }\n\n return true;\n }\n}\n\nfunction messagesFromItem(item) {\n var body = item.body;\n var messages = [];\n\n // The payload schema only allows one of trace_chain, message, or trace.\n // However, existing test cases are based on having both trace and message present.\n // So here we preserve the ability to collect strings from any combination of these keys.\n if (body.trace_chain) {\n var traceChain = body.trace_chain;\n for (var i = 0; i < traceChain.length; i++) {\n var trace = traceChain[i];\n messages.push(_.get(trace, 'exception.message'));\n }\n }\n if (body.trace) {\n messages.push(_.get(body, 'trace.exception.message'));\n }\n if (body.message) {\n messages.push(_.get(body, 'message.body'));\n }\n return messages;\n}\n\nmodule.exports = {\n checkLevel: checkLevel,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlockListed: urlIsNotBlockListed,\n urlIsSafeListed: urlIsSafeListed,\n messageIsIgnored: messageIsIgnored\n};\n","'use strict';\n\nmodule.exports = {\n version: '2.26.2',\n endpoint: 'api.rollbar.com/api/1/item/',\n logLevel: 'debug',\n reportLevel: 'debug',\n uncaughtErrorLevel: 'error',\n maxItems: 0,\n itemsPerMin: 60\n}\n","'use strict';\n\nmodule.exports = {\n scrubFields: [\n 'pw',\n 'pass',\n 'passwd',\n 'password',\n 'secret',\n 'confirm_password',\n 'confirmPassword',\n 'password_confirmation',\n 'passwordConfirmation',\n 'access_token',\n 'accessToken',\n 'X-Rollbar-Access-Token',\n 'secret_key',\n 'secretKey',\n 'secretToken',\n 'cc-number',\n 'card number',\n 'cardnumber',\n 'cardnum',\n 'ccnum',\n 'ccnumber',\n 'cc num',\n 'creditcardnumber',\n 'credit card number',\n 'newcreditcardnumber',\n 'new credit card',\n 'creditcardno',\n 'credit card no',\n 'card#',\n 'card #',\n 'cc-csc',\n 'cvc',\n 'cvc2',\n 'cvv2',\n 'ccv2',\n 'security code',\n 'card verification',\n 'name on credit card',\n 'name on card',\n 'nameoncard',\n 'cardholder',\n 'card holder',\n 'name des karteninhabers',\n 'ccname',\n 'card type',\n 'cardtype',\n 'cc type',\n 'cctype',\n 'payment type',\n 'expiration date',\n 'expirationdate',\n 'expdate',\n 'cc-exp',\n 'ccmonth',\n 'ccyear'\n ]\n}\n","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.merge(options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n}\n\nTelemeter.prototype.configure = function(options) {\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n var deleteCount = 0;\n if (this.queue.length > newMaxEvents) {\n deleteCount = this.queue.length - newMaxEvents;\n }\n this.maxQueueSize = newMaxEvents;\n this.queue.splice(0, deleteCount);\n};\n\nTelemeter.prototype.copyEvents = function() {\n var events = Array.prototype.slice.call(this.queue, 0);\n if (_.isFunction(this.options.filterTelemetry)) {\n try {\n var i = events.length;\n while (i--) {\n if (this.options.filterTelemetry(events[i])) {\n events.splice(i, 1);\n }\n }\n } catch (e) {\n this.options.filterTelemetry = null;\n }\n }\n return events;\n};\n\nTelemeter.prototype.capture = function(type, metadata, level, rollbarUUID, timestamp) {\n var e = {\n level: getLevel(type, level),\n type: type,\n timestamp_ms: timestamp || _.now(),\n body: metadata,\n source: 'client'\n };\n if (rollbarUUID) {\n e.uuid = rollbarUUID;\n }\n\n try {\n if (_.isFunction(this.options.filterTelemetry) && this.options.filterTelemetry(e)) {\n return false;\n }\n } catch (exc) {\n this.options.filterTelemetry = null;\n }\n\n this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function(type, metadata, level, rollbarUUID) {\n return this.capture(type, metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.captureError = function(err, level, rollbarUUID, timestamp) {\n var metadata = {\n message: err.message || String(err)\n };\n if (err.stack) {\n metadata.stack = err.stack;\n }\n return this.capture('error', metadata, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureLog = function(message, level, rollbarUUID, timestamp) {\n return this.capture('log', {\n message: message\n }, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID, requestData) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\n if (requestData) {\n metadata.request = requestData;\n }\n var level = this.levelFromStatus(metadata.status_code);\n return this.capture('network', metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.levelFromStatus = function(statusCode) {\n if (statusCode >= 200 && statusCode < 400) {\n return 'info';\n }\n if (statusCode === 0 || statusCode >= 400) {\n return 'error';\n }\n return 'info';\n};\n\nTelemeter.prototype.captureDom = function(subtype, element, value, checked, rollbarUUID) {\n var metadata = {\n subtype: subtype,\n element: element\n };\n if (value !== undefined) {\n metadata.value = value;\n }\n if (checked !== undefined) {\n metadata.checked = checked;\n }\n return this.capture('dom', metadata, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureNavigation = function(from, to, rollbarUUID) {\n return this.capture('navigation', {from: from, to: to}, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureDomContentLoaded = function(ts) {\n return this.capture('navigation', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n */\n};\nTelemeter.prototype.captureLoad = function(ts) {\n return this.capture('navigation', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n */\n};\n\nTelemeter.prototype.captureConnectivityChange = function(type, rollbarUUID) {\n return this.captureNetwork({change: type}, 'connectivity', rollbarUUID);\n};\n\n// Only intended to be used internally by the notifier\nTelemeter.prototype._captureRollbarItem = function(item) {\n if (!this.options.includeItemsInTelemetry) {\n return;\n }\n if (item.err) {\n return this.captureError(item.err, item.level, item.uuid, item.timestamp);\n }\n if (item.message) {\n return this.captureLog(item.message, item.level, item.uuid, item.timestamp);\n }\n if (item.custom) {\n return this.capture('log', item.custom, item.level, item.uuid, item.timestamp);\n }\n};\n\nTelemeter.prototype.push = function(e) {\n this.queue.push(e);\n if (this.queue.length > this.maxQueueSize) {\n this.queue.shift();\n }\n};\n\nfunction getLevel(type, level) {\n if (level) {\n return level;\n }\n var defaultLevel = {\n error: 'error',\n manual: 'info'\n };\n return defaultLevel[type] || 'info';\n}\n\nmodule.exports = Telemeter;\n","'use strict';\n\nvar _ = require('../utility');\nvar headers = require('../utility/headers');\nvar scrub = require('../scrub');\nvar urlparser = require('./url');\nvar domUtil = require('./domUtility');\n\nvar defaults = {\n network: true,\n networkResponseHeaders: false,\n networkResponseBody: false,\n networkRequestHeaders: false,\n networkRequestBody: false,\n networkErrorOnHttp5xx: false,\n networkErrorOnHttp4xx: false,\n networkErrorOnHttp0: false,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true,\n contentSecurityPolicy: true,\n errorOnContentSecurityPolicy: false\n};\n\nfunction replace(obj, name, replacement, replacements, type) {\n var orig = obj[name];\n obj[name] = replacement(orig);\n if (replacements) {\n replacements[type].push([obj, name, orig]);\n }\n}\n\nfunction restore(replacements, type) {\n var b;\n while (replacements[type].length) {\n b = replacements[type].shift();\n b[0][b[1]] = b[2];\n }\n}\n\nfunction nameFromDescription(description) {\n if (!description || !description.attributes) { return null; }\n var attrs = description.attributes;\n for (var a = 0; a < attrs.length; ++a) {\n if (attrs[a].key === 'name') {\n return attrs[a].value;\n }\n }\n return null;\n}\n\nfunction defaultValueScrubber(scrubFields) {\n var patterns = [];\n for (var i = 0; i < scrubFields.length; ++i) {\n patterns.push(new RegExp(scrubFields[i], 'i'));\n }\n return function(description) {\n var name = nameFromDescription(description);\n if (!name) { return false; }\n for (var i = 0; i < patterns.length; ++i) {\n if (patterns[i].test(name)) {\n return true;\n }\n }\n return false;\n };\n}\n\nfunction Instrumenter(options, telemeter, rollbar, _window, _document) {\n this.options = options;\n var autoInstrument = options.autoInstrument;\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);\n this.telemeter = telemeter;\n this.rollbar = rollbar;\n this.diagnostic = rollbar.client.notifier.diagnostic;\n this._window = _window || {};\n this._document = _document || {};\n this.replacements = {\n network: [],\n log: [],\n navigation: [],\n connectivity: []\n };\n this.eventRemovers = {\n dom: [],\n connectivity: [],\n contentsecuritypolicy: []\n };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function(options) {\n this.options = _.merge(this.options, options);\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.merge(this.autoInstrument);\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n if (options.scrubTelemetryInputs !== undefined) {\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n }\n if (options.telemetryScrubber !== undefined) {\n this.telemetryScrubber = options.telemetryScrubber;\n }\n};\n\n// eslint-disable-next-line complexity\nInstrumenter.prototype.instrument = function(oldSettings) {\n if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {\n this.instrumentNetwork();\n } else if (!this.autoInstrument.network && oldSettings && oldSettings.network) {\n this.deinstrumentNetwork();\n }\n\n if (this.autoInstrument.log && !(oldSettings && oldSettings.log)) {\n this.instrumentConsole();\n } else if (!this.autoInstrument.log && oldSettings && oldSettings.log) {\n this.deinstrumentConsole();\n }\n\n if (this.autoInstrument.dom && !(oldSettings && oldSettings.dom)) {\n this.instrumentDom();\n } else if (!this.autoInstrument.dom && oldSettings && oldSettings.dom) {\n this.deinstrumentDom();\n }\n\n if (this.autoInstrument.navigation && !(oldSettings && oldSettings.navigation)) {\n this.instrumentNavigation();\n } else if (!this.autoInstrument.navigation && oldSettings && oldSettings.navigation) {\n this.deinstrumentNavigation();\n }\n\n if (this.autoInstrument.connectivity && !(oldSettings && oldSettings.connectivity)) {\n this.instrumentConnectivity();\n } else if (!this.autoInstrument.connectivity && oldSettings && oldSettings.connectivity) {\n this.deinstrumentConnectivity();\n }\n\n if (this.autoInstrument.contentSecurityPolicy && !(oldSettings && oldSettings.contentSecurityPolicy)) {\n this.instrumentContentSecurityPolicy();\n } else if (!this.autoInstrument.contentSecurityPolicy && oldSettings && oldSettings.contentSecurityPolicy) {\n this.deinstrumentContentSecurityPolicy();\n }\n};\n\nInstrumenter.prototype.deinstrumentNetwork = function() {\n restore(this.replacements, 'network');\n};\n\nInstrumenter.prototype.instrumentNetwork = function() {\n var self = this;\n\n function wrapProp(prop, xhr) {\n if (prop in xhr && _.isFunction(xhr[prop])) {\n replace(xhr, prop, function(orig) {\n return self.rollbar.wrap(orig);\n });\n }\n }\n\n if ('XMLHttpRequest' in this._window) {\n var xhrp = this._window.XMLHttpRequest.prototype;\n replace(xhrp, 'open', function(orig) {\n return function(method, url) {\n if (_.isType(url, 'string')) {\n if (this.__rollbar_xhr) {\n this.__rollbar_xhr.method = method;\n this.__rollbar_xhr.url = url;\n this.__rollbar_xhr.status_code = null;\n this.__rollbar_xhr.start_time_ms = _.now();\n this.__rollbar_xhr.end_time_ms = null;\n } else {\n this.__rollbar_xhr = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'setRequestHeader', function(orig) {\n return function(header, value) {\n // If xhr.open is async, __rollbar_xhr may not be initialized yet.\n if (!this.__rollbar_xhr) {\n this.__rollbar_xhr = {};\n }\n if (_.isType(header, 'string') && _.isType(value, 'string')) {\n if (self.autoInstrument.networkRequestHeaders) {\n if (!this.__rollbar_xhr.request_headers) {\n this.__rollbar_xhr.request_headers = {};\n }\n this.__rollbar_xhr.request_headers[header] = value;\n }\n // We want the content type even if request header telemetry is off.\n if (header.toLowerCase() === 'content-type') {\n this.__rollbar_xhr.request_content_type = value;\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'send', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(data) {\n /* eslint-enable no-unused-vars */\n var xhr = this;\n\n function onreadystatechangeHandler() {\n if (xhr.__rollbar_xhr) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n if (self.autoInstrument.networkRequestBody) {\n xhr.__rollbar_xhr.request = data;\n }\n xhr.__rollbar_event = self.captureNetwork(xhr.__rollbar_xhr, 'xhr', undefined);\n }\n if (xhr.readyState < 2) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n }\n if (xhr.readyState > 3) {\n xhr.__rollbar_xhr.end_time_ms = _.now();\n\n var headers = null;\n xhr.__rollbar_xhr.response_content_type = xhr.getResponseHeader('Content-Type');\n if (self.autoInstrument.networkResponseHeaders) {\n var headersConfig = self.autoInstrument.networkResponseHeaders;\n headers = {};\n try {\n var header, i;\n if (headersConfig === true) {\n var allHeaders = xhr.getAllResponseHeaders();\n if (allHeaders) {\n var arr = allHeaders.trim().split(/[\\r\\n]+/);\n var parts, value;\n for (i=0; i < arr.length; i++) {\n parts = arr[i].split(': ');\n header = parts.shift();\n value = parts.join(': ');\n headers[header] = value;\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n header = headersConfig[i];\n headers[header] = xhr.getResponseHeader(header);\n }\n }\n } catch (e) {\n /* we ignore the errors here that could come from different\n * browser issues with the xhr methods */\n }\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n try {\n body = xhr.responseText;\n } catch (e) {\n /* ignore errors from reading responseText */\n }\n }\n var response = null;\n if (body || headers) {\n response = {};\n if (body) {\n if (self.isJsonContentType(xhr.__rollbar_xhr.response_content_type)) {\n response.body = self.scrubJson(body);\n } else {\n response.body = body;\n }\n }\n if (headers) {\n response.headers = headers;\n }\n }\n if (response) {\n xhr.__rollbar_xhr.response = response;\n }\n try {\n var code = xhr.status;\n code = code === 1223 ? 204 : code;\n xhr.__rollbar_xhr.status_code = code;\n xhr.__rollbar_event.level = self.telemeter.levelFromStatus(code);\n self.errorOnHttpStatus(xhr.__rollbar_xhr);\n } catch (e) {\n /* ignore possible exception from xhr.status */\n }\n }\n }\n }\n\n wrapProp('onload', xhr);\n wrapProp('onerror', xhr);\n wrapProp('onprogress', xhr);\n\n if ('onreadystatechange' in xhr && _.isFunction(xhr.onreadystatechange)) {\n replace(xhr, 'onreadystatechange', function(orig) {\n return self.rollbar.wrap(orig, undefined, onreadystatechangeHandler);\n });\n } else {\n xhr.onreadystatechange = onreadystatechangeHandler;\n }\n if (xhr.__rollbar_xhr && self.trackHttpErrors()) {\n xhr.__rollbar_xhr.stack = (new Error()).stack;\n }\n return orig.apply(this, arguments);\n }\n }, this.replacements, 'network');\n }\n\n if ('fetch' in this._window) {\n replace(this._window, 'fetch', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(fn, t) {\n /* eslint-enable no-unused-vars */\n var args = new Array(arguments.length);\n for (var i=0, len=args.length; i < len; i++) {\n args[i] = arguments[i];\n }\n var input = args[0];\n var method = 'GET';\n var url;\n if (_.isType(input, 'string')) {\n url = input;\n } else if (input) {\n url = input.url;\n if (input.method) {\n method = input.method;\n }\n }\n if (args[1] && args[1].method) {\n method = args[1].method;\n }\n var metadata = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n if (args[1] && args[1].headers) {\n // Argument may be a Headers object, or plain object. Ensure here that\n // we are working with a Headers object with case-insensitive keys.\n var reqHeaders = headers(args[1].headers);\n\n metadata.request_content_type = reqHeaders.get('Content-Type');\n\n if (self.autoInstrument.networkRequestHeaders) {\n metadata.request_headers = self.fetchHeaders(reqHeaders, self.autoInstrument.networkRequestHeaders)\n }\n }\n\n if (self.autoInstrument.networkRequestBody) {\n if (args[1] && args[1].body) {\n metadata.request = args[1].body;\n } else if (args[0] && !_.isType(args[0], 'string') && args[0].body) {\n metadata.request = args[0].body;\n }\n }\n self.captureNetwork(metadata, 'fetch', undefined);\n if (self.trackHttpErrors()) {\n metadata.stack = (new Error()).stack;\n }\n\n // Start our handler before returning the promise. This allows resp.clone()\n // to execute before other handlers touch the response.\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n metadata.response_content_type = resp.headers.get('Content-Type');\n var headers = null;\n if (self.autoInstrument.networkResponseHeaders) {\n headers = self.fetchHeaders(resp.headers, self.autoInstrument.networkResponseHeaders);\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n if (typeof resp.text === 'function') { // Response.text() is not implemented on some platforms\n // The response must be cloned to prevent reading (and locking) the original stream.\n // This must be done before other handlers touch the response.\n body = resp.clone().text(); //returns a Promise\n }\n }\n if (headers || body) {\n metadata.response = {};\n if (body) {\n // Test to ensure body is a Promise, which it should always be.\n if (typeof body.then === 'function') {\n body.then(function (text) {\n if (text && self.isJsonContentType(metadata.response_content_type)) {\n metadata.response.body = self.scrubJson(text);\n } else {\n metadata.response.body = text;\n }\n });\n } else {\n metadata.response.body = body;\n }\n }\n if (headers) {\n metadata.response.headers = headers;\n }\n }\n self.errorOnHttpStatus(metadata);\n return resp;\n });\n };\n }, this.replacements, 'network');\n }\n};\n\nInstrumenter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID) {\n if (metadata.request && this.isJsonContentType(metadata.request_content_type)) {\n metadata.request = this.scrubJson(metadata.request);\n }\n return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);\n};\n\nInstrumenter.prototype.isJsonContentType = function(contentType) {\n return (contentType && _.isType(contentType, 'string') && contentType.toLowerCase().includes('json')) ? true : false;\n}\n\nInstrumenter.prototype.scrubJson = function(json) {\n return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));\n}\n\nInstrumenter.prototype.fetchHeaders = function(inHeaders, headersConfig) {\n var outHeaders = {};\n try {\n var i;\n if (headersConfig === true) {\n if (typeof inHeaders.entries === 'function') { // Headers.entries() is not implemented in IE\n var allHeaders = inHeaders.entries();\n var currentHeader = allHeaders.next();\n while (!currentHeader.done) {\n outHeaders[currentHeader.value[0]] = currentHeader.value[1];\n currentHeader = allHeaders.next();\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n var header = headersConfig[i];\n outHeaders[header] = inHeaders.get(header);\n }\n }\n } catch (e) {\n /* ignore probable IE errors */\n }\n return outHeaders;\n}\n\nInstrumenter.prototype.trackHttpErrors = function() {\n return this.autoInstrument.networkErrorOnHttp5xx ||\n this.autoInstrument.networkErrorOnHttp4xx ||\n this.autoInstrument.networkErrorOnHttp0;\n}\n\nInstrumenter.prototype.errorOnHttpStatus = function(metadata) {\n var status = metadata.status_code;\n\n if ((status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||\n (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||\n (status === 0 && this.autoInstrument.networkErrorOnHttp0)) {\n var error = new Error('HTTP request failed with Status ' + status);\n error.stack = metadata.stack;\n this.rollbar.error(error, { skipFrames: 1 });\n }\n}\n\nInstrumenter.prototype.deinstrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n var b;\n while (this.replacements['log'].length) {\n b = this.replacements['log'].shift();\n this._window.console[b[0]] = b[1];\n }\n};\n\nInstrumenter.prototype.instrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n\n var self = this;\n var c = this._window.console;\n\n function wrapConsole(method) {\n 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778\n\n var orig = c[method];\n var origConsole = c;\n var level = method === 'warn' ? 'warning' : method;\n c[method] = function() {\n var args = Array.prototype.slice.call(arguments);\n var message = _.formatArgsAsString(args);\n self.telemeter.captureLog(message, level);\n if (orig) {\n Function.prototype.apply.call(orig, origConsole, args);\n }\n };\n self.replacements['log'].push([method, orig]);\n }\n var methods = ['debug','info','warn','error','log'];\n try {\n for (var i=0, len=methods.length; i < len; i++) {\n wrapConsole(methods[i]);\n }\n } catch (e) {\n this.diagnostic.instrumentConsole = { error: e.message };\n }\n};\n\nInstrumenter.prototype.deinstrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n this.removeListeners('dom');\n};\n\nInstrumenter.prototype.instrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n var clickHandler = this.handleClick.bind(this);\n var blurHandler = this.handleBlur.bind(this);\n this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);\n this.addListener('dom', this._window, 'blur', 'onfocusout', blurHandler, true);\n};\n\nInstrumenter.prototype.handleClick = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n var hasTag = e && e.tagName;\n var anchorOrButton = domUtil.isDescribedElement(e, 'a') || domUtil.isDescribedElement(e, 'button');\n if (hasTag && (anchorOrButton || domUtil.isDescribedElement(e, 'input', ['button', 'submit']))) {\n this.captureDomEvent('click', e);\n } else if (domUtil.isDescribedElement(e, 'input', ['checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value, e.checked);\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleBlur = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n if (e && e.tagName) {\n if (domUtil.isDescribedElement(e, 'textarea')) {\n this.captureDomEvent('input', e, e.value);\n } else if (domUtil.isDescribedElement(e, 'select') && e.options && e.options.length) {\n this.handleSelectInputChanged(e);\n } else if (domUtil.isDescribedElement(e, 'input') && !domUtil.isDescribedElement(e, 'input', ['button', 'submit', 'hidden', 'checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value);\n }\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleSelectInputChanged = function(elem) {\n if (elem.multiple) {\n for (var i = 0; i < elem.options.length; i++) {\n if (elem.options[i].selected) {\n this.captureDomEvent('input', elem, elem.options[i].value);\n }\n }\n } else if (elem.selectedIndex >= 0 && elem.options[elem.selectedIndex]) {\n this.captureDomEvent('input', elem, elem.options[elem.selectedIndex].value);\n }\n};\n\nInstrumenter.prototype.captureDomEvent = function(subtype, element, value, isChecked) {\n if (value !== undefined) {\n if (this.scrubTelemetryInputs || (domUtil.getElementType(element) === 'password')) {\n value = '[scrubbed]';\n } else {\n var description = domUtil.describeElement(element);\n if (this.telemetryScrubber) {\n if (this.telemetryScrubber(description)) {\n value = '[scrubbed]';\n }\n } else if (this.defaultValueScrubber(description)) {\n value = '[scrubbed]';\n }\n }\n }\n var elementString = domUtil.elementArrayToString(domUtil.treeToArray(element));\n this.telemeter.captureDom(subtype, elementString, value, isChecked);\n};\n\nInstrumenter.prototype.deinstrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n restore(this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.instrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n var self = this;\n replace(this._window, 'onpopstate', function(orig) {\n return function() {\n var current = self._location.href;\n self.handleUrlChange(self._lastHref, current);\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n }, this.replacements, 'navigation');\n\n replace(this._window.history, 'pushState', function(orig) {\n return function() {\n var url = arguments.length > 2 ? arguments[2] : undefined;\n if (url) {\n self.handleUrlChange(self._lastHref, url + '');\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.handleUrlChange = function(from, to) {\n var parsedHref = urlparser.parse(this._location.href);\n var parsedTo = urlparser.parse(to);\n var parsedFrom = urlparser.parse(from);\n this._lastHref = to;\n if (parsedHref.protocol === parsedTo.protocol && parsedHref.host === parsedTo.host) {\n to = parsedTo.path + (parsedTo.hash || '');\n }\n if (parsedHref.protocol === parsedFrom.protocol && parsedHref.host === parsedFrom.host) {\n from = parsedFrom.path + (parsedFrom.hash || '');\n }\n this.telemeter.captureNavigation(from, to);\n};\n\nInstrumenter.prototype.deinstrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.removeListeners('connectivity');\n } else {\n restore(this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.instrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.addListener('connectivity', this._window, 'online', undefined, function() {\n this.telemeter.captureConnectivityChange('online');\n }.bind(this), true);\n this.addListener('connectivity', this._window, 'offline', undefined, function() {\n this.telemeter.captureConnectivityChange('offline');\n }.bind(this), true);\n } else {\n var self = this;\n replace(this._document.body, 'ononline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('online');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n replace(this._document.body, 'onoffline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('offline');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.handleCspEvent = function(cspEvent) {\n var message = 'Security Policy Violation: ' +\n 'blockedURI: ' + cspEvent.blockedURI + ', ' +\n 'violatedDirective: ' + cspEvent.violatedDirective + ', ' +\n 'effectiveDirective: ' + cspEvent.effectiveDirective + ', ';\n\n if (cspEvent.sourceFile) {\n message += 'location: ' + cspEvent.sourceFile + ', ' +\n 'line: ' + cspEvent.lineNumber + ', ' +\n 'col: ' + cspEvent.columnNumber + ', ';\n }\n\n message += 'originalPolicy: ' + cspEvent.originalPolicy;\n\n this.telemeter.captureLog(message, 'error');\n this.handleCspError(message);\n}\n\nInstrumenter.prototype.handleCspError = function(message) {\n if (this.autoInstrument.errorOnContentSecurityPolicy) {\n this.rollbar.error(message);\n }\n}\n\nInstrumenter.prototype.deinstrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._document)) { return; }\n\n this.removeListeners('contentsecuritypolicy');\n};\n\nInstrumenter.prototype.instrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._document)) { return; }\n\n var cspHandler = this.handleCspEvent.bind(this);\n this.addListener('contentsecuritypolicy', this._document, 'securitypolicyviolation', null, cspHandler, false);\n};\n\nInstrumenter.prototype.addListener = function(section, obj, type, altType, handler, capture) {\n if (obj.addEventListener) {\n obj.addEventListener(type, handler, capture);\n this.eventRemovers[section].push(function() {\n obj.removeEventListener(type, handler, capture);\n });\n } else if (altType) {\n obj.attachEvent(altType, handler);\n this.eventRemovers[section].push(function() {\n obj.detachEvent(altType, handler);\n });\n }\n};\n\nInstrumenter.prototype.removeListeners = function(section) {\n var r;\n while (this.eventRemovers[section].length) {\n r = this.eventRemovers[section].shift();\n r();\n }\n};\n\nmodule.exports = Instrumenter;\n","'use strict';\n\n/*\n * headers - Detect when fetch Headers are undefined and use a partial polyfill.\n *\n * A full polyfill is not used in order to keep package size as small as possible.\n * Since this is only used internally and is not added to the window object,\n * the full interface doesn't need to be supported.\n *\n * This implementation is modified from whatwg-fetch:\n * https://github.com/github/fetch\n */\nfunction headers(headers) {\n if (typeof Headers === 'undefined') {\n return new FetchHeaders(headers);\n }\n\n return new Headers(headers);\n}\n\nfunction normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name)\n }\n return name.toLowerCase()\n}\n\nfunction normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value)\n }\n return value\n}\n\nfunction iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n return iterator\n}\n\nfunction FetchHeaders(headers) {\n this.map = {}\n\n if (headers instanceof FetchHeaders) {\n headers.forEach(function(value, name) {\n this.append(name, value)\n }, this)\n } else if (Array.isArray(headers)) {\n headers.forEach(function(header) {\n this.append(header[0], header[1])\n }, this)\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function(name) {\n this.append(name, headers[name])\n }, this)\n }\n}\n\nFetchHeaders.prototype.append = function(name, value) {\n name = normalizeName(name)\n value = normalizeValue(value)\n var oldValue = this.map[name]\n this.map[name] = oldValue ? oldValue + ', ' + value : value\n}\n\nFetchHeaders.prototype.get = function(name) {\n name = normalizeName(name)\n return this.has(name) ? this.map[name] : null\n}\n\nFetchHeaders.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n}\n\nFetchHeaders.prototype.forEach = function(callback, thisArg) {\n for (var name in this.map) {\n if (this.map.hasOwnProperty(name)) {\n callback.call(thisArg, this.map[name], name, this)\n }\n }\n}\n\nFetchHeaders.prototype.entries = function() {\n var items = []\n this.forEach(function(value, name) {\n items.push([name, value])\n })\n return iteratorFor(items)\n}\n\nmodule.exports = headers;\n","'use strict';\n\nfunction getElementType(e) {\n return (e.getAttribute('type') || '').toLowerCase();\n}\n\nfunction isDescribedElement(element, type, subtypes) {\n if (element.tagName.toLowerCase() !== type.toLowerCase()) {\n return false;\n }\n if (!subtypes) {\n return true;\n }\n element = getElementType(element);\n for (var i = 0; i < subtypes.length; i++) {\n if (subtypes[i] === element) {\n return true;\n }\n }\n return false;\n}\n\nfunction getElementFromEvent(evt, doc) {\n if (evt.target) {\n return evt.target;\n }\n if (doc && doc.elementFromPoint) {\n return doc.elementFromPoint(evt.clientX, evt.clientY);\n }\n return undefined;\n}\n\nfunction treeToArray(elem) {\n var MAX_HEIGHT = 5;\n var out = [];\n var nextDescription;\n for (var height = 0; elem && height < MAX_HEIGHT; height++) {\n nextDescription = describeElement(elem);\n if (nextDescription.tagName === 'html') {\n break;\n }\n out.unshift(nextDescription);\n elem = elem.parentNode;\n }\n return out;\n}\n\nfunction elementArrayToString(a) {\n var MAX_LENGTH = 80;\n var separator = ' > ', separatorLength = separator.length;\n var out = [], len = 0, nextStr, totalLength;\n\n for (var i = a.length - 1; i >= 0; i--) {\n nextStr = descriptionToString(a[i]);\n totalLength = len + (out.length * separatorLength) + nextStr.length;\n if (i < a.length - 1 && totalLength >= MAX_LENGTH + 3) {\n out.unshift('...');\n break;\n }\n out.unshift(nextStr);\n len += nextStr.length;\n }\n return out.join(separator);\n}\n\nfunction descriptionToString(desc) {\n if (!desc || !desc.tagName) {\n return '';\n }\n var out = [desc.tagName];\n if (desc.id) {\n out.push('#' + desc.id);\n }\n if (desc.classes) {\n out.push('.' + desc.classes.join('.'));\n }\n for (var i = 0; i < desc.attributes.length; i++) {\n out.push('[' + desc.attributes[i].key + '=\"' + desc.attributes[i].value + '\"]');\n }\n\n return out.join('');\n}\n\n/**\n * Input: a dom element\n * Output: null if tagName is falsey or input is falsey, else\n * {\n * tagName: String,\n * id: String | undefined,\n * classes: [String] | undefined,\n * attributes: [\n * {\n * key: OneOf(type, name, title, alt),\n * value: String\n * }\n * ]\n * }\n */\nfunction describeElement(elem) {\n if (!elem || !elem.tagName) {\n return null;\n }\n var out = {}, className, key, attr, i;\n out.tagName = elem.tagName.toLowerCase();\n if (elem.id) {\n out.id = elem.id;\n }\n className = elem.className;\n if (className && (typeof className === 'string')) {\n out.classes = className.split(/\\s+/);\n }\n var attributes = ['type', 'name', 'title', 'alt'];\n out.attributes = [];\n for (i = 0; i < attributes.length; i++) {\n key = attributes[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.attributes.push({key: key, value: attr});\n }\n }\n return out;\n}\n\nmodule.exports = {\n describeElement: describeElement,\n descriptionToString: descriptionToString,\n elementArrayToString: elementArrayToString,\n treeToArray: treeToArray,\n getElementFromEvent: getElementFromEvent,\n isDescribedElement: isDescribedElement,\n getElementType: getElementType\n};\n","'use strict';\n\nvar polyfillJSON = require('../../vendor/JSON-js/json3');\n\nmodule.exports = polyfillJSON;\n","// json3.js\n// 2017-02-21\n// Public Domain.\n// NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.\n// See http://www.JSON.org/js.html\n// This code should be minified before deployment.\n// See http://javascript.crockford.com/jsmin.html\n\n// USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO\n// NOT CONTROL.\n\n// This file creates a global JSON object containing two methods: stringify\n// and parse. This file provides the ES5 JSON capability to ES3 systems.\n// If a project might run on IE8 or earlier, then this file should be included.\n// This file does nothing on ES5 systems.\n\n// JSON.stringify(value, replacer, space)\n// value any JavaScript value, usually an object or array.\n// replacer an optional parameter that determines how object\n// values are stringified for objects. It can be a\n// function or an array of strings.\n// space an optional parameter that specifies the indentation\n// of nested structures. If it is omitted, the text will\n// be packed without extra whitespace. If it is a number,\n// it will specify the number of spaces to indent at each\n// level. If it is a string (such as \"\\t\" or \" \"),\n// it contains the characters used to indent at each level.\n// This method produces a JSON text from a JavaScript value.\n// When an object value is found, if the object contains a toJSON\n// method, its toJSON method will be called and the result will be\n// stringified. A toJSON method does not serialize: it returns the\n// value represented by the name/value pair that should be serialized,\n// or undefined if nothing should be serialized. The toJSON method\n// will be passed the key associated with the value, and this will be\n// bound to the value.\n\n// For example, this would serialize Dates as ISO strings.\n\n// Date.prototype.toJSON = function (key) {\n// function f(n) {\n// // Format integers to have at least two digits.\n// return (n < 10)\n// ? \"0\" + n\n// : n;\n// }\n// return this.getUTCFullYear() + \"-\" +\n// f(this.getUTCMonth() + 1) + \"-\" +\n// f(this.getUTCDate()) + \"T\" +\n// f(this.getUTCHours()) + \":\" +\n// f(this.getUTCMinutes()) + \":\" +\n// f(this.getUTCSeconds()) + \"Z\";\n// };\n\n// You can provide an optional replacer method. It will be passed the\n// key and value of each member, with this bound to the containing\n// object. The value that is returned from your method will be\n// serialized. If your method returns undefined, then the member will\n// be excluded from the serialization.\n\n// If the replacer parameter is an array of strings, then it will be\n// used to select the members to be serialized. It filters the results\n// such that only members with keys listed in the replacer array are\n// stringified.\n\n// Values that do not have JSON representations, such as undefined or\n// functions, will not be serialized. Such values in objects will be\n// dropped; in arrays they will be replaced with null. You can use\n// a replacer function to replace those with JSON values.\n\n// JSON.stringify(undefined) returns undefined.\n\n// The optional space parameter produces a stringification of the\n// value that is filled with line breaks and indentation to make it\n// easier to read.\n\n// If the space parameter is a non-empty string, then that string will\n// be used for indentation. If the space parameter is a number, then\n// the indentation will be that many spaces.\n\n// Example:\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}]);\n// // text is '[\"e\",{\"pluribus\":\"unum\"}]'\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}], null, \"\\t\");\n// // text is '[\\n\\t\"e\",\\n\\t{\\n\\t\\t\"pluribus\": \"unum\"\\n\\t}\\n]'\n\n// text = JSON.stringify([new Date()], function (key, value) {\n// return this[key] instanceof Date\n// ? \"Date(\" + this[key] + \")\"\n// : value;\n// });\n// // text is '[\"Date(---current time---)\"]'\n\n// JSON.parse(text, reviver)\n// This method parses a JSON text to produce an object or array.\n// It can throw a SyntaxError exception.\n// This has been modified to use JSON-js/json_parse_state.js as the\n// parser instead of the one built around eval found in JSON-js/json2.js\n\n// The optional reviver parameter is a function that can filter and\n// transform the results. It receives each of the keys and values,\n// and its return value is used instead of the original value.\n// If it returns what it received, then the structure is not modified.\n// If it returns undefined then the member is deleted.\n\n// Example:\n\n// // Parse the text. Values that look like ISO date strings will\n// // be converted to Date objects.\n\n// myData = JSON.parse(text, function (key, value) {\n// var a;\n// if (typeof value === \"string\") {\n// a =\n// /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2}(?:\\.\\d*)?)Z$/.exec(value);\n// if (a) {\n// return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],\n// +a[5], +a[6]));\n// }\n// }\n// return value;\n// });\n\n// myData = JSON.parse('[\"Date(09/09/2001)\"]', function (key, value) {\n// var d;\n// if (typeof value === \"string\" &&\n// value.slice(0, 5) === \"Date(\" &&\n// value.slice(-1) === \")\") {\n// d = new Date(value.slice(5, -1));\n// if (d) {\n// return d;\n// }\n// }\n// return value;\n// });\n\n// This is a reference implementation. You are free to copy, modify, or\n// redistribute.\n\n/*jslint\n for, this\n */\n\n/*property\n JSON, apply, call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,\n getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,\n lastIndex, length, parse, prototype, push, replace, slice, stringify,\n test, toJSON, toString, valueOf\n */\n\nvar setupCustomJSON = function(JSON) {\n\n var rx_one = /^[\\],:{}\\s]*$/;\n var rx_two = /\\\\(?:[\"\\\\\\/bfnrt]|u[0-9a-fA-F]{4})/g;\n var rx_three = /\"[^\"\\\\\\n\\r]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g;\n var rx_four = /(?:^|:|,)(?:\\s*\\[)+/g;\n var rx_escapable = /[\\\\\"\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n var rx_dangerous = /[\\u0000\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n\n function f(n) {\n // Format integers to have at least two digits.\n return n < 10\n ? \"0\" + n\n : n;\n }\n\n function this_value() {\n return this.valueOf();\n }\n\n if (typeof Date.prototype.toJSON !== \"function\") {\n\n Date.prototype.toJSON = function () {\n\n return isFinite(this.valueOf())\n ? this.getUTCFullYear() + \"-\" +\n f(this.getUTCMonth() + 1) + \"-\" +\n f(this.getUTCDate()) + \"T\" +\n f(this.getUTCHours()) + \":\" +\n f(this.getUTCMinutes()) + \":\" +\n f(this.getUTCSeconds()) + \"Z\"\n : null;\n };\n\n Boolean.prototype.toJSON = this_value;\n Number.prototype.toJSON = this_value;\n String.prototype.toJSON = this_value;\n }\n\n var gap;\n var indent;\n var meta;\n var rep;\n\n\n function quote(string) {\n\n // If the string contains no control characters, no quote characters, and no\n // backslash characters, then we can safely slap some quotes around it.\n // Otherwise we must also replace the offending characters with safe escape\n // sequences.\n\n rx_escapable.lastIndex = 0;\n return rx_escapable.test(string)\n ? \"\\\"\" + string.replace(rx_escapable, function (a) {\n var c = meta[a];\n return typeof c === \"string\"\n ? c\n : \"\\\\u\" + (\"0000\" + a.charCodeAt(0).toString(16)).slice(-4);\n }) + \"\\\"\"\n : \"\\\"\" + string + \"\\\"\";\n }\n\n\n function str(key, holder) {\n\n // Produce a string from holder[key].\n\n var i; // The loop counter.\n var k; // The member key.\n var v; // The member value.\n var length;\n var mind = gap;\n var partial;\n var value = holder[key];\n\n // If the value has a toJSON method, call it to obtain a replacement value.\n\n if (value && typeof value === \"object\" &&\n typeof value.toJSON === \"function\") {\n value = value.toJSON(key);\n }\n\n // If we were called with a replacer function, then call the replacer to\n // obtain a replacement value.\n\n if (typeof rep === \"function\") {\n value = rep.call(holder, key, value);\n }\n\n // What happens next depends on the value's type.\n\n switch (typeof value) {\n case \"string\":\n return quote(value);\n\n case \"number\":\n\n // JSON numbers must be finite. Encode non-finite numbers as null.\n\n return isFinite(value)\n ? String(value)\n : \"null\";\n\n case \"boolean\":\n case \"null\":\n\n // If the value is a boolean or null, convert it to a string. Note:\n // typeof null does not produce \"null\". The case is included here in\n // the remote chance that this gets fixed someday.\n\n return String(value);\n\n // If the type is \"object\", we might be dealing with an object or an array or\n // null.\n\n case \"object\":\n\n // Due to a specification blunder in ECMAScript, typeof null is \"object\",\n // so watch out for that case.\n\n if (!value) {\n return \"null\";\n }\n\n // Make an array to hold the partial results of stringifying this object value.\n\n gap += indent;\n partial = [];\n\n // Is the value an array?\n\n if (Object.prototype.toString.apply(value) === \"[object Array]\") {\n\n // The value is an array. Stringify every element. Use null as a placeholder\n // for non-JSON values.\n\n length = value.length;\n for (i = 0; i < length; i += 1) {\n partial[i] = str(i, value) || \"null\";\n }\n\n // Join all of the elements together, separated with commas, and wrap them in\n // brackets.\n\n v = partial.length === 0\n ? \"[]\"\n : gap\n ? \"[\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"]\"\n : \"[\" + partial.join(\",\") + \"]\";\n gap = mind;\n return v;\n }\n\n // If the replacer is an array, use it to select the members to be stringified.\n\n if (rep && typeof rep === \"object\") {\n length = rep.length;\n for (i = 0; i < length; i += 1) {\n if (typeof rep[i] === \"string\") {\n k = rep[i];\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n } else {\n\n // Otherwise, iterate through all of the keys in the object.\n\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(value, k)) {\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n }\n\n // Join all of the member texts together, separated with commas,\n // and wrap them in braces.\n\n v = partial.length === 0\n ? \"{}\"\n : gap\n ? \"{\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"}\"\n : \"{\" + partial.join(\",\") + \"}\";\n gap = mind;\n return v;\n }\n }\n\n // If the JSON object does not yet have a stringify method, give it one.\n\n if (typeof JSON.stringify !== \"function\") {\n meta = { // table of character substitutions\n \"\\b\": \"\\\\b\",\n \"\\t\": \"\\\\t\",\n \"\\n\": \"\\\\n\",\n \"\\f\": \"\\\\f\",\n \"\\r\": \"\\\\r\",\n \"\\\"\": \"\\\\\\\"\",\n \"\\\\\": \"\\\\\\\\\"\n };\n JSON.stringify = function (value, replacer, space) {\n\n // The stringify method takes a value and an optional replacer, and an optional\n // space parameter, and returns a JSON text. The replacer can be a function\n // that can replace values, or an array of strings that will select the keys.\n // A default replacer method can be provided. Use of the space parameter can\n // produce text that is more easily readable.\n\n var i;\n gap = \"\";\n indent = \"\";\n\n // If the space parameter is a number, make an indent string containing that\n // many spaces.\n\n if (typeof space === \"number\") {\n for (i = 0; i < space; i += 1) {\n indent += \" \";\n }\n\n // If the space parameter is a string, it will be used as the indent string.\n\n } else if (typeof space === \"string\") {\n indent = space;\n }\n\n // If there is a replacer, it must be a function or an array.\n // Otherwise, throw an error.\n\n rep = replacer;\n if (replacer && typeof replacer !== \"function\" &&\n (typeof replacer !== \"object\" ||\n typeof replacer.length !== \"number\")) {\n throw new Error(\"JSON.stringify\");\n }\n\n // Make a fake root object containing our value under the key of \"\".\n // Return the result of stringifying the value.\n\n return str(\"\", {\"\": value});\n };\n }\n\n\n // If the JSON object does not yet have a parse method, give it one.\n\n if (typeof JSON.parse !== \"function\") {\n JSON.parse = (function () {\n\n // This function creates a JSON parse function that uses a state machine rather\n // than the dangerous eval function to parse a JSON text.\n\n var state; // The state of the parser, one of\n // 'go' The starting state\n // 'ok' The final, accepting state\n // 'firstokey' Ready for the first key of the object or\n // the closing of an empty object\n // 'okey' Ready for the next key of the object\n // 'colon' Ready for the colon\n // 'ovalue' Ready for the value half of a key/value pair\n // 'ocomma' Ready for a comma or closing }\n // 'firstavalue' Ready for the first value of an array or\n // an empty array\n // 'avalue' Ready for the next value of an array\n // 'acomma' Ready for a comma or closing ]\n var stack; // The stack, for controlling nesting.\n var container; // The current container object or array\n var key; // The current key\n var value; // The current value\n var escapes = { // Escapement translation table\n \"\\\\\": \"\\\\\",\n \"\\\"\": \"\\\"\",\n \"/\": \"/\",\n \"t\": \"\\t\",\n \"n\": \"\\n\",\n \"r\": \"\\r\",\n \"f\": \"\\f\",\n \"b\": \"\\b\"\n };\n var string = { // The actions for string tokens\n go: function () {\n state = \"ok\";\n },\n firstokey: function () {\n key = value;\n state = \"colon\";\n },\n okey: function () {\n key = value;\n state = \"colon\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var number = { // The actions for number tokens\n go: function () {\n state = \"ok\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var action = {\n\n // The action table describes the behavior of the machine. It contains an\n // object for each token. Each object contains a method that is called when\n // a token is matched in a state. An object will lack a method for illegal\n // states.\n\n \"{\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = {};\n state = \"firstokey\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = {};\n state = \"firstokey\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n }\n },\n \"}\": {\n firstokey: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n ocomma: function () {\n var pop = stack.pop();\n container[key] = value;\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \"[\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = [];\n state = \"firstavalue\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = [];\n state = \"firstavalue\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n }\n },\n \"]\": {\n firstavalue: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n acomma: function () {\n var pop = stack.pop();\n container.push(value);\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \":\": {\n colon: function () {\n if (Object.hasOwnProperty.call(container, key)) {\n throw new SyntaxError(\"Duplicate key '\" + key + \"\\\"\");\n }\n state = \"ovalue\";\n }\n },\n \",\": {\n ocomma: function () {\n container[key] = value;\n state = \"okey\";\n },\n acomma: function () {\n container.push(value);\n state = \"avalue\";\n }\n },\n \"true\": {\n go: function () {\n value = true;\n state = \"ok\";\n },\n ovalue: function () {\n value = true;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = true;\n state = \"acomma\";\n },\n avalue: function () {\n value = true;\n state = \"acomma\";\n }\n },\n \"false\": {\n go: function () {\n value = false;\n state = \"ok\";\n },\n ovalue: function () {\n value = false;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = false;\n state = \"acomma\";\n },\n avalue: function () {\n value = false;\n state = \"acomma\";\n }\n },\n \"null\": {\n go: function () {\n value = null;\n state = \"ok\";\n },\n ovalue: function () {\n value = null;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = null;\n state = \"acomma\";\n },\n avalue: function () {\n value = null;\n state = \"acomma\";\n }\n }\n };\n\n function debackslashify(text) {\n\n // Remove and replace any backslash escapement.\n\n return text.replace(/\\\\(?:u(.{4})|([^u]))/g, function (ignore, b, c) {\n return b\n ? String.fromCharCode(parseInt(b, 16))\n : escapes[c];\n });\n }\n\n return function (source, reviver) {\n\n // A regular expression is used to extract tokens from the JSON text.\n // The extraction process is cautious.\n\n var result;\n var tx = /^[\\u0020\\t\\n\\r]*(?:([,:\\[\\]{}]|true|false|null)|(-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?)|\"((?:[^\\r\\n\\t\\\\\\\"]|\\\\(?:[\"\\\\\\/trnfb]|u[0-9a-fA-F]{4}))*)\")/;\n\n // Set the starting state.\n\n state = \"go\";\n\n // The stack records the container, key, and state for each object or array\n // that contains another object or array while processing nested structures.\n\n stack = [];\n\n // If any error occurs, we will catch it and ultimately throw a syntax error.\n\n try {\n\n // For each token...\n\n while (true) {\n result = tx.exec(source);\n if (!result) {\n break;\n }\n\n // result is the result array from matching the tokenizing regular expression.\n // result[0] contains everything that matched, including any initial whitespace.\n // result[1] contains any punctuation that was matched, or true, false, or null.\n // result[2] contains a matched number, still in string form.\n // result[3] contains a matched string, without quotes but with escapement.\n\n if (result[1]) {\n\n // Token: Execute the action for this state and token.\n\n action[result[1]][state]();\n\n } else if (result[2]) {\n\n // Number token: Convert the number string into a number value and execute\n // the action for this state and number.\n\n value = +result[2];\n number[state]();\n } else {\n\n // String token: Replace the escapement sequences and execute the action for\n // this state and string.\n\n value = debackslashify(result[3]);\n string[state]();\n }\n\n // Remove the token from the string. The loop will continue as long as there\n // are tokens. This is a slow process, but it allows the use of ^ matching,\n // which assures that no illegal tokens slip through.\n\n source = source.slice(result[0].length);\n }\n\n // If we find a state/token combination that is illegal, then the action will\n // cause an error. We handle the error by simply changing the state.\n\n } catch (e) {\n state = e;\n }\n\n // The parsing is finished. If we are not in the final \"ok\" state, or if the\n // remaining source contains anything except whitespace, then we did not have\n //a well-formed JSON text.\n\n if (state !== \"ok\" || (/[^\\u0020\\t\\n\\r]/.test(source))) {\n throw (state instanceof SyntaxError)\n ? state\n : new SyntaxError(\"JSON\");\n }\n\n // If there is a reviver function, we recursively walk the new structure,\n // passing each name/value pair to the reviver function for possible\n // transformation, starting with a temporary root object that holds the current\n // value in an empty key. If there is not a reviver function, we simply return\n // that value.\n\n return (typeof reviver === \"function\")\n ? (function walk(holder, key) {\n var k;\n var v;\n var val = holder[key];\n if (val && typeof val === \"object\") {\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(val, k)) {\n v = walk(val, k);\n if (v !== undefined) {\n val[k] = v;\n } else {\n delete val[k];\n }\n }\n }\n }\n return reviver.call(holder, key, val);\n }({\"\": value}, \"\"))\n : value;\n };\n }());\n }\n}\n\nmodule.exports = setupCustomJSON;\n","'use strict';\n\nfunction wrapGlobals(window, handler, shim) {\n if (!window) { return; }\n // Adapted from https://github.com/bugsnag/bugsnag-js\n var globals = 'EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload'.split(',');\n var i, global;\n for (i = 0; i < globals.length; ++i) {\n global = globals[i];\n\n if (window[global] && window[global].prototype) {\n _extendListenerPrototype(handler, window[global].prototype, shim);\n }\n }\n}\n\nfunction _extendListenerPrototype(handler, prototype, shim) {\n if (prototype.hasOwnProperty && prototype.hasOwnProperty('addEventListener')) {\n var oldAddEventListener = prototype.addEventListener;\n while (oldAddEventListener._rollbarOldAdd && oldAddEventListener.belongsToShim) {\n oldAddEventListener = oldAddEventListener._rollbarOldAdd;\n }\n var addFn = function(event, callback, bubble) {\n oldAddEventListener.call(this, event, handler.wrap(callback), bubble);\n };\n addFn._rollbarOldAdd = oldAddEventListener;\n addFn.belongsToShim = shim;\n prototype.addEventListener = addFn;\n\n var oldRemoveEventListener = prototype.removeEventListener;\n while (oldRemoveEventListener._rollbarOldRemove && oldRemoveEventListener.belongsToShim) {\n oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;\n }\n var removeFn = function(event, callback, bubble) {\n oldRemoveEventListener.call(this, event, callback && callback._rollbar_wrapped || callback, bubble);\n };\n removeFn._rollbarOldRemove = oldRemoveEventListener;\n removeFn.belongsToShim = shim;\n prototype.removeEventListener = removeFn;\n }\n}\n\nmodule.exports = wrapGlobals;\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction raw(payload, jsonBackup) {\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction selectFrames(frames, range) {\n var len = frames.length;\n if (len > range * 2) {\n return frames.slice(0, range).concat(frames.slice(len - range));\n }\n return frames;\n}\n\nfunction truncateFrames(payload, jsonBackup, range) {\n range = (typeof range === 'undefined') ? 30 : range;\n var body = payload.data.body;\n var frames;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n frames = chain[i].frames;\n frames = selectFrames(frames, range);\n chain[i].frames = frames;\n }\n } else if (body.trace) {\n frames = body.trace.frames;\n frames = selectFrames(frames, range);\n body.trace.frames = frames;\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction maybeTruncateValue(len, val) {\n if (!val) {\n return val;\n }\n if (val.length > len) {\n return val.slice(0, len - 3).concat('...');\n }\n return val;\n}\n\nfunction truncateStrings(len, payload, jsonBackup) {\n function truncator(k, v, seen) {\n switch (_.typeName(v)) {\n case 'string':\n return maybeTruncateValue(len, v);\n case 'object':\n case 'array':\n return traverse(v, truncator, seen);\n default:\n return v;\n }\n }\n payload = traverse(payload, truncator);\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction truncateTraceData(traceData) {\n if (traceData.exception) {\n delete traceData.exception.description;\n traceData.exception.message = maybeTruncateValue(255, traceData.exception.message);\n }\n traceData.frames = selectFrames(traceData.frames, 1);\n return traceData;\n}\n\nfunction minBody(payload, jsonBackup) {\n var body = payload.data.body;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n chain[i] = truncateTraceData(chain[i]);\n }\n } else if (body.trace) {\n body.trace = truncateTraceData(body.trace);\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction needsTruncation(payload, maxSize) {\n return _.maxByteSize(payload) > maxSize;\n}\n\nfunction truncate(payload, jsonBackup, maxSize) {\n maxSize = (typeof maxSize === 'undefined') ? (512 * 1024) : maxSize;\n var strategies = [\n raw,\n truncateFrames,\n truncateStrings.bind(null, 1024),\n truncateStrings.bind(null, 512),\n truncateStrings.bind(null, 256),\n minBody\n ];\n var strategy, results, result;\n\n while ((strategy = strategies.shift())) {\n results = strategy(payload, jsonBackup);\n payload = results[0];\n result = results[1];\n if (result.error || !needsTruncation(result.value, maxSize)) {\n return result;\n }\n }\n return result;\n}\n\nmodule.exports = {\n truncate: truncate,\n\n /* for testing */\n raw: raw,\n truncateFrames: truncateFrames,\n truncateStrings: truncateStrings,\n maybeTruncateValue: maybeTruncateValue\n};\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://rollbar/webpack/universalModuleDefinition","webpack://rollbar/webpack/bootstrap","webpack://rollbar/./src/utility.js","webpack://rollbar/./src/browser/logger.js","webpack://rollbar/./src/browser/url.js","webpack://rollbar/./src/errorParser.js","webpack://rollbar/./src/scrub.js","webpack://rollbar/./src/utility/traverse.js","webpack://rollbar/./src/browser/bundles/rollbar.noconflict.js","webpack://rollbar/./src/browser/rollbar.js","webpack://rollbar/./src/browser/core.js","webpack://rollbar/./src/rollbar.js","webpack://rollbar/./src/rateLimiter.js","webpack://rollbar/./src/merge.js","webpack://rollbar/./src/queue.js","webpack://rollbar/./src/notifier.js","webpack://rollbar/./src/api.js","webpack://rollbar/./src/apiUtility.js","webpack://rollbar/./node_modules/console-polyfill/index.js","webpack://rollbar/./src/browser/detection.js","webpack://rollbar/./src/browser/globalSetup.js","webpack://rollbar/./src/browser/transport.js","webpack://rollbar/./src/browser/transport/fetch.js","webpack://rollbar/./src/browser/transport/xhr.js","webpack://rollbar/./src/browser/transforms.js","webpack://rollbar/./node_modules/error-stack-parser/error-stack-parser.js","webpack://rollbar/./node_modules/error-stack-parser/node_modules/stackframe/stackframe.js","webpack://rollbar/./src/transforms.js","webpack://rollbar/./src/browser/predicates.js","webpack://rollbar/./src/predicates.js","webpack://rollbar/./src/defaults.js","webpack://rollbar/./src/browser/defaults/scrubFields.js","webpack://rollbar/./src/telemetry.js","webpack://rollbar/./src/browser/telemetry.js","webpack://rollbar/./src/utility/headers.js","webpack://rollbar/./src/browser/domUtility.js","webpack://rollbar/./src/utility/polyfillJSON.js","webpack://rollbar/./vendor/JSON-js/json3.js","webpack://rollbar/./src/browser/wrapGlobals.js","webpack://rollbar/./src/truncation.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;QCVA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;AClFa;;AAEb,YAAY,mBAAO,CAAC,EAAS;;AAE7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,OAAO;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,EAAE;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,mCAAmC,OAAO;AAC1C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,iBAAiB,YAAY;AAC7B;AACA,qBAAqB;AACrB;AACA,KAAK,wBAAwB;AAC7B;AACA,KAAK,yBAAyB;AAC9B;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kCAAkC,OAAO;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,SAAS;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,kCAAkC,OAAO;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,SAAS,UAAU,YAAY,GAAG;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,aAAa;AAChC;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5wBa;;AAEb;AACA,mBAAO,CAAC,EAAkB;AAC1B,gBAAgB,mBAAO,CAAC,EAAa;AACrC,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;AC3Ca;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;AChFa;;AAEb,uBAAuB,mBAAO,CAAC,EAAoB;;AAEnD;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;;AAEA,sBAAsB,wBAAwB;AAC9C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,eAAe;AACf;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7Ha;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,eAAe,mBAAO,CAAC,CAAoB;;AAE3C;AACA;;AAEA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;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AAC5B,UAAU,mBAAO,CAAC,EAAQ;AAC1B,aAAa,mBAAO,CAAC,CAAU;AAC/B,cAAc,mBAAO,CAAC,EAAe;;AAErC,gBAAgB,mBAAO,CAAC,EAAa;AACrC,aAAa,mBAAO,CAAC,CAAO;;AAE5B,iBAAiB,mBAAO,CAAC,EAAc;AACvC,uBAAuB,mBAAO,CAAC,EAAe;AAC9C,iBAAiB,mBAAO,CAAC,EAAc;AACvC,uBAAuB,mBAAO,CAAC,EAAe;AAC9C,kBAAkB,mBAAO,CAAC,CAAgB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,0BAA0B,sBAAsB;AAChD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,oCAAoC,SAAS;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,eAAe,mBAAO,CAAC,EAAa;AACpC,kBAAkB,mBAAO,CAAC,EAAwB;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACxjBa;;AAEb,kBAAkB,mBAAO,CAAC,EAAe;AACzC,YAAY,mBAAO,CAAC,EAAS;AAC7B,eAAe,mBAAO,CAAC,EAAY;AACnC,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,6EAA6E,UAAU;AACvF,yFAAyF,UAAU;;AAEnG;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,6BAA6B;AAC7B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACnRa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AChJa;;AAEb;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA,WAAW,YAAY;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACvDa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wDAAwD,WAAW;AACnE;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,QAAQ;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,aAAa,8BAA8B;AAC3C;AACA;AACA;AACA;AACA,+CAA+C,SAAS;AACxD;AACA;AACA,cAAc;AACd;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,SAAS;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,+BAA+B;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC7Qa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACxHa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,cAAc,mBAAO,CAAC,EAAc;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;AC5Ga;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACzGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;AClBY;;AAEb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;AC/Ba;;AAEb;AACA,gBAAgB,QAAQ;AACxB;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;;AAEA;AACA,gBAAgB,QAAQ;;AAExB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;;;;;;;AClGa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,uBAAuB,mBAAO,CAAC,EAAmB;AAClD,qBAAqB,mBAAO,CAAC,EAAiB;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC/Ha;;AAEb,aAAa,mBAAO,CAAC,CAAW;AAChC,QAAQ,mBAAO,CAAC,CAAe;;AAE/B;AACA;AACA;;AAEA;AACA;AACA,wCAAwC,mBAAmB;AAC3D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;;AAEA;;;;;;;;ACpCa;;AAEb;;AAEA,QAAQ,mBAAO,CAAC,CAAe;AAC/B,aAAa,mBAAO,CAAC,CAAW;;AAEhC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AChKa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,kBAAkB,mBAAO,CAAC,CAAgB;AAC1C,aAAa,mBAAO,CAAC,CAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,OAAO;AAC7C;AACA,oBAAoB,6CAA6C;AACjE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,4BAA4B,gBAAgB;AAC5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,sBAAsB;AACvC;AACA;AACA;;AAEA,4BAA4B,oBAAoB;AAChD;AACA;;AAEA;AACA;;AAEA;AACA;AACA,8BAA8B,aAAa;AAC3C;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,kBAAkB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACnVA;AACA;AACA;;AAEA;AACA,QAAQ,IAA0C;AAClD,QAAQ,iCAA6B,CAAC,uBAAY,CAAC,oCAAE,OAAO;AAAA;AAAA;AAAA,oGAAC;AAC7D,KAAK,MAAM,EAIN;AACL,CAAC;AACD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,MAAM;AACzB,oBAAoB,MAAM;AAC1B;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA,CAAC;;;;;;;ACzMD;AACA;AACA;;AAEA;AACA,QAAQ,IAA0C;AAClD,QAAQ,iCAAqB,EAAE,oCAAE,OAAO;AAAA;AAAA;AAAA,oGAAC;AACzC,KAAK,MAAM,EAIN;AACL,CAAC;AACD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,wBAAwB;AAC3C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA,CAAC;;;;;;;;AC9IY;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,sBAAsB;AAC1D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,8BAA8B;AAC9B;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5Ja;;AAEb,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;ACba;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe;;AAEf;;AAEA,uCAAuC,eAAe;;AAEtD;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA;;AAEA,wCAAwC,eAAe;;AAEvD,mBAAmB,gBAAgB;AACnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,SAAS;AAC1B;;AAEA,mBAAmB,qBAAqB;AACxC;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClMa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACVa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5Da;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qCAAqC,mBAAmB;AACxD;;AAEA;AACA,qCAAqC,4BAA4B;AACjE;AACA;AACA,8BAA8B,4BAA4B;AAC1D;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD;AACA;AACA,8BAA8B,gBAAgB;AAC9C;AACA;;AAEA;AACA,8BAA8B,aAAa;AAC3C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AClLa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,cAAc,mBAAO,CAAC,EAAoB;AAC1C,YAAY,mBAAO,CAAC,CAAU;AAC9B,gBAAgB,mBAAO,CAAC,CAAO;AAC/B,cAAc,mBAAO,CAAC,EAAc;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gDAAgD,aAAa;AAC7D;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B,mBAAmB,qBAAqB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,6BAA6B,0BAA0B;AACvD;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA,iBAAiB;AACjB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,eAAe,0BAA0B;AACzC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB;;AAEjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,SAAS;AAC9C;AACA;AACA,GAAG;AACH,yCAAyC;AACzC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,gDAAgD,QAAQ;;AAExD;AACA;;AAEA;AACA,gDAAgD,QAAQ;;AAExD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;AC7wBa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;AC/Fa;;AAEb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,6BAA6B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,4BAA4B,QAAQ;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,4BAA4B;AAC7C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,uBAAuB;AACpC;AACA;AACA;AACA,2BAA2B,sBAAsB;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnIa;;AAEb,mBAAmB,mBAAO,CAAC,EAA4B;;AAEvD;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB;AACpB;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,yCAAyC,iBAAiB;AAC1D,8BAA8B,kBAAkB;;AAEhD,yCAAyC,iBAAiB;AAC1D,sCAAsC,6BAA6B;;AAEnE;AACA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,wBAAwB;AACxB,+CAA+C,EAAE;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;;AAGA;;AAEA;;AAEA,UAAU;AACV,UAAU;AACV,UAAU;AACV;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA,qBAAqB,YAAY;AACjC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,qBAAqB,YAAY;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,eAAe;AACf;AACA,cAAc,wDAAwD;AACtE,cAAc,0BAA0B;AACxC;AACA;AACA;AACA;;AAEA;;AAEA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,mBAAmB,WAAW;AAC9B;AACA;;AAEA;;AAEA,OAAO;AACP;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,sBAAsB,UAAU;AAChC;AACA;;;AAGA;;AAEA;AACA;;AAEA;AACA;;AAEA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB,oBAAoB;AACpB,cAAc;AACd,gBAAgB;AAChB,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,UAAU;AACV;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,WAAW;AACX;AACA,wBAAwB,gDAAgD;AACxE;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,SAAS;AACT,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,WAAW;AACX;AACA,wBAAwB,gDAAgD;AACxE;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,sCAAsC,EAAE;AACxC;AACA;AACA;AACA,SAAS;AACT;;AAEA;;AAEA;AACA;;AAEA;AACA,+CAA+C,yGAAyG,EAAE;;AAE1J;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,SAAS;AACT;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE,UAAU;AACvB;AACA;AACA,KAAK;AACL;AACA;;AAEA;;;;;;;;AC1vBa;;AAEb;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,aAAa,oBAAoB;AACjC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC1Ca;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,eAAe,mBAAO,CAAC,CAAoB;;AAE3C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA","file":"rollbar.noconflict.umd.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"rollbar\"] = factory();\n\telse\n\t\troot[\"rollbar\"] = factory();\n})(this, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n","'use strict';\n\nvar merge = require('./merge');\n\nvar RollbarJSON = {};\nfunction setupJSON(polyfillJSON) {\n if (isFunction(RollbarJSON.stringify) && isFunction(RollbarJSON.parse)) {\n return;\n }\n\n if (isDefined(JSON)) {\n // If polyfill is provided, prefer it over existing non-native shims.\n if(polyfillJSON) {\n if (isNativeFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isNativeFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n } else { // else accept any interface that is present.\n if (isFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n }\n }\n if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {\n polyfillJSON && polyfillJSON(RollbarJSON);\n }\n}\n\n/*\n * isType - Given a Javascript value and a string, returns true if the type of the value matches the\n * given string.\n *\n * @param x - any value\n * @param t - a lowercase string containing one of the following type names:\n * - undefined\n * - null\n * - error\n * - number\n * - boolean\n * - string\n * - symbol\n * - function\n * - object\n * - array\n * @returns true if x is of type t, otherwise false\n */\nfunction isType(x, t) {\n return t === typeName(x);\n}\n\n/*\n * typeName - Given a Javascript value, returns the type of the object as a string\n */\nfunction typeName(x) {\n var name = typeof x;\n if (name !== 'object') {\n return name;\n }\n if (!x) {\n return 'null';\n }\n if (x instanceof Error) {\n return 'error';\n }\n return ({}).toString.call(x).match(/\\s([a-zA-Z]+)/)[1].toLowerCase();\n}\n\n/* isFunction - a convenience function for checking if a value is a function\n *\n * @param f - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isFunction(f) {\n return isType(f, 'function');\n}\n\n/* isNativeFunction - a convenience function for checking if a value is a native JS function\n *\n * @param f - any value\n * @returns true if f is a native JS function, otherwise false\n */\nfunction isNativeFunction(f) {\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n var funcMatchString = Function.prototype.toString.call(Object.prototype.hasOwnProperty)\n .replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?');\n var reIsNative = RegExp('^' + funcMatchString + '$');\n return isObject(f) && reIsNative.test(f);\n}\n\n/* isObject - Checks if the argument is an object\n *\n * @param value - any value\n * @returns true is value is an object function is an object)\n*/\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/* isString - Checks if the argument is a string\n *\n * @param value - any value\n * @returns true if value is a string\n*/\nfunction isString(value) {\n return typeof value === 'string' || value instanceof String\n}\n\n/**\n * isFiniteNumber - determines whether the passed value is a finite number\n *\n * @param {*} n - any value\n * @returns true if value is a finite number\n */\n function isFiniteNumber(n) {\n return Number.isFinite(n);\n}\n\n/*\n * isDefined - a convenience function for checking if a value is not equal to undefined\n *\n * @param u - any value\n * @returns true if u is anything other than undefined\n */\nfunction isDefined(u) {\n return !isType(u, 'undefined');\n}\n\n/*\n * isIterable - convenience function for checking if a value can be iterated, essentially\n * whether it is an object or an array.\n *\n * @param i - any value\n * @returns true if i is an object or an array as determined by `typeName`\n */\nfunction isIterable(i) {\n var type = typeName(i);\n return (type === 'object' || type === 'array');\n}\n\n/*\n * isError - convenience function for checking if a value is of an error type\n *\n * @param e - any value\n * @returns true if e is an error\n */\nfunction isError(e) {\n // Detect both Error and Firefox Exception type\n return isType(e, 'error') || isType(e, 'exception');\n}\n\n/* isPromise - a convenience function for checking if a value is a promise\n *\n * @param p - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isPromise(p) {\n return isObject(p) && isType(p.then, 'function');\n}\n\nfunction redact() {\n return '********';\n}\n\n// from http://stackoverflow.com/a/8809472/1138191\nfunction uuid4() {\n var d = now();\n var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n var r = (d + Math.random() * 16) % 16 | 0;\n d = Math.floor(d / 16);\n return (c === 'x' ? r : (r & 0x7 | 0x8)).toString(16);\n });\n return uuid;\n}\n\nvar LEVELS = {\n debug: 0,\n info: 1,\n warning: 2,\n error: 3,\n critical: 4\n};\n\nfunction sanitizeUrl(url) {\n var baseUrlParts = parseUri(url);\n if (!baseUrlParts) {\n return '(unknown)';\n }\n\n // remove a trailing # if there is no anchor\n if (baseUrlParts.anchor === '') {\n baseUrlParts.source = baseUrlParts.source.replace('#', '');\n }\n\n url = baseUrlParts.source.replace('?' + baseUrlParts.query, '');\n return url;\n}\n\nvar parseUriOptions = {\n strictMode: false,\n key: [\n 'source',\n 'protocol',\n 'authority',\n 'userInfo',\n 'user',\n 'password',\n 'host',\n 'port',\n 'relative',\n 'path',\n 'directory',\n 'file',\n 'query',\n 'anchor'\n ],\n q: {\n name: 'queryKey',\n parser: /(?:^|&)([^&=]*)=?([^&]*)/g\n },\n parser: {\n strict: /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n loose: /^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/\n }\n};\n\nfunction parseUri(str) {\n if (!isType(str, 'string')) {\n return undefined;\n }\n\n var o = parseUriOptions;\n var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);\n var uri = {};\n\n for (var i = 0, l = o.key.length; i < l; ++i) {\n uri[o.key[i]] = m[i] || '';\n }\n\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) {\n uri[o.q.name][$1] = $2;\n }\n });\n\n return uri;\n}\n\nfunction addParamsAndAccessTokenToPath(accessToken, options, params) {\n params = params || {};\n params.access_token = accessToken;\n var paramsArray = [];\n var k;\n for (k in params) {\n if (Object.prototype.hasOwnProperty.call(params, k)) {\n paramsArray.push([k, params[k]].join('='));\n }\n }\n var query = '?' + paramsArray.sort().join('&');\n\n options = options || {};\n options.path = options.path || '';\n var qs = options.path.indexOf('?');\n var h = options.path.indexOf('#');\n var p;\n if (qs !== -1 && (h === -1 || h > qs)) {\n p = options.path;\n options.path = p.substring(0,qs) + query + '&' + p.substring(qs+1);\n } else {\n if (h !== -1) {\n p = options.path;\n options.path = p.substring(0,h) + query + p.substring(h);\n } else {\n options.path = options.path + query;\n }\n }\n}\n\nfunction formatUrl(u, protocol) {\n protocol = protocol || u.protocol;\n if (!protocol && u.port) {\n if (u.port === 80) {\n protocol = 'http:';\n } else if (u.port === 443) {\n protocol = 'https:';\n }\n }\n protocol = protocol || 'https:';\n\n if (!u.hostname) {\n return null;\n }\n var result = protocol + '//' + u.hostname;\n if (u.port) {\n result = result + ':' + u.port;\n }\n if (u.path) {\n result = result + u.path;\n }\n return result;\n}\n\nfunction stringify(obj, backup) {\n var value, error;\n try {\n value = RollbarJSON.stringify(obj);\n } catch (jsonError) {\n if (backup && isFunction(backup)) {\n try {\n value = backup(obj);\n } catch (backupError) {\n error = backupError;\n }\n } else {\n error = jsonError;\n }\n }\n return {error: error, value: value};\n}\n\nfunction maxByteSize(string) {\n // The transport will use utf-8, so assume utf-8 encoding.\n //\n // This minimal implementation will accurately count bytes for all UCS-2 and\n // single code point UTF-16. If presented with multi code point UTF-16,\n // which should be rare, it will safely overcount, not undercount.\n //\n // While robust utf-8 encoders exist, this is far smaller and far more performant.\n // For quickly counting payload size for truncation, smaller is better.\n\n var count = 0;\n var length = string.length;\n\n for (var i = 0; i < length; i++) {\n var code = string.charCodeAt(i);\n if (code < 128) { // up to 7 bits\n count = count + 1;\n } else if (code < 2048) { // up to 11 bits\n count = count + 2;\n } else if (code < 65536) { // up to 16 bits\n count = count + 3;\n }\n }\n\n return count;\n}\n\nfunction jsonParse(s) {\n var value, error;\n try {\n value = RollbarJSON.parse(s);\n } catch (e) {\n error = e;\n }\n return {error: error, value: value};\n}\n\nfunction makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n mode,\n backupMessage,\n errorParser\n) {\n var location = {\n url: url || '',\n line: lineno,\n column: colno\n };\n location.func = errorParser.guessFunctionName(location.url, location.line);\n location.context = errorParser.gatherContext(location.url, location.line);\n var href = typeof document !== 'undefined' && document && document.location && document.location.href;\n var useragent = typeof window !== 'undefined' && window && window.navigator && window.navigator.userAgent;\n return {\n 'mode': mode,\n 'message': error ? String(error) : (message || backupMessage),\n 'url': href,\n 'stack': [location],\n 'useragent': useragent\n };\n}\n\nfunction wrapCallback(logger, f) {\n return function(err, resp) {\n try {\n f(err, resp);\n } catch (e) {\n logger.error(e);\n }\n };\n}\n\nfunction nonCircularClone(obj) {\n var seen = [obj];\n\n function clone(obj, seen) {\n var value, name, newSeen, result = {};\n\n try {\n for (name in obj) {\n value = obj[name];\n\n if (value && (isType(value, 'object') || isType(value, 'array'))) {\n if (seen.includes(value)) {\n result[name] = 'Removed circular reference: ' + typeName(value);\n } else {\n newSeen = seen.slice();\n newSeen.push(value);\n result[name] = clone(value, newSeen);\n }\n continue;\n }\n\n result[name] = value;\n }\n } catch (e) {\n result = 'Failed cloning custom data: ' + e.message;\n }\n return result;\n }\n return clone(obj, seen);\n}\n\nfunction createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\n var diagnostic = {};\n var argTypes = [];\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n argTypes.push(typ);\n switch (typ) {\n case 'undefined':\n break;\n case 'string':\n message ? extraArgs.push(arg) : message = arg;\n break;\n case 'function':\n callback = wrapCallback(logger, arg);\n break;\n case 'date':\n extraArgs.push(arg);\n break;\n case 'error':\n case 'domexception':\n case 'exception': // Firefox Exception type\n err ? extraArgs.push(arg) : err = arg;\n break;\n case 'object':\n case 'array':\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n if (requestKeys && typ === 'object' && !request) {\n for (var j = 0, len = requestKeys.length; j < len; ++j) {\n if (arg[requestKeys[j]] !== undefined) {\n request = arg;\n break;\n }\n }\n if (request) {\n break;\n }\n }\n custom ? extraArgs.push(arg) : custom = arg;\n break;\n default:\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n extraArgs.push(arg);\n }\n }\n\n // if custom is an array this turns it into an object with integer keys\n if (custom) custom = nonCircularClone(custom);\n\n if (extraArgs.length > 0) {\n if (!custom) custom = nonCircularClone({});\n custom.extraArgs = nonCircularClone(extraArgs);\n }\n\n var item = {\n message: message,\n err: err,\n custom: custom,\n timestamp: now(),\n callback: callback,\n notifier: notifier,\n diagnostic: diagnostic,\n uuid: uuid4()\n };\n\n setCustomItemKeys(item, custom);\n\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n item.diagnostic.original_arg_types = argTypes;\n return item;\n}\n\nfunction setCustomItemKeys(item, custom) {\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (custom && custom.skipFrames !== undefined) {\n item.skipFrames = custom.skipFrames;\n delete custom.skipFrames;\n }\n}\n\nfunction addErrorContext(item, errors) {\n var custom = item.data.custom || {};\n var contextAdded = false;\n\n try {\n for (var i = 0; i < errors.length; ++i) {\n if (errors[i].hasOwnProperty('rollbarContext')) {\n custom = merge(custom, nonCircularClone(errors[i].rollbarContext));\n contextAdded = true;\n }\n }\n\n // Avoid adding an empty object to the data.\n if (contextAdded) {\n item.data.custom = custom;\n }\n } catch (e) {\n item.diagnostic.error_context = 'Failed: ' + e.message;\n }\n}\n\nvar TELEMETRY_TYPES = ['log', 'network', 'dom', 'navigation', 'error', 'manual'];\nvar TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];\n\nfunction arrayIncludes(arr, val) {\n for (var k = 0; k < arr.length; ++k) {\n if (arr[k] === val) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction createTelemetryEvent(args) {\n var type, metadata, level;\n var arg;\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n switch (typ) {\n case 'string':\n if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {\n type = arg;\n } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {\n level = arg;\n }\n break;\n case 'object':\n metadata = arg;\n break;\n default:\n break;\n }\n }\n var event = {\n type: type || 'manual',\n metadata: metadata || {},\n level: level\n };\n\n return event;\n}\n\n/*\n * get - given an obj/array and a keypath, return the value at that keypath or\n * undefined if not possible.\n *\n * @param obj - an object or array\n * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'\n * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`\n */\nfunction get(obj, path) {\n if (!obj) {\n return undefined;\n }\n var keys = path.split('.');\n var result = obj;\n try {\n for (var i = 0, len = keys.length; i < len; ++i) {\n result = result[keys[i]];\n }\n } catch (e) {\n result = undefined;\n }\n return result;\n}\n\nfunction set(obj, path, value) {\n if (!obj) {\n return;\n }\n var keys = path.split('.');\n var len = keys.length;\n if (len < 1) {\n return;\n }\n if (len === 1) {\n obj[keys[0]] = value;\n return;\n }\n try {\n var temp = obj[keys[0]] || {};\n var replacement = temp;\n for (var i = 1; i < len - 1; ++i) {\n temp[keys[i]] = temp[keys[i]] || {};\n temp = temp[keys[i]];\n }\n temp[keys[len-1]] = value;\n obj[keys[0]] = replacement;\n } catch (e) {\n return;\n }\n}\n\nfunction formatArgsAsString(args) {\n var i, len, arg;\n var result = [];\n for (i = 0, len = args.length; i < len; ++i) {\n arg = args[i];\n switch (typeName(arg)) {\n case 'object':\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500) {\n arg = arg.substr(0, 497) + '...';\n }\n break;\n case 'null':\n arg = 'null';\n break;\n case 'undefined':\n arg = 'undefined';\n break;\n case 'symbol':\n arg = arg.toString();\n break;\n }\n result.push(arg);\n }\n return result.join(' ');\n}\n\nfunction now() {\n if (Date.now) {\n return +Date.now();\n }\n return +new Date();\n}\n\nfunction filterIp(requestData, captureIp) {\n if (!requestData || !requestData['user_ip'] || captureIp === true) {\n return;\n }\n var newIp = requestData['user_ip'];\n if (!captureIp) {\n newIp = null;\n } else {\n try {\n var parts;\n if (newIp.indexOf('.') !== -1) {\n parts = newIp.split('.');\n parts.pop();\n parts.push('0');\n newIp = parts.join('.');\n } else if (newIp.indexOf(':') !== -1) {\n parts = newIp.split(':');\n if (parts.length > 2) {\n var beginning = parts.slice(0, 3);\n var slashIdx = beginning[2].indexOf('/');\n if (slashIdx !== -1) {\n beginning[2] = beginning[2].substring(0, slashIdx);\n }\n var terminal = '0000:0000:0000:0000:0000';\n newIp = beginning.concat(terminal).join(':');\n }\n } else {\n newIp = null;\n }\n } catch (e) {\n newIp = null;\n }\n }\n requestData['user_ip'] = newIp;\n}\n\nfunction handleOptions(current, input, payload, logger) {\n var result = merge(current, input, payload);\n result = updateDeprecatedOptions(result, logger);\n if (!input || input.overwriteScrubFields) {\n return result;\n }\n if (input.scrubFields) {\n result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);\n }\n return result;\n}\n\nfunction updateDeprecatedOptions(options, logger) {\n if(options.hostWhiteList && !options.hostSafeList) {\n options.hostSafeList = options.hostWhiteList;\n options.hostWhiteList = undefined;\n logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');\n }\n if(options.hostBlackList && !options.hostBlockList) {\n options.hostBlockList = options.hostBlackList;\n options.hostBlackList = undefined;\n logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');\n }\n return options;\n}\n\nmodule.exports = {\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n createItem: createItem,\n addErrorContext: addErrorContext,\n createTelemetryEvent: createTelemetryEvent,\n filterIp: filterIp,\n formatArgsAsString: formatArgsAsString,\n formatUrl: formatUrl,\n get: get,\n handleOptions: handleOptions,\n isError: isError,\n isFiniteNumber: isFiniteNumber,\n isFunction: isFunction,\n isIterable: isIterable,\n isNativeFunction: isNativeFunction,\n isObject: isObject,\n isString: isString,\n isType: isType,\n isPromise: isPromise,\n jsonParse: jsonParse,\n LEVELS: LEVELS,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n merge: merge,\n now: now,\n redact: redact,\n RollbarJSON: RollbarJSON,\n sanitizeUrl: sanitizeUrl,\n set: set,\n setupJSON: setupJSON,\n stringify: stringify,\n maxByteSize: maxByteSize,\n typeName: typeName,\n uuid4: uuid4\n};\n","'use strict';\n\n/* eslint-disable no-console */\nrequire('console-polyfill');\nvar detection = require('./detection');\nvar _ = require('../utility');\n\nfunction error() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.error(_.formatArgsAsString(args));\n } else {\n console.error.apply(console, args);\n }\n}\n\nfunction info() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.info(_.formatArgsAsString(args));\n } else {\n console.info.apply(console, args);\n }\n}\n\nfunction log() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.log(_.formatArgsAsString(args));\n } else {\n console.log.apply(console, args);\n }\n}\n\n/* eslint-enable no-console */\n\nmodule.exports = {\n error: error,\n info: info,\n log: log\n};\n","'use strict';\n\n// See https://nodejs.org/docs/latest/api/url.html\nfunction parse(url) {\n var result = {\n protocol: null, auth: null, host: null, path: null,\n hash: null, href: url, hostname: null, port: null,\n pathname: null, search: null, query: null\n };\n\n var i, last;\n i = url.indexOf('//');\n if (i !== -1) {\n result.protocol = url.substring(0,i);\n last = i+2;\n } else {\n last = 0;\n }\n \n i = url.indexOf('@', last);\n if (i !== -1) {\n result.auth = url.substring(last, i);\n last = i+1;\n }\n\n i = url.indexOf('/', last);\n if (i === -1) {\n i = url.indexOf('?', last);\n if (i === -1) {\n i = url.indexOf('#', last);\n if (i === -1) {\n result.host = url.substring(last);\n } else {\n result.host = url.substring(last, i);\n result.hash = url.substring(i);\n }\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n return result;\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n\n i = url.indexOf('#', last);\n if (i === -1) {\n result.path = url.substring(last);\n } else {\n result.path = url.substring(last, i);\n result.hash = url.substring(i);\n }\n\n if (result.path) {\n var pathParts = result.path.split('?');\n result.pathname = pathParts[0];\n result.query = pathParts[1];\n result.search = result.query ? '?' + result.query : null;\n }\n return result;\n}\n\nmodule.exports = {\n parse: parse\n};\n","'use strict';\n\nvar ErrorStackParser = require('error-stack-parser');\n\nvar UNKNOWN_FUNCTION = '?';\nvar ERR_CLASS_REGEXP = new RegExp('^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ');\n\nfunction guessFunctionName() {\n return UNKNOWN_FUNCTION;\n}\n\n\nfunction gatherContext() {\n return null;\n}\n\n\nfunction Frame(stackFrame) {\n var data = {};\n\n data._stackFrame = stackFrame;\n\n data.url = stackFrame.fileName;\n data.line = stackFrame.lineNumber;\n data.func = stackFrame.functionName;\n data.column = stackFrame.columnNumber;\n data.args = stackFrame.args;\n\n data.context = gatherContext();\n\n return data;\n}\n\n\nfunction Stack(exception, skip) {\n function getStack() {\n var parserStack = [];\n\n skip = skip || 0;\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch(e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = skip; i < parserStack.length; i++) {\n stack.push(new Frame(parserStack[i]));\n }\n\n return stack;\n }\n\n return {\n stack: getStack(),\n message: exception.message,\n name: _mostSpecificErrorName(exception),\n rawStack: exception.stack,\n rawException: exception\n };\n}\n\n\nfunction parse(e, skip) {\n var err = e;\n\n if (err.nested || err.cause) {\n var traceChain = [];\n while (err) {\n traceChain.push(new Stack(err, skip));\n err = err.nested || err.cause;\n\n skip = 0; // Only apply skip value to primary error\n }\n\n // Return primary error with full trace chain attached.\n traceChain[0].traceChain = traceChain;\n return traceChain[0];\n } else {\n return new Stack(err, skip);\n }\n}\n\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg || !errMsg.match) {\n return ['Unknown error. There was no error message to display.', ''];\n }\n var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);\n var errClass = '(unknown)';\n\n if (errClassMatch) {\n errClass = errClassMatch[errClassMatch.length - 1];\n errMsg = errMsg.replace((errClassMatch[errClassMatch.length - 2] || '') + errClass + ':', '');\n errMsg = errMsg.replace(/(^[\\s]+|[\\s]+$)/g, '');\n }\n return [errClass, errMsg];\n}\n\n// * Prefers any value over an empty string\n// * Prefers any value over 'Error' where possible\n// * Prefers name over constructor.name when both are more specific than 'Error'\nfunction _mostSpecificErrorName(error) {\n var name = error.name && error.name.length && error.name;\n var constructorName = error.constructor.name && error.constructor.name.length && error.constructor.name;\n\n if (!name || !constructorName) {\n return name || constructorName;\n }\n\n if (name === 'Error') {\n return constructorName;\n }\n return name;\n}\n\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame\n};\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction scrub(data, scrubFields, scrubPaths) {\n scrubFields = scrubFields || [];\n\n if (scrubPaths) {\n for (var i = 0; i < scrubPaths.length; ++i) {\n scrubPath(data, scrubPaths[i]);\n }\n }\n\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart) {\n return paramPart + _.redact();\n }\n\n function paramScrubber(v) {\n var i;\n if (_.isType(v, 'string')) {\n for (i = 0; i < queryRes.length; ++i) {\n v = v.replace(queryRes[i], redactQueryParam);\n }\n }\n return v;\n }\n\n function valScrubber(k, v) {\n var i;\n for (i = 0; i < paramRes.length; ++i) {\n if (paramRes[i].test(k)) {\n v = _.redact();\n break;\n }\n }\n return v;\n }\n\n function scrubber(k, v, seen) {\n var tmpV = valScrubber(k, v);\n if (tmpV === v) {\n if (_.isType(v, 'object') || _.isType(v, 'array')) {\n return traverse(v, scrubber, seen);\n }\n return paramScrubber(tmpV);\n } else {\n return tmpV;\n }\n }\n\n return traverse(data, scrubber);\n}\n\nfunction scrubPath(obj, path) {\n var keys = path.split('.');\n var last = keys.length - 1;\n try {\n for (var i = 0; i <= last; ++i) {\n if (i < last) {\n obj = obj[keys[i]];\n } else {\n obj[keys[i]] = _.redact();\n }\n }\n } catch (e) {\n // Missing key is OK;\n }\n}\n\nfunction _getScrubFieldRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '^\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?$';\n ret.push(new RegExp(pat, 'i'));\n }\n return ret;\n}\n\n\nfunction _getScrubQueryParamRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?';\n ret.push(new RegExp('(' + pat + '=)([^&\\\\n]+)', 'igm'));\n }\n return ret;\n}\n\nmodule.exports = scrub;\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction traverse(obj, func, seen) {\n var k, v, i;\n var isObj = _.isType(obj, 'object');\n var isArray = _.isType(obj, 'array');\n var keys = [];\n var seenIndex;\n\n // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.\n seen = seen || { obj: [], mapped: []};\n\n if (isObj) {\n seenIndex = seen.obj.indexOf(obj);\n\n if (isObj && seenIndex !== -1) {\n // Prefer the mapped object if there is one.\n return seen.mapped[seenIndex] || seen.obj[seenIndex];\n }\n\n seen.obj.push(obj);\n seenIndex = seen.obj.length - 1;\n }\n\n if (isObj) {\n for (k in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, k)) {\n keys.push(k);\n }\n }\n } else if (isArray) {\n for (i = 0; i < obj.length; ++i) {\n keys.push(i);\n }\n }\n\n var result = isObj ? {} : [];\n var same = true;\n for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n result[k] = func(k, v, seen);\n same = same && result[k] === obj[k];\n }\n\n if (isObj && !same) {\n seen.mapped[seenIndex] = result;\n }\n\n return !same ? result : obj;\n}\n\nmodule.exports = traverse;\n","'use strict';\n\nvar rollbar = require('../rollbar');\n\nif ((typeof window !== 'undefined') && !window._rollbarStartTime) {\n window._rollbarStartTime = (new Date()).getTime();\n}\n\nmodule.exports = rollbar;\n","'use strict';\n\nvar Rollbar = require('./core');\nvar telemeter = require('../telemetry');\nvar instrumenter = require('./telemetry');\nvar polyfillJSON = require('../utility/polyfillJSON');\nvar wrapGlobals = require('./wrapGlobals');\nvar scrub = require('../scrub');\nvar truncation = require('../truncation');\n\nRollbar.setComponents({\n telemeter: telemeter,\n instrumenter: instrumenter,\n polyfillJSON: polyfillJSON,\n wrapGlobals: wrapGlobals,\n scrub: scrub,\n truncation: truncation\n});\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar Client = require('../rollbar');\nvar _ = require('../utility');\nvar API = require('../api');\nvar logger = require('./logger');\nvar globals = require('./globalSetup');\n\nvar Transport = require('./transport');\nvar urllib = require('./url');\n\nvar transforms = require('./transforms');\nvar sharedTransforms = require('../transforms');\nvar predicates = require('./predicates');\nvar sharedPredicates = require('../predicates');\nvar errorParser = require('../errorParser');\n\nfunction Rollbar(options, client) {\n this.options = _.handleOptions(defaultOptions, options, null, logger);\n this.options._configuredOptions = options;\n var Telemeter = this.components.telemeter;\n var Instrumenter = this.components.instrumenter;\n var polyfillJSON = this.components.polyfillJSON;\n this.wrapGlobals = this.components.wrapGlobals;\n this.scrub = this.components.scrub;\n var truncation = this.components.truncation;\n\n var transport = new Transport(truncation);\n var api = new API(this.options, transport, urllib, truncation);\n if (Telemeter) {\n this.telemeter = new Telemeter(this.options);\n }\n this.client = client || new Client(this.options, api, logger, this.telemeter, 'browser');\n var gWindow = _gWindow();\n var gDocument = (typeof document != 'undefined') && document;\n this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers\n this.anonymousErrorsPending = 0;\n addTransformsToNotifier(this.client.notifier, this, gWindow);\n addPredicatesToQueue(this.client.queue);\n this.setupUnhandledCapture();\n if (Instrumenter) {\n this.instrumenter = new Instrumenter(this.options, this.client.telemeter, this, gWindow, gDocument);\n this.instrumenter.instrument();\n }\n _.setupJSON(polyfillJSON);\n\n // Used with rollbar-react for rollbar-react-native compatibility.\n this.rollbar = this;\n}\n\nvar _instance = null;\nRollbar.init = function(options, client) {\n if (_instance) {\n return _instance.global(options).configure(options);\n }\n _instance = new Rollbar(options, client);\n return _instance;\n};\n\nRollbar.prototype.components = {};\n\nRollbar.setComponents = function(components) {\n Rollbar.prototype.components = components;\n}\n\nfunction handleUninitialized(maybeCallback) {\n var message = 'Rollbar is not initialized';\n logger.error(message);\n if (maybeCallback) {\n maybeCallback(new Error(message));\n }\n}\n\nRollbar.prototype.global = function(options) {\n this.client.global(options);\n return this;\n};\nRollbar.global = function(options) {\n if (_instance) {\n return _instance.global(options);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.configure = function(options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = {payload: payloadData};\n }\n this.options = _.handleOptions(oldOptions, options, payload, logger);\n this.options._configuredOptions = _.handleOptions(oldOptions._configuredOptions, options, payload);\n this.client.configure(this.options, payloadData);\n this.instrumenter && this.instrumenter.configure(this.options);\n this.setupUnhandledCapture();\n return this;\n};\nRollbar.configure = function(options, payloadData) {\n if (_instance) {\n return _instance.configure(options, payloadData);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.lastError = function() {\n return this.client.lastError;\n};\nRollbar.lastError = function() {\n if (_instance) {\n return _instance.lastError();\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.log = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.log(item);\n return {uuid: uuid};\n};\nRollbar.log = function() {\n if (_instance) {\n return _instance.log.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.debug = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.debug(item);\n return {uuid: uuid};\n};\nRollbar.debug = function() {\n if (_instance) {\n return _instance.debug.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.info = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.info(item);\n return {uuid: uuid};\n};\nRollbar.info = function() {\n if (_instance) {\n return _instance.info.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warn = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warn(item);\n return {uuid: uuid};\n};\nRollbar.warn = function() {\n if (_instance) {\n return _instance.warn.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warning = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warning(item);\n return {uuid: uuid};\n};\nRollbar.warning = function() {\n if (_instance) {\n return _instance.warning.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.error = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.error(item);\n return {uuid: uuid};\n};\nRollbar.error = function() {\n if (_instance) {\n return _instance.error.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.critical = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.critical(item);\n return {uuid: uuid};\n};\nRollbar.critical = function() {\n if (_instance) {\n return _instance.critical.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.buildJsonPayload = function(item) {\n return this.client.buildJsonPayload(item);\n};\nRollbar.buildJsonPayload = function() {\n if (_instance) {\n return _instance.buildJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.sendJsonPayload = function(jsonPayload) {\n return this.client.sendJsonPayload(jsonPayload);\n};\nRollbar.sendJsonPayload = function() {\n if (_instance) {\n return _instance.sendJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.setupUnhandledCapture = function() {\n var gWindow = _gWindow();\n\n if (!this.unhandledExceptionsInitialized) {\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(gWindow, this);\n if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {\n this.wrapGlobals(gWindow, this);\n }\n this.unhandledExceptionsInitialized = true;\n }\n }\n if (!this.unhandledRejectionsInitialized) {\n if (this.options.captureUnhandledRejections || this.options.handleUnhandledRejections) {\n globals.captureUnhandledRejections(gWindow, this);\n this.unhandledRejectionsInitialized = true;\n }\n }\n};\n\nRollbar.prototype.handleUncaughtException = function(message, url, lineno, colno, error, context) {\n if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {\n return;\n }\n\n // Chrome will always send 5+ arguments and error will be valid or null, not undefined.\n // If error is undefined, we have a different caller.\n // Chrome also sends errors from web workers with null error, but does not invoke\n // prepareStackTrace() for these. Test for empty url to skip them.\n if (this.options.inspectAnonymousErrors && this.isChrome && error === null && url === '') {\n return 'anonymous';\n }\n\n var item;\n var stackInfo = _.makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n 'onerror',\n 'uncaught exception',\n errorParser\n );\n if (_.isError(error)) {\n item = this._createItem([message, error, context]);\n item._unhandledStackInfo = stackInfo;\n } else if (_.isError(url)) {\n item = this._createItem([message, url, context]);\n item._unhandledStackInfo = stackInfo;\n } else {\n item = this._createItem([message, context]);\n item.stackInfo = stackInfo;\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n this.client.log(item);\n};\n\n/**\n * Chrome only. Other browsers will ignore.\n *\n * Use Error.prepareStackTrace to extract information about errors that\n * do not have a valid error object in onerror().\n *\n * In tested version of Chrome, onerror is called first but has no way\n * to communicate with prepareStackTrace. Use a counter to let this\n * handler know which errors to send to Rollbar.\n *\n * In config options, set inspectAnonymousErrors to enable.\n */\nRollbar.prototype.handleAnonymousErrors = function() {\n if (!this.options.inspectAnonymousErrors || !this.isChrome) {\n return;\n }\n\n var r = this;\n function prepareStackTrace(error, _stack) { // eslint-disable-line no-unused-vars\n if (r.options.inspectAnonymousErrors) {\n if (r.anonymousErrorsPending) {\n // This is the only known way to detect that onerror saw an anonymous error.\n // It depends on onerror reliably being called before Error.prepareStackTrace,\n // which so far holds true on tested versions of Chrome. If versions of Chrome\n // are tested that behave differently, this logic will need to be updated\n // accordingly.\n r.anonymousErrorsPending -= 1;\n\n if (!error) {\n // Not likely to get here, but calling handleUncaughtException from here\n // without an error object would throw off the anonymousErrorsPending counter,\n // so return now.\n return;\n }\n\n // Allow this to be tracked later.\n error._isAnonymous = true;\n\n // url, lineno, colno shouldn't be needed for these errors.\n // If that changes, update this accordingly, using the unused\n // _stack param as needed (rather than parse error.toString()).\n r.handleUncaughtException(error.message, null, null, null, error);\n }\n }\n\n // Workaround to ensure stack is preserved for normal errors.\n return error.stack;\n }\n\n // https://v8.dev/docs/stack-trace-api\n try {\n Error.prepareStackTrace = prepareStackTrace;\n } catch (e) {\n this.options.inspectAnonymousErrors = false;\n this.error('anonymous error handler failed', e);\n }\n}\n\nRollbar.prototype.handleUnhandledRejection = function(reason, promise) {\n if (!this.options.captureUnhandledRejections && !this.options.handleUnhandledRejections) {\n return;\n }\n\n var message = 'unhandled rejection was null or undefined!';\n if (reason) {\n if (reason.message) {\n message = reason.message;\n } else {\n var reasonResult = _.stringify(reason);\n if (reasonResult.value) {\n message = reasonResult.value;\n }\n }\n }\n var context = (reason && reason._rollbarContext) || (promise && promise._rollbarContext);\n\n var item;\n if (_.isError(reason)) {\n item = this._createItem([message, reason, context]);\n } else {\n item = this._createItem([message, reason, context]);\n item.stackInfo = _.makeUnhandledStackInfo(\n message,\n '',\n 0,\n 0,\n null,\n 'unhandledrejection',\n '',\n errorParser\n );\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n item._originalArgs = item._originalArgs || [];\n item._originalArgs.push(promise);\n this.client.log(item);\n};\n\nRollbar.prototype.wrap = function(f, context, _before) {\n try {\n var ctxFn;\n if(_.isFunction(context)) {\n ctxFn = context;\n } else {\n ctxFn = function() { return context || {}; };\n }\n\n if (!_.isFunction(f)) {\n return f;\n }\n\n if (f._isWrap) {\n return f;\n }\n\n if (!f._rollbar_wrapped) {\n f._rollbar_wrapped = function () {\n if (_before && _.isFunction(_before)) {\n _before.apply(this, arguments);\n }\n try {\n return f.apply(this, arguments);\n } catch(exc) {\n var e = exc;\n if (e && window._rollbarWrappedError !== e) {\n if (_.isType(e, 'string')) {\n e = new String(e);\n }\n e._rollbarContext = ctxFn() || {};\n e._rollbarContext._wrappedSource = f.toString();\n\n window._rollbarWrappedError = e;\n }\n throw e;\n }\n };\n\n f._rollbar_wrapped._isWrap = true;\n\n if (f.hasOwnProperty) {\n for (var prop in f) {\n if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {\n f._rollbar_wrapped[prop] = f[prop];\n }\n }\n }\n }\n\n return f._rollbar_wrapped;\n } catch (e) {\n // Return the original function if the wrap fails.\n return f;\n }\n};\nRollbar.wrap = function(f, context) {\n if (_instance) {\n return _instance.wrap(f, context);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.captureEvent = function() {\n var event = _.createTelemetryEvent(arguments);\n return this.client.captureEvent(event.type, event.metadata, event.level);\n};\nRollbar.captureEvent = function() {\n if (_instance) {\n return _instance.captureEvent.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\n// The following two methods are used internally and are not meant for public use\nRollbar.prototype.captureDomContentLoaded = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureLoad(ts);\n};\n\n/* Internal */\n\nfunction addTransformsToNotifier(notifier, rollbar, gWindow) {\n notifier\n .addTransform(transforms.handleDomException)\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(gWindow))\n .addTransform(transforms.addClientInfo(gWindow))\n .addTransform(transforms.addPluginInfo(gWindow))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(sharedTransforms.addConfigToPayload)\n .addTransform(transforms.addScrubber(rollbar.scrub))\n .addTransform(sharedTransforms.addPayloadOptions)\n .addTransform(sharedTransforms.userTransform(logger))\n .addTransform(sharedTransforms.addConfiguredOptions)\n .addTransform(sharedTransforms.addDiagnosticKeys)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(sharedPredicates.checkLevel)\n .addPredicate(predicates.checkIgnore)\n .addPredicate(sharedPredicates.userCheckIgnore(logger))\n .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))\n .addPredicate(sharedPredicates.urlIsSafeListed(logger))\n .addPredicate(sharedPredicates.messageIsIgnored(logger));\n}\n\nRollbar.prototype.loadFull = function() {\n logger.info('Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.');\n};\n\nRollbar.prototype._createItem = function(args) {\n return _.createItem(args, logger, this);\n};\n\nfunction _getFirstFunction(args) {\n for (var i = 0, len = args.length; i < len; ++i) {\n if (_.isFunction(args[i])) {\n return args[i];\n }\n }\n return undefined;\n}\n\nfunction _gWindow() {\n return ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n}\n\nvar defaults = require('../defaults');\nvar scrubFields = require('./defaults/scrubFields');\n\nvar defaultOptions = {\n version: defaults.version,\n scrubFields: scrubFields.scrubFields,\n logLevel: defaults.logLevel,\n reportLevel: defaults.reportLevel,\n uncaughtErrorLevel: defaults.uncaughtErrorLevel,\n endpoint: defaults.endpoint,\n verbose: false,\n enabled: true,\n transmit: true,\n sendConfig: false,\n includeItemsInTelemetry: true,\n captureIp: true,\n inspectAnonymousErrors: true,\n ignoreDuplicateErrors: true,\n wrapGlobalEventHandlers: false\n};\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar _ = require('./utility');\n\n/*\n * Rollbar - the interface to Rollbar\n *\n * @param options\n * @param api\n * @param logger\n */\nfunction Rollbar(options, api, logger, telemeter, platform) {\n this.options = _.merge(options);\n this.logger = logger;\n Rollbar.rateLimiter.configureGlobal(this.options);\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.api = api;\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n\n // This must happen before the Notifier is created\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = telemeter;\n setStackTraceLimit(options);\n this.lastError = null;\n this.lastErrorHash = 'none';\n}\n\nvar defaultOptions = {\n maxItems: 0,\n itemsPerMinute: 60\n};\n\nRollbar.rateLimiter = new RateLimiter(defaultOptions);\n\nRollbar.prototype.global = function (options) {\n Rollbar.rateLimiter.configureGlobal(options);\n return this;\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n\n this.options = _.merge(oldOptions, options, payload);\n\n // This must happen before the Notifier is configured\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier && this.notifier.configure(this.options);\n this.telemeter && this.telemeter.configure(this.options);\n setStackTraceLimit(options);\n this.global(this.options);\n\n if (validateTracer(options.tracer)) {\n this.tracer = options.tracer\n }\n\n return this;\n};\n\nRollbar.prototype.log = function (item) {\n var level = this._defaultLogLevel();\n return this._log(level, item);\n};\n\nRollbar.prototype.debug = function (item) {\n this._log('debug', item);\n};\n\nRollbar.prototype.info = function (item) {\n this._log('info', item);\n};\n\nRollbar.prototype.warn = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.warning = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.error = function (item) {\n this._log('error', item);\n};\n\nRollbar.prototype.critical = function (item) {\n this._log('critical', item);\n};\n\nRollbar.prototype.wait = function (callback) {\n this.queue.wait(callback);\n};\n\nRollbar.prototype.captureEvent = function (type, metadata, level) {\n return this.telemeter && this.telemeter.captureEvent(type, metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function (ts) {\n return this.telemeter && this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (ts) {\n return this.telemeter && this.telemeter.captureLoad(ts);\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.api.buildJsonPayload(item);\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n this.api.postJsonPayload(jsonPayload);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function (defaultLevel, item) {\n var callback;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {\n if (callback) {\n var error = new Error('ignored identical item');\n error.item = item;\n callback(error);\n }\n return;\n }\n try {\n this._addTracingInfo(item);\n item.level = item.level || defaultLevel;\n this.telemeter && this.telemeter._captureRollbarItem(item);\n item.telemetryEvents = (this.telemeter && this.telemeter.copyEvents()) || [];\n this.notifier.log(item, callback);\n } catch (e) {\n if (callback) {\n callback(e);\n }\n this.logger.error(e);\n }\n};\n\nRollbar.prototype._defaultLogLevel = function () {\n return this.options.logLevel || 'debug';\n};\n\nRollbar.prototype._sameAsLastError = function (item) {\n if (!item._isUncaught) {\n return false;\n }\n var itemHash = generateItemHash(item);\n if (this.lastErrorHash === itemHash) {\n return true;\n }\n this.lastError = item.err;\n this.lastErrorHash = itemHash;\n return false;\n};\n\nRollbar.prototype._addTracingInfo = function (item) {\n // Tracer validation occurs in the constructor\n // or in the Rollbar.prototype.configure methods\n if (this.tracer) {\n // add rollbar occurrence uuid to span\n var span = this.tracer.scope().active();\n\n if (validateSpan(span)) {\n span.setTag('rollbar.error_uuid', item.uuid);\n span.setTag('rollbar.has_error', true);\n span.setTag('error', true);\n span.setTag('rollbar.item_url', `https://rollbar.com/item/uuid/?uuid=${item.uuid}`);\n span.setTag('rollbar.occurrence_url', `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`);\n\n // add span ID & trace ID to occurrence\n var opentracingSpanId = span.context().toSpanId();\n var opentracingTraceId = span.context().toTraceId();\n\n if (item.custom) {\n item.custom.opentracing_span_id = opentracingSpanId;\n item.custom.opentracing_trace_id = opentracingTraceId;\n } else {\n item.custom = {\n opentracing_span_id: opentracingSpanId,\n opentracing_trace_id: opentracingTraceId\n };\n }\n }\n }\n}\n\nfunction generateItemHash(item) {\n var message = item.message || '';\n var stack = (item.err || {}).stack || String(item.err);\n return message + '::' + stack;\n}\n\n// Node.js, Chrome, Safari, and some other browsers support this property\n// which globally sets the number of stack frames returned in an Error object.\n// If a browser can't use it, no harm done.\nfunction setStackTraceLimit(options) {\n if (options.stackTraceLimit) {\n Error.stackTraceLimit = options.stackTraceLimit;\n }\n}\n\n/**\n * Validate the Tracer object provided to the Client\n * is valid for our Opentracing use case.\n * @param {opentracer.Tracer} tracer\n */\nfunction validateTracer(tracer) {\n if (!tracer) {\n return false;\n }\n\n if (!tracer.scope || typeof tracer.scope !== 'function') {\n return false;\n }\n\n var scope = tracer.scope();\n\n if (!scope || !scope.active || typeof scope.active !== 'function') {\n return false;\n }\n\n return true;\n}\n\n/**\n * Validate the Span object provided\n * @param {opentracer.Span} span\n */\nfunction validateSpan(span) {\n if (!span || !span.context || typeof span.context !== 'function') {\n return false;\n }\n\n var spanContext = span.context();\n\n if (!spanContext\n || !spanContext.toSpanId\n || !spanContext.toTraceId\n || typeof spanContext.toSpanId !== 'function'\n || typeof spanContext.toTraceId !== 'function') {\n return false\n }\n\n return true;\n}\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar\n *\n * @param options - the same options that are accepted by configureGlobal offered as a convenience\n */\nfunction RateLimiter(options) {\n this.startTime = _.now();\n this.counter = 0;\n this.perMinCounter = 0;\n this.platform = null;\n this.platformOptions = {};\n this.configureGlobal(options);\n}\n\nRateLimiter.globalSettings = {\n startTime: _.now(),\n maxItems: undefined,\n itemsPerMinute: undefined\n};\n\n/*\n * configureGlobal - set the global rate limiter options\n *\n * @param options - Only the following values are recognized:\n * startTime: a timestamp of the form returned by (new Date()).getTime()\n * maxItems: the maximum items\n * itemsPerMinute: the max number of items to send in a given minute\n */\nRateLimiter.prototype.configureGlobal = function(options) {\n if (options.startTime !== undefined) {\n RateLimiter.globalSettings.startTime = options.startTime;\n }\n if (options.maxItems !== undefined) {\n RateLimiter.globalSettings.maxItems = options.maxItems;\n }\n if (options.itemsPerMinute !== undefined) {\n RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;\n }\n};\n\n/*\n * shouldSend - determine if we should send a given item based on rate limit settings\n *\n * @param item - the item we are about to send\n * @returns An object with the following structure:\n * error: (Error|null)\n * shouldSend: bool\n * payload: (Object|null)\n * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and\n * exactly one of error or payload will be non-null. If error is non-null, the returned Error will\n * describe the situation, but it means that we were already over a rate limit (either globally or\n * per minute) when this item was checked. If error is null, and therefore payload is non-null, it\n * means this item put us over the global rate limit and the payload should be sent to Rollbar in\n * place of the passed in item.\n */\nRateLimiter.prototype.shouldSend = function(item, now) {\n now = now || _.now();\n var elapsedTime = now - this.startTime;\n if (elapsedTime < 0 || elapsedTime >= 60000) {\n this.startTime = now;\n this.perMinCounter = 0;\n }\n\n var globalRateLimit = RateLimiter.globalSettings.maxItems;\n var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;\n\n if (checkRate(item, globalRateLimit, this.counter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimit + ' max items reached', false);\n } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimitPerMin + ' items per minute reached', false);\n }\n this.counter++;\n this.perMinCounter++;\n\n var shouldSend = !checkRate(item, globalRateLimit, this.counter);\n var perMinute = shouldSend;\n shouldSend = shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);\n return shouldSendValue(this.platform, this.platformOptions, null, shouldSend, globalRateLimit, globalRateLimitPerMin, perMinute);\n};\n\nRateLimiter.prototype.setPlatformOptions = function(platform, options) {\n this.platform = platform;\n this.platformOptions = options;\n};\n\n/* Helpers */\n\nfunction checkRate(item, limit, counter) {\n return !item.ignoreRateLimit && limit >= 1 && counter > limit;\n}\n\nfunction shouldSendValue(platform, options, error, shouldSend, globalRateLimit, limitPerMin, perMinute) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute);\n }\n return {error: error, shouldSend: shouldSend, payload: payload};\n}\n\nfunction rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute) {\n var environment = options.environment || (options.payload && options.payload.environment);\n var msg;\n if (perMinute) {\n msg = 'item per minute limit reached, ignoring errors until timeout';\n } else {\n msg = 'maxItems has been hit, ignoring errors until reset.';\n }\n var item = {\n body: {\n message: {\n body: msg,\n extra: {\n maxItems: globalRateLimit,\n itemsPerMinute: limitPerMin\n }\n }\n },\n language: 'javascript',\n environment: environment,\n notifier: {\n version: (options.notifier && options.notifier.version) || options.version\n }\n };\n if (platform === 'browser') {\n item.platform = 'browser';\n item.framework = 'browser-js';\n item.notifier.name = 'rollbar-browser-js';\n } else if (platform === 'server') {\n item.framework = options.framework || 'node-js';\n item.notifier.name = options.notifier.name;\n } else if (platform === 'react-native') {\n item.framework = options.framework || 'react-native';\n item.notifier.name = options.notifier.name;\n }\n return item;\n}\n\nmodule.exports = RateLimiter;\n","'use strict';\n\n'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isPlainObject = function isPlainObject(obj) {\n\tif (!obj || toStr.call(obj) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tvar hasOwnConstructor = hasOwn.call(obj, 'constructor');\n\tvar hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n\t// Not own constructor property must be Object\n\tif (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n\t\treturn false;\n\t}\n\n\t// Own properties are enumerated firstly, so to speed up,\n\t// if last one is own, then all properties are own.\n\tvar key;\n\tfor (key in obj) {/**/}\n\n\treturn typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\nfunction merge() {\n var i, src, copy, clone, name,\n result = {},\n current = null,\n length = arguments.length;\n\n for (i=0; i < length; i++) {\n current = arguments[i];\n if (current == null) {\n continue;\n }\n\n for (name in current) {\n src = result[name];\n copy = current[name];\n if (result !== copy) {\n if (copy && isPlainObject(copy)) {\n clone = src && isPlainObject(src) ? src : {};\n result[name] = merge(clone, copy);\n } else if (typeof copy !== 'undefined') {\n result[name] = copy;\n }\n }\n }\n }\n return result;\n}\n\nmodule.exports = merge;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Queue - an object which handles which handles a queue of items to be sent to Rollbar.\n * This object handles rate limiting via a passed in rate limiter, retries based on connection\n * errors, and filtering of items based on a set of configurable predicates. The communication to\n * the backend is performed via a given API object.\n *\n * @param rateLimiter - An object which conforms to the interface\n * rateLimiter.shouldSend(item) -> bool\n * @param api - An object which conforms to the interface\n * api.postItem(payload, function(err, response))\n * @param logger - An object used to log verbose messages if desired\n * @param options - see Queue.prototype.configure\n */\nfunction Queue(rateLimiter, api, logger, options) {\n this.rateLimiter = rateLimiter;\n this.api = api;\n this.logger = logger;\n this.options = options;\n this.predicates = [];\n this.pendingItems = [];\n this.pendingRequests = [];\n this.retryQueue = [];\n this.retryHandle = null;\n this.waitCallback = null;\n this.waitIntervalID = null;\n}\n\n/*\n * configure - updates the options this queue uses\n *\n * @param options\n */\nQueue.prototype.configure = function(options) {\n this.api && this.api.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addPredicate - adds a predicate to the end of the list of predicates for this queue\n *\n * @param predicate - function(item, options) -> (bool|{err: Error})\n * Returning true means that this predicate passes and the item is okay to go on the queue\n * Returning false means do not add the item to the queue, but it is not an error\n * Returning {err: Error} means do not add the item to the queue, and the given error explains why\n * Returning {err: undefined} is equivalent to returning true but don't do that\n */\nQueue.prototype.addPredicate = function(predicate) {\n if (_.isFunction(predicate)) {\n this.predicates.push(predicate);\n }\n return this;\n};\n\nQueue.prototype.addPendingItem = function(item) {\n this.pendingItems.push(item);\n};\n\nQueue.prototype.removePendingItem = function(item) {\n var idx = this.pendingItems.indexOf(item);\n if (idx !== -1) {\n this.pendingItems.splice(idx, 1);\n }\n};\n\n/*\n * addItem - Send an item to the Rollbar API if all of the predicates are satisfied\n *\n * @param item - The payload to send to the backend\n * @param callback - function(error, repsonse) which will be called with the response from the API\n * in the case of a success, otherwise response will be null and error will have a value. If both\n * error and response are null then the item was stopped by a predicate which did not consider this\n * to be an error condition, but nonetheless did not send the item to the API.\n * @param originalError - The original error before any transformations that is to be logged if any\n */\nQueue.prototype.addItem = function(item, callback, originalError, originalItem) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() { return; };\n }\n var predicateResult = this._applyPredicates(item);\n if (predicateResult.stop) {\n this.removePendingItem(originalItem);\n callback(predicateResult.err);\n return;\n }\n this._maybeLog(item, originalError);\n this.removePendingItem(originalItem);\n if (!this.options.transmit) {\n callback(new Error('Transmit disabled'));\n return;\n }\n this.pendingRequests.push(item);\n try {\n this._makeApiRequest(item, function(err, resp) {\n this._dequeuePendingRequest(item);\n callback(err, resp);\n }.bind(this));\n } catch (e) {\n this._dequeuePendingRequest(item);\n callback(e);\n }\n};\n\n/*\n * wait - Stop any further errors from being added to the queue, and get called back when all items\n * currently processing have finished sending to the backend.\n *\n * @param callback - function() called when all pending items have been sent\n */\nQueue.prototype.wait = function(callback) {\n if (!_.isFunction(callback)) {\n return;\n }\n this.waitCallback = callback;\n if (this._maybeCallWait()) {\n return;\n }\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitIntervalID = setInterval(function() {\n this._maybeCallWait();\n }.bind(this), 500);\n};\n\n/* _applyPredicates - Sequentially applies the predicates that have been added to the queue to the\n * given item with the currently configured options.\n *\n * @param item - An item in the queue\n * @returns {stop: bool, err: (Error|null)} - stop being true means do not add item to the queue,\n * the error value should be passed up to a callbak if we are stopping.\n */\nQueue.prototype._applyPredicates = function(item) {\n var p = null;\n for (var i = 0, len = this.predicates.length; i < len; i++) {\n p = this.predicates[i](item, this.options);\n if (!p || p.err !== undefined) {\n return {stop: true, err: p.err};\n }\n }\n return {stop: false, err: null};\n};\n\n/*\n * _makeApiRequest - Send an item to Rollbar, callback when done, if there is an error make an\n * effort to retry if we are configured to do so.\n *\n * @param item - an item ready to send to the backend\n * @param callback - function(err, response)\n */\nQueue.prototype._makeApiRequest = function(item, callback) {\n var rateLimitResponse = this.rateLimiter.shouldSend(item);\n if (rateLimitResponse.shouldSend) {\n this.api.postItem(item, function(err, resp) {\n if (err) {\n this._maybeRetry(err, item, callback);\n } else {\n callback(err, resp);\n }\n }.bind(this));\n } else if (rateLimitResponse.error) {\n callback(rateLimitResponse.error);\n } else {\n this.api.postItem(rateLimitResponse.payload, callback);\n }\n};\n\n// These are errors basically mean there is no internet connection\nvar RETRIABLE_ERRORS = ['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED', 'EHOSTUNREACH', 'EPIPE', 'EAI_AGAIN'];\n\n/*\n * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback\n * with the error.\n *\n * @param err - an error returned by the API transport\n * @param item - the item that was trying to be sent when this error occured\n * @param callback - function(err, response)\n */\nQueue.prototype._maybeRetry = function(err, item, callback) {\n var shouldRetry = false;\n if (this.options.retryInterval) {\n for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {\n if (err.code === RETRIABLE_ERRORS[i]) {\n shouldRetry = true;\n break;\n }\n }\n if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {\n item.retries = item.retries ? item.retries + 1 : 1;\n if (item.retries > this.options.maxRetries) {\n shouldRetry = false;\n }\n }\n }\n if (shouldRetry) {\n this._retryApiRequest(item, callback);\n } else {\n callback(err);\n }\n};\n\n/*\n * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process\n * that queue based on the retryInterval in the options for this queue.\n *\n * @param item - an item that failed to send due to an error we deem retriable\n * @param callback - function(err, response)\n */\nQueue.prototype._retryApiRequest = function(item, callback) {\n this.retryQueue.push({item: item, callback: callback});\n\n if (!this.retryHandle) {\n this.retryHandle = setInterval(function() {\n while (this.retryQueue.length) {\n var retryObject = this.retryQueue.shift();\n this._makeApiRequest(retryObject.item, retryObject.callback);\n }\n }.bind(this), this.options.retryInterval);\n }\n};\n\n/*\n * _dequeuePendingRequest - Removes the item from the pending request queue, this queue is used to\n * enable to functionality of providing a callback that clients can pass to `wait` to be notified\n * when the pending request queue has been emptied. This must be called when the API finishes\n * processing this item. If a `wait` callback is configured, it is called by this function.\n *\n * @param item - the item previously added to the pending request queue\n */\nQueue.prototype._dequeuePendingRequest = function(item) {\n var idx = this.pendingRequests.indexOf(item);\n if (idx !== -1) {\n this.pendingRequests.splice(idx, 1);\n this._maybeCallWait();\n }\n};\n\nQueue.prototype._maybeLog = function(data, originalError) {\n if (this.logger && this.options.verbose) {\n var message = originalError;\n message = message || _.get(data, 'body.trace.exception.message');\n message = message || _.get(data, 'body.trace_chain.0.exception.message');\n if (message) {\n this.logger.error(message);\n return;\n }\n message = _.get(data, 'body.message.body');\n if (message) {\n this.logger.log(message);\n }\n }\n};\n\nQueue.prototype._maybeCallWait = function() {\n if (_.isFunction(this.waitCallback) && this.pendingItems.length === 0 && this.pendingRequests.length === 0) {\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitCallback();\n return true;\n }\n return false;\n};\n\nmodule.exports = Queue;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Notifier - the internal object responsible for delegating between the client exposed API, the\n * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the\n * queue which handles the communcation with the Rollbar API servers.\n *\n * @param queue - an object that conforms to the interface: addItem(item, callback)\n * @param options - an object representing the options to be set for this notifier, this should have\n * any defaults already set by the caller\n */\nfunction Notifier(queue, options) {\n this.queue = queue;\n this.options = options;\n this.transforms = [];\n this.diagnostic = {};\n}\n\n/*\n * configure - updates the options for this notifier with the passed in object\n *\n * @param options - an object which gets merged with the current options set on this notifier\n * @returns this\n */\nNotifier.prototype.configure = function(options) {\n this.queue && this.queue.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addTransform - adds a transform onto the end of the queue of transforms for this notifier\n *\n * @param transform - a function which takes three arguments:\n * * item: An Object representing the data to eventually be sent to Rollbar\n * * options: The current value of the options for this notifier\n * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this\n * callback with a null value for error if it wants the processing chain to continue, otherwise\n * with an error to terminate the processing. The item should be the updated item after this\n * transform is finished modifying it.\n */\nNotifier.prototype.addTransform = function(transform) {\n if (_.isFunction(transform)) {\n this.transforms.push(transform);\n }\n return this;\n};\n\n/*\n * log - the internal log function which applies the configured transforms and then pushes onto the\n * queue to be sent to the backend.\n *\n * @param item - An object with the following structure:\n * message [String] - An optional string to be sent to rollbar\n * error [Error] - An optional error\n *\n * @param callback - A function of type function(err, resp) which will be called with exactly one\n * null argument and one non-null argument. The callback will be called once, either during the\n * transform stage if an error occurs inside a transform, or in response to the communication with\n * the backend. The second argument will be the response from the backend in case of success.\n */\nNotifier.prototype.log = function(item, callback) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!this.options.enabled) {\n return callback(new Error('Rollbar is not enabled'));\n }\n\n this.queue.addPendingItem(item);\n var originalError = item.err;\n this._applyTransforms(item, function(err, i) {\n if (err) {\n this.queue.removePendingItem(item);\n return callback(err, null);\n }\n this.queue.addItem(i, callback, originalError, item);\n }.bind(this));\n};\n\n/* Internal */\n\n/*\n * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See\n * `addTransform` for more information.\n *\n * @param item - An item to be transformed\n * @param callback - A function of type function(err, item) which will be called with a non-null\n * error and a null item in the case of a transform failure, or a null error and non-null item after\n * all transforms have been applied.\n */\nNotifier.prototype._applyTransforms = function(item, callback) {\n var transformIndex = -1;\n var transformsLength = this.transforms.length;\n var transforms = this.transforms;\n var options = this.options;\n\n var cb = function(err, i) {\n if (err) {\n callback(err, null);\n return;\n }\n\n transformIndex++;\n\n if (transformIndex === transformsLength) {\n callback(null, i);\n return;\n }\n\n transforms[transformIndex](i, options, cb);\n };\n\n cb(null, item);\n};\n\nmodule.exports = Notifier;\n","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1/item/',\n search: null,\n version: '1',\n protocol: 'https:',\n port: 443\n};\n\n/**\n * Api is an object that encapsulates methods of communicating with\n * the Rollbar API. It is a standard interface with some parts implemented\n * differently for server or browser contexts. It is an object that should\n * be instantiated when used so it can contain non-global options that may\n * be different for another instance of RollbarApi.\n *\n * @param options {\n * accessToken: the accessToken to use for posting items to rollbar\n * endpoint: an alternative endpoint to send errors to\n * must be a valid, fully qualified URL.\n * The default is: https://api.rollbar.com/api/1/item\n * proxy: if you wish to proxy requests provide an object\n * with the following keys:\n * host or hostname (required): foo.example.com\n * port (optional): 123\n * protocol (optional): https\n * }\n */\nfunction Api(options, transport, urllib, truncation, jsonBackup) {\n this.options = options;\n this.transport = transport;\n this.url = urllib;\n this.truncation = truncation;\n this.jsonBackup = jsonBackup;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, urllib);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function(data, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n var self = this;\n\n // ensure the network request is scheduled after the current tick.\n setTimeout(function() {\n self.transport.post(self.accessToken, transportOptions, payload, callback);\n }, 0);\n};\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.buildJsonPayload = function(data, callback) {\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n\n if (stringifyResult.error) {\n if (callback) {\n callback(stringifyResult.error);\n }\n return null;\n }\n\n return stringifyResult.value;\n};\n\n/**\n *\n * @param jsonPayload\n * @param callback\n */\nApi.prototype.postJsonPayload = function(jsonPayload, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n this.transport.postJsonPayload(this.accessToken, transportOptions, jsonPayload, callback);\n};\n\nApi.prototype.configure = function(options) {\n var oldOptions = this.oldOptions;\n this.options = _.merge(oldOptions, options);\n this.transportOptions = _getTransport(this.options, this.url);\n if (this.options.accessToken !== undefined) {\n this.accessToken = this.options.accessToken;\n }\n return this;\n};\n\nfunction _getTransport(options, url) {\n return helpers.getTransportFromOptions(options, defaultOptions, url);\n}\n\nmodule.exports = Api;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (!_.isType(data.context, 'string')) {\n var contextResult = _.stringify(data.context, jsonBackup);\n if (contextResult.error) {\n data.context = 'Error: could not serialize \\'context\\'';\n } else {\n data.context = contextResult.value || '';\n }\n if (data.context.length > 255) {\n data.context = data.context.substr(0, 255);\n }\n }\n return {\n access_token: accessToken,\n data: data\n };\n}\n\nfunction getTransportFromOptions(options, defaults, url) {\n var hostname = defaults.hostname;\n var protocol = defaults.protocol;\n var port = defaults.port;\n var path = defaults.path;\n var search = defaults.search;\n var timeout = options.timeout;\n var transport = detectTransport(options)\n\n var proxy = options.proxy;\n if (options.endpoint) {\n var opts = url.parse(options.endpoint);\n hostname = opts.hostname;\n protocol = opts.protocol;\n port = opts.port;\n path = opts.pathname;\n search = opts.search;\n }\n return {\n timeout: timeout,\n hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy,\n transport: transport\n };\n}\n\nfunction detectTransport(options) {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var transport = options.defaultTransport || 'xhr';\n if (typeof gWindow.fetch === 'undefined') transport = 'xhr';\n if (typeof gWindow.XMLHttpRequest === 'undefined') transport = 'fetch';\n return transport;\n}\n\nfunction transportOptions(transport, method) {\n var protocol = transport.protocol || 'https:';\n var port = transport.port || (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);\n var hostname = transport.hostname;\n var path = transport.path;\n var timeout = transport.timeout;\n var transportAPI = transport.transport;\n if (transport.search) {\n path = path + transport.search;\n }\n if (transport.proxy) {\n path = protocol + '//' + hostname + path;\n hostname = transport.proxy.host || transport.proxy.hostname;\n port = transport.proxy.port;\n protocol = transport.proxy.protocol || protocol;\n }\n return {\n timeout: timeout,\n protocol: protocol,\n hostname: hostname,\n path: path,\n port: port,\n method: method,\n transport: transportAPI\n };\n}\n\nfunction appendPathToPath(base, path) {\n var baseTrailingSlash = /\\/$/.test(base);\n var pathBeginningSlash = /^\\//.test(path);\n\n if (baseTrailingSlash && pathBeginningSlash) {\n path = path.substring(1);\n } else if (!baseTrailingSlash && !pathBeginningSlash) {\n path = '/' + path;\n }\n\n return base + path;\n}\n\nmodule.exports = {\n buildPayload: buildPayload,\n getTransportFromOptions: getTransportFromOptions,\n transportOptions: transportOptions,\n appendPathToPath: appendPathToPath\n};\n","// Console-polyfill. MIT license.\n// https://github.com/paulmillr/console-polyfill\n// Make it safe to do console.log() always.\n(function(global) {\n 'use strict';\n if (!global.console) {\n global.console = {};\n }\n var con = global.console;\n var prop, method;\n var dummy = function() {};\n var properties = ['memory'];\n var methods = ('assert,clear,count,debug,dir,dirxml,error,exception,group,' +\n 'groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,' +\n 'show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn').split(',');\n while (prop = properties.pop()) if (!con[prop]) con[prop] = {};\n while (method = methods.pop()) if (!con[method]) con[method] = dummy;\n // Using `this` for web workers & supports Browserify / Webpack.\n})(typeof window === 'undefined' ? this : window);\n","'use strict';\n\n// This detection.js module is used to encapsulate any ugly browser/feature\n// detection we may need to do.\n\n// Figure out which version of IE we're using, if any.\n// This is gleaned from http://stackoverflow.com/questions/5574842/best-way-to-check-for-ie-less-than-9-in-javascript-without-library\n// Will return an integer on IE (i.e. 8)\n// Will return undefined otherwise\nfunction getIEVersion() {\n\tvar undef;\n\tif (typeof document === 'undefined') {\n\t\treturn undef;\n\t}\n\n var v = 3,\n div = document.createElement('div'),\n all = div.getElementsByTagName('i');\n\n while (\n div.innerHTML = '',\n all[0]\n );\n\n return v > 4 ? v : undef;\n}\n\nvar Detection = {\n ieVersion: getIEVersion\n};\n\nmodule.exports = Detection;\n","'use strict';\n\nfunction captureUncaughtExceptions(window, handler, shim) {\n if (!window) { return; }\n var oldOnError;\n\n if (typeof handler._rollbarOldOnError === 'function') {\n oldOnError = handler._rollbarOldOnError;\n } else if (window.onerror) {\n oldOnError = window.onerror;\n while (oldOnError._rollbarOldOnError) {\n oldOnError = oldOnError._rollbarOldOnError;\n }\n handler._rollbarOldOnError = oldOnError;\n }\n\n handler.handleAnonymousErrors();\n\n var fn = function() {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n if (shim) {\n fn._rollbarOldOnError = oldOnError;\n }\n window.onerror = fn;\n}\n\nfunction _rollbarWindowOnError(window, r, old, args) {\n if (window._rollbarWrappedError) {\n if (!args[4]) {\n args[4] = window._rollbarWrappedError;\n }\n if (!args[5]) {\n args[5] = window._rollbarWrappedError._rollbarContext;\n }\n window._rollbarWrappedError = null;\n }\n\n var ret = r.handleUncaughtException.apply(r, args);\n\n if (old) {\n old.apply(window, args);\n }\n\n // Let other chained onerror handlers above run before setting this.\n // If an error is thrown and caught within a chained onerror handler,\n // Error.prepareStackTrace() will see that one before the one we want.\n if (ret === 'anonymous') {\n r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()\n }\n}\n\nfunction captureUnhandledRejections(window, handler, shim) {\n if (!window) { return; }\n\n if (typeof window._rollbarURH === 'function' && window._rollbarURH.belongsToShim) {\n window.removeEventListener('unhandledrejection', window._rollbarURH);\n }\n\n var rejectionHandler = function (evt) {\n var reason, promise, detail;\n try {\n reason = evt.reason;\n } catch (e) {\n reason = undefined;\n }\n try {\n promise = evt.promise;\n } catch (e) {\n promise = '[unhandledrejection] error getting `promise` from event';\n }\n try {\n detail = evt.detail;\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\n }\n } catch (e) {\n // Ignore\n }\n if (!reason) {\n reason = '[unhandledrejection] error getting `reason` from event';\n }\n\n if (handler && handler.handleUnhandledRejection) {\n handler.handleUnhandledRejection(reason, promise);\n }\n };\n rejectionHandler.belongsToShim = shim;\n window._rollbarURH = rejectionHandler;\n window.addEventListener('unhandledrejection', rejectionHandler);\n}\n\n\nmodule.exports = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections\n};\n","'use strict';\n\nvar _ = require('../utility');\nvar makeFetchRequest = require('./transport/fetch');\nvar makeXhrRequest = require('./transport/xhr');\n\n/*\n * accessToken may be embedded in payload but that should not\n * be assumed\n *\n * options: {\n * hostname\n * protocol\n * path\n * port\n * method\n * transport ('xhr' | 'fetch')\n * }\n *\n * params is an object containing key/value pairs. These\n * will be appended to the path as 'key=value&key=value'\n *\n * payload is an unserialized object\n */\nfunction Transport(truncation) {\n this.truncation = truncation;\n}\n\nTransport.prototype.get = function(accessToken, options, params, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n _.addParamsAndAccessTokenToPath(accessToken, options, params);\n\n var method = 'GET';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken, url, method, null, callback, requestFactory, options.timeout, options.transport\n );\n}\n\nTransport.prototype.post = function(accessToken, options, payload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!payload) {\n return callback(new Error('Cannot send empty request'));\n }\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n if (stringifyResult.error) {\n return callback(stringifyResult.error);\n }\n\n var writeData = stringifyResult.value;\n var method = 'POST';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken, url, method, writeData, callback, requestFactory, options.timeout, options.transport\n );\n}\n\nTransport.prototype.postJsonPayload = function (accessToken, options, jsonPayload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n var method = 'POST';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken, url, method, jsonPayload, callback, requestFactory, options.timeout, options.transport\n );\n}\n\n\n// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope\n// so Angular change detection isn't triggered on each API call.\n// This is the equivalent of runOutsideAngular().\n//\nTransport.prototype._makeZoneRequest = function () {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;\n var args = Array.prototype.slice.call(arguments);\n\n if (currentZone && currentZone._name === 'angular') {\n var rootZone = currentZone._parent;\n var self = this;\n rootZone.run(function () {\n self._makeRequest.apply(undefined, args);\n });\n } else {\n this._makeRequest.apply(undefined, args);\n }\n}\n\nTransport.prototype._makeRequest = function (\n accessToken, url, method, data, callback, requestFactory, timeout, transport\n) {\n if (typeof RollbarProxy !== 'undefined') {\n return _proxyRequest(data, callback);\n }\n\n if (transport === 'fetch') {\n makeFetchRequest(accessToken, url, method, data, callback, timeout)\n } else {\n makeXhrRequest(accessToken, url, method, data, callback, requestFactory, timeout)\n }\n}\n\n/* global RollbarProxy */\nfunction _proxyRequest(json, callback) {\n var rollbarProxy = new RollbarProxy();\n rollbarProxy.sendJsonPayload(\n json,\n function(_msg) { /* do nothing */ }, // eslint-disable-line no-unused-vars\n function(err) {\n callback(new Error(err));\n }\n );\n}\n\nmodule.exports = Transport;\n","'use strict';\n\nvar logger = require('../logger');\nvar _ = require('../../utility');\n\nfunction makeFetchRequest(accessToken, url, method, data, callback, timeout) {\n var controller;\n var timeoutId;\n\n if(_.isFiniteNumber(timeout)) {\n controller = new AbortController();\n timeoutId = setTimeout(function () {controller.abort()}, timeout);\n }\n\n fetch(url, {\n method: method,\n headers: {\n 'Content-Type': 'application/json',\n 'X-Rollbar-Access-Token': accessToken,\n signal: controller && controller.signal\n },\n body: data,\n })\n .then(function (response) {\n if (timeoutId) clearTimeout(timeoutId);\n return response.json();\n })\n .then(function (data) {\n callback(null, data);\n })\n .catch(function (error) {\n logger.error(error.message);\n callback(error);\n });\n}\n\nmodule.exports = makeFetchRequest;\n","'use strict';\n\n/*global XDomainRequest*/\n\nvar _ = require('../../utility');\nvar logger = require('../logger');\n\nfunction makeXhrRequest(accessToken, url, method, data, callback, requestFactory, timeout) {\n var request;\n if (requestFactory) {\n request = requestFactory();\n } else {\n request = _createXMLHTTPObject();\n }\n if (!request) {\n // Give up, no way to send requests\n return callback(new Error('No way to send a request'));\n }\n try {\n try {\n var onreadystatechange = function() {\n try {\n if (onreadystatechange && request.readyState === 4) {\n onreadystatechange = undefined;\n\n var parseResponse = _.jsonParse(request.responseText);\n if (_isSuccess(request)) {\n callback(parseResponse.error, parseResponse.value);\n return;\n } else if (_isNormalFailure(request)) {\n if (request.status === 403) {\n // likely caused by using a server access token\n var message = parseResponse.value && parseResponse.value.message;\n logger.error(message);\n }\n // return valid http status codes\n callback(new Error(String(request.status)));\n } else {\n // IE will return a status 12000+ on some sort of connection failure,\n // so we return a blank error\n // http://msdn.microsoft.com/en-us/library/aa383770%28VS.85%29.aspx\n var msg = 'XHR response had no status code (likely connection failure)';\n callback(_newRetriableError(msg));\n }\n }\n } catch (ex) {\n //jquery source mentions firefox may error out while accessing the\n //request members if there is a network error\n //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111\n var exc;\n if (ex && ex.stack) {\n exc = ex;\n } else {\n exc = new Error(ex);\n }\n callback(exc);\n }\n };\n\n request.open(method, url, true);\n if (request.setRequestHeader) {\n request.setRequestHeader('Content-Type', 'application/json');\n request.setRequestHeader('X-Rollbar-Access-Token', accessToken);\n }\n\n if(_.isFiniteNumber(timeout)) {\n request.timeout = timeout;\n }\n\n request.onreadystatechange = onreadystatechange;\n request.send(data);\n } catch (e1) {\n // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest\n if (typeof XDomainRequest !== 'undefined') {\n\n // Assume we are in a really old browser which has a bunch of limitations:\n // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx\n\n // Extreme paranoia: if we have XDomainRequest then we have a window, but just in case\n if (!window || !window.location) {\n return callback(new Error('No window available during request, unknown environment'));\n }\n\n // If the current page is http, try and send over http\n if (window.location.href.substring(0, 5) === 'http:' && url.substring(0, 5) === 'https') {\n url = 'http' + url.substring(5);\n }\n\n var xdomainrequest = new XDomainRequest();\n xdomainrequest.onprogress = function() {};\n xdomainrequest.ontimeout = function() {\n var msg = 'Request timed out';\n var code = 'ETIMEDOUT';\n callback(_newRetriableError(msg, code));\n };\n xdomainrequest.onerror = function() {\n callback(new Error('Error during request'));\n };\n xdomainrequest.onload = function() {\n var parseResponse = _.jsonParse(xdomainrequest.responseText);\n callback(parseResponse.error, parseResponse.value);\n };\n xdomainrequest.open(method, url, true);\n xdomainrequest.send(data);\n } else {\n callback(new Error('Cannot find a method to transport a request'));\n }\n }\n } catch (e2) {\n callback(e2);\n }\n}\n\nfunction _createXMLHTTPObject() {\n /* global ActiveXObject:false */\n\n var factories = [\n function () {\n return new XMLHttpRequest();\n },\n function () {\n return new ActiveXObject('Msxml2.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Msxml3.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Microsoft.XMLHTTP');\n }\n ];\n var xmlhttp;\n var i;\n var numFactories = factories.length;\n for (i = 0; i < numFactories; i++) {\n /* eslint-disable no-empty */\n try {\n xmlhttp = factories[i]();\n break;\n } catch (e) {\n // pass\n }\n /* eslint-enable no-empty */\n }\n return xmlhttp;\n}\n\nfunction _isSuccess(r) {\n return r && r.status && r.status === 200;\n}\n\nfunction _isNormalFailure(r) {\n return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;\n}\n\nfunction _newRetriableError(message, code) {\n var err = new Error(message);\n err.code = code || 'ENOTFOUND';\n return err;\n}\n\nmodule.exports = makeXhrRequest;\n","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('../errorParser');\nvar logger = require('./logger');\n\nfunction handleDomException(item, options, callback) {\n if(item.err && errorParser.Stack(item.err).name === 'DOMException') {\n var originalError = new Error();\n originalError.name = item.err.name;\n originalError.message = item.err.message;\n originalError.stack = item.err.stack;\n originalError.nested = item.err;\n item.err = originalError;\n }\n callback(null, item);\n}\n\nfunction handleItemWithError(item, options, callback) {\n item.data = item.data || {};\n if (item.err) {\n try {\n item.stackInfo = item.err._savedStackTrace || errorParser.parse(item.err, item.skipFrames);\n\n if (options.addErrorContext) {\n addErrorContext(item);\n }\n } catch (e) {\n logger.error('Error while parsing the error object.', e);\n try {\n item.message = item.err.message || item.err.description || item.message || String(item.err);\n } catch (e2) {\n item.message = String(item.err) || String(e2);\n }\n delete item.err;\n }\n }\n callback(null, item);\n}\n\nfunction addErrorContext(item) {\n var chain = [];\n var err = item.err;\n\n chain.push(err);\n\n while (err.nested || err.cause) {\n err = err.nested || err.cause;\n chain.push(err);\n }\n\n _.addErrorContext(item, chain);\n}\n\nfunction ensureItemHasSomethingToSay(item, options, callback) {\n if (!item.message && !item.stackInfo && !item.custom) {\n callback(new Error('No message, stack info, or custom data'), null);\n }\n callback(null, item);\n}\n\nfunction addBaseInfo(item, options, callback) {\n var environment = (options.payload && options.payload.environment) || options.environment;\n item.data = _.merge(item.data, {\n environment: environment,\n level: item.level,\n endpoint: options.endpoint,\n platform: 'browser',\n framework: 'browser-js',\n language: 'javascript',\n server: {},\n uuid: item.uuid,\n notifier: {\n name: 'rollbar-browser-js',\n version: options.version\n },\n custom: item.custom\n });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function(item, options, callback) {\n var requestInfo = {};\n\n if (window && window.location) {\n requestInfo.url = window.location.href;\n requestInfo.query_string = window.location.search;\n }\n\n var remoteString = '$remote_ip';\n if (!options.captureIp) {\n remoteString = null;\n } else if (options.captureIp !== true) {\n remoteString += '_anonymize';\n }\n if (remoteString) requestInfo.user_ip = remoteString;\n\n if (Object.keys(requestInfo).length > 0) {\n _.set(item, 'data.request', requestInfo);\n }\n\n callback(null, item);\n };\n}\n\nfunction addClientInfo(window) {\n return function(item, options, callback) {\n if (!window) {\n return callback(null, item);\n }\n var nav = window.navigator || {};\n var scr = window.screen || {};\n _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: nav.userAgent,\n language: nav.language,\n cookie_enabled: nav.cookieEnabled,\n screen: {\n width: scr.width,\n height: scr.height\n }\n }\n });\n callback(null, item);\n };\n}\n\nfunction addPluginInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.navigator) {\n return callback(null, item);\n }\n var plugins = [];\n var navPlugins = window.navigator.plugins || [];\n var cur;\n for (var i=0, l=navPlugins.length; i < l; ++i) {\n cur = navPlugins[i];\n plugins.push({name: cur.name, description: cur.description});\n }\n _.set(item, 'data.client.javascript.plugins', plugins);\n callback(null, item);\n };\n}\n\nfunction addBody(item, options, callback) {\n if (item.stackInfo) {\n if (item.stackInfo.traceChain) {\n addBodyTraceChain(item, options, callback);\n } else {\n addBodyTrace(item, options, callback);\n }\n } else {\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction addBodyMessage(item, options, callback) {\n var message = item.message;\n var custom = item.custom;\n\n if (!message) {\n message = 'Item sent with null or missing arguments.';\n }\n var result = {\n body: message\n };\n\n if (custom) {\n result.extra = _.merge(custom);\n }\n\n _.set(item, 'data.body', {message: result});\n callback(null, item);\n}\n\nfunction stackFromItem(item) {\n // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = item.stackInfo.stack;\n if (stack && stack.length === 0 && item._unhandledStackInfo && item._unhandledStackInfo.stack) {\n stack = item._unhandledStackInfo.stack;\n }\n return stack;\n}\n\nfunction addBodyTraceChain(item, options, callback) {\n var traceChain = item.stackInfo.traceChain;\n var traces = [];\n\n var traceChainLength = traceChain.length;\n for (var i = 0; i < traceChainLength; i++) {\n var trace = buildTrace(item, traceChain[i], options);\n traces.push(trace);\n }\n\n _.set(item, 'data.body', {trace_chain: traces});\n callback(null, item);\n}\n\nfunction addBodyTrace(item, options, callback) {\n var stack = stackFromItem(item);\n\n if (stack) {\n var trace = buildTrace(item, item.stackInfo, options);\n _.set(item, 'data.body', {trace: trace});\n callback(null, item);\n } else {\n var stackInfo = item.stackInfo;\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction buildTrace(item, stackInfo, options) {\n var description = item && item.data.description;\n var custom = item && item.custom;\n var stack = stackFromItem(item);\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n var trace = {\n exception: {\n 'class': className,\n message: message\n }\n };\n\n if (description) {\n trace.exception.description = description;\n }\n\n if (stack) {\n if (stack.length === 0) {\n trace.exception.stack = stackInfo.rawStack;\n trace.exception.raw = String(stackInfo.rawException);\n }\n var stackFrame;\n var frame;\n var code;\n var pre;\n var post;\n var contextLength;\n var i, mid;\n\n trace.frames = [];\n for (i = 0; i < stack.length; ++i) {\n stackFrame = stack[i];\n frame = {\n filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',\n lineno: stackFrame.line || null,\n method: (!stackFrame.func || stackFrame.func === '?') ? '[anonymous]' : stackFrame.func,\n colno: stackFrame.column\n };\n if (options.sendFrameUrl) {\n frame.url = stackFrame.url;\n }\n if (frame.method && frame.method.endsWith && frame.method.endsWith('_rollbar_wrapped')) {\n continue;\n }\n\n code = pre = post = null;\n contextLength = stackFrame.context ? stackFrame.context.length : 0;\n if (contextLength) {\n mid = Math.floor(contextLength / 2);\n pre = stackFrame.context.slice(0, mid);\n code = stackFrame.context[mid];\n post = stackFrame.context.slice(mid);\n }\n\n if (code) {\n frame.code = code;\n }\n\n if (pre || post) {\n frame.context = {};\n if (pre && pre.length) {\n frame.context.pre = pre;\n }\n if (post && post.length) {\n frame.context.post = post;\n }\n }\n\n if (stackFrame.args) {\n frame.args = stackFrame.args;\n }\n\n trace.frames.push(frame);\n }\n\n // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last\n trace.frames.reverse();\n\n if (custom) {\n trace.extra = _.merge(custom);\n }\n }\n\n return trace;\n}\n\nfunction errorClass(stackInfo, guess, options) {\n if (stackInfo.name) {\n return stackInfo.name;\n } else if (options.guessErrorClass) {\n return guess;\n } else {\n return '(unknown)';\n }\n}\n\nfunction addScrubber(scrubFn) {\n return function (item, options, callback) {\n if (scrubFn) {\n var scrubFields = options.scrubFields || [];\n var scrubPaths = options.scrubPaths || [];\n item.data = scrubFn(item.data, scrubFields, scrubPaths);\n }\n callback(null, item);\n }\n}\n\nmodule.exports = {\n handleDomException: handleDomException,\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n addScrubber: addScrubber\n};\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('error-stack-parser', ['stackframe'], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory(require('stackframe'));\n } else {\n root.ErrorStackParser = factory(root.StackFrame);\n }\n}(this, function ErrorStackParser(StackFrame) {\n 'use strict';\n\n var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\\S+:\\d+/;\n var CHROME_IE_STACK_REGEXP = /^\\s*at .*(\\S+:\\d+|\\(native\\))/m;\n var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\\[native code])?$/;\n\n return {\n /**\n * Given an Error object, extract the most information from it.\n *\n * @param {Error} error object\n * @return {Array} of StackFrames\n */\n parse: function ErrorStackParser$$parse(error) {\n if (typeof error.stacktrace !== 'undefined' || typeof error['opera#sourceloc'] !== 'undefined') {\n return this.parseOpera(error);\n } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {\n return this.parseV8OrIE(error);\n } else if (error.stack) {\n return this.parseFFOrSafari(error);\n } else {\n throw new Error('Cannot parse given Error object');\n }\n },\n\n // Separate line and column numbers from a string of the form: (URI:Line:Column)\n extractLocation: function ErrorStackParser$$extractLocation(urlLike) {\n // Fail-fast but return locations like \"(native)\"\n if (urlLike.indexOf(':') === -1) {\n return [urlLike];\n }\n\n var regExp = /(.+?)(?::(\\d+))?(?::(\\d+))?$/;\n var parts = regExp.exec(urlLike.replace(/[()]/g, ''));\n return [parts[1], parts[2] || undefined, parts[3] || undefined];\n },\n\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(CHROME_IE_STACK_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n if (line.indexOf('(eval ') > -1) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n line = line.replace(/eval code/g, 'eval').replace(/(\\(eval at [^()]*)|(,.*$)/g, '');\n }\n var sanitizedLine = line.replace(/^\\s+/, '').replace(/\\(eval code/g, '(').replace(/^.*?\\s+/, '');\n\n // capture and preseve the parenthesized location \"(/foo/my bar.js:12:87)\" in\n // case it has spaces in it, as the string is split on \\s+ later on\n var location = sanitizedLine.match(/ (\\(.+\\)$)/);\n\n // remove the parenthesized location from the line, if it was matched\n sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;\n\n // if a location was matched, pass it to extractLocation() otherwise pass all sanitizedLine\n // because this line doesn't have function name\n var locationParts = this.extractLocation(location ? location[1] : sanitizedLine);\n var functionName = location && sanitizedLine || undefined;\n var fileName = ['eval', ''].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];\n\n return new StackFrame({\n functionName: functionName,\n fileName: fileName,\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n },\n\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n if (line.indexOf(' > eval') > -1) {\n line = line.replace(/ line (\\d+)(?: > eval line \\d+)* > eval:\\d+:\\d+/g, ':$1');\n }\n\n if (line.indexOf('@') === -1 && line.indexOf(':') === -1) {\n // Safari eval frames only have function names and nothing else\n return new StackFrame({\n functionName: line\n });\n } else {\n var functionNameRegex = /((.*\".+\"[^@]*)?[^@]*)(?:@)/;\n var matches = line.match(functionNameRegex);\n var functionName = matches && matches[1] ? matches[1] : undefined;\n var locationParts = this.extractLocation(line.replace(functionNameRegex, ''));\n\n return new StackFrame({\n functionName: functionName,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }\n }, this);\n },\n\n parseOpera: function ErrorStackParser$$parseOpera(e) {\n if (!e.stacktrace || (e.message.indexOf('\\n') > -1 &&\n e.message.split('\\n').length > e.stacktrace.split('\\n').length)) {\n return this.parseOpera9(e);\n } else if (!e.stack) {\n return this.parseOpera10(e);\n } else {\n return this.parseOpera11(e);\n }\n },\n\n parseOpera9: function ErrorStackParser$$parseOpera9(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)/i;\n var lines = e.message.split('\\n');\n var result = [];\n\n for (var i = 2, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(new StackFrame({\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n }));\n }\n }\n\n return result;\n },\n\n parseOpera10: function ErrorStackParser$$parseOpera10(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)(?:: In function (\\S+))?$/i;\n var lines = e.stacktrace.split('\\n');\n var result = [];\n\n for (var i = 0, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(\n new StackFrame({\n functionName: match[3] || undefined,\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n })\n );\n }\n }\n\n return result;\n },\n\n // Opera 10.65+ Error.stack very similar to FF/Safari\n parseOpera11: function ErrorStackParser$$parseOpera11(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);\n }, this);\n\n return filtered.map(function(line) {\n var tokens = line.split('@');\n var locationParts = this.extractLocation(tokens.pop());\n var functionCall = (tokens.shift() || '');\n var functionName = functionCall\n .replace(//, '$2')\n .replace(/\\([^)]*\\)/g, '') || undefined;\n var argsRaw;\n if (functionCall.match(/\\(([^)]*)\\)/)) {\n argsRaw = functionCall.replace(/^[^(]+\\(([^)]*)\\)$/, '$1');\n }\n var args = (argsRaw === undefined || argsRaw === '[arguments not available]') ?\n undefined : argsRaw.split(',');\n\n return new StackFrame({\n functionName: functionName,\n args: args,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n }\n };\n}));\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('stackframe', [], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.StackFrame = factory();\n }\n}(this, function() {\n 'use strict';\n function _isNumber(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n }\n\n function _capitalize(str) {\n return str.charAt(0).toUpperCase() + str.substring(1);\n }\n\n function _getter(p) {\n return function() {\n return this[p];\n };\n }\n\n var booleanProps = ['isConstructor', 'isEval', 'isNative', 'isToplevel'];\n var numericProps = ['columnNumber', 'lineNumber'];\n var stringProps = ['fileName', 'functionName', 'source'];\n var arrayProps = ['args'];\n var objectProps = ['evalOrigin'];\n\n var props = booleanProps.concat(numericProps, stringProps, arrayProps, objectProps);\n\n function StackFrame(obj) {\n if (!obj) return;\n for (var i = 0; i < props.length; i++) {\n if (obj[props[i]] !== undefined) {\n this['set' + _capitalize(props[i])](obj[props[i]]);\n }\n }\n }\n\n StackFrame.prototype = {\n getArgs: function() {\n return this.args;\n },\n setArgs: function(v) {\n if (Object.prototype.toString.call(v) !== '[object Array]') {\n throw new TypeError('Args must be an Array');\n }\n this.args = v;\n },\n\n getEvalOrigin: function() {\n return this.evalOrigin;\n },\n setEvalOrigin: function(v) {\n if (v instanceof StackFrame) {\n this.evalOrigin = v;\n } else if (v instanceof Object) {\n this.evalOrigin = new StackFrame(v);\n } else {\n throw new TypeError('Eval Origin must be an Object or StackFrame');\n }\n },\n\n toString: function() {\n var fileName = this.getFileName() || '';\n var lineNumber = this.getLineNumber() || '';\n var columnNumber = this.getColumnNumber() || '';\n var functionName = this.getFunctionName() || '';\n if (this.getIsEval()) {\n if (fileName) {\n return '[eval] (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return '[eval]:' + lineNumber + ':' + columnNumber;\n }\n if (functionName) {\n return functionName + ' (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return fileName + ':' + lineNumber + ':' + columnNumber;\n }\n };\n\n StackFrame.fromString = function StackFrame$$fromString(str) {\n var argsStartIndex = str.indexOf('(');\n var argsEndIndex = str.lastIndexOf(')');\n\n var functionName = str.substring(0, argsStartIndex);\n var args = str.substring(argsStartIndex + 1, argsEndIndex).split(',');\n var locationString = str.substring(argsEndIndex + 1);\n\n if (locationString.indexOf('@') === 0) {\n var parts = /@(.+?)(?::(\\d+))?(?::(\\d+))?$/.exec(locationString, '');\n var fileName = parts[1];\n var lineNumber = parts[2];\n var columnNumber = parts[3];\n }\n\n return new StackFrame({\n functionName: functionName,\n args: args || undefined,\n fileName: fileName,\n lineNumber: lineNumber || undefined,\n columnNumber: columnNumber || undefined\n });\n };\n\n for (var i = 0; i < booleanProps.length; i++) {\n StackFrame.prototype['get' + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);\n StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function(p) {\n return function(v) {\n this[p] = Boolean(v);\n };\n })(booleanProps[i]);\n }\n\n for (var j = 0; j < numericProps.length; j++) {\n StackFrame.prototype['get' + _capitalize(numericProps[j])] = _getter(numericProps[j]);\n StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function(p) {\n return function(v) {\n if (!_isNumber(v)) {\n throw new TypeError(p + ' must be a Number');\n }\n this[p] = Number(v);\n };\n })(numericProps[j]);\n }\n\n for (var k = 0; k < stringProps.length; k++) {\n StackFrame.prototype['get' + _capitalize(stringProps[k])] = _getter(stringProps[k]);\n StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function(p) {\n return function(v) {\n this[p] = String(v);\n };\n })(stringProps[k]);\n }\n\n return StackFrame;\n}));\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction itemToPayload(item, options, callback) {\n var data = item.data;\n\n if (item._isUncaught) {\n data._isUncaught = true;\n }\n if (item._originalArgs) {\n data._originalArgs = item._originalArgs;\n }\n callback(null, data);\n}\n\nfunction addPayloadOptions(item, options, callback) {\n var payloadOptions = options.payload || {};\n if (payloadOptions.body) {\n delete payloadOptions.body;\n }\n\n item.data = _.merge(item.data, payloadOptions);\n callback(null, item);\n}\n\nfunction addTelemetryData(item, options, callback) {\n if (item.telemetryEvents) {\n _.set(item, 'data.body.telemetry', item.telemetryEvents);\n }\n callback(null, item);\n}\n\nfunction addMessageWithError(item, options, callback) {\n if (!item.message) {\n callback(null, item);\n return;\n }\n var tracePath = 'data.body.trace_chain.0';\n var trace = _.get(item, tracePath);\n if (!trace) {\n tracePath = 'data.body.trace';\n trace = _.get(item, tracePath);\n }\n if (trace) {\n if (!(trace.exception && trace.exception.description)) {\n _.set(item, tracePath+'.exception.description', item.message);\n callback(null, item);\n return;\n }\n var extra = _.get(item, tracePath+'.extra') || {};\n var newExtra = _.merge(extra, {message: item.message});\n _.set(item, tracePath+'.extra', newExtra);\n }\n callback(null, item);\n}\n\nfunction userTransform(logger) {\n return function(item, options, callback) {\n var newItem = _.merge(item);\n var response = null;\n try {\n if (_.isFunction(options.transform)) {\n response = options.transform(newItem.data, item);\n }\n } catch (e) {\n options.transform = null;\n logger.error('Error while calling custom transform() function. Removing custom transform().', e);\n callback(null, item);\n return;\n }\n if(_.isPromise(response)) {\n response.then(function (promisedItem) {\n if(promisedItem) {\n newItem.data = promisedItem;\n }\n callback(null, newItem);\n }, function (error) {\n callback(error, item);\n });\n } else {\n callback(null, newItem);\n }\n }\n}\n\nfunction addConfigToPayload(item, options, callback) {\n if (!options.sendConfig) {\n return callback(null, item);\n }\n var configKey = '_rollbarConfig';\n var custom = _.get(item, 'data.custom') || {};\n custom[configKey] = options;\n item.data.custom = custom;\n callback(null, item);\n}\n\nfunction addFunctionOption(options, name) {\n if(_.isFunction(options[name])) {\n options[name] = options[name].toString();\n }\n}\n\nfunction addConfiguredOptions(item, options, callback) {\n var configuredOptions = options._configuredOptions;\n\n // These must be stringified or they'll get dropped during serialization.\n addFunctionOption(configuredOptions, 'transform');\n addFunctionOption(configuredOptions, 'checkIgnore');\n addFunctionOption(configuredOptions, 'onSendCallback');\n\n delete configuredOptions.accessToken;\n item.data.notifier.configured_options = configuredOptions;\n callback(null, item);\n}\n\nfunction addDiagnosticKeys(item, options, callback) {\n var diagnostic = _.merge(item.notifier.client.notifier.diagnostic, item.diagnostic);\n\n if (_.get(item, 'err._isAnonymous')) {\n diagnostic.is_anonymous = true;\n }\n\n if (item._isUncaught) {\n diagnostic.is_uncaught = item._isUncaught;\n }\n\n if (item.err) {\n try {\n diagnostic.raw_error = {\n message: item.err.message,\n name: item.err.name,\n constructor_name: item.err.constructor && item.err.constructor.name,\n filename: item.err.fileName,\n line: item.err.lineNumber,\n column: item.err.columnNumber,\n stack: item.err.stack\n };\n } catch (e) {\n diagnostic.raw_error = { failed: String(e) };\n }\n }\n\n item.data.notifier.diagnostic = _.merge(item.data.notifier.diagnostic, diagnostic);\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addPayloadOptions: addPayloadOptions,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError,\n userTransform: userTransform,\n addConfigToPayload: addConfigToPayload,\n addConfiguredOptions: addConfiguredOptions,\n addDiagnosticKeys: addDiagnosticKeys\n};\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction checkIgnore(item, settings) {\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore\n};\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction checkLevel(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = settings.reportLevel;\n var reportLevelVal = _.LEVELS[reportLevel] || 0;\n\n if (levelVal < reportLevelVal) {\n return false;\n }\n return true;\n}\n\nfunction userCheckIgnore(logger) {\n return function(item, settings) {\n var isUncaught = !!item._isUncaught;\n delete item._isUncaught;\n var args = item._originalArgs;\n delete item._originalArgs;\n try {\n if (_.isFunction(settings.onSendCallback)) {\n settings.onSendCallback(isUncaught, args, item);\n }\n } catch (e) {\n settings.onSendCallback = null;\n logger.error('Error while calling onSendCallback, removing', e);\n }\n try {\n if (_.isFunction(settings.checkIgnore) && settings.checkIgnore(isUncaught, args, item)) {\n return false;\n }\n } catch (e) {\n settings.checkIgnore = null;\n logger.error('Error while calling custom checkIgnore(), removing', e);\n }\n return true;\n }\n}\n\nfunction urlIsNotBlockListed(logger) {\n return function(item, settings) {\n return !urlIsOnAList(item, settings, 'blocklist', logger);\n }\n}\n\nfunction urlIsSafeListed(logger) {\n return function(item, settings) {\n return urlIsOnAList(item, settings, 'safelist', logger);\n }\n}\n\nfunction matchFrames(trace, list, block) {\n if (!trace) { return !block }\n\n var frames = trace.frames;\n\n if (!frames || frames.length === 0) { return !block; }\n\n var frame, filename, url, urlRegex;\n var listLength = list.length;\n var frameLength = frames.length;\n for (var i = 0; i < frameLength; i++) {\n frame = frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) { return !block; }\n\n for (var j = 0; j < listLength; j++) {\n url = list[j];\n urlRegex = new RegExp(url);\n\n if (urlRegex.test(filename)) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction urlIsOnAList(item, settings, safeOrBlock, logger) {\n // safelist is the default\n var block = false;\n if (safeOrBlock === 'blocklist') {\n block = true;\n }\n\n var list, traces;\n try {\n list = block ? settings.hostBlockList : settings.hostSafeList;\n traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];\n\n // These two checks are important to come first as they are defaults\n // in case the list is missing or the trace is missing or not well-formed\n if (!list || list.length === 0) {\n return !block;\n }\n if (traces.length === 0 || !traces[0]) {\n return !block;\n }\n\n var tracesLength = traces.length;\n for (var i = 0; i < tracesLength; i++) {\n if(matchFrames(traces[i], list, block)) {\n return true;\n }\n }\n } catch (e)\n /* istanbul ignore next */\n {\n if (block) {\n settings.hostBlockList = null;\n } else {\n settings.hostSafeList = null;\n }\n var listName = block ? 'hostBlockList' : 'hostSafeList';\n logger.error('Error while reading your configuration\\'s ' + listName + ' option. Removing custom ' + listName + '.', e);\n return !block;\n }\n return false;\n}\n\nfunction messageIsIgnored(logger) {\n return function(item, settings) {\n var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n messages = messagesFromItem(item);\n\n if (messages.length === 0){\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n\n for (j = 0; j < messages.length; j++) {\n messageIsIgnored = rIgnoredMessage.test(messages[j]);\n\n if (messageIsIgnored) {\n return false;\n }\n }\n }\n } catch(e)\n /* istanbul ignore next */\n {\n settings.ignoredMessages = null;\n logger.error('Error while reading your configuration\\'s ignoredMessages option. Removing custom ignoredMessages.');\n }\n\n return true;\n }\n}\n\nfunction messagesFromItem(item) {\n var body = item.body;\n var messages = [];\n\n // The payload schema only allows one of trace_chain, message, or trace.\n // However, existing test cases are based on having both trace and message present.\n // So here we preserve the ability to collect strings from any combination of these keys.\n if (body.trace_chain) {\n var traceChain = body.trace_chain;\n for (var i = 0; i < traceChain.length; i++) {\n var trace = traceChain[i];\n messages.push(_.get(trace, 'exception.message'));\n }\n }\n if (body.trace) {\n messages.push(_.get(body, 'trace.exception.message'));\n }\n if (body.message) {\n messages.push(_.get(body, 'message.body'));\n }\n return messages;\n}\n\nmodule.exports = {\n checkLevel: checkLevel,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlockListed: urlIsNotBlockListed,\n urlIsSafeListed: urlIsSafeListed,\n messageIsIgnored: messageIsIgnored\n};\n","'use strict';\n\nmodule.exports = {\n version: '2.26.3',\n endpoint: 'api.rollbar.com/api/1/item/',\n logLevel: 'debug',\n reportLevel: 'debug',\n uncaughtErrorLevel: 'error',\n maxItems: 0,\n itemsPerMin: 60\n}\n","'use strict';\n\nmodule.exports = {\n scrubFields: [\n 'pw',\n 'pass',\n 'passwd',\n 'password',\n 'secret',\n 'confirm_password',\n 'confirmPassword',\n 'password_confirmation',\n 'passwordConfirmation',\n 'access_token',\n 'accessToken',\n 'X-Rollbar-Access-Token',\n 'secret_key',\n 'secretKey',\n 'secretToken',\n 'cc-number',\n 'card number',\n 'cardnumber',\n 'cardnum',\n 'ccnum',\n 'ccnumber',\n 'cc num',\n 'creditcardnumber',\n 'credit card number',\n 'newcreditcardnumber',\n 'new credit card',\n 'creditcardno',\n 'credit card no',\n 'card#',\n 'card #',\n 'cc-csc',\n 'cvc',\n 'cvc2',\n 'cvv2',\n 'ccv2',\n 'security code',\n 'card verification',\n 'name on credit card',\n 'name on card',\n 'nameoncard',\n 'cardholder',\n 'card holder',\n 'name des karteninhabers',\n 'ccname',\n 'card type',\n 'cardtype',\n 'cc type',\n 'cctype',\n 'payment type',\n 'expiration date',\n 'expirationdate',\n 'expdate',\n 'cc-exp',\n 'ccmonth',\n 'ccyear'\n ]\n}\n","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.merge(options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n}\n\nTelemeter.prototype.configure = function(options) {\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n var deleteCount = 0;\n if (this.queue.length > newMaxEvents) {\n deleteCount = this.queue.length - newMaxEvents;\n }\n this.maxQueueSize = newMaxEvents;\n this.queue.splice(0, deleteCount);\n};\n\nTelemeter.prototype.copyEvents = function() {\n var events = Array.prototype.slice.call(this.queue, 0);\n if (_.isFunction(this.options.filterTelemetry)) {\n try {\n var i = events.length;\n while (i--) {\n if (this.options.filterTelemetry(events[i])) {\n events.splice(i, 1);\n }\n }\n } catch (e) {\n this.options.filterTelemetry = null;\n }\n }\n return events;\n};\n\nTelemeter.prototype.capture = function(type, metadata, level, rollbarUUID, timestamp) {\n var e = {\n level: getLevel(type, level),\n type: type,\n timestamp_ms: timestamp || _.now(),\n body: metadata,\n source: 'client'\n };\n if (rollbarUUID) {\n e.uuid = rollbarUUID;\n }\n\n try {\n if (_.isFunction(this.options.filterTelemetry) && this.options.filterTelemetry(e)) {\n return false;\n }\n } catch (exc) {\n this.options.filterTelemetry = null;\n }\n\n this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function(type, metadata, level, rollbarUUID) {\n return this.capture(type, metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.captureError = function(err, level, rollbarUUID, timestamp) {\n var metadata = {\n message: err.message || String(err)\n };\n if (err.stack) {\n metadata.stack = err.stack;\n }\n return this.capture('error', metadata, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureLog = function(message, level, rollbarUUID, timestamp) {\n return this.capture('log', {\n message: message\n }, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID, requestData) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\n if (requestData) {\n metadata.request = requestData;\n }\n var level = this.levelFromStatus(metadata.status_code);\n return this.capture('network', metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.levelFromStatus = function(statusCode) {\n if (statusCode >= 200 && statusCode < 400) {\n return 'info';\n }\n if (statusCode === 0 || statusCode >= 400) {\n return 'error';\n }\n return 'info';\n};\n\nTelemeter.prototype.captureDom = function(subtype, element, value, checked, rollbarUUID) {\n var metadata = {\n subtype: subtype,\n element: element\n };\n if (value !== undefined) {\n metadata.value = value;\n }\n if (checked !== undefined) {\n metadata.checked = checked;\n }\n return this.capture('dom', metadata, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureNavigation = function(from, to, rollbarUUID) {\n return this.capture('navigation', {from: from, to: to}, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureDomContentLoaded = function(ts) {\n return this.capture('navigation', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n */\n};\nTelemeter.prototype.captureLoad = function(ts) {\n return this.capture('navigation', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n */\n};\n\nTelemeter.prototype.captureConnectivityChange = function(type, rollbarUUID) {\n return this.captureNetwork({change: type}, 'connectivity', rollbarUUID);\n};\n\n// Only intended to be used internally by the notifier\nTelemeter.prototype._captureRollbarItem = function(item) {\n if (!this.options.includeItemsInTelemetry) {\n return;\n }\n if (item.err) {\n return this.captureError(item.err, item.level, item.uuid, item.timestamp);\n }\n if (item.message) {\n return this.captureLog(item.message, item.level, item.uuid, item.timestamp);\n }\n if (item.custom) {\n return this.capture('log', item.custom, item.level, item.uuid, item.timestamp);\n }\n};\n\nTelemeter.prototype.push = function(e) {\n this.queue.push(e);\n if (this.queue.length > this.maxQueueSize) {\n this.queue.shift();\n }\n};\n\nfunction getLevel(type, level) {\n if (level) {\n return level;\n }\n var defaultLevel = {\n error: 'error',\n manual: 'info'\n };\n return defaultLevel[type] || 'info';\n}\n\nmodule.exports = Telemeter;\n","'use strict';\n\nvar _ = require('../utility');\nvar headers = require('../utility/headers');\nvar scrub = require('../scrub');\nvar urlparser = require('./url');\nvar domUtil = require('./domUtility');\n\nvar defaults = {\n network: true,\n networkResponseHeaders: false,\n networkResponseBody: false,\n networkRequestHeaders: false,\n networkRequestBody: false,\n networkErrorOnHttp5xx: false,\n networkErrorOnHttp4xx: false,\n networkErrorOnHttp0: false,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true,\n contentSecurityPolicy: true,\n errorOnContentSecurityPolicy: false\n};\n\nfunction replace(obj, name, replacement, replacements, type) {\n var orig = obj[name];\n obj[name] = replacement(orig);\n if (replacements) {\n replacements[type].push([obj, name, orig]);\n }\n}\n\nfunction restore(replacements, type) {\n var b;\n while (replacements[type].length) {\n b = replacements[type].shift();\n b[0][b[1]] = b[2];\n }\n}\n\nfunction nameFromDescription(description) {\n if (!description || !description.attributes) { return null; }\n var attrs = description.attributes;\n for (var a = 0; a < attrs.length; ++a) {\n if (attrs[a].key === 'name') {\n return attrs[a].value;\n }\n }\n return null;\n}\n\nfunction defaultValueScrubber(scrubFields) {\n var patterns = [];\n for (var i = 0; i < scrubFields.length; ++i) {\n patterns.push(new RegExp(scrubFields[i], 'i'));\n }\n return function(description) {\n var name = nameFromDescription(description);\n if (!name) { return false; }\n for (var i = 0; i < patterns.length; ++i) {\n if (patterns[i].test(name)) {\n return true;\n }\n }\n return false;\n };\n}\n\nfunction Instrumenter(options, telemeter, rollbar, _window, _document) {\n this.options = options;\n var autoInstrument = options.autoInstrument;\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);\n this.telemeter = telemeter;\n this.rollbar = rollbar;\n this.diagnostic = rollbar.client.notifier.diagnostic;\n this._window = _window || {};\n this._document = _document || {};\n this.replacements = {\n network: [],\n log: [],\n navigation: [],\n connectivity: []\n };\n this.eventRemovers = {\n dom: [],\n connectivity: [],\n contentsecuritypolicy: []\n };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function(options) {\n this.options = _.merge(this.options, options);\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.merge(this.autoInstrument);\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n if (options.scrubTelemetryInputs !== undefined) {\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n }\n if (options.telemetryScrubber !== undefined) {\n this.telemetryScrubber = options.telemetryScrubber;\n }\n};\n\n// eslint-disable-next-line complexity\nInstrumenter.prototype.instrument = function(oldSettings) {\n if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {\n this.instrumentNetwork();\n } else if (!this.autoInstrument.network && oldSettings && oldSettings.network) {\n this.deinstrumentNetwork();\n }\n\n if (this.autoInstrument.log && !(oldSettings && oldSettings.log)) {\n this.instrumentConsole();\n } else if (!this.autoInstrument.log && oldSettings && oldSettings.log) {\n this.deinstrumentConsole();\n }\n\n if (this.autoInstrument.dom && !(oldSettings && oldSettings.dom)) {\n this.instrumentDom();\n } else if (!this.autoInstrument.dom && oldSettings && oldSettings.dom) {\n this.deinstrumentDom();\n }\n\n if (this.autoInstrument.navigation && !(oldSettings && oldSettings.navigation)) {\n this.instrumentNavigation();\n } else if (!this.autoInstrument.navigation && oldSettings && oldSettings.navigation) {\n this.deinstrumentNavigation();\n }\n\n if (this.autoInstrument.connectivity && !(oldSettings && oldSettings.connectivity)) {\n this.instrumentConnectivity();\n } else if (!this.autoInstrument.connectivity && oldSettings && oldSettings.connectivity) {\n this.deinstrumentConnectivity();\n }\n\n if (this.autoInstrument.contentSecurityPolicy && !(oldSettings && oldSettings.contentSecurityPolicy)) {\n this.instrumentContentSecurityPolicy();\n } else if (!this.autoInstrument.contentSecurityPolicy && oldSettings && oldSettings.contentSecurityPolicy) {\n this.deinstrumentContentSecurityPolicy();\n }\n};\n\nInstrumenter.prototype.deinstrumentNetwork = function() {\n restore(this.replacements, 'network');\n};\n\nInstrumenter.prototype.instrumentNetwork = function() {\n var self = this;\n\n function wrapProp(prop, xhr) {\n if (prop in xhr && _.isFunction(xhr[prop])) {\n replace(xhr, prop, function(orig) {\n return self.rollbar.wrap(orig);\n });\n }\n }\n\n if ('XMLHttpRequest' in this._window) {\n var xhrp = this._window.XMLHttpRequest.prototype;\n replace(xhrp, 'open', function(orig) {\n return function(method, url) {\n var isUrlObject = _isUrlObject(url)\n if (_.isType(url, 'string') || isUrlObject) {\n url = isUrlObject ? url.toString() : url;\n if (this.__rollbar_xhr) {\n this.__rollbar_xhr.method = method;\n this.__rollbar_xhr.url = url;\n this.__rollbar_xhr.status_code = null;\n this.__rollbar_xhr.start_time_ms = _.now();\n this.__rollbar_xhr.end_time_ms = null;\n } else {\n this.__rollbar_xhr = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'setRequestHeader', function(orig) {\n return function(header, value) {\n // If xhr.open is async, __rollbar_xhr may not be initialized yet.\n if (!this.__rollbar_xhr) {\n this.__rollbar_xhr = {};\n }\n if (_.isType(header, 'string') && _.isType(value, 'string')) {\n if (self.autoInstrument.networkRequestHeaders) {\n if (!this.__rollbar_xhr.request_headers) {\n this.__rollbar_xhr.request_headers = {};\n }\n this.__rollbar_xhr.request_headers[header] = value;\n }\n // We want the content type even if request header telemetry is off.\n if (header.toLowerCase() === 'content-type') {\n this.__rollbar_xhr.request_content_type = value;\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'send', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(data) {\n /* eslint-enable no-unused-vars */\n var xhr = this;\n\n function onreadystatechangeHandler() {\n if (xhr.__rollbar_xhr) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n if (self.autoInstrument.networkRequestBody) {\n xhr.__rollbar_xhr.request = data;\n }\n xhr.__rollbar_event = self.captureNetwork(xhr.__rollbar_xhr, 'xhr', undefined);\n }\n if (xhr.readyState < 2) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n }\n if (xhr.readyState > 3) {\n xhr.__rollbar_xhr.end_time_ms = _.now();\n\n var headers = null;\n xhr.__rollbar_xhr.response_content_type = xhr.getResponseHeader('Content-Type');\n if (self.autoInstrument.networkResponseHeaders) {\n var headersConfig = self.autoInstrument.networkResponseHeaders;\n headers = {};\n try {\n var header, i;\n if (headersConfig === true) {\n var allHeaders = xhr.getAllResponseHeaders();\n if (allHeaders) {\n var arr = allHeaders.trim().split(/[\\r\\n]+/);\n var parts, value;\n for (i=0; i < arr.length; i++) {\n parts = arr[i].split(': ');\n header = parts.shift();\n value = parts.join(': ');\n headers[header] = value;\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n header = headersConfig[i];\n headers[header] = xhr.getResponseHeader(header);\n }\n }\n } catch (e) {\n /* we ignore the errors here that could come from different\n * browser issues with the xhr methods */\n }\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n try {\n body = xhr.responseText;\n } catch (e) {\n /* ignore errors from reading responseText */\n }\n }\n var response = null;\n if (body || headers) {\n response = {};\n if (body) {\n if (self.isJsonContentType(xhr.__rollbar_xhr.response_content_type)) {\n response.body = self.scrubJson(body);\n } else {\n response.body = body;\n }\n }\n if (headers) {\n response.headers = headers;\n }\n }\n if (response) {\n xhr.__rollbar_xhr.response = response;\n }\n try {\n var code = xhr.status;\n code = code === 1223 ? 204 : code;\n xhr.__rollbar_xhr.status_code = code;\n xhr.__rollbar_event.level = self.telemeter.levelFromStatus(code);\n self.errorOnHttpStatus(xhr.__rollbar_xhr);\n } catch (e) {\n /* ignore possible exception from xhr.status */\n }\n }\n }\n }\n\n wrapProp('onload', xhr);\n wrapProp('onerror', xhr);\n wrapProp('onprogress', xhr);\n\n if ('onreadystatechange' in xhr && _.isFunction(xhr.onreadystatechange)) {\n replace(xhr, 'onreadystatechange', function(orig) {\n return self.rollbar.wrap(orig, undefined, onreadystatechangeHandler);\n });\n } else {\n xhr.onreadystatechange = onreadystatechangeHandler;\n }\n if (xhr.__rollbar_xhr && self.trackHttpErrors()) {\n xhr.__rollbar_xhr.stack = (new Error()).stack;\n }\n return orig.apply(this, arguments);\n }\n }, this.replacements, 'network');\n }\n\n if ('fetch' in this._window) {\n replace(this._window, 'fetch', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(fn, t) {\n /* eslint-enable no-unused-vars */\n var args = new Array(arguments.length);\n for (var i=0, len=args.length; i < len; i++) {\n args[i] = arguments[i];\n }\n var input = args[0];\n var method = 'GET';\n var url;\n var isUrlObject = _isUrlObject(input)\n if (_.isType(input, 'string') || isUrlObject) {\n url = isUrlObject ? input.toString() : input;\n } else if (input) {\n url = input.url;\n if (input.method) {\n method = input.method;\n }\n }\n if (args[1] && args[1].method) {\n method = args[1].method;\n }\n var metadata = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n if (args[1] && args[1].headers) {\n // Argument may be a Headers object, or plain object. Ensure here that\n // we are working with a Headers object with case-insensitive keys.\n var reqHeaders = headers(args[1].headers);\n\n metadata.request_content_type = reqHeaders.get('Content-Type');\n\n if (self.autoInstrument.networkRequestHeaders) {\n metadata.request_headers = self.fetchHeaders(reqHeaders, self.autoInstrument.networkRequestHeaders)\n }\n }\n\n if (self.autoInstrument.networkRequestBody) {\n if (args[1] && args[1].body) {\n metadata.request = args[1].body;\n } else if (args[0] && !_.isType(args[0], 'string') && args[0].body) {\n metadata.request = args[0].body;\n }\n }\n self.captureNetwork(metadata, 'fetch', undefined);\n if (self.trackHttpErrors()) {\n metadata.stack = (new Error()).stack;\n }\n\n // Start our handler before returning the promise. This allows resp.clone()\n // to execute before other handlers touch the response.\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n metadata.response_content_type = resp.headers.get('Content-Type');\n var headers = null;\n if (self.autoInstrument.networkResponseHeaders) {\n headers = self.fetchHeaders(resp.headers, self.autoInstrument.networkResponseHeaders);\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n if (typeof resp.text === 'function') { // Response.text() is not implemented on some platforms\n // The response must be cloned to prevent reading (and locking) the original stream.\n // This must be done before other handlers touch the response.\n body = resp.clone().text(); //returns a Promise\n }\n }\n if (headers || body) {\n metadata.response = {};\n if (body) {\n // Test to ensure body is a Promise, which it should always be.\n if (typeof body.then === 'function') {\n body.then(function (text) {\n if (text && self.isJsonContentType(metadata.response_content_type)) {\n metadata.response.body = self.scrubJson(text);\n } else {\n metadata.response.body = text;\n }\n });\n } else {\n metadata.response.body = body;\n }\n }\n if (headers) {\n metadata.response.headers = headers;\n }\n }\n self.errorOnHttpStatus(metadata);\n return resp;\n });\n };\n }, this.replacements, 'network');\n }\n};\n\nInstrumenter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID) {\n if (metadata.request && this.isJsonContentType(metadata.request_content_type)) {\n metadata.request = this.scrubJson(metadata.request);\n }\n return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);\n};\n\nInstrumenter.prototype.isJsonContentType = function(contentType) {\n return (contentType && _.isType(contentType, 'string') && contentType.toLowerCase().includes('json')) ? true : false;\n}\n\nInstrumenter.prototype.scrubJson = function(json) {\n return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));\n}\n\nInstrumenter.prototype.fetchHeaders = function(inHeaders, headersConfig) {\n var outHeaders = {};\n try {\n var i;\n if (headersConfig === true) {\n if (typeof inHeaders.entries === 'function') { // Headers.entries() is not implemented in IE\n var allHeaders = inHeaders.entries();\n var currentHeader = allHeaders.next();\n while (!currentHeader.done) {\n outHeaders[currentHeader.value[0]] = currentHeader.value[1];\n currentHeader = allHeaders.next();\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n var header = headersConfig[i];\n outHeaders[header] = inHeaders.get(header);\n }\n }\n } catch (e) {\n /* ignore probable IE errors */\n }\n return outHeaders;\n}\n\nInstrumenter.prototype.trackHttpErrors = function() {\n return this.autoInstrument.networkErrorOnHttp5xx ||\n this.autoInstrument.networkErrorOnHttp4xx ||\n this.autoInstrument.networkErrorOnHttp0;\n}\n\nInstrumenter.prototype.errorOnHttpStatus = function(metadata) {\n var status = metadata.status_code;\n\n if ((status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||\n (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||\n (status === 0 && this.autoInstrument.networkErrorOnHttp0)) {\n var error = new Error('HTTP request failed with Status ' + status);\n error.stack = metadata.stack;\n this.rollbar.error(error, { skipFrames: 1 });\n }\n}\n\nInstrumenter.prototype.deinstrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n var b;\n while (this.replacements['log'].length) {\n b = this.replacements['log'].shift();\n this._window.console[b[0]] = b[1];\n }\n};\n\nInstrumenter.prototype.instrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n\n var self = this;\n var c = this._window.console;\n\n function wrapConsole(method) {\n 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778\n\n var orig = c[method];\n var origConsole = c;\n var level = method === 'warn' ? 'warning' : method;\n c[method] = function() {\n var args = Array.prototype.slice.call(arguments);\n var message = _.formatArgsAsString(args);\n self.telemeter.captureLog(message, level);\n if (orig) {\n Function.prototype.apply.call(orig, origConsole, args);\n }\n };\n self.replacements['log'].push([method, orig]);\n }\n var methods = ['debug','info','warn','error','log'];\n try {\n for (var i=0, len=methods.length; i < len; i++) {\n wrapConsole(methods[i]);\n }\n } catch (e) {\n this.diagnostic.instrumentConsole = { error: e.message };\n }\n};\n\nInstrumenter.prototype.deinstrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n this.removeListeners('dom');\n};\n\nInstrumenter.prototype.instrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n var clickHandler = this.handleClick.bind(this);\n var blurHandler = this.handleBlur.bind(this);\n this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);\n this.addListener('dom', this._window, 'blur', 'onfocusout', blurHandler, true);\n};\n\nInstrumenter.prototype.handleClick = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n var hasTag = e && e.tagName;\n var anchorOrButton = domUtil.isDescribedElement(e, 'a') || domUtil.isDescribedElement(e, 'button');\n if (hasTag && (anchorOrButton || domUtil.isDescribedElement(e, 'input', ['button', 'submit']))) {\n this.captureDomEvent('click', e);\n } else if (domUtil.isDescribedElement(e, 'input', ['checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value, e.checked);\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleBlur = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n if (e && e.tagName) {\n if (domUtil.isDescribedElement(e, 'textarea')) {\n this.captureDomEvent('input', e, e.value);\n } else if (domUtil.isDescribedElement(e, 'select') && e.options && e.options.length) {\n this.handleSelectInputChanged(e);\n } else if (domUtil.isDescribedElement(e, 'input') && !domUtil.isDescribedElement(e, 'input', ['button', 'submit', 'hidden', 'checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value);\n }\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleSelectInputChanged = function(elem) {\n if (elem.multiple) {\n for (var i = 0; i < elem.options.length; i++) {\n if (elem.options[i].selected) {\n this.captureDomEvent('input', elem, elem.options[i].value);\n }\n }\n } else if (elem.selectedIndex >= 0 && elem.options[elem.selectedIndex]) {\n this.captureDomEvent('input', elem, elem.options[elem.selectedIndex].value);\n }\n};\n\nInstrumenter.prototype.captureDomEvent = function(subtype, element, value, isChecked) {\n if (value !== undefined) {\n if (this.scrubTelemetryInputs || (domUtil.getElementType(element) === 'password')) {\n value = '[scrubbed]';\n } else {\n var description = domUtil.describeElement(element);\n if (this.telemetryScrubber) {\n if (this.telemetryScrubber(description)) {\n value = '[scrubbed]';\n }\n } else if (this.defaultValueScrubber(description)) {\n value = '[scrubbed]';\n }\n }\n }\n var elementString = domUtil.elementArrayToString(domUtil.treeToArray(element));\n this.telemeter.captureDom(subtype, elementString, value, isChecked);\n};\n\nInstrumenter.prototype.deinstrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n restore(this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.instrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n var self = this;\n replace(this._window, 'onpopstate', function(orig) {\n return function() {\n var current = self._location.href;\n self.handleUrlChange(self._lastHref, current);\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n }, this.replacements, 'navigation');\n\n replace(this._window.history, 'pushState', function(orig) {\n return function() {\n var url = arguments.length > 2 ? arguments[2] : undefined;\n if (url) {\n self.handleUrlChange(self._lastHref, url + '');\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.handleUrlChange = function(from, to) {\n var parsedHref = urlparser.parse(this._location.href);\n var parsedTo = urlparser.parse(to);\n var parsedFrom = urlparser.parse(from);\n this._lastHref = to;\n if (parsedHref.protocol === parsedTo.protocol && parsedHref.host === parsedTo.host) {\n to = parsedTo.path + (parsedTo.hash || '');\n }\n if (parsedHref.protocol === parsedFrom.protocol && parsedHref.host === parsedFrom.host) {\n from = parsedFrom.path + (parsedFrom.hash || '');\n }\n this.telemeter.captureNavigation(from, to);\n};\n\nInstrumenter.prototype.deinstrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.removeListeners('connectivity');\n } else {\n restore(this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.instrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.addListener('connectivity', this._window, 'online', undefined, function() {\n this.telemeter.captureConnectivityChange('online');\n }.bind(this), true);\n this.addListener('connectivity', this._window, 'offline', undefined, function() {\n this.telemeter.captureConnectivityChange('offline');\n }.bind(this), true);\n } else {\n var self = this;\n replace(this._document.body, 'ononline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('online');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n replace(this._document.body, 'onoffline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('offline');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.handleCspEvent = function(cspEvent) {\n var message = 'Security Policy Violation: ' +\n 'blockedURI: ' + cspEvent.blockedURI + ', ' +\n 'violatedDirective: ' + cspEvent.violatedDirective + ', ' +\n 'effectiveDirective: ' + cspEvent.effectiveDirective + ', ';\n\n if (cspEvent.sourceFile) {\n message += 'location: ' + cspEvent.sourceFile + ', ' +\n 'line: ' + cspEvent.lineNumber + ', ' +\n 'col: ' + cspEvent.columnNumber + ', ';\n }\n\n message += 'originalPolicy: ' + cspEvent.originalPolicy;\n\n this.telemeter.captureLog(message, 'error');\n this.handleCspError(message);\n}\n\nInstrumenter.prototype.handleCspError = function(message) {\n if (this.autoInstrument.errorOnContentSecurityPolicy) {\n this.rollbar.error(message);\n }\n}\n\nInstrumenter.prototype.deinstrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._document)) { return; }\n\n this.removeListeners('contentsecuritypolicy');\n};\n\nInstrumenter.prototype.instrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._document)) { return; }\n\n var cspHandler = this.handleCspEvent.bind(this);\n this.addListener('contentsecuritypolicy', this._document, 'securitypolicyviolation', null, cspHandler, false);\n};\n\nInstrumenter.prototype.addListener = function(section, obj, type, altType, handler, capture) {\n if (obj.addEventListener) {\n obj.addEventListener(type, handler, capture);\n this.eventRemovers[section].push(function() {\n obj.removeEventListener(type, handler, capture);\n });\n } else if (altType) {\n obj.attachEvent(altType, handler);\n this.eventRemovers[section].push(function() {\n obj.detachEvent(altType, handler);\n });\n }\n};\n\nInstrumenter.prototype.removeListeners = function(section) {\n var r;\n while (this.eventRemovers[section].length) {\n r = this.eventRemovers[section].shift();\n r();\n }\n};\n\nfunction _isUrlObject(input) {\n return typeof URL !== 'undefined' && input instanceof URL\n}\n\nmodule.exports = Instrumenter;\n","'use strict';\n\n/*\n * headers - Detect when fetch Headers are undefined and use a partial polyfill.\n *\n * A full polyfill is not used in order to keep package size as small as possible.\n * Since this is only used internally and is not added to the window object,\n * the full interface doesn't need to be supported.\n *\n * This implementation is modified from whatwg-fetch:\n * https://github.com/github/fetch\n */\nfunction headers(headers) {\n if (typeof Headers === 'undefined') {\n return new FetchHeaders(headers);\n }\n\n return new Headers(headers);\n}\n\nfunction normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name)\n }\n return name.toLowerCase()\n}\n\nfunction normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value)\n }\n return value\n}\n\nfunction iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n return iterator\n}\n\nfunction FetchHeaders(headers) {\n this.map = {}\n\n if (headers instanceof FetchHeaders) {\n headers.forEach(function(value, name) {\n this.append(name, value)\n }, this)\n } else if (Array.isArray(headers)) {\n headers.forEach(function(header) {\n this.append(header[0], header[1])\n }, this)\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function(name) {\n this.append(name, headers[name])\n }, this)\n }\n}\n\nFetchHeaders.prototype.append = function(name, value) {\n name = normalizeName(name)\n value = normalizeValue(value)\n var oldValue = this.map[name]\n this.map[name] = oldValue ? oldValue + ', ' + value : value\n}\n\nFetchHeaders.prototype.get = function(name) {\n name = normalizeName(name)\n return this.has(name) ? this.map[name] : null\n}\n\nFetchHeaders.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n}\n\nFetchHeaders.prototype.forEach = function(callback, thisArg) {\n for (var name in this.map) {\n if (this.map.hasOwnProperty(name)) {\n callback.call(thisArg, this.map[name], name, this)\n }\n }\n}\n\nFetchHeaders.prototype.entries = function() {\n var items = []\n this.forEach(function(value, name) {\n items.push([name, value])\n })\n return iteratorFor(items)\n}\n\nmodule.exports = headers;\n","'use strict';\n\nfunction getElementType(e) {\n return (e.getAttribute('type') || '').toLowerCase();\n}\n\nfunction isDescribedElement(element, type, subtypes) {\n if (element.tagName.toLowerCase() !== type.toLowerCase()) {\n return false;\n }\n if (!subtypes) {\n return true;\n }\n element = getElementType(element);\n for (var i = 0; i < subtypes.length; i++) {\n if (subtypes[i] === element) {\n return true;\n }\n }\n return false;\n}\n\nfunction getElementFromEvent(evt, doc) {\n if (evt.target) {\n return evt.target;\n }\n if (doc && doc.elementFromPoint) {\n return doc.elementFromPoint(evt.clientX, evt.clientY);\n }\n return undefined;\n}\n\nfunction treeToArray(elem) {\n var MAX_HEIGHT = 5;\n var out = [];\n var nextDescription;\n for (var height = 0; elem && height < MAX_HEIGHT; height++) {\n nextDescription = describeElement(elem);\n if (nextDescription.tagName === 'html') {\n break;\n }\n out.unshift(nextDescription);\n elem = elem.parentNode;\n }\n return out;\n}\n\nfunction elementArrayToString(a) {\n var MAX_LENGTH = 80;\n var separator = ' > ', separatorLength = separator.length;\n var out = [], len = 0, nextStr, totalLength;\n\n for (var i = a.length - 1; i >= 0; i--) {\n nextStr = descriptionToString(a[i]);\n totalLength = len + (out.length * separatorLength) + nextStr.length;\n if (i < a.length - 1 && totalLength >= MAX_LENGTH + 3) {\n out.unshift('...');\n break;\n }\n out.unshift(nextStr);\n len += nextStr.length;\n }\n return out.join(separator);\n}\n\nfunction descriptionToString(desc) {\n if (!desc || !desc.tagName) {\n return '';\n }\n var out = [desc.tagName];\n if (desc.id) {\n out.push('#' + desc.id);\n }\n if (desc.classes) {\n out.push('.' + desc.classes.join('.'));\n }\n for (var i = 0; i < desc.attributes.length; i++) {\n out.push('[' + desc.attributes[i].key + '=\"' + desc.attributes[i].value + '\"]');\n }\n\n return out.join('');\n}\n\n/**\n * Input: a dom element\n * Output: null if tagName is falsey or input is falsey, else\n * {\n * tagName: String,\n * id: String | undefined,\n * classes: [String] | undefined,\n * attributes: [\n * {\n * key: OneOf(type, name, title, alt),\n * value: String\n * }\n * ]\n * }\n */\nfunction describeElement(elem) {\n if (!elem || !elem.tagName) {\n return null;\n }\n var out = {}, className, key, attr, i;\n out.tagName = elem.tagName.toLowerCase();\n if (elem.id) {\n out.id = elem.id;\n }\n className = elem.className;\n if (className && (typeof className === 'string')) {\n out.classes = className.split(/\\s+/);\n }\n var attributes = ['type', 'name', 'title', 'alt'];\n out.attributes = [];\n for (i = 0; i < attributes.length; i++) {\n key = attributes[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.attributes.push({key: key, value: attr});\n }\n }\n return out;\n}\n\nmodule.exports = {\n describeElement: describeElement,\n descriptionToString: descriptionToString,\n elementArrayToString: elementArrayToString,\n treeToArray: treeToArray,\n getElementFromEvent: getElementFromEvent,\n isDescribedElement: isDescribedElement,\n getElementType: getElementType\n};\n","'use strict';\n\nvar polyfillJSON = require('../../vendor/JSON-js/json3');\n\nmodule.exports = polyfillJSON;\n","// json3.js\n// 2017-02-21\n// Public Domain.\n// NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.\n// See http://www.JSON.org/js.html\n// This code should be minified before deployment.\n// See http://javascript.crockford.com/jsmin.html\n\n// USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO\n// NOT CONTROL.\n\n// This file creates a global JSON object containing two methods: stringify\n// and parse. This file provides the ES5 JSON capability to ES3 systems.\n// If a project might run on IE8 or earlier, then this file should be included.\n// This file does nothing on ES5 systems.\n\n// JSON.stringify(value, replacer, space)\n// value any JavaScript value, usually an object or array.\n// replacer an optional parameter that determines how object\n// values are stringified for objects. It can be a\n// function or an array of strings.\n// space an optional parameter that specifies the indentation\n// of nested structures. If it is omitted, the text will\n// be packed without extra whitespace. If it is a number,\n// it will specify the number of spaces to indent at each\n// level. If it is a string (such as \"\\t\" or \" \"),\n// it contains the characters used to indent at each level.\n// This method produces a JSON text from a JavaScript value.\n// When an object value is found, if the object contains a toJSON\n// method, its toJSON method will be called and the result will be\n// stringified. A toJSON method does not serialize: it returns the\n// value represented by the name/value pair that should be serialized,\n// or undefined if nothing should be serialized. The toJSON method\n// will be passed the key associated with the value, and this will be\n// bound to the value.\n\n// For example, this would serialize Dates as ISO strings.\n\n// Date.prototype.toJSON = function (key) {\n// function f(n) {\n// // Format integers to have at least two digits.\n// return (n < 10)\n// ? \"0\" + n\n// : n;\n// }\n// return this.getUTCFullYear() + \"-\" +\n// f(this.getUTCMonth() + 1) + \"-\" +\n// f(this.getUTCDate()) + \"T\" +\n// f(this.getUTCHours()) + \":\" +\n// f(this.getUTCMinutes()) + \":\" +\n// f(this.getUTCSeconds()) + \"Z\";\n// };\n\n// You can provide an optional replacer method. It will be passed the\n// key and value of each member, with this bound to the containing\n// object. The value that is returned from your method will be\n// serialized. If your method returns undefined, then the member will\n// be excluded from the serialization.\n\n// If the replacer parameter is an array of strings, then it will be\n// used to select the members to be serialized. It filters the results\n// such that only members with keys listed in the replacer array are\n// stringified.\n\n// Values that do not have JSON representations, such as undefined or\n// functions, will not be serialized. Such values in objects will be\n// dropped; in arrays they will be replaced with null. You can use\n// a replacer function to replace those with JSON values.\n\n// JSON.stringify(undefined) returns undefined.\n\n// The optional space parameter produces a stringification of the\n// value that is filled with line breaks and indentation to make it\n// easier to read.\n\n// If the space parameter is a non-empty string, then that string will\n// be used for indentation. If the space parameter is a number, then\n// the indentation will be that many spaces.\n\n// Example:\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}]);\n// // text is '[\"e\",{\"pluribus\":\"unum\"}]'\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}], null, \"\\t\");\n// // text is '[\\n\\t\"e\",\\n\\t{\\n\\t\\t\"pluribus\": \"unum\"\\n\\t}\\n]'\n\n// text = JSON.stringify([new Date()], function (key, value) {\n// return this[key] instanceof Date\n// ? \"Date(\" + this[key] + \")\"\n// : value;\n// });\n// // text is '[\"Date(---current time---)\"]'\n\n// JSON.parse(text, reviver)\n// This method parses a JSON text to produce an object or array.\n// It can throw a SyntaxError exception.\n// This has been modified to use JSON-js/json_parse_state.js as the\n// parser instead of the one built around eval found in JSON-js/json2.js\n\n// The optional reviver parameter is a function that can filter and\n// transform the results. It receives each of the keys and values,\n// and its return value is used instead of the original value.\n// If it returns what it received, then the structure is not modified.\n// If it returns undefined then the member is deleted.\n\n// Example:\n\n// // Parse the text. Values that look like ISO date strings will\n// // be converted to Date objects.\n\n// myData = JSON.parse(text, function (key, value) {\n// var a;\n// if (typeof value === \"string\") {\n// a =\n// /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2}(?:\\.\\d*)?)Z$/.exec(value);\n// if (a) {\n// return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],\n// +a[5], +a[6]));\n// }\n// }\n// return value;\n// });\n\n// myData = JSON.parse('[\"Date(09/09/2001)\"]', function (key, value) {\n// var d;\n// if (typeof value === \"string\" &&\n// value.slice(0, 5) === \"Date(\" &&\n// value.slice(-1) === \")\") {\n// d = new Date(value.slice(5, -1));\n// if (d) {\n// return d;\n// }\n// }\n// return value;\n// });\n\n// This is a reference implementation. You are free to copy, modify, or\n// redistribute.\n\n/*jslint\n for, this\n */\n\n/*property\n JSON, apply, call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,\n getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,\n lastIndex, length, parse, prototype, push, replace, slice, stringify,\n test, toJSON, toString, valueOf\n */\n\nvar setupCustomJSON = function(JSON) {\n\n var rx_one = /^[\\],:{}\\s]*$/;\n var rx_two = /\\\\(?:[\"\\\\\\/bfnrt]|u[0-9a-fA-F]{4})/g;\n var rx_three = /\"[^\"\\\\\\n\\r]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g;\n var rx_four = /(?:^|:|,)(?:\\s*\\[)+/g;\n var rx_escapable = /[\\\\\"\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n var rx_dangerous = /[\\u0000\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n\n function f(n) {\n // Format integers to have at least two digits.\n return n < 10\n ? \"0\" + n\n : n;\n }\n\n function this_value() {\n return this.valueOf();\n }\n\n if (typeof Date.prototype.toJSON !== \"function\") {\n\n Date.prototype.toJSON = function () {\n\n return isFinite(this.valueOf())\n ? this.getUTCFullYear() + \"-\" +\n f(this.getUTCMonth() + 1) + \"-\" +\n f(this.getUTCDate()) + \"T\" +\n f(this.getUTCHours()) + \":\" +\n f(this.getUTCMinutes()) + \":\" +\n f(this.getUTCSeconds()) + \"Z\"\n : null;\n };\n\n Boolean.prototype.toJSON = this_value;\n Number.prototype.toJSON = this_value;\n String.prototype.toJSON = this_value;\n }\n\n var gap;\n var indent;\n var meta;\n var rep;\n\n\n function quote(string) {\n\n // If the string contains no control characters, no quote characters, and no\n // backslash characters, then we can safely slap some quotes around it.\n // Otherwise we must also replace the offending characters with safe escape\n // sequences.\n\n rx_escapable.lastIndex = 0;\n return rx_escapable.test(string)\n ? \"\\\"\" + string.replace(rx_escapable, function (a) {\n var c = meta[a];\n return typeof c === \"string\"\n ? c\n : \"\\\\u\" + (\"0000\" + a.charCodeAt(0).toString(16)).slice(-4);\n }) + \"\\\"\"\n : \"\\\"\" + string + \"\\\"\";\n }\n\n\n function str(key, holder) {\n\n // Produce a string from holder[key].\n\n var i; // The loop counter.\n var k; // The member key.\n var v; // The member value.\n var length;\n var mind = gap;\n var partial;\n var value = holder[key];\n\n // If the value has a toJSON method, call it to obtain a replacement value.\n\n if (value && typeof value === \"object\" &&\n typeof value.toJSON === \"function\") {\n value = value.toJSON(key);\n }\n\n // If we were called with a replacer function, then call the replacer to\n // obtain a replacement value.\n\n if (typeof rep === \"function\") {\n value = rep.call(holder, key, value);\n }\n\n // What happens next depends on the value's type.\n\n switch (typeof value) {\n case \"string\":\n return quote(value);\n\n case \"number\":\n\n // JSON numbers must be finite. Encode non-finite numbers as null.\n\n return isFinite(value)\n ? String(value)\n : \"null\";\n\n case \"boolean\":\n case \"null\":\n\n // If the value is a boolean or null, convert it to a string. Note:\n // typeof null does not produce \"null\". The case is included here in\n // the remote chance that this gets fixed someday.\n\n return String(value);\n\n // If the type is \"object\", we might be dealing with an object or an array or\n // null.\n\n case \"object\":\n\n // Due to a specification blunder in ECMAScript, typeof null is \"object\",\n // so watch out for that case.\n\n if (!value) {\n return \"null\";\n }\n\n // Make an array to hold the partial results of stringifying this object value.\n\n gap += indent;\n partial = [];\n\n // Is the value an array?\n\n if (Object.prototype.toString.apply(value) === \"[object Array]\") {\n\n // The value is an array. Stringify every element. Use null as a placeholder\n // for non-JSON values.\n\n length = value.length;\n for (i = 0; i < length; i += 1) {\n partial[i] = str(i, value) || \"null\";\n }\n\n // Join all of the elements together, separated with commas, and wrap them in\n // brackets.\n\n v = partial.length === 0\n ? \"[]\"\n : gap\n ? \"[\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"]\"\n : \"[\" + partial.join(\",\") + \"]\";\n gap = mind;\n return v;\n }\n\n // If the replacer is an array, use it to select the members to be stringified.\n\n if (rep && typeof rep === \"object\") {\n length = rep.length;\n for (i = 0; i < length; i += 1) {\n if (typeof rep[i] === \"string\") {\n k = rep[i];\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n } else {\n\n // Otherwise, iterate through all of the keys in the object.\n\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(value, k)) {\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n }\n\n // Join all of the member texts together, separated with commas,\n // and wrap them in braces.\n\n v = partial.length === 0\n ? \"{}\"\n : gap\n ? \"{\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"}\"\n : \"{\" + partial.join(\",\") + \"}\";\n gap = mind;\n return v;\n }\n }\n\n // If the JSON object does not yet have a stringify method, give it one.\n\n if (typeof JSON.stringify !== \"function\") {\n meta = { // table of character substitutions\n \"\\b\": \"\\\\b\",\n \"\\t\": \"\\\\t\",\n \"\\n\": \"\\\\n\",\n \"\\f\": \"\\\\f\",\n \"\\r\": \"\\\\r\",\n \"\\\"\": \"\\\\\\\"\",\n \"\\\\\": \"\\\\\\\\\"\n };\n JSON.stringify = function (value, replacer, space) {\n\n // The stringify method takes a value and an optional replacer, and an optional\n // space parameter, and returns a JSON text. The replacer can be a function\n // that can replace values, or an array of strings that will select the keys.\n // A default replacer method can be provided. Use of the space parameter can\n // produce text that is more easily readable.\n\n var i;\n gap = \"\";\n indent = \"\";\n\n // If the space parameter is a number, make an indent string containing that\n // many spaces.\n\n if (typeof space === \"number\") {\n for (i = 0; i < space; i += 1) {\n indent += \" \";\n }\n\n // If the space parameter is a string, it will be used as the indent string.\n\n } else if (typeof space === \"string\") {\n indent = space;\n }\n\n // If there is a replacer, it must be a function or an array.\n // Otherwise, throw an error.\n\n rep = replacer;\n if (replacer && typeof replacer !== \"function\" &&\n (typeof replacer !== \"object\" ||\n typeof replacer.length !== \"number\")) {\n throw new Error(\"JSON.stringify\");\n }\n\n // Make a fake root object containing our value under the key of \"\".\n // Return the result of stringifying the value.\n\n return str(\"\", {\"\": value});\n };\n }\n\n\n // If the JSON object does not yet have a parse method, give it one.\n\n if (typeof JSON.parse !== \"function\") {\n JSON.parse = (function () {\n\n // This function creates a JSON parse function that uses a state machine rather\n // than the dangerous eval function to parse a JSON text.\n\n var state; // The state of the parser, one of\n // 'go' The starting state\n // 'ok' The final, accepting state\n // 'firstokey' Ready for the first key of the object or\n // the closing of an empty object\n // 'okey' Ready for the next key of the object\n // 'colon' Ready for the colon\n // 'ovalue' Ready for the value half of a key/value pair\n // 'ocomma' Ready for a comma or closing }\n // 'firstavalue' Ready for the first value of an array or\n // an empty array\n // 'avalue' Ready for the next value of an array\n // 'acomma' Ready for a comma or closing ]\n var stack; // The stack, for controlling nesting.\n var container; // The current container object or array\n var key; // The current key\n var value; // The current value\n var escapes = { // Escapement translation table\n \"\\\\\": \"\\\\\",\n \"\\\"\": \"\\\"\",\n \"/\": \"/\",\n \"t\": \"\\t\",\n \"n\": \"\\n\",\n \"r\": \"\\r\",\n \"f\": \"\\f\",\n \"b\": \"\\b\"\n };\n var string = { // The actions for string tokens\n go: function () {\n state = \"ok\";\n },\n firstokey: function () {\n key = value;\n state = \"colon\";\n },\n okey: function () {\n key = value;\n state = \"colon\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var number = { // The actions for number tokens\n go: function () {\n state = \"ok\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var action = {\n\n // The action table describes the behavior of the machine. It contains an\n // object for each token. Each object contains a method that is called when\n // a token is matched in a state. An object will lack a method for illegal\n // states.\n\n \"{\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = {};\n state = \"firstokey\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = {};\n state = \"firstokey\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n }\n },\n \"}\": {\n firstokey: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n ocomma: function () {\n var pop = stack.pop();\n container[key] = value;\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \"[\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = [];\n state = \"firstavalue\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = [];\n state = \"firstavalue\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n }\n },\n \"]\": {\n firstavalue: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n acomma: function () {\n var pop = stack.pop();\n container.push(value);\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \":\": {\n colon: function () {\n if (Object.hasOwnProperty.call(container, key)) {\n throw new SyntaxError(\"Duplicate key '\" + key + \"\\\"\");\n }\n state = \"ovalue\";\n }\n },\n \",\": {\n ocomma: function () {\n container[key] = value;\n state = \"okey\";\n },\n acomma: function () {\n container.push(value);\n state = \"avalue\";\n }\n },\n \"true\": {\n go: function () {\n value = true;\n state = \"ok\";\n },\n ovalue: function () {\n value = true;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = true;\n state = \"acomma\";\n },\n avalue: function () {\n value = true;\n state = \"acomma\";\n }\n },\n \"false\": {\n go: function () {\n value = false;\n state = \"ok\";\n },\n ovalue: function () {\n value = false;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = false;\n state = \"acomma\";\n },\n avalue: function () {\n value = false;\n state = \"acomma\";\n }\n },\n \"null\": {\n go: function () {\n value = null;\n state = \"ok\";\n },\n ovalue: function () {\n value = null;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = null;\n state = \"acomma\";\n },\n avalue: function () {\n value = null;\n state = \"acomma\";\n }\n }\n };\n\n function debackslashify(text) {\n\n // Remove and replace any backslash escapement.\n\n return text.replace(/\\\\(?:u(.{4})|([^u]))/g, function (ignore, b, c) {\n return b\n ? String.fromCharCode(parseInt(b, 16))\n : escapes[c];\n });\n }\n\n return function (source, reviver) {\n\n // A regular expression is used to extract tokens from the JSON text.\n // The extraction process is cautious.\n\n var result;\n var tx = /^[\\u0020\\t\\n\\r]*(?:([,:\\[\\]{}]|true|false|null)|(-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?)|\"((?:[^\\r\\n\\t\\\\\\\"]|\\\\(?:[\"\\\\\\/trnfb]|u[0-9a-fA-F]{4}))*)\")/;\n\n // Set the starting state.\n\n state = \"go\";\n\n // The stack records the container, key, and state for each object or array\n // that contains another object or array while processing nested structures.\n\n stack = [];\n\n // If any error occurs, we will catch it and ultimately throw a syntax error.\n\n try {\n\n // For each token...\n\n while (true) {\n result = tx.exec(source);\n if (!result) {\n break;\n }\n\n // result is the result array from matching the tokenizing regular expression.\n // result[0] contains everything that matched, including any initial whitespace.\n // result[1] contains any punctuation that was matched, or true, false, or null.\n // result[2] contains a matched number, still in string form.\n // result[3] contains a matched string, without quotes but with escapement.\n\n if (result[1]) {\n\n // Token: Execute the action for this state and token.\n\n action[result[1]][state]();\n\n } else if (result[2]) {\n\n // Number token: Convert the number string into a number value and execute\n // the action for this state and number.\n\n value = +result[2];\n number[state]();\n } else {\n\n // String token: Replace the escapement sequences and execute the action for\n // this state and string.\n\n value = debackslashify(result[3]);\n string[state]();\n }\n\n // Remove the token from the string. The loop will continue as long as there\n // are tokens. This is a slow process, but it allows the use of ^ matching,\n // which assures that no illegal tokens slip through.\n\n source = source.slice(result[0].length);\n }\n\n // If we find a state/token combination that is illegal, then the action will\n // cause an error. We handle the error by simply changing the state.\n\n } catch (e) {\n state = e;\n }\n\n // The parsing is finished. If we are not in the final \"ok\" state, or if the\n // remaining source contains anything except whitespace, then we did not have\n //a well-formed JSON text.\n\n if (state !== \"ok\" || (/[^\\u0020\\t\\n\\r]/.test(source))) {\n throw (state instanceof SyntaxError)\n ? state\n : new SyntaxError(\"JSON\");\n }\n\n // If there is a reviver function, we recursively walk the new structure,\n // passing each name/value pair to the reviver function for possible\n // transformation, starting with a temporary root object that holds the current\n // value in an empty key. If there is not a reviver function, we simply return\n // that value.\n\n return (typeof reviver === \"function\")\n ? (function walk(holder, key) {\n var k;\n var v;\n var val = holder[key];\n if (val && typeof val === \"object\") {\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(val, k)) {\n v = walk(val, k);\n if (v !== undefined) {\n val[k] = v;\n } else {\n delete val[k];\n }\n }\n }\n }\n return reviver.call(holder, key, val);\n }({\"\": value}, \"\"))\n : value;\n };\n }());\n }\n}\n\nmodule.exports = setupCustomJSON;\n","'use strict';\n\nfunction wrapGlobals(window, handler, shim) {\n if (!window) { return; }\n // Adapted from https://github.com/bugsnag/bugsnag-js\n var globals = 'EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload'.split(',');\n var i, global;\n for (i = 0; i < globals.length; ++i) {\n global = globals[i];\n\n if (window[global] && window[global].prototype) {\n _extendListenerPrototype(handler, window[global].prototype, shim);\n }\n }\n}\n\nfunction _extendListenerPrototype(handler, prototype, shim) {\n if (prototype.hasOwnProperty && prototype.hasOwnProperty('addEventListener')) {\n var oldAddEventListener = prototype.addEventListener;\n while (oldAddEventListener._rollbarOldAdd && oldAddEventListener.belongsToShim) {\n oldAddEventListener = oldAddEventListener._rollbarOldAdd;\n }\n var addFn = function(event, callback, bubble) {\n oldAddEventListener.call(this, event, handler.wrap(callback), bubble);\n };\n addFn._rollbarOldAdd = oldAddEventListener;\n addFn.belongsToShim = shim;\n prototype.addEventListener = addFn;\n\n var oldRemoveEventListener = prototype.removeEventListener;\n while (oldRemoveEventListener._rollbarOldRemove && oldRemoveEventListener.belongsToShim) {\n oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;\n }\n var removeFn = function(event, callback, bubble) {\n oldRemoveEventListener.call(this, event, callback && callback._rollbar_wrapped || callback, bubble);\n };\n removeFn._rollbarOldRemove = oldRemoveEventListener;\n removeFn.belongsToShim = shim;\n prototype.removeEventListener = removeFn;\n }\n}\n\nmodule.exports = wrapGlobals;\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction raw(payload, jsonBackup) {\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction selectFrames(frames, range) {\n var len = frames.length;\n if (len > range * 2) {\n return frames.slice(0, range).concat(frames.slice(len - range));\n }\n return frames;\n}\n\nfunction truncateFrames(payload, jsonBackup, range) {\n range = (typeof range === 'undefined') ? 30 : range;\n var body = payload.data.body;\n var frames;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n frames = chain[i].frames;\n frames = selectFrames(frames, range);\n chain[i].frames = frames;\n }\n } else if (body.trace) {\n frames = body.trace.frames;\n frames = selectFrames(frames, range);\n body.trace.frames = frames;\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction maybeTruncateValue(len, val) {\n if (!val) {\n return val;\n }\n if (val.length > len) {\n return val.slice(0, len - 3).concat('...');\n }\n return val;\n}\n\nfunction truncateStrings(len, payload, jsonBackup) {\n function truncator(k, v, seen) {\n switch (_.typeName(v)) {\n case 'string':\n return maybeTruncateValue(len, v);\n case 'object':\n case 'array':\n return traverse(v, truncator, seen);\n default:\n return v;\n }\n }\n payload = traverse(payload, truncator);\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction truncateTraceData(traceData) {\n if (traceData.exception) {\n delete traceData.exception.description;\n traceData.exception.message = maybeTruncateValue(255, traceData.exception.message);\n }\n traceData.frames = selectFrames(traceData.frames, 1);\n return traceData;\n}\n\nfunction minBody(payload, jsonBackup) {\n var body = payload.data.body;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n chain[i] = truncateTraceData(chain[i]);\n }\n } else if (body.trace) {\n body.trace = truncateTraceData(body.trace);\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction needsTruncation(payload, maxSize) {\n return _.maxByteSize(payload) > maxSize;\n}\n\nfunction truncate(payload, jsonBackup, maxSize) {\n maxSize = (typeof maxSize === 'undefined') ? (512 * 1024) : maxSize;\n var strategies = [\n raw,\n truncateFrames,\n truncateStrings.bind(null, 1024),\n truncateStrings.bind(null, 512),\n truncateStrings.bind(null, 256),\n minBody\n ];\n var strategy, results, result;\n\n while ((strategy = strategies.shift())) {\n results = strategy(payload, jsonBackup);\n payload = results[0];\n result = results[1];\n if (result.error || !needsTruncation(result.value, maxSize)) {\n return result;\n }\n }\n return result;\n}\n\nmodule.exports = {\n truncate: truncate,\n\n /* for testing */\n raw: raw,\n truncateFrames: truncateFrames,\n truncateStrings: truncateStrings,\n maybeTruncateValue: maybeTruncateValue\n};\n"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/rollbar.noconflict.umd.min.js b/dist/rollbar.noconflict.umd.min.js index db319cab4..59df712b7 100644 --- a/dist/rollbar.noconflict.umd.min.js +++ b/dist/rollbar.noconflict.umd.min.js @@ -1,2 +1 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.rollbar=e():t.rollbar=e()}(this,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=6)}([function(t,e,r){"use strict";var n=r(12),o={};function i(t,e){return e===s(t)}function s(t){var e=typeof t;return"object"!==e?e:t?t instanceof Error?"error":{}.toString.call(t).match(/\s([a-zA-Z]+)/)[1].toLowerCase():"null"}function a(t){return i(t,"function")}function u(t){var e=Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?"),r=RegExp("^"+e+"$");return c(t)&&r.test(t)}function c(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function l(){var t=y();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var r=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?r:7&r|8).toString(16)}))}var p={strictMode:!1,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};function f(t,e){var r,n;try{r=o.stringify(t)}catch(o){if(e&&a(e))try{r=e(t)}catch(t){n=t}else n=o}return{error:n,value:r}}function h(t,e){return function(r,n){try{e(r,n)}catch(e){t.error(e)}}}function d(t){return function t(e,r){var n,o,a,u={};try{for(o in e)(n=e[o])&&(i(n,"object")||i(n,"array"))?r.includes(n)?u[o]="Removed circular reference: "+s(n):((a=r.slice()).push(n),u[o]=t(n,a)):u[o]=n}catch(t){u="Failed cloning custom data: "+t.message}return u}(t,[t])}var m=["log","network","dom","navigation","error","manual"],g=["critical","error","warning","info","debug"];function v(t,e){for(var r=0;ra)?(s=e.path,e.path=s.substring(0,a)+i+"&"+s.substring(a+1)):-1!==u?(s=e.path,e.path=s.substring(0,u)+i+s.substring(u)):e.path=e.path+i},createItem:function(t,e,r,n,o){for(var i,a,u,c,p,f,m=[],g=[],v=0,b=t.length;v0&&(u||(u=d({})),u.extraArgs=d(m));var k={message:i,err:a,custom:u,timestamp:y(),callback:c,notifier:r,diagnostic:{},uuid:l()};return function(t,e){e&&void 0!==e.level&&(t.level=e.level,delete e.level);e&&void 0!==e.skipFrames&&(t.skipFrames=e.skipFrames,delete e.skipFrames)}(k,u),n&&p&&(k.request=p),o&&(k.lambdaContext=o),k._originalArgs=t,k.diagnostic.original_arg_types=g,k},addErrorContext:function(t,e){var r=t.data.custom||{},o=!1;try{for(var i=0;i2){var o=n.slice(0,3),i=o[2].indexOf("/");-1!==i&&(o[2]=o[2].substring(0,i));r=o.concat("0000:0000:0000:0000:0000").join(":")}}else r=null}catch(t){r=null}else r=null;t.user_ip=r}},formatArgsAsString:function(t){var e,r,n,o=[];for(e=0,r=t.length;e500&&(n=n.substr(0,497)+"...");break;case"null":n="null";break;case"undefined":n="undefined";break;case"symbol":n=n.toString()}o.push(n)}return o.join(" ")},formatUrl:function(t,e){if(!(e=e||t.protocol)&&t.port&&(80===t.port?e="http:":443===t.port&&(e="https:")),e=e||"https:",!t.hostname)return null;var r=e+"//"+t.hostname;return t.port&&(r=r+":"+t.port),t.path&&(r+=t.path),r},get:function(t,e){if(t){var r=e.split("."),n=t;try{for(var o=0,i=r.length;o=1&&r>e}function s(t,e,r,n,o,i,s){var a=null;return r&&(r=new Error(r)),r||n||(a=function(t,e,r,n,o){var i,s=e.environment||e.payload&&e.payload.environment;i=o?"item per minute limit reached, ignoring errors until timeout":"maxItems has been hit, ignoring errors until reset.";var a={body:{message:{body:i,extra:{maxItems:r,itemsPerMinute:n}}},language:"javascript",environment:s,notifier:{version:e.notifier&&e.notifier.version||e.version}};"browser"===t?(a.platform="browser",a.framework="browser-js",a.notifier.name="rollbar-browser-js"):"server"===t?(a.framework=e.framework||"node-js",a.notifier.name=e.notifier.name):"react-native"===t&&(a.framework=e.framework||"react-native",a.notifier.name=e.notifier.name);return a}(t,e,o,i,s)),{error:r,shouldSend:n,payload:a}}o.globalSettings={startTime:n.now(),maxItems:void 0,itemsPerMinute:void 0},o.prototype.configureGlobal=function(t){void 0!==t.startTime&&(o.globalSettings.startTime=t.startTime),void 0!==t.maxItems&&(o.globalSettings.maxItems=t.maxItems),void 0!==t.itemsPerMinute&&(o.globalSettings.itemsPerMinute=t.itemsPerMinute)},o.prototype.shouldSend=function(t,e){var r=(e=e||n.now())-this.startTime;(r<0||r>=6e4)&&(this.startTime=e,this.perMinCounter=0);var a=o.globalSettings.maxItems,u=o.globalSettings.itemsPerMinute;if(i(t,a,this.counter))return s(this.platform,this.platformOptions,a+" max items reached",!1);if(i(t,u,this.perMinCounter))return s(this.platform,this.platformOptions,u+" items per minute reached",!1);this.counter++,this.perMinCounter++;var c=!i(t,a,this.counter),l=c;return c=c&&!i(t,u,this.perMinCounter),s(this.platform,this.platformOptions,null,c,a,u,l)},o.prototype.setPlatformOptions=function(t,e){this.platform=t,this.platformOptions=e},t.exports=o},function(t,e,r){"use strict";var n=Object.prototype.hasOwnProperty,o=Object.prototype.toString,i=function(t){if(!t||"[object Object]"!==o.call(t))return!1;var e,r=n.call(t,"constructor"),i=t.constructor&&t.constructor.prototype&&n.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!r&&!i)return!1;for(e in t);return void 0===e||n.call(t,e)};t.exports=function t(){var e,r,n,o,s,a={},u=null,c=arguments.length;for(e=0;ethis.options.maxRetries&&(o=!1))}o?this._retryApiRequest(e,r):r(t)},o.prototype._retryApiRequest=function(t,e){this.retryQueue.push({item:t,callback:e}),this.retryHandle||(this.retryHandle=setInterval(function(){for(;this.retryQueue.length;){var t=this.retryQueue.shift();this._makeApiRequest(t.item,t.callback)}}.bind(this),this.options.retryInterval))},o.prototype._dequeuePendingRequest=function(t){var e=this.pendingRequests.indexOf(t);-1!==e&&(this.pendingRequests.splice(e,1),this._maybeCallWait())},o.prototype._maybeLog=function(t,e){if(this.logger&&this.options.verbose){var r=e;if(r=(r=r||n.get(t,"body.trace.exception.message"))||n.get(t,"body.trace_chain.0.exception.message"))return void this.logger.error(r);(r=n.get(t,"body.message.body"))&&this.logger.log(r)}},o.prototype._maybeCallWait=function(){return!(!n.isFunction(this.waitCallback)||0!==this.pendingItems.length||0!==this.pendingRequests.length)&&(this.waitIntervalID&&(this.waitIntervalID=clearInterval(this.waitIntervalID)),this.waitCallback(),!0)},t.exports=o},function(t,e,r){"use strict";var n=r(0);function o(t,e){this.queue=t,this.options=e,this.transforms=[],this.diagnostic={}}o.prototype.configure=function(t){this.queue&&this.queue.configure(t);var e=this.options;return this.options=n.merge(e,t),this},o.prototype.addTransform=function(t){return n.isFunction(t)&&this.transforms.push(t),this},o.prototype.log=function(t,e){if(e&&n.isFunction(e)||(e=function(){}),!this.options.enabled)return e(new Error("Rollbar is not enabled"));this.queue.addPendingItem(t);var r=t.err;this._applyTransforms(t,function(n,o){if(n)return this.queue.removePendingItem(t),e(n,null);this.queue.addItem(o,e,r,t)}.bind(this))},o.prototype._applyTransforms=function(t,e){var r=-1,n=this.transforms.length,o=this.transforms,i=this.options,s=function(t,a){t?e(t,null):++r!==n?o[r](a,i,s):e(null,a)};s(null,t)},t.exports=o},function(t,e,r){"use strict";var n=r(0),o=r(16),i={hostname:"api.rollbar.com",path:"/api/1/item/",search:null,version:"1",protocol:"https:",port:443};function s(t,e,r,n,o){this.options=t,this.transport=e,this.url=r,this.truncation=n,this.jsonBackup=o,this.accessToken=t.accessToken,this.transportOptions=a(t,r)}function a(t,e){return o.getTransportFromOptions(t,i,e)}s.prototype.postItem=function(t,e){var r=o.transportOptions(this.transportOptions,"POST"),n=o.buildPayload(this.accessToken,t,this.jsonBackup),i=this;setTimeout((function(){i.transport.post(i.accessToken,r,n,e)}),0)},s.prototype.buildJsonPayload=function(t,e){var r,i=o.buildPayload(this.accessToken,t,this.jsonBackup);return(r=this.truncation?this.truncation.truncate(i):n.stringify(i)).error?(e&&e(r.error),null):r.value},s.prototype.postJsonPayload=function(t,e){var r=o.transportOptions(this.transportOptions,"POST");this.transport.postJsonPayload(this.accessToken,r,t,e)},s.prototype.configure=function(t){var e=this.oldOptions;return this.options=n.merge(e,t),this.transportOptions=a(this.options,this.url),void 0!==this.options.accessToken&&(this.accessToken=this.options.accessToken),this},t.exports=s},function(t,e,r){"use strict";var n=r(0);t.exports={buildPayload:function(t,e,r){if(!n.isType(e.context,"string")){var o=n.stringify(e.context,r);o.error?e.context="Error: could not serialize 'context'":e.context=o.value||"",e.context.length>255&&(e.context=e.context.substr(0,255))}return{access_token:t,data:e}},getTransportFromOptions:function(t,e,r){var n=e.hostname,o=e.protocol,i=e.port,s=e.path,a=e.search,u=t.timeout,c=function(t){var e="undefined"!=typeof window&&window||"undefined"!=typeof self&&self,r=t.defaultTransport||"xhr";void 0===e.fetch&&(r="xhr");void 0===e.XMLHttpRequest&&(r="fetch");return r}(t),l=t.proxy;if(t.endpoint){var p=r.parse(t.endpoint);n=p.hostname,o=p.protocol,i=p.port,s=p.pathname,a=p.search}return{timeout:u,hostname:n,protocol:o,port:i,path:s,search:a,proxy:l,transport:c}},transportOptions:function(t,e){var r=t.protocol||"https:",n=t.port||("http:"===r?80:"https:"===r?443:void 0),o=t.hostname,i=t.path,s=t.timeout,a=t.transport;return t.search&&(i+=t.search),t.proxy&&(i=r+"//"+o+i,o=t.proxy.host||t.proxy.hostname,n=t.proxy.port,r=t.proxy.protocol||r),{timeout:s,protocol:r,hostname:o,path:i,port:n,method:e,transport:a}},appendPathToPath:function(t,e){var r=/\/$/.test(t),n=/^\//.test(e);return r&&n?e=e.substring(1):r||n||(e="/"+e),t+e}}},function(t,e){!function(t){"use strict";t.console||(t.console={});for(var e,r,n=t.console,o=function(){},i=["memory"],s="assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(",");e=i.pop();)n[e]||(n[e]={});for(;r=s.pop();)n[r]||(n[r]=o)}("undefined"==typeof window?this:window)},function(t,e,r){"use strict";var n={ieVersion:function(){if("undefined"!=typeof document){for(var t=3,e=document.createElement("div"),r=e.getElementsByTagName("i");e.innerHTML="\x3c!--[if gt IE "+ ++t+"]>4?t:void 0}}};t.exports=n},function(t,e,r){"use strict";function n(t,e,r,n){t._rollbarWrappedError&&(n[4]||(n[4]=t._rollbarWrappedError),n[5]||(n[5]=t._rollbarWrappedError._rollbarContext),t._rollbarWrappedError=null);var o=e.handleUncaughtException.apply(e,n);r&&r.apply(t,n),"anonymous"===o&&(e.anonymousErrorsPending+=1)}t.exports={captureUncaughtExceptions:function(t,e,r){if(t){var o;if("function"==typeof e._rollbarOldOnError)o=e._rollbarOldOnError;else if(t.onerror){for(o=t.onerror;o._rollbarOldOnError;)o=o._rollbarOldOnError;e._rollbarOldOnError=o}e.handleAnonymousErrors();var i=function(){var r=Array.prototype.slice.call(arguments,0);n(t,e,o,r)};r&&(i._rollbarOldOnError=o),t.onerror=i}},captureUnhandledRejections:function(t,e,r){if(t){"function"==typeof t._rollbarURH&&t._rollbarURH.belongsToShim&&t.removeEventListener("unhandledrejection",t._rollbarURH);var n=function(t){var r,n,o;try{r=t.reason}catch(t){r=void 0}try{n=t.promise}catch(t){n="[unhandledrejection] error getting `promise` from event"}try{o=t.detail,!r&&o&&(r=o.reason,n=o.promise)}catch(t){}r||(r="[unhandledrejection] error getting `reason` from event"),e&&e.handleUnhandledRejection&&e.handleUnhandledRejection(r,n)};n.belongsToShim=r,t._rollbarURH=n,t.addEventListener("unhandledrejection",n)}}}},function(t,e,r){"use strict";var n=r(0),o=r(21),i=r(22);function s(t){this.truncation=t}s.prototype.get=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){}),n.addParamsAndAccessTokenToPath(t,e,r);var s=n.formatUrl(e);this._makeZoneRequest(t,s,"GET",null,o,i,e.timeout,e.transport)},s.prototype.post=function(t,e,r,o,i){if(o&&n.isFunction(o)||(o=function(){}),!r)return o(new Error("Cannot send empty request"));var s;if((s=this.truncation?this.truncation.truncate(r):n.stringify(r)).error)return o(s.error);var a=s.value,u=n.formatUrl(e);this._makeZoneRequest(t,u,"POST",a,o,i,e.timeout,e.transport)},s.prototype.postJsonPayload=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){});var s=n.formatUrl(e);this._makeZoneRequest(t,s,"POST",r,o,i,e.timeout,e.transport)},s.prototype._makeZoneRequest=function(){var t="undefined"!=typeof window&&window||void 0!==o&&o,e=t&&t.Zone&&t.Zone.current,r=Array.prototype.slice.call(arguments);if(e&&"angular"===e._name){var n=e._parent,o=this;n.run((function(){o._makeRequest.apply(void 0,r)}))}else this._makeRequest.apply(void 0,r)},s.prototype._makeRequest=function(t,e,r,n,s,a,u,c){if("undefined"!=typeof RollbarProxy)return function(t,e){(new RollbarProxy).sendJsonPayload(t,(function(t){}),(function(t){e(new Error(t))}))}(n,s);"fetch"===c?o(t,e,r,n,s,u):i(t,e,r,n,s,a,u)},t.exports=s},function(t,e,r){"use strict";var n=r(1),o=r(0);t.exports=function(t,e,r,i,s,a){var u,c;o.isFiniteNumber(a)&&(u=new AbortController,c=setTimeout((function(){u.abort()}),a)),fetch(e,{method:r,headers:{"Content-Type":"application/json","X-Rollbar-Access-Token":t,signal:u&&u.signal},body:i}).then((function(t){return c&&clearTimeout(c),t.json()})).then((function(t){s(null,t)})).catch((function(t){n.error(t.message),s(t)}))}},function(t,e,r){"use strict";var n=r(0),o=r(1);function i(t,e){var r=new Error(t);return r.code=e||"ENOTFOUND",r}t.exports=function(t,e,r,s,a,u,c){var l;if(!(l=u?u():function(){var t,e,r=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],n=r.length;for(e=0;e=400&&t.status<600}(l)){if(403===l.status){var e=t.value&&t.value.message;o.error(e)}a(new Error(String(l.status)))}else{a(i("XHR response had no status code (likely connection failure)"))}}}catch(t){var r;r=t&&t.stack?t:new Error(t),a(r)}var s};l.open(r,e,!0),l.setRequestHeader&&(l.setRequestHeader("Content-Type","application/json"),l.setRequestHeader("X-Rollbar-Access-Token",t)),n.isFiniteNumber(c)&&(l.timeout=c),l.onreadystatechange=p,l.send(s)}catch(t){if("undefined"!=typeof XDomainRequest){if(!window||!window.location)return a(new Error("No window available during request, unknown environment"));"http:"===window.location.href.substring(0,5)&&"https"===e.substring(0,5)&&(e="http"+e.substring(5));var f=new XDomainRequest;f.onprogress=function(){},f.ontimeout=function(){a(i("Request timed out","ETIMEDOUT"))},f.onerror=function(){a(new Error("Error during request"))},f.onload=function(){var t=n.jsonParse(f.responseText);a(t.error,t.value)},f.open(r,e,!0),f.send(s)}else a(new Error("Cannot find a method to transport a request"))}}catch(t){a(t)}}},function(t,e,r){"use strict";var n=r(0),o=r(3),i=r(1);function s(t,e,r){var o=t.message,i=t.custom;o||(o="Item sent with null or missing arguments.");var s={body:o};i&&(s.extra=n.merge(i)),n.set(t,"data.body",{message:s}),r(null,t)}function a(t){var e=t.stackInfo.stack;return e&&0===e.length&&t._unhandledStackInfo&&t._unhandledStackInfo.stack&&(e=t._unhandledStackInfo.stack),e}function u(t,e,r){var i=t&&t.data.description,s=t&&t.custom,u=a(t),l=o.guessErrorClass(e.message),p={exception:{class:c(e,l[0],r),message:l[1]}};if(i&&(p.exception.description=i),u){var f,h,d,m,g,v,y,b;for(0===u.length&&(p.exception.stack=e.rawStack,p.exception.raw=String(e.rawException)),p.frames=[],y=0;y0&&n.set(e,"data.request",i),o(null,e)}},addClientInfo:function(t){return function(e,r,o){if(!t)return o(null,e);var i=t.navigator||{},s=t.screen||{};n.set(e,"data.client",{runtime_ms:e.timestamp-t._rollbarStartTime,timestamp:Math.round(e.timestamp/1e3),javascript:{browser:i.userAgent,language:i.language,cookie_enabled:i.cookieEnabled,screen:{width:s.width,height:s.height}}}),o(null,e)}},addPluginInfo:function(t){return function(e,r,o){if(!t||!t.navigator)return o(null,e);for(var i,s=[],a=t.navigator.plugins||[],u=0,c=a.length;u-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));var r=e.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),n=r.match(/ (\(.+\)$)/);r=n?r.replace(n[0],""):r;var o=this.extractLocation(n?n[1]:r),i=n&&r||void 0,s=["eval",""].indexOf(o[0])>-1?void 0:o[0];return new t({functionName:i,fileName:s,lineNumber:o[1],columnNumber:o[2],source:e})}),this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter((function(t){return!t.match(n)}),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 t({functionName:e});var r=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(r),o=n&&n[1]?n[1]:void 0,i=this.extractLocation(e.replace(r,""));return new t({functionName:o,fileName:i[0],lineNumber:i[1],columnNumber:i[2],source:e})}),this)},parseOpera:function(t){return!t.stacktrace||t.message.indexOf("\n")>-1&&t.message.split("\n").length>t.stacktrace.split("\n").length?this.parseOpera9(t):t.stack?this.parseOpera11(t):this.parseOpera10(t)},parseOpera9:function(e){for(var r=/Line (\d+).*script (?:in )?(\S+)/i,n=e.message.split("\n"),o=[],i=2,s=n.length;i/,"$2").replace(/\([^)]*\)/g,"")||void 0;i.match(/\(([^)]*)\)/)&&(r=i.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var a=void 0===r||"[arguments not available]"===r?void 0:r.split(",");return new t({functionName:s,args:a,fileName:o[0],lineNumber:o[1],columnNumber:o[2],source:e})}),this)}}})?n.apply(e,o):n)||(t.exports=i)}()},function(t,e,r){var n,o,i;!function(r,s){"use strict";o=[],void 0===(i="function"==typeof(n=function(){function t(t){return t.charAt(0).toUpperCase()+t.substring(1)}function e(t){return function(){return this[t]}}var r=["isConstructor","isEval","isNative","isToplevel"],n=["columnNumber","lineNumber"],o=["fileName","functionName","source"],i=r.concat(n,o,["args"],["evalOrigin"]);function s(e){if(e)for(var r=0;ro&&(i=this.queue.length-o),this.maxQueueSize=o,this.queue.splice(0,i)},o.prototype.copyEvents=function(){var t=Array.prototype.slice.call(this.queue,0);if(n.isFunction(this.options.filterTelemetry))try{for(var e=t.length;e--;)this.options.filterTelemetry(t[e])&&t.splice(e,1)}catch(t){this.options.filterTelemetry=null}return t},o.prototype.capture=function(t,e,r,o,s){var a={level:i(t,r),type:t,timestamp_ms:s||n.now(),body:e,source:"client"};o&&(a.uuid=o);try{if(n.isFunction(this.options.filterTelemetry)&&this.options.filterTelemetry(a))return!1}catch(t){this.options.filterTelemetry=null}return this.push(a),a},o.prototype.captureEvent=function(t,e,r,n){return this.capture(t,e,r,n)},o.prototype.captureError=function(t,e,r,n){var o={message:t.message||String(t)};return t.stack&&(o.stack=t.stack),this.capture("error",o,e,r,n)},o.prototype.captureLog=function(t,e,r,n){return this.capture("log",{message:t},e,r,n)},o.prototype.captureNetwork=function(t,e,r,n){e=e||"xhr",t.subtype=t.subtype||e,n&&(t.request=n);var o=this.levelFromStatus(t.status_code);return this.capture("network",t,o,r)},o.prototype.levelFromStatus=function(t){return t>=200&&t<400?"info":0===t||t>=400?"error":"info"},o.prototype.captureDom=function(t,e,r,n,o){var i={subtype:t,element:e};return void 0!==r&&(i.value=r),void 0!==n&&(i.checked=n),this.capture("dom",i,"info",o)},o.prototype.captureNavigation=function(t,e,r){return this.capture("navigation",{from:t,to:e},"info",r)},o.prototype.captureDomContentLoaded=function(t){return this.capture("navigation",{subtype:"DOMContentLoaded"},"info",void 0,t&&t.getTime())},o.prototype.captureLoad=function(t){return this.capture("navigation",{subtype:"load"},"info",void 0,t&&t.getTime())},o.prototype.captureConnectivityChange=function(t,e){return this.captureNetwork({change:t},"connectivity",e)},o.prototype._captureRollbarItem=function(t){if(this.options.includeItemsInTelemetry)return t.err?this.captureError(t.err,t.level,t.uuid,t.timestamp):t.message?this.captureLog(t.message,t.level,t.uuid,t.timestamp):t.custom?this.capture("log",t.custom,t.level,t.uuid,t.timestamp):void 0},o.prototype.push=function(t){this.queue.push(t),this.queue.length>this.maxQueueSize&&this.queue.shift()},t.exports=o},function(t,e,r){"use strict";var n=r(0),o=r(33),i=r(4),s=r(2),a=r(34),u={network:!0,networkResponseHeaders:!1,networkResponseBody:!1,networkRequestHeaders:!1,networkRequestBody:!1,networkErrorOnHttp5xx:!1,networkErrorOnHttp4xx:!1,networkErrorOnHttp0:!1,log:!0,dom:!0,navigation:!0,connectivity:!0,contentSecurityPolicy:!0,errorOnContentSecurityPolicy:!1};function c(t,e,r,n,o){var i=t[e];t[e]=r(i),n&&n[o].push([t,e,i])}function l(t,e){for(var r;t[e].length;)(r=t[e].shift())[0][r[1]]=r[2]}function p(t,e,r,o,i){this.options=t;var s=t.autoInstrument;!1===t.enabled||!1===s?this.autoInstrument={}:(n.isType(s,"object")||(s=u),this.autoInstrument=n.merge(u,s)),this.scrubTelemetryInputs=!!t.scrubTelemetryInputs,this.telemetryScrubber=t.telemetryScrubber,this.defaultValueScrubber=function(t){for(var e=[],r=0;r3)){i.__rollbar_xhr.end_time_ms=n.now();var e=null;if(i.__rollbar_xhr.response_content_type=i.getResponseHeader("Content-Type"),t.autoInstrument.networkResponseHeaders){var r=t.autoInstrument.networkResponseHeaders;e={};try{var s,a;if(!0===r){var u=i.getAllResponseHeaders();if(u){var c,l,p=u.trim().split(/[\r\n]+/);for(a=0;a=500&&this.autoInstrument.networkErrorOnHttp5xx||e>=400&&this.autoInstrument.networkErrorOnHttp4xx||0===e&&this.autoInstrument.networkErrorOnHttp0){var r=new Error("HTTP request failed with Status "+e);r.stack=t.stack,this.rollbar.error(r,{skipFrames:1})}},p.prototype.deinstrumentConsole=function(){if("console"in this._window&&this._window.console.log)for(var t;this.replacements.log.length;)t=this.replacements.log.shift(),this._window.console[t[0]]=t[1]},p.prototype.instrumentConsole=function(){if("console"in this._window&&this._window.console.log){var t=this,e=this._window.console,r=["debug","info","warn","error","log"];try{for(var o=0,i=r.length;o=0&&t.options[t.selectedIndex]&&this.captureDomEvent("input",t,t.options[t.selectedIndex].value)},p.prototype.captureDomEvent=function(t,e,r,n){if(void 0!==r)if(this.scrubTelemetryInputs||"password"===a.getElementType(e))r="[scrubbed]";else{var o=a.describeElement(e);this.telemetryScrubber?this.telemetryScrubber(o)&&(r="[scrubbed]"):this.defaultValueScrubber(o)&&(r="[scrubbed]")}var i=a.elementArrayToString(a.treeToArray(e));this.telemeter.captureDom(t,i,r,n)},p.prototype.deinstrumentNavigation=function(){var t=this._window.chrome;!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState&&l(this.replacements,"navigation")},p.prototype.instrumentNavigation=function(){var t=this._window.chrome;if(!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState){var e=this;c(this._window,"onpopstate",(function(t){return function(){var r=e._location.href;e.handleUrlChange(e._lastHref,r),t&&t.apply(this,arguments)}}),this.replacements,"navigation"),c(this._window.history,"pushState",(function(t){return function(){var r=arguments.length>2?arguments[2]:void 0;return r&&e.handleUrlChange(e._lastHref,r+""),t.apply(this,arguments)}}),this.replacements,"navigation")}},p.prototype.handleUrlChange=function(t,e){var r=s.parse(this._location.href),n=s.parse(e),o=s.parse(t);this._lastHref=e,r.protocol===n.protocol&&r.host===n.host&&(e=n.path+(n.hash||"")),r.protocol===o.protocol&&r.host===o.host&&(t=o.path+(o.hash||"")),this.telemeter.captureNavigation(t,e)},p.prototype.deinstrumentConnectivity=function(){("addEventListener"in this._window||"body"in this._document)&&(this._window.addEventListener?this.removeListeners("connectivity"):l(this.replacements,"connectivity"))},p.prototype.instrumentConnectivity=function(){if("addEventListener"in this._window||"body"in this._document)if(this._window.addEventListener)this.addListener("connectivity",this._window,"online",void 0,function(){this.telemeter.captureConnectivityChange("online")}.bind(this),!0),this.addListener("connectivity",this._window,"offline",void 0,function(){this.telemeter.captureConnectivityChange("offline")}.bind(this),!0);else{var t=this;c(this._document.body,"ononline",(function(e){return function(){t.telemeter.captureConnectivityChange("online"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity"),c(this._document.body,"onoffline",(function(e){return function(){t.telemeter.captureConnectivityChange("offline"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity")}},p.prototype.handleCspEvent=function(t){var e="Security Policy Violation: blockedURI: "+t.blockedURI+", violatedDirective: "+t.violatedDirective+", effectiveDirective: "+t.effectiveDirective+", ";t.sourceFile&&(e+="location: "+t.sourceFile+", line: "+t.lineNumber+", col: "+t.columnNumber+", "),e+="originalPolicy: "+t.originalPolicy,this.telemeter.captureLog(e,"error"),this.handleCspError(e)},p.prototype.handleCspError=function(t){this.autoInstrument.errorOnContentSecurityPolicy&&this.rollbar.error(t)},p.prototype.deinstrumentContentSecurityPolicy=function(){"addEventListener"in this._document&&this.removeListeners("contentsecuritypolicy")},p.prototype.instrumentContentSecurityPolicy=function(){if("addEventListener"in this._document){var t=this.handleCspEvent.bind(this);this.addListener("contentsecuritypolicy",this._document,"securitypolicyviolation",null,t,!1)}},p.prototype.addListener=function(t,e,r,n,o,i){e.addEventListener?(e.addEventListener(r,o,i),this.eventRemovers[t].push((function(){e.removeEventListener(r,o,i)}))):n&&(e.attachEvent(n,o),this.eventRemovers[t].push((function(){e.detachEvent(n,o)})))},p.prototype.removeListeners=function(t){for(;this.eventRemovers[t].length;)this.eventRemovers[t].shift()()},t.exports=p},function(t,e,r){"use strict";function n(t){return"string"!=typeof t&&(t=String(t)),t.toLowerCase()}function o(t){this.map={},t instanceof o?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}o.prototype.append=function(t,e){t=n(t),e=function(t){return"string"!=typeof t&&(t=String(t)),t}(e);var r=this.map[t];this.map[t]=r?r+", "+e:e},o.prototype.get=function(t){return t=n(t),this.has(t)?this.map[t]:null},o.prototype.has=function(t){return this.map.hasOwnProperty(n(t))},o.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},o.prototype.entries=function(){var t=[];return this.forEach((function(e,r){t.push([r,e])})),function(t){return{next:function(){var e=t.shift();return{done:void 0===e,value:e}}}}(t)},t.exports=function(t){return"undefined"==typeof Headers?new o(t):new Headers(t)}},function(t,e,r){"use strict";function n(t){return(t.getAttribute("type")||"").toLowerCase()}function o(t){if(!t||!t.tagName)return"";var e=[t.tagName];t.id&&e.push("#"+t.id),t.classes&&e.push("."+t.classes.join("."));for(var r=0;r=0;a--){if(e=o(t[a]),r=s+i.length*n+e.length,a=83){i.unshift("...");break}i.unshift(e),s+=e.length}return i.join(" > ")},treeToArray:function(t){for(var e,r=[],n=0;t&&n<5&&"html"!==(e=i(t)).tagName;n++)r.unshift(e),t=t.parentNode;return r},getElementFromEvent:function(t,e){return t.target?t.target:e&&e.elementFromPoint?e.elementFromPoint(t.clientX,t.clientY):void 0},isDescribedElement:function(t,e,r){if(t.tagName.toLowerCase()!==e.toLowerCase())return!1;if(!r)return!0;t=n(t);for(var o=0;o2*e?t.slice(0,e).concat(t.slice(r-e)):t}function a(t,e,r){r=void 0===r?30:r;var o,i=t.data.body;if(i.trace_chain)for(var a=i.trace_chain,u=0;ut?e.slice(0,t-3).concat("..."):e}function c(t,e,r){return[e=o(e,(function e(r,i,s){switch(n.typeName(i)){case"string":return u(t,i);case"object":case"array":return o(i,e,s);default:return i}})),n.stringify(e,r)]}function l(t){return t.exception&&(delete t.exception.description,t.exception.message=u(255,t.exception.message)),t.frames=s(t.frames,1),t}function p(t,e){var r=t.data.body;if(r.trace_chain)for(var o=r.trace_chain,i=0;ie}t.exports={truncate:function(t,e,r){r=void 0===r?524288:r;for(var n,o,s,u=[i,a,c.bind(null,1024),c.bind(null,512),c.bind(null,256),p];n=u.shift();)if(t=(o=n(t,e))[0],(s=o[1]).error||!f(s.value,r))return s;return s},raw:i,truncateFrames:a,truncateStrings:c,maybeTruncateValue:u}}])})); -//# sourceMappingURL=rollbar.noconflict.umd.min.js.map \ No newline at end of file +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.rollbar=e():t.rollbar=e()}(this,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=6)}([function(t,e,r){"use strict";var n=r(12),o={};function i(t,e){return e===s(t)}function s(t){var e=typeof t;return"object"!==e?e:t?t instanceof Error?"error":{}.toString.call(t).match(/\s([a-zA-Z]+)/)[1].toLowerCase():"null"}function a(t){return i(t,"function")}function u(t){var e=Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?"),r=RegExp("^"+e+"$");return c(t)&&r.test(t)}function c(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function l(){var t=y();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var r=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?r:7&r|8).toString(16)}))}var p={strictMode:!1,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};function f(t,e){var r,n;try{r=o.stringify(t)}catch(o){if(e&&a(e))try{r=e(t)}catch(t){n=t}else n=o}return{error:n,value:r}}function h(t,e){return function(r,n){try{e(r,n)}catch(e){t.error(e)}}}function d(t){return function t(e,r){var n,o,a,u={};try{for(o in e)(n=e[o])&&(i(n,"object")||i(n,"array"))?r.includes(n)?u[o]="Removed circular reference: "+s(n):((a=r.slice()).push(n),u[o]=t(n,a)):u[o]=n}catch(t){u="Failed cloning custom data: "+t.message}return u}(t,[t])}var m=["log","network","dom","navigation","error","manual"],g=["critical","error","warning","info","debug"];function v(t,e){for(var r=0;ra)?(s=e.path,e.path=s.substring(0,a)+i+"&"+s.substring(a+1)):-1!==u?(s=e.path,e.path=s.substring(0,u)+i+s.substring(u)):e.path=e.path+i},createItem:function(t,e,r,n,o){for(var i,a,u,c,p,f,m=[],g=[],v=0,b=t.length;v0&&(u||(u=d({})),u.extraArgs=d(m));var k={message:i,err:a,custom:u,timestamp:y(),callback:c,notifier:r,diagnostic:{},uuid:l()};return function(t,e){e&&void 0!==e.level&&(t.level=e.level,delete e.level);e&&void 0!==e.skipFrames&&(t.skipFrames=e.skipFrames,delete e.skipFrames)}(k,u),n&&p&&(k.request=p),o&&(k.lambdaContext=o),k._originalArgs=t,k.diagnostic.original_arg_types=g,k},addErrorContext:function(t,e){var r=t.data.custom||{},o=!1;try{for(var i=0;i2){var o=n.slice(0,3),i=o[2].indexOf("/");-1!==i&&(o[2]=o[2].substring(0,i));r=o.concat("0000:0000:0000:0000:0000").join(":")}}else r=null}catch(t){r=null}else r=null;t.user_ip=r}},formatArgsAsString:function(t){var e,r,n,o=[];for(e=0,r=t.length;e500&&(n=n.substr(0,497)+"...");break;case"null":n="null";break;case"undefined":n="undefined";break;case"symbol":n=n.toString()}o.push(n)}return o.join(" ")},formatUrl:function(t,e){if(!(e=e||t.protocol)&&t.port&&(80===t.port?e="http:":443===t.port&&(e="https:")),e=e||"https:",!t.hostname)return null;var r=e+"//"+t.hostname;return t.port&&(r=r+":"+t.port),t.path&&(r+=t.path),r},get:function(t,e){if(t){var r=e.split("."),n=t;try{for(var o=0,i=r.length;o=1&&r>e}function s(t,e,r,n,o,i,s){var a=null;return r&&(r=new Error(r)),r||n||(a=function(t,e,r,n,o){var i,s=e.environment||e.payload&&e.payload.environment;i=o?"item per minute limit reached, ignoring errors until timeout":"maxItems has been hit, ignoring errors until reset.";var a={body:{message:{body:i,extra:{maxItems:r,itemsPerMinute:n}}},language:"javascript",environment:s,notifier:{version:e.notifier&&e.notifier.version||e.version}};"browser"===t?(a.platform="browser",a.framework="browser-js",a.notifier.name="rollbar-browser-js"):"server"===t?(a.framework=e.framework||"node-js",a.notifier.name=e.notifier.name):"react-native"===t&&(a.framework=e.framework||"react-native",a.notifier.name=e.notifier.name);return a}(t,e,o,i,s)),{error:r,shouldSend:n,payload:a}}o.globalSettings={startTime:n.now(),maxItems:void 0,itemsPerMinute:void 0},o.prototype.configureGlobal=function(t){void 0!==t.startTime&&(o.globalSettings.startTime=t.startTime),void 0!==t.maxItems&&(o.globalSettings.maxItems=t.maxItems),void 0!==t.itemsPerMinute&&(o.globalSettings.itemsPerMinute=t.itemsPerMinute)},o.prototype.shouldSend=function(t,e){var r=(e=e||n.now())-this.startTime;(r<0||r>=6e4)&&(this.startTime=e,this.perMinCounter=0);var a=o.globalSettings.maxItems,u=o.globalSettings.itemsPerMinute;if(i(t,a,this.counter))return s(this.platform,this.platformOptions,a+" max items reached",!1);if(i(t,u,this.perMinCounter))return s(this.platform,this.platformOptions,u+" items per minute reached",!1);this.counter++,this.perMinCounter++;var c=!i(t,a,this.counter),l=c;return c=c&&!i(t,u,this.perMinCounter),s(this.platform,this.platformOptions,null,c,a,u,l)},o.prototype.setPlatformOptions=function(t,e){this.platform=t,this.platformOptions=e},t.exports=o},function(t,e,r){"use strict";var n=Object.prototype.hasOwnProperty,o=Object.prototype.toString,i=function(t){if(!t||"[object Object]"!==o.call(t))return!1;var e,r=n.call(t,"constructor"),i=t.constructor&&t.constructor.prototype&&n.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!r&&!i)return!1;for(e in t);return void 0===e||n.call(t,e)};t.exports=function t(){var e,r,n,o,s,a={},u=null,c=arguments.length;for(e=0;ethis.options.maxRetries&&(o=!1))}o?this._retryApiRequest(e,r):r(t)},o.prototype._retryApiRequest=function(t,e){this.retryQueue.push({item:t,callback:e}),this.retryHandle||(this.retryHandle=setInterval(function(){for(;this.retryQueue.length;){var t=this.retryQueue.shift();this._makeApiRequest(t.item,t.callback)}}.bind(this),this.options.retryInterval))},o.prototype._dequeuePendingRequest=function(t){var e=this.pendingRequests.indexOf(t);-1!==e&&(this.pendingRequests.splice(e,1),this._maybeCallWait())},o.prototype._maybeLog=function(t,e){if(this.logger&&this.options.verbose){var r=e;if(r=(r=r||n.get(t,"body.trace.exception.message"))||n.get(t,"body.trace_chain.0.exception.message"))return void this.logger.error(r);(r=n.get(t,"body.message.body"))&&this.logger.log(r)}},o.prototype._maybeCallWait=function(){return!(!n.isFunction(this.waitCallback)||0!==this.pendingItems.length||0!==this.pendingRequests.length)&&(this.waitIntervalID&&(this.waitIntervalID=clearInterval(this.waitIntervalID)),this.waitCallback(),!0)},t.exports=o},function(t,e,r){"use strict";var n=r(0);function o(t,e){this.queue=t,this.options=e,this.transforms=[],this.diagnostic={}}o.prototype.configure=function(t){this.queue&&this.queue.configure(t);var e=this.options;return this.options=n.merge(e,t),this},o.prototype.addTransform=function(t){return n.isFunction(t)&&this.transforms.push(t),this},o.prototype.log=function(t,e){if(e&&n.isFunction(e)||(e=function(){}),!this.options.enabled)return e(new Error("Rollbar is not enabled"));this.queue.addPendingItem(t);var r=t.err;this._applyTransforms(t,function(n,o){if(n)return this.queue.removePendingItem(t),e(n,null);this.queue.addItem(o,e,r,t)}.bind(this))},o.prototype._applyTransforms=function(t,e){var r=-1,n=this.transforms.length,o=this.transforms,i=this.options,s=function(t,a){t?e(t,null):++r!==n?o[r](a,i,s):e(null,a)};s(null,t)},t.exports=o},function(t,e,r){"use strict";var n=r(0),o=r(16),i={hostname:"api.rollbar.com",path:"/api/1/item/",search:null,version:"1",protocol:"https:",port:443};function s(t,e,r,n,o){this.options=t,this.transport=e,this.url=r,this.truncation=n,this.jsonBackup=o,this.accessToken=t.accessToken,this.transportOptions=a(t,r)}function a(t,e){return o.getTransportFromOptions(t,i,e)}s.prototype.postItem=function(t,e){var r=o.transportOptions(this.transportOptions,"POST"),n=o.buildPayload(this.accessToken,t,this.jsonBackup),i=this;setTimeout((function(){i.transport.post(i.accessToken,r,n,e)}),0)},s.prototype.buildJsonPayload=function(t,e){var r,i=o.buildPayload(this.accessToken,t,this.jsonBackup);return(r=this.truncation?this.truncation.truncate(i):n.stringify(i)).error?(e&&e(r.error),null):r.value},s.prototype.postJsonPayload=function(t,e){var r=o.transportOptions(this.transportOptions,"POST");this.transport.postJsonPayload(this.accessToken,r,t,e)},s.prototype.configure=function(t){var e=this.oldOptions;return this.options=n.merge(e,t),this.transportOptions=a(this.options,this.url),void 0!==this.options.accessToken&&(this.accessToken=this.options.accessToken),this},t.exports=s},function(t,e,r){"use strict";var n=r(0);t.exports={buildPayload:function(t,e,r){if(!n.isType(e.context,"string")){var o=n.stringify(e.context,r);o.error?e.context="Error: could not serialize 'context'":e.context=o.value||"",e.context.length>255&&(e.context=e.context.substr(0,255))}return{access_token:t,data:e}},getTransportFromOptions:function(t,e,r){var n=e.hostname,o=e.protocol,i=e.port,s=e.path,a=e.search,u=t.timeout,c=function(t){var e="undefined"!=typeof window&&window||"undefined"!=typeof self&&self,r=t.defaultTransport||"xhr";void 0===e.fetch&&(r="xhr");void 0===e.XMLHttpRequest&&(r="fetch");return r}(t),l=t.proxy;if(t.endpoint){var p=r.parse(t.endpoint);n=p.hostname,o=p.protocol,i=p.port,s=p.pathname,a=p.search}return{timeout:u,hostname:n,protocol:o,port:i,path:s,search:a,proxy:l,transport:c}},transportOptions:function(t,e){var r=t.protocol||"https:",n=t.port||("http:"===r?80:"https:"===r?443:void 0),o=t.hostname,i=t.path,s=t.timeout,a=t.transport;return t.search&&(i+=t.search),t.proxy&&(i=r+"//"+o+i,o=t.proxy.host||t.proxy.hostname,n=t.proxy.port,r=t.proxy.protocol||r),{timeout:s,protocol:r,hostname:o,path:i,port:n,method:e,transport:a}},appendPathToPath:function(t,e){var r=/\/$/.test(t),n=/^\//.test(e);return r&&n?e=e.substring(1):r||n||(e="/"+e),t+e}}},function(t,e){!function(t){"use strict";t.console||(t.console={});for(var e,r,n=t.console,o=function(){},i=["memory"],s="assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(",");e=i.pop();)n[e]||(n[e]={});for(;r=s.pop();)n[r]||(n[r]=o)}("undefined"==typeof window?this:window)},function(t,e,r){"use strict";var n={ieVersion:function(){if("undefined"!=typeof document){for(var t=3,e=document.createElement("div"),r=e.getElementsByTagName("i");e.innerHTML="\x3c!--[if gt IE "+ ++t+"]>4?t:void 0}}};t.exports=n},function(t,e,r){"use strict";function n(t,e,r,n){t._rollbarWrappedError&&(n[4]||(n[4]=t._rollbarWrappedError),n[5]||(n[5]=t._rollbarWrappedError._rollbarContext),t._rollbarWrappedError=null);var o=e.handleUncaughtException.apply(e,n);r&&r.apply(t,n),"anonymous"===o&&(e.anonymousErrorsPending+=1)}t.exports={captureUncaughtExceptions:function(t,e,r){if(t){var o;if("function"==typeof e._rollbarOldOnError)o=e._rollbarOldOnError;else if(t.onerror){for(o=t.onerror;o._rollbarOldOnError;)o=o._rollbarOldOnError;e._rollbarOldOnError=o}e.handleAnonymousErrors();var i=function(){var r=Array.prototype.slice.call(arguments,0);n(t,e,o,r)};r&&(i._rollbarOldOnError=o),t.onerror=i}},captureUnhandledRejections:function(t,e,r){if(t){"function"==typeof t._rollbarURH&&t._rollbarURH.belongsToShim&&t.removeEventListener("unhandledrejection",t._rollbarURH);var n=function(t){var r,n,o;try{r=t.reason}catch(t){r=void 0}try{n=t.promise}catch(t){n="[unhandledrejection] error getting `promise` from event"}try{o=t.detail,!r&&o&&(r=o.reason,n=o.promise)}catch(t){}r||(r="[unhandledrejection] error getting `reason` from event"),e&&e.handleUnhandledRejection&&e.handleUnhandledRejection(r,n)};n.belongsToShim=r,t._rollbarURH=n,t.addEventListener("unhandledrejection",n)}}}},function(t,e,r){"use strict";var n=r(0),o=r(21),i=r(22);function s(t){this.truncation=t}s.prototype.get=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){}),n.addParamsAndAccessTokenToPath(t,e,r);var s=n.formatUrl(e);this._makeZoneRequest(t,s,"GET",null,o,i,e.timeout,e.transport)},s.prototype.post=function(t,e,r,o,i){if(o&&n.isFunction(o)||(o=function(){}),!r)return o(new Error("Cannot send empty request"));var s;if((s=this.truncation?this.truncation.truncate(r):n.stringify(r)).error)return o(s.error);var a=s.value,u=n.formatUrl(e);this._makeZoneRequest(t,u,"POST",a,o,i,e.timeout,e.transport)},s.prototype.postJsonPayload=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){});var s=n.formatUrl(e);this._makeZoneRequest(t,s,"POST",r,o,i,e.timeout,e.transport)},s.prototype._makeZoneRequest=function(){var t="undefined"!=typeof window&&window||void 0!==o&&o,e=t&&t.Zone&&t.Zone.current,r=Array.prototype.slice.call(arguments);if(e&&"angular"===e._name){var n=e._parent,o=this;n.run((function(){o._makeRequest.apply(void 0,r)}))}else this._makeRequest.apply(void 0,r)},s.prototype._makeRequest=function(t,e,r,n,s,a,u,c){if("undefined"!=typeof RollbarProxy)return function(t,e){(new RollbarProxy).sendJsonPayload(t,(function(t){}),(function(t){e(new Error(t))}))}(n,s);"fetch"===c?o(t,e,r,n,s,u):i(t,e,r,n,s,a,u)},t.exports=s},function(t,e,r){"use strict";var n=r(1),o=r(0);t.exports=function(t,e,r,i,s,a){var u,c;o.isFiniteNumber(a)&&(u=new AbortController,c=setTimeout((function(){u.abort()}),a)),fetch(e,{method:r,headers:{"Content-Type":"application/json","X-Rollbar-Access-Token":t,signal:u&&u.signal},body:i}).then((function(t){return c&&clearTimeout(c),t.json()})).then((function(t){s(null,t)})).catch((function(t){n.error(t.message),s(t)}))}},function(t,e,r){"use strict";var n=r(0),o=r(1);function i(t,e){var r=new Error(t);return r.code=e||"ENOTFOUND",r}t.exports=function(t,e,r,s,a,u,c){var l;if(!(l=u?u():function(){var t,e,r=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],n=r.length;for(e=0;e=400&&t.status<600}(l)){if(403===l.status){var e=t.value&&t.value.message;o.error(e)}a(new Error(String(l.status)))}else{a(i("XHR response had no status code (likely connection failure)"))}}}catch(t){var r;r=t&&t.stack?t:new Error(t),a(r)}var s};l.open(r,e,!0),l.setRequestHeader&&(l.setRequestHeader("Content-Type","application/json"),l.setRequestHeader("X-Rollbar-Access-Token",t)),n.isFiniteNumber(c)&&(l.timeout=c),l.onreadystatechange=p,l.send(s)}catch(t){if("undefined"!=typeof XDomainRequest){if(!window||!window.location)return a(new Error("No window available during request, unknown environment"));"http:"===window.location.href.substring(0,5)&&"https"===e.substring(0,5)&&(e="http"+e.substring(5));var f=new XDomainRequest;f.onprogress=function(){},f.ontimeout=function(){a(i("Request timed out","ETIMEDOUT"))},f.onerror=function(){a(new Error("Error during request"))},f.onload=function(){var t=n.jsonParse(f.responseText);a(t.error,t.value)},f.open(r,e,!0),f.send(s)}else a(new Error("Cannot find a method to transport a request"))}}catch(t){a(t)}}},function(t,e,r){"use strict";var n=r(0),o=r(3),i=r(1);function s(t,e,r){var o=t.message,i=t.custom;o||(o="Item sent with null or missing arguments.");var s={body:o};i&&(s.extra=n.merge(i)),n.set(t,"data.body",{message:s}),r(null,t)}function a(t){var e=t.stackInfo.stack;return e&&0===e.length&&t._unhandledStackInfo&&t._unhandledStackInfo.stack&&(e=t._unhandledStackInfo.stack),e}function u(t,e,r){var i=t&&t.data.description,s=t&&t.custom,u=a(t),l=o.guessErrorClass(e.message),p={exception:{class:c(e,l[0],r),message:l[1]}};if(i&&(p.exception.description=i),u){var f,h,d,m,g,v,y,b;for(0===u.length&&(p.exception.stack=e.rawStack,p.exception.raw=String(e.rawException)),p.frames=[],y=0;y0&&n.set(e,"data.request",i),o(null,e)}},addClientInfo:function(t){return function(e,r,o){if(!t)return o(null,e);var i=t.navigator||{},s=t.screen||{};n.set(e,"data.client",{runtime_ms:e.timestamp-t._rollbarStartTime,timestamp:Math.round(e.timestamp/1e3),javascript:{browser:i.userAgent,language:i.language,cookie_enabled:i.cookieEnabled,screen:{width:s.width,height:s.height}}}),o(null,e)}},addPluginInfo:function(t){return function(e,r,o){if(!t||!t.navigator)return o(null,e);for(var i,s=[],a=t.navigator.plugins||[],u=0,c=a.length;u-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));var r=e.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),n=r.match(/ (\(.+\)$)/);r=n?r.replace(n[0],""):r;var o=this.extractLocation(n?n[1]:r),i=n&&r||void 0,s=["eval",""].indexOf(o[0])>-1?void 0:o[0];return new t({functionName:i,fileName:s,lineNumber:o[1],columnNumber:o[2],source:e})}),this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter((function(t){return!t.match(n)}),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 t({functionName:e});var r=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(r),o=n&&n[1]?n[1]:void 0,i=this.extractLocation(e.replace(r,""));return new t({functionName:o,fileName:i[0],lineNumber:i[1],columnNumber:i[2],source:e})}),this)},parseOpera:function(t){return!t.stacktrace||t.message.indexOf("\n")>-1&&t.message.split("\n").length>t.stacktrace.split("\n").length?this.parseOpera9(t):t.stack?this.parseOpera11(t):this.parseOpera10(t)},parseOpera9:function(e){for(var r=/Line (\d+).*script (?:in )?(\S+)/i,n=e.message.split("\n"),o=[],i=2,s=n.length;i/,"$2").replace(/\([^)]*\)/g,"")||void 0;i.match(/\(([^)]*)\)/)&&(r=i.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var a=void 0===r||"[arguments not available]"===r?void 0:r.split(",");return new t({functionName:s,args:a,fileName:o[0],lineNumber:o[1],columnNumber:o[2],source:e})}),this)}}})?n.apply(e,o):n)||(t.exports=i)}()},function(t,e,r){var n,o,i;!function(r,s){"use strict";o=[],void 0===(i="function"==typeof(n=function(){function t(t){return t.charAt(0).toUpperCase()+t.substring(1)}function e(t){return function(){return this[t]}}var r=["isConstructor","isEval","isNative","isToplevel"],n=["columnNumber","lineNumber"],o=["fileName","functionName","source"],i=r.concat(n,o,["args"],["evalOrigin"]);function s(e){if(e)for(var r=0;ro&&(i=this.queue.length-o),this.maxQueueSize=o,this.queue.splice(0,i)},o.prototype.copyEvents=function(){var t=Array.prototype.slice.call(this.queue,0);if(n.isFunction(this.options.filterTelemetry))try{for(var e=t.length;e--;)this.options.filterTelemetry(t[e])&&t.splice(e,1)}catch(t){this.options.filterTelemetry=null}return t},o.prototype.capture=function(t,e,r,o,s){var a={level:i(t,r),type:t,timestamp_ms:s||n.now(),body:e,source:"client"};o&&(a.uuid=o);try{if(n.isFunction(this.options.filterTelemetry)&&this.options.filterTelemetry(a))return!1}catch(t){this.options.filterTelemetry=null}return this.push(a),a},o.prototype.captureEvent=function(t,e,r,n){return this.capture(t,e,r,n)},o.prototype.captureError=function(t,e,r,n){var o={message:t.message||String(t)};return t.stack&&(o.stack=t.stack),this.capture("error",o,e,r,n)},o.prototype.captureLog=function(t,e,r,n){return this.capture("log",{message:t},e,r,n)},o.prototype.captureNetwork=function(t,e,r,n){e=e||"xhr",t.subtype=t.subtype||e,n&&(t.request=n);var o=this.levelFromStatus(t.status_code);return this.capture("network",t,o,r)},o.prototype.levelFromStatus=function(t){return t>=200&&t<400?"info":0===t||t>=400?"error":"info"},o.prototype.captureDom=function(t,e,r,n,o){var i={subtype:t,element:e};return void 0!==r&&(i.value=r),void 0!==n&&(i.checked=n),this.capture("dom",i,"info",o)},o.prototype.captureNavigation=function(t,e,r){return this.capture("navigation",{from:t,to:e},"info",r)},o.prototype.captureDomContentLoaded=function(t){return this.capture("navigation",{subtype:"DOMContentLoaded"},"info",void 0,t&&t.getTime())},o.prototype.captureLoad=function(t){return this.capture("navigation",{subtype:"load"},"info",void 0,t&&t.getTime())},o.prototype.captureConnectivityChange=function(t,e){return this.captureNetwork({change:t},"connectivity",e)},o.prototype._captureRollbarItem=function(t){if(this.options.includeItemsInTelemetry)return t.err?this.captureError(t.err,t.level,t.uuid,t.timestamp):t.message?this.captureLog(t.message,t.level,t.uuid,t.timestamp):t.custom?this.capture("log",t.custom,t.level,t.uuid,t.timestamp):void 0},o.prototype.push=function(t){this.queue.push(t),this.queue.length>this.maxQueueSize&&this.queue.shift()},t.exports=o},function(t,e,r){"use strict";var n=r(0),o=r(33),i=r(4),s=r(2),a=r(34),u={network:!0,networkResponseHeaders:!1,networkResponseBody:!1,networkRequestHeaders:!1,networkRequestBody:!1,networkErrorOnHttp5xx:!1,networkErrorOnHttp4xx:!1,networkErrorOnHttp0:!1,log:!0,dom:!0,navigation:!0,connectivity:!0,contentSecurityPolicy:!0,errorOnContentSecurityPolicy:!1};function c(t,e,r,n,o){var i=t[e];t[e]=r(i),n&&n[o].push([t,e,i])}function l(t,e){for(var r;t[e].length;)(r=t[e].shift())[0][r[1]]=r[2]}function p(t,e,r,o,i){this.options=t;var s=t.autoInstrument;!1===t.enabled||!1===s?this.autoInstrument={}:(n.isType(s,"object")||(s=u),this.autoInstrument=n.merge(u,s)),this.scrubTelemetryInputs=!!t.scrubTelemetryInputs,this.telemetryScrubber=t.telemetryScrubber,this.defaultValueScrubber=function(t){for(var e=[],r=0;r3)){i.__rollbar_xhr.end_time_ms=n.now();var e=null;if(i.__rollbar_xhr.response_content_type=i.getResponseHeader("Content-Type"),t.autoInstrument.networkResponseHeaders){var r=t.autoInstrument.networkResponseHeaders;e={};try{var s,a;if(!0===r){var u=i.getAllResponseHeaders();if(u){var c,l,p=u.trim().split(/[\r\n]+/);for(a=0;a=500&&this.autoInstrument.networkErrorOnHttp5xx||e>=400&&this.autoInstrument.networkErrorOnHttp4xx||0===e&&this.autoInstrument.networkErrorOnHttp0){var r=new Error("HTTP request failed with Status "+e);r.stack=t.stack,this.rollbar.error(r,{skipFrames:1})}},p.prototype.deinstrumentConsole=function(){if("console"in this._window&&this._window.console.log)for(var t;this.replacements.log.length;)t=this.replacements.log.shift(),this._window.console[t[0]]=t[1]},p.prototype.instrumentConsole=function(){if("console"in this._window&&this._window.console.log){var t=this,e=this._window.console,r=["debug","info","warn","error","log"];try{for(var o=0,i=r.length;o=0&&t.options[t.selectedIndex]&&this.captureDomEvent("input",t,t.options[t.selectedIndex].value)},p.prototype.captureDomEvent=function(t,e,r,n){if(void 0!==r)if(this.scrubTelemetryInputs||"password"===a.getElementType(e))r="[scrubbed]";else{var o=a.describeElement(e);this.telemetryScrubber?this.telemetryScrubber(o)&&(r="[scrubbed]"):this.defaultValueScrubber(o)&&(r="[scrubbed]")}var i=a.elementArrayToString(a.treeToArray(e));this.telemeter.captureDom(t,i,r,n)},p.prototype.deinstrumentNavigation=function(){var t=this._window.chrome;!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState&&l(this.replacements,"navigation")},p.prototype.instrumentNavigation=function(){var t=this._window.chrome;if(!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState){var e=this;c(this._window,"onpopstate",(function(t){return function(){var r=e._location.href;e.handleUrlChange(e._lastHref,r),t&&t.apply(this,arguments)}}),this.replacements,"navigation"),c(this._window.history,"pushState",(function(t){return function(){var r=arguments.length>2?arguments[2]:void 0;return r&&e.handleUrlChange(e._lastHref,r+""),t.apply(this,arguments)}}),this.replacements,"navigation")}},p.prototype.handleUrlChange=function(t,e){var r=s.parse(this._location.href),n=s.parse(e),o=s.parse(t);this._lastHref=e,r.protocol===n.protocol&&r.host===n.host&&(e=n.path+(n.hash||"")),r.protocol===o.protocol&&r.host===o.host&&(t=o.path+(o.hash||"")),this.telemeter.captureNavigation(t,e)},p.prototype.deinstrumentConnectivity=function(){("addEventListener"in this._window||"body"in this._document)&&(this._window.addEventListener?this.removeListeners("connectivity"):l(this.replacements,"connectivity"))},p.prototype.instrumentConnectivity=function(){if("addEventListener"in this._window||"body"in this._document)if(this._window.addEventListener)this.addListener("connectivity",this._window,"online",void 0,function(){this.telemeter.captureConnectivityChange("online")}.bind(this),!0),this.addListener("connectivity",this._window,"offline",void 0,function(){this.telemeter.captureConnectivityChange("offline")}.bind(this),!0);else{var t=this;c(this._document.body,"ononline",(function(e){return function(){t.telemeter.captureConnectivityChange("online"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity"),c(this._document.body,"onoffline",(function(e){return function(){t.telemeter.captureConnectivityChange("offline"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity")}},p.prototype.handleCspEvent=function(t){var e="Security Policy Violation: blockedURI: "+t.blockedURI+", violatedDirective: "+t.violatedDirective+", effectiveDirective: "+t.effectiveDirective+", ";t.sourceFile&&(e+="location: "+t.sourceFile+", line: "+t.lineNumber+", col: "+t.columnNumber+", "),e+="originalPolicy: "+t.originalPolicy,this.telemeter.captureLog(e,"error"),this.handleCspError(e)},p.prototype.handleCspError=function(t){this.autoInstrument.errorOnContentSecurityPolicy&&this.rollbar.error(t)},p.prototype.deinstrumentContentSecurityPolicy=function(){"addEventListener"in this._document&&this.removeListeners("contentsecuritypolicy")},p.prototype.instrumentContentSecurityPolicy=function(){if("addEventListener"in this._document){var t=this.handleCspEvent.bind(this);this.addListener("contentsecuritypolicy",this._document,"securitypolicyviolation",null,t,!1)}},p.prototype.addListener=function(t,e,r,n,o,i){e.addEventListener?(e.addEventListener(r,o,i),this.eventRemovers[t].push((function(){e.removeEventListener(r,o,i)}))):n&&(e.attachEvent(n,o),this.eventRemovers[t].push((function(){e.detachEvent(n,o)})))},p.prototype.removeListeners=function(t){for(;this.eventRemovers[t].length;)this.eventRemovers[t].shift()()},t.exports=p},function(t,e,r){"use strict";function n(t){return"string"!=typeof t&&(t=String(t)),t.toLowerCase()}function o(t){this.map={},t instanceof o?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}o.prototype.append=function(t,e){t=n(t),e=function(t){return"string"!=typeof t&&(t=String(t)),t}(e);var r=this.map[t];this.map[t]=r?r+", "+e:e},o.prototype.get=function(t){return t=n(t),this.has(t)?this.map[t]:null},o.prototype.has=function(t){return this.map.hasOwnProperty(n(t))},o.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},o.prototype.entries=function(){var t=[];return this.forEach((function(e,r){t.push([r,e])})),function(t){return{next:function(){var e=t.shift();return{done:void 0===e,value:e}}}}(t)},t.exports=function(t){return"undefined"==typeof Headers?new o(t):new Headers(t)}},function(t,e,r){"use strict";function n(t){return(t.getAttribute("type")||"").toLowerCase()}function o(t){if(!t||!t.tagName)return"";var e=[t.tagName];t.id&&e.push("#"+t.id),t.classes&&e.push("."+t.classes.join("."));for(var r=0;r=0;a--){if(e=o(t[a]),r=s+i.length*n+e.length,a=83){i.unshift("...");break}i.unshift(e),s+=e.length}return i.join(" > ")},treeToArray:function(t){for(var e,r=[],n=0;t&&n<5&&"html"!==(e=i(t)).tagName;n++)r.unshift(e),t=t.parentNode;return r},getElementFromEvent:function(t,e){return t.target?t.target:e&&e.elementFromPoint?e.elementFromPoint(t.clientX,t.clientY):void 0},isDescribedElement:function(t,e,r){if(t.tagName.toLowerCase()!==e.toLowerCase())return!1;if(!r)return!0;t=n(t);for(var o=0;o2*e?t.slice(0,e).concat(t.slice(r-e)):t}function a(t,e,r){r=void 0===r?30:r;var o,i=t.data.body;if(i.trace_chain)for(var a=i.trace_chain,u=0;ut?e.slice(0,t-3).concat("..."):e}function c(t,e,r){return[e=o(e,(function e(r,i,s){switch(n.typeName(i)){case"string":return u(t,i);case"object":case"array":return o(i,e,s);default:return i}})),n.stringify(e,r)]}function l(t){return t.exception&&(delete t.exception.description,t.exception.message=u(255,t.exception.message)),t.frames=s(t.frames,1),t}function p(t,e){var r=t.data.body;if(r.trace_chain)for(var o=r.trace_chain,i=0;ie}t.exports={truncate:function(t,e,r){r=void 0===r?524288:r;for(var n,o,s,u=[i,a,c.bind(null,1024),c.bind(null,512),c.bind(null,256),p];n=u.shift();)if(t=(o=n(t,e))[0],(s=o[1]).error||!f(s.value,r))return s;return s},raw:i,truncateFrames:a,truncateStrings:c,maybeTruncateValue:u}}])})); \ No newline at end of file diff --git a/dist/rollbar.snippet.js b/dist/rollbar.snippet.js index ae2684756..6e5403e61 100644 --- a/dist/rollbar.snippet.js +++ b/dist/rollbar.snippet.js @@ -1 +1 @@ -!function(r){var e={};function o(n){if(e[n])return e[n].exports;var t=e[n]={i:n,l:!1,exports:{}};return r[n].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.m=r,o.c=e,o.d=function(r,e,n){o.o(r,e)||Object.defineProperty(r,e,{enumerable:!0,get:n})},o.r=function(r){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},o.t=function(r,e){if(1&e&&(r=o(r)),8&e)return r;if(4&e&&"object"==typeof r&&r&&r.__esModule)return r;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:r}),2&e&&"string"!=typeof r)for(var t in r)o.d(n,t,function(e){return r[e]}.bind(null,t));return n},o.n=function(r){var e=r&&r.__esModule?function(){return r.default}:function(){return r};return o.d(e,"a",e),e},o.o=function(r,e){return Object.prototype.hasOwnProperty.call(r,e)},o.p="",o(o.s=0)}([function(r,e,o){"use strict";var n=o(1),t=o(5);_rollbarConfig=_rollbarConfig||{},_rollbarConfig.rollbarJsUrl=_rollbarConfig.rollbarJsUrl||"https://cdn.rollbar.com/rollbarjs/refs/tags/v2.26.2/rollbar.min.js",_rollbarConfig.async=void 0===_rollbarConfig.async||_rollbarConfig.async;var a=n.setupShim(window,_rollbarConfig),l=t(_rollbarConfig);window.rollbar=n.Rollbar,a.loadFull(window,document,!_rollbarConfig.async,_rollbarConfig,l)},function(r,e,o){"use strict";var n=o(2),t=o(3);function a(r){return function(){try{return r.apply(this,arguments)}catch(r){try{console.error("[Rollbar]: Internal error",r)}catch(r){}}}}var l=0;function i(r,e){this.options=r,this._rollbarOldOnError=null;var o=l++;this.shimId=function(){return o},"undefined"!=typeof window&&window._rollbarShims&&(window._rollbarShims[o]={handler:e,messages:[]})}var s=o(4),d=function(r,e){return new i(r,e)},c=function(r){return new s(d,r)};function u(r){return a((function(){var e=this,o=Array.prototype.slice.call(arguments,0),n={shim:e,method:r,args:o,ts:new Date};window._rollbarShims[this.shimId()].messages.push(n)}))}i.prototype.loadFull=function(r,e,o,n,t){var l=!1,i=e.createElement("script"),s=e.getElementsByTagName("script")[0],d=s.parentNode;i.crossOrigin="",i.src=n.rollbarJsUrl,o||(i.async=!0),i.onload=i.onreadystatechange=a((function(){if(!(l||this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState)){i.onload=i.onreadystatechange=null;try{d.removeChild(i)}catch(r){}l=!0,function(){var e;if(void 0===r._rollbarDidLoad){e=new Error("rollbar.js did not load");for(var o,n,a,l,i=0;o=r._rollbarShims[i++];)for(o=o.messages||[];n=o.shift();)for(a=n.args||[],i=0;i qs)) {\n p = options.path;\n options.path = p.substring(0,qs) + query + '&' + p.substring(qs+1);\n } else {\n if (h !== -1) {\n p = options.path;\n options.path = p.substring(0,h) + query + p.substring(h);\n } else {\n options.path = options.path + query;\n }\n }\n}\n\nfunction formatUrl(u, protocol) {\n protocol = protocol || u.protocol;\n if (!protocol && u.port) {\n if (u.port === 80) {\n protocol = 'http:';\n } else if (u.port === 443) {\n protocol = 'https:';\n }\n }\n protocol = protocol || 'https:';\n\n if (!u.hostname) {\n return null;\n }\n var result = protocol + '//' + u.hostname;\n if (u.port) {\n result = result + ':' + u.port;\n }\n if (u.path) {\n result = result + u.path;\n }\n return result;\n}\n\nfunction stringify(obj, backup) {\n var value, error;\n try {\n value = RollbarJSON.stringify(obj);\n } catch (jsonError) {\n if (backup && isFunction(backup)) {\n try {\n value = backup(obj);\n } catch (backupError) {\n error = backupError;\n }\n } else {\n error = jsonError;\n }\n }\n return {error: error, value: value};\n}\n\nfunction maxByteSize(string) {\n // The transport will use utf-8, so assume utf-8 encoding.\n //\n // This minimal implementation will accurately count bytes for all UCS-2 and\n // single code point UTF-16. If presented with multi code point UTF-16,\n // which should be rare, it will safely overcount, not undercount.\n //\n // While robust utf-8 encoders exist, this is far smaller and far more performant.\n // For quickly counting payload size for truncation, smaller is better.\n\n var count = 0;\n var length = string.length;\n\n for (var i = 0; i < length; i++) {\n var code = string.charCodeAt(i);\n if (code < 128) { // up to 7 bits\n count = count + 1;\n } else if (code < 2048) { // up to 11 bits\n count = count + 2;\n } else if (code < 65536) { // up to 16 bits\n count = count + 3;\n }\n }\n\n return count;\n}\n\nfunction jsonParse(s) {\n var value, error;\n try {\n value = RollbarJSON.parse(s);\n } catch (e) {\n error = e;\n }\n return {error: error, value: value};\n}\n\nfunction makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n mode,\n backupMessage,\n errorParser\n) {\n var location = {\n url: url || '',\n line: lineno,\n column: colno\n };\n location.func = errorParser.guessFunctionName(location.url, location.line);\n location.context = errorParser.gatherContext(location.url, location.line);\n var href = typeof document !== 'undefined' && document && document.location && document.location.href;\n var useragent = typeof window !== 'undefined' && window && window.navigator && window.navigator.userAgent;\n return {\n 'mode': mode,\n 'message': error ? String(error) : (message || backupMessage),\n 'url': href,\n 'stack': [location],\n 'useragent': useragent\n };\n}\n\nfunction wrapCallback(logger, f) {\n return function(err, resp) {\n try {\n f(err, resp);\n } catch (e) {\n logger.error(e);\n }\n };\n}\n\nfunction nonCircularClone(obj) {\n var seen = [obj];\n\n function clone(obj, seen) {\n var value, name, newSeen, result = {};\n\n try {\n for (name in obj) {\n value = obj[name];\n\n if (value && (isType(value, 'object') || isType(value, 'array'))) {\n if (seen.includes(value)) {\n result[name] = 'Removed circular reference: ' + typeName(value);\n } else {\n newSeen = seen.slice();\n newSeen.push(value);\n result[name] = clone(value, newSeen);\n }\n continue;\n }\n\n result[name] = value;\n }\n } catch (e) {\n result = 'Failed cloning custom data: ' + e.message;\n }\n return result;\n }\n return clone(obj, seen);\n}\n\nfunction createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\n var diagnostic = {};\n var argTypes = [];\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n argTypes.push(typ);\n switch (typ) {\n case 'undefined':\n break;\n case 'string':\n message ? extraArgs.push(arg) : message = arg;\n break;\n case 'function':\n callback = wrapCallback(logger, arg);\n break;\n case 'date':\n extraArgs.push(arg);\n break;\n case 'error':\n case 'domexception':\n case 'exception': // Firefox Exception type\n err ? extraArgs.push(arg) : err = arg;\n break;\n case 'object':\n case 'array':\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n if (requestKeys && typ === 'object' && !request) {\n for (var j = 0, len = requestKeys.length; j < len; ++j) {\n if (arg[requestKeys[j]] !== undefined) {\n request = arg;\n break;\n }\n }\n if (request) {\n break;\n }\n }\n custom ? extraArgs.push(arg) : custom = arg;\n break;\n default:\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n extraArgs.push(arg);\n }\n }\n\n // if custom is an array this turns it into an object with integer keys\n if (custom) custom = nonCircularClone(custom);\n\n if (extraArgs.length > 0) {\n if (!custom) custom = nonCircularClone({});\n custom.extraArgs = nonCircularClone(extraArgs);\n }\n\n var item = {\n message: message,\n err: err,\n custom: custom,\n timestamp: now(),\n callback: callback,\n notifier: notifier,\n diagnostic: diagnostic,\n uuid: uuid4()\n };\n\n setCustomItemKeys(item, custom);\n\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n item.diagnostic.original_arg_types = argTypes;\n return item;\n}\n\nfunction setCustomItemKeys(item, custom) {\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (custom && custom.skipFrames !== undefined) {\n item.skipFrames = custom.skipFrames;\n delete custom.skipFrames;\n }\n}\n\nfunction addErrorContext(item, errors) {\n var custom = item.data.custom || {};\n var contextAdded = false;\n\n try {\n for (var i = 0; i < errors.length; ++i) {\n if (errors[i].hasOwnProperty('rollbarContext')) {\n custom = merge(custom, nonCircularClone(errors[i].rollbarContext));\n contextAdded = true;\n }\n }\n\n // Avoid adding an empty object to the data.\n if (contextAdded) {\n item.data.custom = custom;\n }\n } catch (e) {\n item.diagnostic.error_context = 'Failed: ' + e.message;\n }\n}\n\nvar TELEMETRY_TYPES = ['log', 'network', 'dom', 'navigation', 'error', 'manual'];\nvar TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];\n\nfunction arrayIncludes(arr, val) {\n for (var k = 0; k < arr.length; ++k) {\n if (arr[k] === val) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction createTelemetryEvent(args) {\n var type, metadata, level;\n var arg;\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n switch (typ) {\n case 'string':\n if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {\n type = arg;\n } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {\n level = arg;\n }\n break;\n case 'object':\n metadata = arg;\n break;\n default:\n break;\n }\n }\n var event = {\n type: type || 'manual',\n metadata: metadata || {},\n level: level\n };\n\n return event;\n}\n\n/*\n * get - given an obj/array and a keypath, return the value at that keypath or\n * undefined if not possible.\n *\n * @param obj - an object or array\n * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'\n * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`\n */\nfunction get(obj, path) {\n if (!obj) {\n return undefined;\n }\n var keys = path.split('.');\n var result = obj;\n try {\n for (var i = 0, len = keys.length; i < len; ++i) {\n result = result[keys[i]];\n }\n } catch (e) {\n result = undefined;\n }\n return result;\n}\n\nfunction set(obj, path, value) {\n if (!obj) {\n return;\n }\n var keys = path.split('.');\n var len = keys.length;\n if (len < 1) {\n return;\n }\n if (len === 1) {\n obj[keys[0]] = value;\n return;\n }\n try {\n var temp = obj[keys[0]] || {};\n var replacement = temp;\n for (var i = 1; i < len - 1; ++i) {\n temp[keys[i]] = temp[keys[i]] || {};\n temp = temp[keys[i]];\n }\n temp[keys[len-1]] = value;\n obj[keys[0]] = replacement;\n } catch (e) {\n return;\n }\n}\n\nfunction formatArgsAsString(args) {\n var i, len, arg;\n var result = [];\n for (i = 0, len = args.length; i < len; ++i) {\n arg = args[i];\n switch (typeName(arg)) {\n case 'object':\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500) {\n arg = arg.substr(0, 497) + '...';\n }\n break;\n case 'null':\n arg = 'null';\n break;\n case 'undefined':\n arg = 'undefined';\n break;\n case 'symbol':\n arg = arg.toString();\n break;\n }\n result.push(arg);\n }\n return result.join(' ');\n}\n\nfunction now() {\n if (Date.now) {\n return +Date.now();\n }\n return +new Date();\n}\n\nfunction filterIp(requestData, captureIp) {\n if (!requestData || !requestData['user_ip'] || captureIp === true) {\n return;\n }\n var newIp = requestData['user_ip'];\n if (!captureIp) {\n newIp = null;\n } else {\n try {\n var parts;\n if (newIp.indexOf('.') !== -1) {\n parts = newIp.split('.');\n parts.pop();\n parts.push('0');\n newIp = parts.join('.');\n } else if (newIp.indexOf(':') !== -1) {\n parts = newIp.split(':');\n if (parts.length > 2) {\n var beginning = parts.slice(0, 3);\n var slashIdx = beginning[2].indexOf('/');\n if (slashIdx !== -1) {\n beginning[2] = beginning[2].substring(0, slashIdx);\n }\n var terminal = '0000:0000:0000:0000:0000';\n newIp = beginning.concat(terminal).join(':');\n }\n } else {\n newIp = null;\n }\n } catch (e) {\n newIp = null;\n }\n }\n requestData['user_ip'] = newIp;\n}\n\nfunction handleOptions(current, input, payload, logger) {\n var result = merge(current, input, payload);\n result = updateDeprecatedOptions(result, logger);\n if (!input || input.overwriteScrubFields) {\n return result;\n }\n if (input.scrubFields) {\n result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);\n }\n return result;\n}\n\nfunction updateDeprecatedOptions(options, logger) {\n if(options.hostWhiteList && !options.hostSafeList) {\n options.hostSafeList = options.hostWhiteList;\n options.hostWhiteList = undefined;\n logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');\n }\n if(options.hostBlackList && !options.hostBlockList) {\n options.hostBlockList = options.hostBlackList;\n options.hostBlackList = undefined;\n logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');\n }\n return options;\n}\n\nmodule.exports = {\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n createItem: createItem,\n addErrorContext: addErrorContext,\n createTelemetryEvent: createTelemetryEvent,\n filterIp: filterIp,\n formatArgsAsString: formatArgsAsString,\n formatUrl: formatUrl,\n get: get,\n handleOptions: handleOptions,\n isError: isError,\n isFiniteNumber: isFiniteNumber,\n isFunction: isFunction,\n isIterable: isIterable,\n isNativeFunction: isNativeFunction,\n isObject: isObject,\n isString: isString,\n isType: isType,\n isPromise: isPromise,\n jsonParse: jsonParse,\n LEVELS: LEVELS,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n merge: merge,\n now: now,\n redact: redact,\n RollbarJSON: RollbarJSON,\n sanitizeUrl: sanitizeUrl,\n set: set,\n setupJSON: setupJSON,\n stringify: stringify,\n maxByteSize: maxByteSize,\n typeName: typeName,\n uuid4: uuid4\n};\n","'use strict';\n\n/* eslint-disable no-console */\nrequire('console-polyfill');\nvar detection = require('./detection');\nvar _ = require('../utility');\n\nfunction error() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.error(_.formatArgsAsString(args));\n } else {\n console.error.apply(console, args);\n }\n}\n\nfunction info() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.info(_.formatArgsAsString(args));\n } else {\n console.info.apply(console, args);\n }\n}\n\nfunction log() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.log(_.formatArgsAsString(args));\n } else {\n console.log.apply(console, args);\n }\n}\n\n/* eslint-enable no-console */\n\nmodule.exports = {\n error: error,\n info: info,\n log: log\n};\n","'use strict';\n\n// See https://nodejs.org/docs/latest/api/url.html\nfunction parse(url) {\n var result = {\n protocol: null, auth: null, host: null, path: null,\n hash: null, href: url, hostname: null, port: null,\n pathname: null, search: null, query: null\n };\n\n var i, last;\n i = url.indexOf('//');\n if (i !== -1) {\n result.protocol = url.substring(0,i);\n last = i+2;\n } else {\n last = 0;\n }\n \n i = url.indexOf('@', last);\n if (i !== -1) {\n result.auth = url.substring(last, i);\n last = i+1;\n }\n\n i = url.indexOf('/', last);\n if (i === -1) {\n i = url.indexOf('?', last);\n if (i === -1) {\n i = url.indexOf('#', last);\n if (i === -1) {\n result.host = url.substring(last);\n } else {\n result.host = url.substring(last, i);\n result.hash = url.substring(i);\n }\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n return result;\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n\n i = url.indexOf('#', last);\n if (i === -1) {\n result.path = url.substring(last);\n } else {\n result.path = url.substring(last, i);\n result.hash = url.substring(i);\n }\n\n if (result.path) {\n var pathParts = result.path.split('?');\n result.pathname = pathParts[0];\n result.query = pathParts[1];\n result.search = result.query ? '?' + result.query : null;\n }\n return result;\n}\n\nmodule.exports = {\n parse: parse\n};\n","'use strict';\n\nvar ErrorStackParser = require('error-stack-parser');\n\nvar UNKNOWN_FUNCTION = '?';\nvar ERR_CLASS_REGEXP = new RegExp('^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ');\n\nfunction guessFunctionName() {\n return UNKNOWN_FUNCTION;\n}\n\n\nfunction gatherContext() {\n return null;\n}\n\n\nfunction Frame(stackFrame) {\n var data = {};\n\n data._stackFrame = stackFrame;\n\n data.url = stackFrame.fileName;\n data.line = stackFrame.lineNumber;\n data.func = stackFrame.functionName;\n data.column = stackFrame.columnNumber;\n data.args = stackFrame.args;\n\n data.context = gatherContext();\n\n return data;\n}\n\n\nfunction Stack(exception, skip) {\n function getStack() {\n var parserStack = [];\n\n skip = skip || 0;\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch(e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = skip; i < parserStack.length; i++) {\n stack.push(new Frame(parserStack[i]));\n }\n\n return stack;\n }\n\n return {\n stack: getStack(),\n message: exception.message,\n name: _mostSpecificErrorName(exception),\n rawStack: exception.stack,\n rawException: exception\n };\n}\n\n\nfunction parse(e, skip) {\n var err = e;\n\n if (err.nested || err.cause) {\n var traceChain = [];\n while (err) {\n traceChain.push(new Stack(err, skip));\n err = err.nested || err.cause;\n\n skip = 0; // Only apply skip value to primary error\n }\n\n // Return primary error with full trace chain attached.\n traceChain[0].traceChain = traceChain;\n return traceChain[0];\n } else {\n return new Stack(err, skip);\n }\n}\n\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg || !errMsg.match) {\n return ['Unknown error. There was no error message to display.', ''];\n }\n var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);\n var errClass = '(unknown)';\n\n if (errClassMatch) {\n errClass = errClassMatch[errClassMatch.length - 1];\n errMsg = errMsg.replace((errClassMatch[errClassMatch.length - 2] || '') + errClass + ':', '');\n errMsg = errMsg.replace(/(^[\\s]+|[\\s]+$)/g, '');\n }\n return [errClass, errMsg];\n}\n\n// * Prefers any value over an empty string\n// * Prefers any value over 'Error' where possible\n// * Prefers name over constructor.name when both are more specific than 'Error'\nfunction _mostSpecificErrorName(error) {\n var name = error.name && error.name.length && error.name;\n var constructorName = error.constructor.name && error.constructor.name.length && error.constructor.name;\n\n if (!name || !constructorName) {\n return name || constructorName;\n }\n\n if (name === 'Error') {\n return constructorName;\n }\n return name;\n}\n\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame\n};\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction scrub(data, scrubFields, scrubPaths) {\n scrubFields = scrubFields || [];\n\n if (scrubPaths) {\n for (var i = 0; i < scrubPaths.length; ++i) {\n scrubPath(data, scrubPaths[i]);\n }\n }\n\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart) {\n return paramPart + _.redact();\n }\n\n function paramScrubber(v) {\n var i;\n if (_.isType(v, 'string')) {\n for (i = 0; i < queryRes.length; ++i) {\n v = v.replace(queryRes[i], redactQueryParam);\n }\n }\n return v;\n }\n\n function valScrubber(k, v) {\n var i;\n for (i = 0; i < paramRes.length; ++i) {\n if (paramRes[i].test(k)) {\n v = _.redact();\n break;\n }\n }\n return v;\n }\n\n function scrubber(k, v, seen) {\n var tmpV = valScrubber(k, v);\n if (tmpV === v) {\n if (_.isType(v, 'object') || _.isType(v, 'array')) {\n return traverse(v, scrubber, seen);\n }\n return paramScrubber(tmpV);\n } else {\n return tmpV;\n }\n }\n\n return traverse(data, scrubber);\n}\n\nfunction scrubPath(obj, path) {\n var keys = path.split('.');\n var last = keys.length - 1;\n try {\n for (var i = 0; i <= last; ++i) {\n if (i < last) {\n obj = obj[keys[i]];\n } else {\n obj[keys[i]] = _.redact();\n }\n }\n } catch (e) {\n // Missing key is OK;\n }\n}\n\nfunction _getScrubFieldRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '^\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?$';\n ret.push(new RegExp(pat, 'i'));\n }\n return ret;\n}\n\n\nfunction _getScrubQueryParamRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?';\n ret.push(new RegExp('(' + pat + '=)([^&\\\\n]+)', 'igm'));\n }\n return ret;\n}\n\nmodule.exports = scrub;\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction traverse(obj, func, seen) {\n var k, v, i;\n var isObj = _.isType(obj, 'object');\n var isArray = _.isType(obj, 'array');\n var keys = [];\n var seenIndex;\n\n // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.\n seen = seen || { obj: [], mapped: []};\n\n if (isObj) {\n seenIndex = seen.obj.indexOf(obj);\n\n if (isObj && seenIndex !== -1) {\n // Prefer the mapped object if there is one.\n return seen.mapped[seenIndex] || seen.obj[seenIndex];\n }\n\n seen.obj.push(obj);\n seenIndex = seen.obj.length - 1;\n }\n\n if (isObj) {\n for (k in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, k)) {\n keys.push(k);\n }\n }\n } else if (isArray) {\n for (i = 0; i < obj.length; ++i) {\n keys.push(i);\n }\n }\n\n var result = isObj ? {} : [];\n var same = true;\n for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n result[k] = func(k, v, seen);\n same = same && result[k] === obj[k];\n }\n\n if (isObj && !same) {\n seen.mapped[seenIndex] = result;\n }\n\n return !same ? result : obj;\n}\n\nmodule.exports = traverse;\n","'use strict';\n\nvar rollbar = require('../rollbar');\n\nvar options = (typeof window !== 'undefined') && window._rollbarConfig;\nvar alias = options && options.globalAlias || 'Rollbar';\nvar shimRunning = (typeof window !== 'undefined') && window[alias] && typeof window[alias].shimId === 'function' && window[alias].shimId() !== undefined;\n\nif ((typeof window !== 'undefined') && !window._rollbarStartTime) {\n window._rollbarStartTime = (new Date()).getTime();\n}\n\nif (!shimRunning && options) {\n var Rollbar = new rollbar(options);\n window[alias] = Rollbar;\n} else if (typeof window !== 'undefined') {\n window.rollbar = rollbar;\n window._rollbarDidLoad = true;\n} else if (typeof self !== 'undefined') {\n self.rollbar = rollbar;\n self._rollbarDidLoad = true;\n}\n\nmodule.exports = rollbar;\n","'use strict';\n\nvar Rollbar = require('./core');\nvar telemeter = require('../telemetry');\nvar instrumenter = require('./telemetry');\nvar polyfillJSON = require('../utility/polyfillJSON');\nvar wrapGlobals = require('./wrapGlobals');\nvar scrub = require('../scrub');\nvar truncation = require('../truncation');\n\nRollbar.setComponents({\n telemeter: telemeter,\n instrumenter: instrumenter,\n polyfillJSON: polyfillJSON,\n wrapGlobals: wrapGlobals,\n scrub: scrub,\n truncation: truncation\n});\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar Client = require('../rollbar');\nvar _ = require('../utility');\nvar API = require('../api');\nvar logger = require('./logger');\nvar globals = require('./globalSetup');\n\nvar Transport = require('./transport');\nvar urllib = require('./url');\n\nvar transforms = require('./transforms');\nvar sharedTransforms = require('../transforms');\nvar predicates = require('./predicates');\nvar sharedPredicates = require('../predicates');\nvar errorParser = require('../errorParser');\n\nfunction Rollbar(options, client) {\n this.options = _.handleOptions(defaultOptions, options, null, logger);\n this.options._configuredOptions = options;\n var Telemeter = this.components.telemeter;\n var Instrumenter = this.components.instrumenter;\n var polyfillJSON = this.components.polyfillJSON;\n this.wrapGlobals = this.components.wrapGlobals;\n this.scrub = this.components.scrub;\n var truncation = this.components.truncation;\n\n var transport = new Transport(truncation);\n var api = new API(this.options, transport, urllib, truncation);\n if (Telemeter) {\n this.telemeter = new Telemeter(this.options);\n }\n this.client = client || new Client(this.options, api, logger, this.telemeter, 'browser');\n var gWindow = _gWindow();\n var gDocument = (typeof document != 'undefined') && document;\n this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers\n this.anonymousErrorsPending = 0;\n addTransformsToNotifier(this.client.notifier, this, gWindow);\n addPredicatesToQueue(this.client.queue);\n this.setupUnhandledCapture();\n if (Instrumenter) {\n this.instrumenter = new Instrumenter(this.options, this.client.telemeter, this, gWindow, gDocument);\n this.instrumenter.instrument();\n }\n _.setupJSON(polyfillJSON);\n\n // Used with rollbar-react for rollbar-react-native compatibility.\n this.rollbar = this;\n}\n\nvar _instance = null;\nRollbar.init = function(options, client) {\n if (_instance) {\n return _instance.global(options).configure(options);\n }\n _instance = new Rollbar(options, client);\n return _instance;\n};\n\nRollbar.prototype.components = {};\n\nRollbar.setComponents = function(components) {\n Rollbar.prototype.components = components;\n}\n\nfunction handleUninitialized(maybeCallback) {\n var message = 'Rollbar is not initialized';\n logger.error(message);\n if (maybeCallback) {\n maybeCallback(new Error(message));\n }\n}\n\nRollbar.prototype.global = function(options) {\n this.client.global(options);\n return this;\n};\nRollbar.global = function(options) {\n if (_instance) {\n return _instance.global(options);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.configure = function(options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = {payload: payloadData};\n }\n this.options = _.handleOptions(oldOptions, options, payload, logger);\n this.options._configuredOptions = _.handleOptions(oldOptions._configuredOptions, options, payload);\n this.client.configure(this.options, payloadData);\n this.instrumenter && this.instrumenter.configure(this.options);\n this.setupUnhandledCapture();\n return this;\n};\nRollbar.configure = function(options, payloadData) {\n if (_instance) {\n return _instance.configure(options, payloadData);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.lastError = function() {\n return this.client.lastError;\n};\nRollbar.lastError = function() {\n if (_instance) {\n return _instance.lastError();\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.log = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.log(item);\n return {uuid: uuid};\n};\nRollbar.log = function() {\n if (_instance) {\n return _instance.log.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.debug = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.debug(item);\n return {uuid: uuid};\n};\nRollbar.debug = function() {\n if (_instance) {\n return _instance.debug.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.info = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.info(item);\n return {uuid: uuid};\n};\nRollbar.info = function() {\n if (_instance) {\n return _instance.info.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warn = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warn(item);\n return {uuid: uuid};\n};\nRollbar.warn = function() {\n if (_instance) {\n return _instance.warn.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warning = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warning(item);\n return {uuid: uuid};\n};\nRollbar.warning = function() {\n if (_instance) {\n return _instance.warning.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.error = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.error(item);\n return {uuid: uuid};\n};\nRollbar.error = function() {\n if (_instance) {\n return _instance.error.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.critical = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.critical(item);\n return {uuid: uuid};\n};\nRollbar.critical = function() {\n if (_instance) {\n return _instance.critical.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.buildJsonPayload = function(item) {\n return this.client.buildJsonPayload(item);\n};\nRollbar.buildJsonPayload = function() {\n if (_instance) {\n return _instance.buildJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.sendJsonPayload = function(jsonPayload) {\n return this.client.sendJsonPayload(jsonPayload);\n};\nRollbar.sendJsonPayload = function() {\n if (_instance) {\n return _instance.sendJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.setupUnhandledCapture = function() {\n var gWindow = _gWindow();\n\n if (!this.unhandledExceptionsInitialized) {\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(gWindow, this);\n if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {\n this.wrapGlobals(gWindow, this);\n }\n this.unhandledExceptionsInitialized = true;\n }\n }\n if (!this.unhandledRejectionsInitialized) {\n if (this.options.captureUnhandledRejections || this.options.handleUnhandledRejections) {\n globals.captureUnhandledRejections(gWindow, this);\n this.unhandledRejectionsInitialized = true;\n }\n }\n};\n\nRollbar.prototype.handleUncaughtException = function(message, url, lineno, colno, error, context) {\n if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {\n return;\n }\n\n // Chrome will always send 5+ arguments and error will be valid or null, not undefined.\n // If error is undefined, we have a different caller.\n // Chrome also sends errors from web workers with null error, but does not invoke\n // prepareStackTrace() for these. Test for empty url to skip them.\n if (this.options.inspectAnonymousErrors && this.isChrome && error === null && url === '') {\n return 'anonymous';\n }\n\n var item;\n var stackInfo = _.makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n 'onerror',\n 'uncaught exception',\n errorParser\n );\n if (_.isError(error)) {\n item = this._createItem([message, error, context]);\n item._unhandledStackInfo = stackInfo;\n } else if (_.isError(url)) {\n item = this._createItem([message, url, context]);\n item._unhandledStackInfo = stackInfo;\n } else {\n item = this._createItem([message, context]);\n item.stackInfo = stackInfo;\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n this.client.log(item);\n};\n\n/**\n * Chrome only. Other browsers will ignore.\n *\n * Use Error.prepareStackTrace to extract information about errors that\n * do not have a valid error object in onerror().\n *\n * In tested version of Chrome, onerror is called first but has no way\n * to communicate with prepareStackTrace. Use a counter to let this\n * handler know which errors to send to Rollbar.\n *\n * In config options, set inspectAnonymousErrors to enable.\n */\nRollbar.prototype.handleAnonymousErrors = function() {\n if (!this.options.inspectAnonymousErrors || !this.isChrome) {\n return;\n }\n\n var r = this;\n function prepareStackTrace(error, _stack) { // eslint-disable-line no-unused-vars\n if (r.options.inspectAnonymousErrors) {\n if (r.anonymousErrorsPending) {\n // This is the only known way to detect that onerror saw an anonymous error.\n // It depends on onerror reliably being called before Error.prepareStackTrace,\n // which so far holds true on tested versions of Chrome. If versions of Chrome\n // are tested that behave differently, this logic will need to be updated\n // accordingly.\n r.anonymousErrorsPending -= 1;\n\n if (!error) {\n // Not likely to get here, but calling handleUncaughtException from here\n // without an error object would throw off the anonymousErrorsPending counter,\n // so return now.\n return;\n }\n\n // Allow this to be tracked later.\n error._isAnonymous = true;\n\n // url, lineno, colno shouldn't be needed for these errors.\n // If that changes, update this accordingly, using the unused\n // _stack param as needed (rather than parse error.toString()).\n r.handleUncaughtException(error.message, null, null, null, error);\n }\n }\n\n // Workaround to ensure stack is preserved for normal errors.\n return error.stack;\n }\n\n // https://v8.dev/docs/stack-trace-api\n try {\n Error.prepareStackTrace = prepareStackTrace;\n } catch (e) {\n this.options.inspectAnonymousErrors = false;\n this.error('anonymous error handler failed', e);\n }\n}\n\nRollbar.prototype.handleUnhandledRejection = function(reason, promise) {\n if (!this.options.captureUnhandledRejections && !this.options.handleUnhandledRejections) {\n return;\n }\n\n var message = 'unhandled rejection was null or undefined!';\n if (reason) {\n if (reason.message) {\n message = reason.message;\n } else {\n var reasonResult = _.stringify(reason);\n if (reasonResult.value) {\n message = reasonResult.value;\n }\n }\n }\n var context = (reason && reason._rollbarContext) || (promise && promise._rollbarContext);\n\n var item;\n if (_.isError(reason)) {\n item = this._createItem([message, reason, context]);\n } else {\n item = this._createItem([message, reason, context]);\n item.stackInfo = _.makeUnhandledStackInfo(\n message,\n '',\n 0,\n 0,\n null,\n 'unhandledrejection',\n '',\n errorParser\n );\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n item._originalArgs = item._originalArgs || [];\n item._originalArgs.push(promise);\n this.client.log(item);\n};\n\nRollbar.prototype.wrap = function(f, context, _before) {\n try {\n var ctxFn;\n if(_.isFunction(context)) {\n ctxFn = context;\n } else {\n ctxFn = function() { return context || {}; };\n }\n\n if (!_.isFunction(f)) {\n return f;\n }\n\n if (f._isWrap) {\n return f;\n }\n\n if (!f._rollbar_wrapped) {\n f._rollbar_wrapped = function () {\n if (_before && _.isFunction(_before)) {\n _before.apply(this, arguments);\n }\n try {\n return f.apply(this, arguments);\n } catch(exc) {\n var e = exc;\n if (e && window._rollbarWrappedError !== e) {\n if (_.isType(e, 'string')) {\n e = new String(e);\n }\n e._rollbarContext = ctxFn() || {};\n e._rollbarContext._wrappedSource = f.toString();\n\n window._rollbarWrappedError = e;\n }\n throw e;\n }\n };\n\n f._rollbar_wrapped._isWrap = true;\n\n if (f.hasOwnProperty) {\n for (var prop in f) {\n if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {\n f._rollbar_wrapped[prop] = f[prop];\n }\n }\n }\n }\n\n return f._rollbar_wrapped;\n } catch (e) {\n // Return the original function if the wrap fails.\n return f;\n }\n};\nRollbar.wrap = function(f, context) {\n if (_instance) {\n return _instance.wrap(f, context);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.captureEvent = function() {\n var event = _.createTelemetryEvent(arguments);\n return this.client.captureEvent(event.type, event.metadata, event.level);\n};\nRollbar.captureEvent = function() {\n if (_instance) {\n return _instance.captureEvent.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\n// The following two methods are used internally and are not meant for public use\nRollbar.prototype.captureDomContentLoaded = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureLoad(ts);\n};\n\n/* Internal */\n\nfunction addTransformsToNotifier(notifier, rollbar, gWindow) {\n notifier\n .addTransform(transforms.handleDomException)\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(gWindow))\n .addTransform(transforms.addClientInfo(gWindow))\n .addTransform(transforms.addPluginInfo(gWindow))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(sharedTransforms.addConfigToPayload)\n .addTransform(transforms.addScrubber(rollbar.scrub))\n .addTransform(sharedTransforms.addPayloadOptions)\n .addTransform(sharedTransforms.userTransform(logger))\n .addTransform(sharedTransforms.addConfiguredOptions)\n .addTransform(sharedTransforms.addDiagnosticKeys)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(sharedPredicates.checkLevel)\n .addPredicate(predicates.checkIgnore)\n .addPredicate(sharedPredicates.userCheckIgnore(logger))\n .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))\n .addPredicate(sharedPredicates.urlIsSafeListed(logger))\n .addPredicate(sharedPredicates.messageIsIgnored(logger));\n}\n\nRollbar.prototype.loadFull = function() {\n logger.info('Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.');\n};\n\nRollbar.prototype._createItem = function(args) {\n return _.createItem(args, logger, this);\n};\n\nfunction _getFirstFunction(args) {\n for (var i = 0, len = args.length; i < len; ++i) {\n if (_.isFunction(args[i])) {\n return args[i];\n }\n }\n return undefined;\n}\n\nfunction _gWindow() {\n return ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n}\n\nvar defaults = require('../defaults');\nvar scrubFields = require('./defaults/scrubFields');\n\nvar defaultOptions = {\n version: defaults.version,\n scrubFields: scrubFields.scrubFields,\n logLevel: defaults.logLevel,\n reportLevel: defaults.reportLevel,\n uncaughtErrorLevel: defaults.uncaughtErrorLevel,\n endpoint: defaults.endpoint,\n verbose: false,\n enabled: true,\n transmit: true,\n sendConfig: false,\n includeItemsInTelemetry: true,\n captureIp: true,\n inspectAnonymousErrors: true,\n ignoreDuplicateErrors: true,\n wrapGlobalEventHandlers: false\n};\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar _ = require('./utility');\n\n/*\n * Rollbar - the interface to Rollbar\n *\n * @param options\n * @param api\n * @param logger\n */\nfunction Rollbar(options, api, logger, telemeter, platform) {\n this.options = _.merge(options);\n this.logger = logger;\n Rollbar.rateLimiter.configureGlobal(this.options);\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.api = api;\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n\n // This must happen before the Notifier is created\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = telemeter;\n setStackTraceLimit(options);\n this.lastError = null;\n this.lastErrorHash = 'none';\n}\n\nvar defaultOptions = {\n maxItems: 0,\n itemsPerMinute: 60\n};\n\nRollbar.rateLimiter = new RateLimiter(defaultOptions);\n\nRollbar.prototype.global = function (options) {\n Rollbar.rateLimiter.configureGlobal(options);\n return this;\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n\n this.options = _.merge(oldOptions, options, payload);\n\n // This must happen before the Notifier is configured\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier && this.notifier.configure(this.options);\n this.telemeter && this.telemeter.configure(this.options);\n setStackTraceLimit(options);\n this.global(this.options);\n\n if (validateTracer(options.tracer)) {\n this.tracer = options.tracer\n }\n\n return this;\n};\n\nRollbar.prototype.log = function (item) {\n var level = this._defaultLogLevel();\n return this._log(level, item);\n};\n\nRollbar.prototype.debug = function (item) {\n this._log('debug', item);\n};\n\nRollbar.prototype.info = function (item) {\n this._log('info', item);\n};\n\nRollbar.prototype.warn = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.warning = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.error = function (item) {\n this._log('error', item);\n};\n\nRollbar.prototype.critical = function (item) {\n this._log('critical', item);\n};\n\nRollbar.prototype.wait = function (callback) {\n this.queue.wait(callback);\n};\n\nRollbar.prototype.captureEvent = function (type, metadata, level) {\n return this.telemeter && this.telemeter.captureEvent(type, metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function (ts) {\n return this.telemeter && this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (ts) {\n return this.telemeter && this.telemeter.captureLoad(ts);\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.api.buildJsonPayload(item);\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n this.api.postJsonPayload(jsonPayload);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function (defaultLevel, item) {\n var callback;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {\n if (callback) {\n var error = new Error('ignored identical item');\n error.item = item;\n callback(error);\n }\n return;\n }\n try {\n this._addTracingInfo(item);\n item.level = item.level || defaultLevel;\n this.telemeter && this.telemeter._captureRollbarItem(item);\n item.telemetryEvents = (this.telemeter && this.telemeter.copyEvents()) || [];\n this.notifier.log(item, callback);\n } catch (e) {\n if (callback) {\n callback(e);\n }\n this.logger.error(e);\n }\n};\n\nRollbar.prototype._defaultLogLevel = function () {\n return this.options.logLevel || 'debug';\n};\n\nRollbar.prototype._sameAsLastError = function (item) {\n if (!item._isUncaught) {\n return false;\n }\n var itemHash = generateItemHash(item);\n if (this.lastErrorHash === itemHash) {\n return true;\n }\n this.lastError = item.err;\n this.lastErrorHash = itemHash;\n return false;\n};\n\nRollbar.prototype._addTracingInfo = function (item) {\n // Tracer validation occurs in the constructor\n // or in the Rollbar.prototype.configure methods\n if (this.tracer) {\n // add rollbar occurrence uuid to span\n var span = this.tracer.scope().active();\n\n if (validateSpan(span)) {\n span.setTag('rollbar.error_uuid', item.uuid);\n span.setTag('rollbar.has_error', true);\n span.setTag('error', true);\n span.setTag('rollbar.item_url', `https://rollbar.com/item/uuid/?uuid=${item.uuid}`);\n span.setTag('rollbar.occurrence_url', `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`);\n\n // add span ID & trace ID to occurrence\n var opentracingSpanId = span.context().toSpanId();\n var opentracingTraceId = span.context().toTraceId();\n\n if (item.custom) {\n item.custom.opentracing_span_id = opentracingSpanId;\n item.custom.opentracing_trace_id = opentracingTraceId;\n } else {\n item.custom = {\n opentracing_span_id: opentracingSpanId,\n opentracing_trace_id: opentracingTraceId\n };\n }\n }\n }\n}\n\nfunction generateItemHash(item) {\n var message = item.message || '';\n var stack = (item.err || {}).stack || String(item.err);\n return message + '::' + stack;\n}\n\n// Node.js, Chrome, Safari, and some other browsers support this property\n// which globally sets the number of stack frames returned in an Error object.\n// If a browser can't use it, no harm done.\nfunction setStackTraceLimit(options) {\n if (options.stackTraceLimit) {\n Error.stackTraceLimit = options.stackTraceLimit;\n }\n}\n\n/**\n * Validate the Tracer object provided to the Client\n * is valid for our Opentracing use case.\n * @param {opentracer.Tracer} tracer\n */\nfunction validateTracer(tracer) {\n if (!tracer) {\n return false;\n }\n\n if (!tracer.scope || typeof tracer.scope !== 'function') {\n return false;\n }\n\n var scope = tracer.scope();\n\n if (!scope || !scope.active || typeof scope.active !== 'function') {\n return false;\n }\n\n return true;\n}\n\n/**\n * Validate the Span object provided\n * @param {opentracer.Span} span\n */\nfunction validateSpan(span) {\n if (!span || !span.context || typeof span.context !== 'function') {\n return false;\n }\n\n var spanContext = span.context();\n\n if (!spanContext\n || !spanContext.toSpanId\n || !spanContext.toTraceId\n || typeof spanContext.toSpanId !== 'function'\n || typeof spanContext.toTraceId !== 'function') {\n return false\n }\n\n return true;\n}\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar\n *\n * @param options - the same options that are accepted by configureGlobal offered as a convenience\n */\nfunction RateLimiter(options) {\n this.startTime = _.now();\n this.counter = 0;\n this.perMinCounter = 0;\n this.platform = null;\n this.platformOptions = {};\n this.configureGlobal(options);\n}\n\nRateLimiter.globalSettings = {\n startTime: _.now(),\n maxItems: undefined,\n itemsPerMinute: undefined\n};\n\n/*\n * configureGlobal - set the global rate limiter options\n *\n * @param options - Only the following values are recognized:\n * startTime: a timestamp of the form returned by (new Date()).getTime()\n * maxItems: the maximum items\n * itemsPerMinute: the max number of items to send in a given minute\n */\nRateLimiter.prototype.configureGlobal = function(options) {\n if (options.startTime !== undefined) {\n RateLimiter.globalSettings.startTime = options.startTime;\n }\n if (options.maxItems !== undefined) {\n RateLimiter.globalSettings.maxItems = options.maxItems;\n }\n if (options.itemsPerMinute !== undefined) {\n RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;\n }\n};\n\n/*\n * shouldSend - determine if we should send a given item based on rate limit settings\n *\n * @param item - the item we are about to send\n * @returns An object with the following structure:\n * error: (Error|null)\n * shouldSend: bool\n * payload: (Object|null)\n * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and\n * exactly one of error or payload will be non-null. If error is non-null, the returned Error will\n * describe the situation, but it means that we were already over a rate limit (either globally or\n * per minute) when this item was checked. If error is null, and therefore payload is non-null, it\n * means this item put us over the global rate limit and the payload should be sent to Rollbar in\n * place of the passed in item.\n */\nRateLimiter.prototype.shouldSend = function(item, now) {\n now = now || _.now();\n var elapsedTime = now - this.startTime;\n if (elapsedTime < 0 || elapsedTime >= 60000) {\n this.startTime = now;\n this.perMinCounter = 0;\n }\n\n var globalRateLimit = RateLimiter.globalSettings.maxItems;\n var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;\n\n if (checkRate(item, globalRateLimit, this.counter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimit + ' max items reached', false);\n } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimitPerMin + ' items per minute reached', false);\n }\n this.counter++;\n this.perMinCounter++;\n\n var shouldSend = !checkRate(item, globalRateLimit, this.counter);\n var perMinute = shouldSend;\n shouldSend = shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);\n return shouldSendValue(this.platform, this.platformOptions, null, shouldSend, globalRateLimit, globalRateLimitPerMin, perMinute);\n};\n\nRateLimiter.prototype.setPlatformOptions = function(platform, options) {\n this.platform = platform;\n this.platformOptions = options;\n};\n\n/* Helpers */\n\nfunction checkRate(item, limit, counter) {\n return !item.ignoreRateLimit && limit >= 1 && counter > limit;\n}\n\nfunction shouldSendValue(platform, options, error, shouldSend, globalRateLimit, limitPerMin, perMinute) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute);\n }\n return {error: error, shouldSend: shouldSend, payload: payload};\n}\n\nfunction rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute) {\n var environment = options.environment || (options.payload && options.payload.environment);\n var msg;\n if (perMinute) {\n msg = 'item per minute limit reached, ignoring errors until timeout';\n } else {\n msg = 'maxItems has been hit, ignoring errors until reset.';\n }\n var item = {\n body: {\n message: {\n body: msg,\n extra: {\n maxItems: globalRateLimit,\n itemsPerMinute: limitPerMin\n }\n }\n },\n language: 'javascript',\n environment: environment,\n notifier: {\n version: (options.notifier && options.notifier.version) || options.version\n }\n };\n if (platform === 'browser') {\n item.platform = 'browser';\n item.framework = 'browser-js';\n item.notifier.name = 'rollbar-browser-js';\n } else if (platform === 'server') {\n item.framework = options.framework || 'node-js';\n item.notifier.name = options.notifier.name;\n } else if (platform === 'react-native') {\n item.framework = options.framework || 'react-native';\n item.notifier.name = options.notifier.name;\n }\n return item;\n}\n\nmodule.exports = RateLimiter;\n","'use strict';\n\n'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isPlainObject = function isPlainObject(obj) {\n\tif (!obj || toStr.call(obj) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tvar hasOwnConstructor = hasOwn.call(obj, 'constructor');\n\tvar hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n\t// Not own constructor property must be Object\n\tif (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n\t\treturn false;\n\t}\n\n\t// Own properties are enumerated firstly, so to speed up,\n\t// if last one is own, then all properties are own.\n\tvar key;\n\tfor (key in obj) {/**/}\n\n\treturn typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\nfunction merge() {\n var i, src, copy, clone, name,\n result = {},\n current = null,\n length = arguments.length;\n\n for (i=0; i < length; i++) {\n current = arguments[i];\n if (current == null) {\n continue;\n }\n\n for (name in current) {\n src = result[name];\n copy = current[name];\n if (result !== copy) {\n if (copy && isPlainObject(copy)) {\n clone = src && isPlainObject(src) ? src : {};\n result[name] = merge(clone, copy);\n } else if (typeof copy !== 'undefined') {\n result[name] = copy;\n }\n }\n }\n }\n return result;\n}\n\nmodule.exports = merge;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Queue - an object which handles which handles a queue of items to be sent to Rollbar.\n * This object handles rate limiting via a passed in rate limiter, retries based on connection\n * errors, and filtering of items based on a set of configurable predicates. The communication to\n * the backend is performed via a given API object.\n *\n * @param rateLimiter - An object which conforms to the interface\n * rateLimiter.shouldSend(item) -> bool\n * @param api - An object which conforms to the interface\n * api.postItem(payload, function(err, response))\n * @param logger - An object used to log verbose messages if desired\n * @param options - see Queue.prototype.configure\n */\nfunction Queue(rateLimiter, api, logger, options) {\n this.rateLimiter = rateLimiter;\n this.api = api;\n this.logger = logger;\n this.options = options;\n this.predicates = [];\n this.pendingItems = [];\n this.pendingRequests = [];\n this.retryQueue = [];\n this.retryHandle = null;\n this.waitCallback = null;\n this.waitIntervalID = null;\n}\n\n/*\n * configure - updates the options this queue uses\n *\n * @param options\n */\nQueue.prototype.configure = function(options) {\n this.api && this.api.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addPredicate - adds a predicate to the end of the list of predicates for this queue\n *\n * @param predicate - function(item, options) -> (bool|{err: Error})\n * Returning true means that this predicate passes and the item is okay to go on the queue\n * Returning false means do not add the item to the queue, but it is not an error\n * Returning {err: Error} means do not add the item to the queue, and the given error explains why\n * Returning {err: undefined} is equivalent to returning true but don't do that\n */\nQueue.prototype.addPredicate = function(predicate) {\n if (_.isFunction(predicate)) {\n this.predicates.push(predicate);\n }\n return this;\n};\n\nQueue.prototype.addPendingItem = function(item) {\n this.pendingItems.push(item);\n};\n\nQueue.prototype.removePendingItem = function(item) {\n var idx = this.pendingItems.indexOf(item);\n if (idx !== -1) {\n this.pendingItems.splice(idx, 1);\n }\n};\n\n/*\n * addItem - Send an item to the Rollbar API if all of the predicates are satisfied\n *\n * @param item - The payload to send to the backend\n * @param callback - function(error, repsonse) which will be called with the response from the API\n * in the case of a success, otherwise response will be null and error will have a value. If both\n * error and response are null then the item was stopped by a predicate which did not consider this\n * to be an error condition, but nonetheless did not send the item to the API.\n * @param originalError - The original error before any transformations that is to be logged if any\n */\nQueue.prototype.addItem = function(item, callback, originalError, originalItem) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() { return; };\n }\n var predicateResult = this._applyPredicates(item);\n if (predicateResult.stop) {\n this.removePendingItem(originalItem);\n callback(predicateResult.err);\n return;\n }\n this._maybeLog(item, originalError);\n this.removePendingItem(originalItem);\n if (!this.options.transmit) {\n callback(new Error('Transmit disabled'));\n return;\n }\n this.pendingRequests.push(item);\n try {\n this._makeApiRequest(item, function(err, resp) {\n this._dequeuePendingRequest(item);\n callback(err, resp);\n }.bind(this));\n } catch (e) {\n this._dequeuePendingRequest(item);\n callback(e);\n }\n};\n\n/*\n * wait - Stop any further errors from being added to the queue, and get called back when all items\n * currently processing have finished sending to the backend.\n *\n * @param callback - function() called when all pending items have been sent\n */\nQueue.prototype.wait = function(callback) {\n if (!_.isFunction(callback)) {\n return;\n }\n this.waitCallback = callback;\n if (this._maybeCallWait()) {\n return;\n }\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitIntervalID = setInterval(function() {\n this._maybeCallWait();\n }.bind(this), 500);\n};\n\n/* _applyPredicates - Sequentially applies the predicates that have been added to the queue to the\n * given item with the currently configured options.\n *\n * @param item - An item in the queue\n * @returns {stop: bool, err: (Error|null)} - stop being true means do not add item to the queue,\n * the error value should be passed up to a callbak if we are stopping.\n */\nQueue.prototype._applyPredicates = function(item) {\n var p = null;\n for (var i = 0, len = this.predicates.length; i < len; i++) {\n p = this.predicates[i](item, this.options);\n if (!p || p.err !== undefined) {\n return {stop: true, err: p.err};\n }\n }\n return {stop: false, err: null};\n};\n\n/*\n * _makeApiRequest - Send an item to Rollbar, callback when done, if there is an error make an\n * effort to retry if we are configured to do so.\n *\n * @param item - an item ready to send to the backend\n * @param callback - function(err, response)\n */\nQueue.prototype._makeApiRequest = function(item, callback) {\n var rateLimitResponse = this.rateLimiter.shouldSend(item);\n if (rateLimitResponse.shouldSend) {\n this.api.postItem(item, function(err, resp) {\n if (err) {\n this._maybeRetry(err, item, callback);\n } else {\n callback(err, resp);\n }\n }.bind(this));\n } else if (rateLimitResponse.error) {\n callback(rateLimitResponse.error);\n } else {\n this.api.postItem(rateLimitResponse.payload, callback);\n }\n};\n\n// These are errors basically mean there is no internet connection\nvar RETRIABLE_ERRORS = ['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED', 'EHOSTUNREACH', 'EPIPE', 'EAI_AGAIN'];\n\n/*\n * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback\n * with the error.\n *\n * @param err - an error returned by the API transport\n * @param item - the item that was trying to be sent when this error occured\n * @param callback - function(err, response)\n */\nQueue.prototype._maybeRetry = function(err, item, callback) {\n var shouldRetry = false;\n if (this.options.retryInterval) {\n for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {\n if (err.code === RETRIABLE_ERRORS[i]) {\n shouldRetry = true;\n break;\n }\n }\n if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {\n item.retries = item.retries ? item.retries + 1 : 1;\n if (item.retries > this.options.maxRetries) {\n shouldRetry = false;\n }\n }\n }\n if (shouldRetry) {\n this._retryApiRequest(item, callback);\n } else {\n callback(err);\n }\n};\n\n/*\n * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process\n * that queue based on the retryInterval in the options for this queue.\n *\n * @param item - an item that failed to send due to an error we deem retriable\n * @param callback - function(err, response)\n */\nQueue.prototype._retryApiRequest = function(item, callback) {\n this.retryQueue.push({item: item, callback: callback});\n\n if (!this.retryHandle) {\n this.retryHandle = setInterval(function() {\n while (this.retryQueue.length) {\n var retryObject = this.retryQueue.shift();\n this._makeApiRequest(retryObject.item, retryObject.callback);\n }\n }.bind(this), this.options.retryInterval);\n }\n};\n\n/*\n * _dequeuePendingRequest - Removes the item from the pending request queue, this queue is used to\n * enable to functionality of providing a callback that clients can pass to `wait` to be notified\n * when the pending request queue has been emptied. This must be called when the API finishes\n * processing this item. If a `wait` callback is configured, it is called by this function.\n *\n * @param item - the item previously added to the pending request queue\n */\nQueue.prototype._dequeuePendingRequest = function(item) {\n var idx = this.pendingRequests.indexOf(item);\n if (idx !== -1) {\n this.pendingRequests.splice(idx, 1);\n this._maybeCallWait();\n }\n};\n\nQueue.prototype._maybeLog = function(data, originalError) {\n if (this.logger && this.options.verbose) {\n var message = originalError;\n message = message || _.get(data, 'body.trace.exception.message');\n message = message || _.get(data, 'body.trace_chain.0.exception.message');\n if (message) {\n this.logger.error(message);\n return;\n }\n message = _.get(data, 'body.message.body');\n if (message) {\n this.logger.log(message);\n }\n }\n};\n\nQueue.prototype._maybeCallWait = function() {\n if (_.isFunction(this.waitCallback) && this.pendingItems.length === 0 && this.pendingRequests.length === 0) {\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitCallback();\n return true;\n }\n return false;\n};\n\nmodule.exports = Queue;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Notifier - the internal object responsible for delegating between the client exposed API, the\n * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the\n * queue which handles the communcation with the Rollbar API servers.\n *\n * @param queue - an object that conforms to the interface: addItem(item, callback)\n * @param options - an object representing the options to be set for this notifier, this should have\n * any defaults already set by the caller\n */\nfunction Notifier(queue, options) {\n this.queue = queue;\n this.options = options;\n this.transforms = [];\n this.diagnostic = {};\n}\n\n/*\n * configure - updates the options for this notifier with the passed in object\n *\n * @param options - an object which gets merged with the current options set on this notifier\n * @returns this\n */\nNotifier.prototype.configure = function(options) {\n this.queue && this.queue.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addTransform - adds a transform onto the end of the queue of transforms for this notifier\n *\n * @param transform - a function which takes three arguments:\n * * item: An Object representing the data to eventually be sent to Rollbar\n * * options: The current value of the options for this notifier\n * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this\n * callback with a null value for error if it wants the processing chain to continue, otherwise\n * with an error to terminate the processing. The item should be the updated item after this\n * transform is finished modifying it.\n */\nNotifier.prototype.addTransform = function(transform) {\n if (_.isFunction(transform)) {\n this.transforms.push(transform);\n }\n return this;\n};\n\n/*\n * log - the internal log function which applies the configured transforms and then pushes onto the\n * queue to be sent to the backend.\n *\n * @param item - An object with the following structure:\n * message [String] - An optional string to be sent to rollbar\n * error [Error] - An optional error\n *\n * @param callback - A function of type function(err, resp) which will be called with exactly one\n * null argument and one non-null argument. The callback will be called once, either during the\n * transform stage if an error occurs inside a transform, or in response to the communication with\n * the backend. The second argument will be the response from the backend in case of success.\n */\nNotifier.prototype.log = function(item, callback) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!this.options.enabled) {\n return callback(new Error('Rollbar is not enabled'));\n }\n\n this.queue.addPendingItem(item);\n var originalError = item.err;\n this._applyTransforms(item, function(err, i) {\n if (err) {\n this.queue.removePendingItem(item);\n return callback(err, null);\n }\n this.queue.addItem(i, callback, originalError, item);\n }.bind(this));\n};\n\n/* Internal */\n\n/*\n * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See\n * `addTransform` for more information.\n *\n * @param item - An item to be transformed\n * @param callback - A function of type function(err, item) which will be called with a non-null\n * error and a null item in the case of a transform failure, or a null error and non-null item after\n * all transforms have been applied.\n */\nNotifier.prototype._applyTransforms = function(item, callback) {\n var transformIndex = -1;\n var transformsLength = this.transforms.length;\n var transforms = this.transforms;\n var options = this.options;\n\n var cb = function(err, i) {\n if (err) {\n callback(err, null);\n return;\n }\n\n transformIndex++;\n\n if (transformIndex === transformsLength) {\n callback(null, i);\n return;\n }\n\n transforms[transformIndex](i, options, cb);\n };\n\n cb(null, item);\n};\n\nmodule.exports = Notifier;\n","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1/item/',\n search: null,\n version: '1',\n protocol: 'https:',\n port: 443\n};\n\n/**\n * Api is an object that encapsulates methods of communicating with\n * the Rollbar API. It is a standard interface with some parts implemented\n * differently for server or browser contexts. It is an object that should\n * be instantiated when used so it can contain non-global options that may\n * be different for another instance of RollbarApi.\n *\n * @param options {\n * accessToken: the accessToken to use for posting items to rollbar\n * endpoint: an alternative endpoint to send errors to\n * must be a valid, fully qualified URL.\n * The default is: https://api.rollbar.com/api/1/item\n * proxy: if you wish to proxy requests provide an object\n * with the following keys:\n * host or hostname (required): foo.example.com\n * port (optional): 123\n * protocol (optional): https\n * }\n */\nfunction Api(options, transport, urllib, truncation, jsonBackup) {\n this.options = options;\n this.transport = transport;\n this.url = urllib;\n this.truncation = truncation;\n this.jsonBackup = jsonBackup;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, urllib);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function(data, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n var self = this;\n\n // ensure the network request is scheduled after the current tick.\n setTimeout(function() {\n self.transport.post(self.accessToken, transportOptions, payload, callback);\n }, 0);\n};\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.buildJsonPayload = function(data, callback) {\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n\n if (stringifyResult.error) {\n if (callback) {\n callback(stringifyResult.error);\n }\n return null;\n }\n\n return stringifyResult.value;\n};\n\n/**\n *\n * @param jsonPayload\n * @param callback\n */\nApi.prototype.postJsonPayload = function(jsonPayload, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n this.transport.postJsonPayload(this.accessToken, transportOptions, jsonPayload, callback);\n};\n\nApi.prototype.configure = function(options) {\n var oldOptions = this.oldOptions;\n this.options = _.merge(oldOptions, options);\n this.transportOptions = _getTransport(this.options, this.url);\n if (this.options.accessToken !== undefined) {\n this.accessToken = this.options.accessToken;\n }\n return this;\n};\n\nfunction _getTransport(options, url) {\n return helpers.getTransportFromOptions(options, defaultOptions, url);\n}\n\nmodule.exports = Api;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (!_.isType(data.context, 'string')) {\n var contextResult = _.stringify(data.context, jsonBackup);\n if (contextResult.error) {\n data.context = 'Error: could not serialize \\'context\\'';\n } else {\n data.context = contextResult.value || '';\n }\n if (data.context.length > 255) {\n data.context = data.context.substr(0, 255);\n }\n }\n return {\n access_token: accessToken,\n data: data\n };\n}\n\nfunction getTransportFromOptions(options, defaults, url) {\n var hostname = defaults.hostname;\n var protocol = defaults.protocol;\n var port = defaults.port;\n var path = defaults.path;\n var search = defaults.search;\n var timeout = options.timeout;\n var transport = detectTransport(options)\n\n var proxy = options.proxy;\n if (options.endpoint) {\n var opts = url.parse(options.endpoint);\n hostname = opts.hostname;\n protocol = opts.protocol;\n port = opts.port;\n path = opts.pathname;\n search = opts.search;\n }\n return {\n timeout: timeout,\n hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy,\n transport: transport\n };\n}\n\nfunction detectTransport(options) {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var transport = options.defaultTransport || 'xhr';\n if (typeof gWindow.fetch === 'undefined') transport = 'xhr';\n if (typeof gWindow.XMLHttpRequest === 'undefined') transport = 'fetch';\n return transport;\n}\n\nfunction transportOptions(transport, method) {\n var protocol = transport.protocol || 'https:';\n var port = transport.port || (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);\n var hostname = transport.hostname;\n var path = transport.path;\n var timeout = transport.timeout;\n var transportAPI = transport.transport;\n if (transport.search) {\n path = path + transport.search;\n }\n if (transport.proxy) {\n path = protocol + '//' + hostname + path;\n hostname = transport.proxy.host || transport.proxy.hostname;\n port = transport.proxy.port;\n protocol = transport.proxy.protocol || protocol;\n }\n return {\n timeout: timeout,\n protocol: protocol,\n hostname: hostname,\n path: path,\n port: port,\n method: method,\n transport: transportAPI\n };\n}\n\nfunction appendPathToPath(base, path) {\n var baseTrailingSlash = /\\/$/.test(base);\n var pathBeginningSlash = /^\\//.test(path);\n\n if (baseTrailingSlash && pathBeginningSlash) {\n path = path.substring(1);\n } else if (!baseTrailingSlash && !pathBeginningSlash) {\n path = '/' + path;\n }\n\n return base + path;\n}\n\nmodule.exports = {\n buildPayload: buildPayload,\n getTransportFromOptions: getTransportFromOptions,\n transportOptions: transportOptions,\n appendPathToPath: appendPathToPath\n};\n","// Console-polyfill. MIT license.\n// https://github.com/paulmillr/console-polyfill\n// Make it safe to do console.log() always.\n(function(global) {\n 'use strict';\n if (!global.console) {\n global.console = {};\n }\n var con = global.console;\n var prop, method;\n var dummy = function() {};\n var properties = ['memory'];\n var methods = ('assert,clear,count,debug,dir,dirxml,error,exception,group,' +\n 'groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,' +\n 'show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn').split(',');\n while (prop = properties.pop()) if (!con[prop]) con[prop] = {};\n while (method = methods.pop()) if (!con[method]) con[method] = dummy;\n // Using `this` for web workers & supports Browserify / Webpack.\n})(typeof window === 'undefined' ? this : window);\n","'use strict';\n\n// This detection.js module is used to encapsulate any ugly browser/feature\n// detection we may need to do.\n\n// Figure out which version of IE we're using, if any.\n// This is gleaned from http://stackoverflow.com/questions/5574842/best-way-to-check-for-ie-less-than-9-in-javascript-without-library\n// Will return an integer on IE (i.e. 8)\n// Will return undefined otherwise\nfunction getIEVersion() {\n\tvar undef;\n\tif (typeof document === 'undefined') {\n\t\treturn undef;\n\t}\n\n var v = 3,\n div = document.createElement('div'),\n all = div.getElementsByTagName('i');\n\n while (\n div.innerHTML = '',\n all[0]\n );\n\n return v > 4 ? v : undef;\n}\n\nvar Detection = {\n ieVersion: getIEVersion\n};\n\nmodule.exports = Detection;\n","'use strict';\n\nfunction captureUncaughtExceptions(window, handler, shim) {\n if (!window) { return; }\n var oldOnError;\n\n if (typeof handler._rollbarOldOnError === 'function') {\n oldOnError = handler._rollbarOldOnError;\n } else if (window.onerror) {\n oldOnError = window.onerror;\n while (oldOnError._rollbarOldOnError) {\n oldOnError = oldOnError._rollbarOldOnError;\n }\n handler._rollbarOldOnError = oldOnError;\n }\n\n handler.handleAnonymousErrors();\n\n var fn = function() {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n if (shim) {\n fn._rollbarOldOnError = oldOnError;\n }\n window.onerror = fn;\n}\n\nfunction _rollbarWindowOnError(window, r, old, args) {\n if (window._rollbarWrappedError) {\n if (!args[4]) {\n args[4] = window._rollbarWrappedError;\n }\n if (!args[5]) {\n args[5] = window._rollbarWrappedError._rollbarContext;\n }\n window._rollbarWrappedError = null;\n }\n\n var ret = r.handleUncaughtException.apply(r, args);\n\n if (old) {\n old.apply(window, args);\n }\n\n // Let other chained onerror handlers above run before setting this.\n // If an error is thrown and caught within a chained onerror handler,\n // Error.prepareStackTrace() will see that one before the one we want.\n if (ret === 'anonymous') {\n r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()\n }\n}\n\nfunction captureUnhandledRejections(window, handler, shim) {\n if (!window) { return; }\n\n if (typeof window._rollbarURH === 'function' && window._rollbarURH.belongsToShim) {\n window.removeEventListener('unhandledrejection', window._rollbarURH);\n }\n\n var rejectionHandler = function (evt) {\n var reason, promise, detail;\n try {\n reason = evt.reason;\n } catch (e) {\n reason = undefined;\n }\n try {\n promise = evt.promise;\n } catch (e) {\n promise = '[unhandledrejection] error getting `promise` from event';\n }\n try {\n detail = evt.detail;\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\n }\n } catch (e) {\n // Ignore\n }\n if (!reason) {\n reason = '[unhandledrejection] error getting `reason` from event';\n }\n\n if (handler && handler.handleUnhandledRejection) {\n handler.handleUnhandledRejection(reason, promise);\n }\n };\n rejectionHandler.belongsToShim = shim;\n window._rollbarURH = rejectionHandler;\n window.addEventListener('unhandledrejection', rejectionHandler);\n}\n\n\nmodule.exports = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections\n};\n","'use strict';\n\nvar _ = require('../utility');\nvar makeFetchRequest = require('./transport/fetch');\nvar makeXhrRequest = require('./transport/xhr');\n\n/*\n * accessToken may be embedded in payload but that should not\n * be assumed\n *\n * options: {\n * hostname\n * protocol\n * path\n * port\n * method\n * transport ('xhr' | 'fetch')\n * }\n *\n * params is an object containing key/value pairs. These\n * will be appended to the path as 'key=value&key=value'\n *\n * payload is an unserialized object\n */\nfunction Transport(truncation) {\n this.truncation = truncation;\n}\n\nTransport.prototype.get = function(accessToken, options, params, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n _.addParamsAndAccessTokenToPath(accessToken, options, params);\n\n var method = 'GET';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken, url, method, null, callback, requestFactory, options.timeout, options.transport\n );\n}\n\nTransport.prototype.post = function(accessToken, options, payload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!payload) {\n return callback(new Error('Cannot send empty request'));\n }\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n if (stringifyResult.error) {\n return callback(stringifyResult.error);\n }\n\n var writeData = stringifyResult.value;\n var method = 'POST';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken, url, method, writeData, callback, requestFactory, options.timeout, options.transport\n );\n}\n\nTransport.prototype.postJsonPayload = function (accessToken, options, jsonPayload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n var method = 'POST';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken, url, method, jsonPayload, callback, requestFactory, options.timeout, options.transport\n );\n}\n\n\n// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope\n// so Angular change detection isn't triggered on each API call.\n// This is the equivalent of runOutsideAngular().\n//\nTransport.prototype._makeZoneRequest = function () {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;\n var args = Array.prototype.slice.call(arguments);\n\n if (currentZone && currentZone._name === 'angular') {\n var rootZone = currentZone._parent;\n var self = this;\n rootZone.run(function () {\n self._makeRequest.apply(undefined, args);\n });\n } else {\n this._makeRequest.apply(undefined, args);\n }\n}\n\nTransport.prototype._makeRequest = function (\n accessToken, url, method, data, callback, requestFactory, timeout, transport\n) {\n if (typeof RollbarProxy !== 'undefined') {\n return _proxyRequest(data, callback);\n }\n\n if (transport === 'fetch') {\n makeFetchRequest(accessToken, url, method, data, callback, timeout)\n } else {\n makeXhrRequest(accessToken, url, method, data, callback, requestFactory, timeout)\n }\n}\n\n/* global RollbarProxy */\nfunction _proxyRequest(json, callback) {\n var rollbarProxy = new RollbarProxy();\n rollbarProxy.sendJsonPayload(\n json,\n function(_msg) { /* do nothing */ }, // eslint-disable-line no-unused-vars\n function(err) {\n callback(new Error(err));\n }\n );\n}\n\nmodule.exports = Transport;\n","'use strict';\n\nvar logger = require('../logger');\nvar _ = require('../../utility');\n\nfunction makeFetchRequest(accessToken, url, method, data, callback, timeout) {\n var controller;\n var timeoutId;\n\n if(_.isFiniteNumber(timeout)) {\n controller = new AbortController();\n timeoutId = setTimeout(function () {controller.abort()}, timeout);\n }\n\n fetch(url, {\n method: method,\n headers: {\n 'Content-Type': 'application/json',\n 'X-Rollbar-Access-Token': accessToken,\n signal: controller && controller.signal\n },\n body: data,\n })\n .then(function (response) {\n if (timeoutId) clearTimeout(timeoutId);\n return response.json();\n })\n .then(function (data) {\n callback(null, data);\n })\n .catch(function (error) {\n logger.error(error.message);\n callback(error);\n });\n}\n\nmodule.exports = makeFetchRequest;\n","'use strict';\n\n/*global XDomainRequest*/\n\nvar _ = require('../../utility');\nvar logger = require('../logger');\n\nfunction makeXhrRequest(accessToken, url, method, data, callback, requestFactory, timeout) {\n var request;\n if (requestFactory) {\n request = requestFactory();\n } else {\n request = _createXMLHTTPObject();\n }\n if (!request) {\n // Give up, no way to send requests\n return callback(new Error('No way to send a request'));\n }\n try {\n try {\n var onreadystatechange = function() {\n try {\n if (onreadystatechange && request.readyState === 4) {\n onreadystatechange = undefined;\n\n var parseResponse = _.jsonParse(request.responseText);\n if (_isSuccess(request)) {\n callback(parseResponse.error, parseResponse.value);\n return;\n } else if (_isNormalFailure(request)) {\n if (request.status === 403) {\n // likely caused by using a server access token\n var message = parseResponse.value && parseResponse.value.message;\n logger.error(message);\n }\n // return valid http status codes\n callback(new Error(String(request.status)));\n } else {\n // IE will return a status 12000+ on some sort of connection failure,\n // so we return a blank error\n // http://msdn.microsoft.com/en-us/library/aa383770%28VS.85%29.aspx\n var msg = 'XHR response had no status code (likely connection failure)';\n callback(_newRetriableError(msg));\n }\n }\n } catch (ex) {\n //jquery source mentions firefox may error out while accessing the\n //request members if there is a network error\n //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111\n var exc;\n if (ex && ex.stack) {\n exc = ex;\n } else {\n exc = new Error(ex);\n }\n callback(exc);\n }\n };\n\n request.open(method, url, true);\n if (request.setRequestHeader) {\n request.setRequestHeader('Content-Type', 'application/json');\n request.setRequestHeader('X-Rollbar-Access-Token', accessToken);\n }\n\n if(_.isFiniteNumber(timeout)) {\n request.timeout = timeout;\n }\n\n request.onreadystatechange = onreadystatechange;\n request.send(data);\n } catch (e1) {\n // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest\n if (typeof XDomainRequest !== 'undefined') {\n\n // Assume we are in a really old browser which has a bunch of limitations:\n // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx\n\n // Extreme paranoia: if we have XDomainRequest then we have a window, but just in case\n if (!window || !window.location) {\n return callback(new Error('No window available during request, unknown environment'));\n }\n\n // If the current page is http, try and send over http\n if (window.location.href.substring(0, 5) === 'http:' && url.substring(0, 5) === 'https') {\n url = 'http' + url.substring(5);\n }\n\n var xdomainrequest = new XDomainRequest();\n xdomainrequest.onprogress = function() {};\n xdomainrequest.ontimeout = function() {\n var msg = 'Request timed out';\n var code = 'ETIMEDOUT';\n callback(_newRetriableError(msg, code));\n };\n xdomainrequest.onerror = function() {\n callback(new Error('Error during request'));\n };\n xdomainrequest.onload = function() {\n var parseResponse = _.jsonParse(xdomainrequest.responseText);\n callback(parseResponse.error, parseResponse.value);\n };\n xdomainrequest.open(method, url, true);\n xdomainrequest.send(data);\n } else {\n callback(new Error('Cannot find a method to transport a request'));\n }\n }\n } catch (e2) {\n callback(e2);\n }\n}\n\nfunction _createXMLHTTPObject() {\n /* global ActiveXObject:false */\n\n var factories = [\n function () {\n return new XMLHttpRequest();\n },\n function () {\n return new ActiveXObject('Msxml2.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Msxml3.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Microsoft.XMLHTTP');\n }\n ];\n var xmlhttp;\n var i;\n var numFactories = factories.length;\n for (i = 0; i < numFactories; i++) {\n /* eslint-disable no-empty */\n try {\n xmlhttp = factories[i]();\n break;\n } catch (e) {\n // pass\n }\n /* eslint-enable no-empty */\n }\n return xmlhttp;\n}\n\nfunction _isSuccess(r) {\n return r && r.status && r.status === 200;\n}\n\nfunction _isNormalFailure(r) {\n return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;\n}\n\nfunction _newRetriableError(message, code) {\n var err = new Error(message);\n err.code = code || 'ENOTFOUND';\n return err;\n}\n\nmodule.exports = makeXhrRequest;\n","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('../errorParser');\nvar logger = require('./logger');\n\nfunction handleDomException(item, options, callback) {\n if(item.err && errorParser.Stack(item.err).name === 'DOMException') {\n var originalError = new Error();\n originalError.name = item.err.name;\n originalError.message = item.err.message;\n originalError.stack = item.err.stack;\n originalError.nested = item.err;\n item.err = originalError;\n }\n callback(null, item);\n}\n\nfunction handleItemWithError(item, options, callback) {\n item.data = item.data || {};\n if (item.err) {\n try {\n item.stackInfo = item.err._savedStackTrace || errorParser.parse(item.err, item.skipFrames);\n\n if (options.addErrorContext) {\n addErrorContext(item);\n }\n } catch (e) {\n logger.error('Error while parsing the error object.', e);\n try {\n item.message = item.err.message || item.err.description || item.message || String(item.err);\n } catch (e2) {\n item.message = String(item.err) || String(e2);\n }\n delete item.err;\n }\n }\n callback(null, item);\n}\n\nfunction addErrorContext(item) {\n var chain = [];\n var err = item.err;\n\n chain.push(err);\n\n while (err.nested || err.cause) {\n err = err.nested || err.cause;\n chain.push(err);\n }\n\n _.addErrorContext(item, chain);\n}\n\nfunction ensureItemHasSomethingToSay(item, options, callback) {\n if (!item.message && !item.stackInfo && !item.custom) {\n callback(new Error('No message, stack info, or custom data'), null);\n }\n callback(null, item);\n}\n\nfunction addBaseInfo(item, options, callback) {\n var environment = (options.payload && options.payload.environment) || options.environment;\n item.data = _.merge(item.data, {\n environment: environment,\n level: item.level,\n endpoint: options.endpoint,\n platform: 'browser',\n framework: 'browser-js',\n language: 'javascript',\n server: {},\n uuid: item.uuid,\n notifier: {\n name: 'rollbar-browser-js',\n version: options.version\n },\n custom: item.custom\n });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function(item, options, callback) {\n var requestInfo = {};\n\n if (window && window.location) {\n requestInfo.url = window.location.href;\n requestInfo.query_string = window.location.search;\n }\n\n var remoteString = '$remote_ip';\n if (!options.captureIp) {\n remoteString = null;\n } else if (options.captureIp !== true) {\n remoteString += '_anonymize';\n }\n if (remoteString) requestInfo.user_ip = remoteString;\n\n if (Object.keys(requestInfo).length > 0) {\n _.set(item, 'data.request', requestInfo);\n }\n\n callback(null, item);\n };\n}\n\nfunction addClientInfo(window) {\n return function(item, options, callback) {\n if (!window) {\n return callback(null, item);\n }\n var nav = window.navigator || {};\n var scr = window.screen || {};\n _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: nav.userAgent,\n language: nav.language,\n cookie_enabled: nav.cookieEnabled,\n screen: {\n width: scr.width,\n height: scr.height\n }\n }\n });\n callback(null, item);\n };\n}\n\nfunction addPluginInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.navigator) {\n return callback(null, item);\n }\n var plugins = [];\n var navPlugins = window.navigator.plugins || [];\n var cur;\n for (var i=0, l=navPlugins.length; i < l; ++i) {\n cur = navPlugins[i];\n plugins.push({name: cur.name, description: cur.description});\n }\n _.set(item, 'data.client.javascript.plugins', plugins);\n callback(null, item);\n };\n}\n\nfunction addBody(item, options, callback) {\n if (item.stackInfo) {\n if (item.stackInfo.traceChain) {\n addBodyTraceChain(item, options, callback);\n } else {\n addBodyTrace(item, options, callback);\n }\n } else {\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction addBodyMessage(item, options, callback) {\n var message = item.message;\n var custom = item.custom;\n\n if (!message) {\n message = 'Item sent with null or missing arguments.';\n }\n var result = {\n body: message\n };\n\n if (custom) {\n result.extra = _.merge(custom);\n }\n\n _.set(item, 'data.body', {message: result});\n callback(null, item);\n}\n\nfunction stackFromItem(item) {\n // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = item.stackInfo.stack;\n if (stack && stack.length === 0 && item._unhandledStackInfo && item._unhandledStackInfo.stack) {\n stack = item._unhandledStackInfo.stack;\n }\n return stack;\n}\n\nfunction addBodyTraceChain(item, options, callback) {\n var traceChain = item.stackInfo.traceChain;\n var traces = [];\n\n var traceChainLength = traceChain.length;\n for (var i = 0; i < traceChainLength; i++) {\n var trace = buildTrace(item, traceChain[i], options);\n traces.push(trace);\n }\n\n _.set(item, 'data.body', {trace_chain: traces});\n callback(null, item);\n}\n\nfunction addBodyTrace(item, options, callback) {\n var stack = stackFromItem(item);\n\n if (stack) {\n var trace = buildTrace(item, item.stackInfo, options);\n _.set(item, 'data.body', {trace: trace});\n callback(null, item);\n } else {\n var stackInfo = item.stackInfo;\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction buildTrace(item, stackInfo, options) {\n var description = item && item.data.description;\n var custom = item && item.custom;\n var stack = stackFromItem(item);\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n var trace = {\n exception: {\n 'class': className,\n message: message\n }\n };\n\n if (description) {\n trace.exception.description = description;\n }\n\n if (stack) {\n if (stack.length === 0) {\n trace.exception.stack = stackInfo.rawStack;\n trace.exception.raw = String(stackInfo.rawException);\n }\n var stackFrame;\n var frame;\n var code;\n var pre;\n var post;\n var contextLength;\n var i, mid;\n\n trace.frames = [];\n for (i = 0; i < stack.length; ++i) {\n stackFrame = stack[i];\n frame = {\n filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',\n lineno: stackFrame.line || null,\n method: (!stackFrame.func || stackFrame.func === '?') ? '[anonymous]' : stackFrame.func,\n colno: stackFrame.column\n };\n if (options.sendFrameUrl) {\n frame.url = stackFrame.url;\n }\n if (frame.method && frame.method.endsWith && frame.method.endsWith('_rollbar_wrapped')) {\n continue;\n }\n\n code = pre = post = null;\n contextLength = stackFrame.context ? stackFrame.context.length : 0;\n if (contextLength) {\n mid = Math.floor(contextLength / 2);\n pre = stackFrame.context.slice(0, mid);\n code = stackFrame.context[mid];\n post = stackFrame.context.slice(mid);\n }\n\n if (code) {\n frame.code = code;\n }\n\n if (pre || post) {\n frame.context = {};\n if (pre && pre.length) {\n frame.context.pre = pre;\n }\n if (post && post.length) {\n frame.context.post = post;\n }\n }\n\n if (stackFrame.args) {\n frame.args = stackFrame.args;\n }\n\n trace.frames.push(frame);\n }\n\n // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last\n trace.frames.reverse();\n\n if (custom) {\n trace.extra = _.merge(custom);\n }\n }\n\n return trace;\n}\n\nfunction errorClass(stackInfo, guess, options) {\n if (stackInfo.name) {\n return stackInfo.name;\n } else if (options.guessErrorClass) {\n return guess;\n } else {\n return '(unknown)';\n }\n}\n\nfunction addScrubber(scrubFn) {\n return function (item, options, callback) {\n if (scrubFn) {\n var scrubFields = options.scrubFields || [];\n var scrubPaths = options.scrubPaths || [];\n item.data = scrubFn(item.data, scrubFields, scrubPaths);\n }\n callback(null, item);\n }\n}\n\nmodule.exports = {\n handleDomException: handleDomException,\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n addScrubber: addScrubber\n};\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('error-stack-parser', ['stackframe'], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory(require('stackframe'));\n } else {\n root.ErrorStackParser = factory(root.StackFrame);\n }\n}(this, function ErrorStackParser(StackFrame) {\n 'use strict';\n\n var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\\S+:\\d+/;\n var CHROME_IE_STACK_REGEXP = /^\\s*at .*(\\S+:\\d+|\\(native\\))/m;\n var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\\[native code])?$/;\n\n return {\n /**\n * Given an Error object, extract the most information from it.\n *\n * @param {Error} error object\n * @return {Array} of StackFrames\n */\n parse: function ErrorStackParser$$parse(error) {\n if (typeof error.stacktrace !== 'undefined' || typeof error['opera#sourceloc'] !== 'undefined') {\n return this.parseOpera(error);\n } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {\n return this.parseV8OrIE(error);\n } else if (error.stack) {\n return this.parseFFOrSafari(error);\n } else {\n throw new Error('Cannot parse given Error object');\n }\n },\n\n // Separate line and column numbers from a string of the form: (URI:Line:Column)\n extractLocation: function ErrorStackParser$$extractLocation(urlLike) {\n // Fail-fast but return locations like \"(native)\"\n if (urlLike.indexOf(':') === -1) {\n return [urlLike];\n }\n\n var regExp = /(.+?)(?::(\\d+))?(?::(\\d+))?$/;\n var parts = regExp.exec(urlLike.replace(/[()]/g, ''));\n return [parts[1], parts[2] || undefined, parts[3] || undefined];\n },\n\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(CHROME_IE_STACK_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n if (line.indexOf('(eval ') > -1) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n line = line.replace(/eval code/g, 'eval').replace(/(\\(eval at [^()]*)|(,.*$)/g, '');\n }\n var sanitizedLine = line.replace(/^\\s+/, '').replace(/\\(eval code/g, '(').replace(/^.*?\\s+/, '');\n\n // capture and preseve the parenthesized location \"(/foo/my bar.js:12:87)\" in\n // case it has spaces in it, as the string is split on \\s+ later on\n var location = sanitizedLine.match(/ (\\(.+\\)$)/);\n\n // remove the parenthesized location from the line, if it was matched\n sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;\n\n // if a location was matched, pass it to extractLocation() otherwise pass all sanitizedLine\n // because this line doesn't have function name\n var locationParts = this.extractLocation(location ? location[1] : sanitizedLine);\n var functionName = location && sanitizedLine || undefined;\n var fileName = ['eval', ''].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];\n\n return new StackFrame({\n functionName: functionName,\n fileName: fileName,\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n },\n\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n if (line.indexOf(' > eval') > -1) {\n line = line.replace(/ line (\\d+)(?: > eval line \\d+)* > eval:\\d+:\\d+/g, ':$1');\n }\n\n if (line.indexOf('@') === -1 && line.indexOf(':') === -1) {\n // Safari eval frames only have function names and nothing else\n return new StackFrame({\n functionName: line\n });\n } else {\n var functionNameRegex = /((.*\".+\"[^@]*)?[^@]*)(?:@)/;\n var matches = line.match(functionNameRegex);\n var functionName = matches && matches[1] ? matches[1] : undefined;\n var locationParts = this.extractLocation(line.replace(functionNameRegex, ''));\n\n return new StackFrame({\n functionName: functionName,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }\n }, this);\n },\n\n parseOpera: function ErrorStackParser$$parseOpera(e) {\n if (!e.stacktrace || (e.message.indexOf('\\n') > -1 &&\n e.message.split('\\n').length > e.stacktrace.split('\\n').length)) {\n return this.parseOpera9(e);\n } else if (!e.stack) {\n return this.parseOpera10(e);\n } else {\n return this.parseOpera11(e);\n }\n },\n\n parseOpera9: function ErrorStackParser$$parseOpera9(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)/i;\n var lines = e.message.split('\\n');\n var result = [];\n\n for (var i = 2, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(new StackFrame({\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n }));\n }\n }\n\n return result;\n },\n\n parseOpera10: function ErrorStackParser$$parseOpera10(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)(?:: In function (\\S+))?$/i;\n var lines = e.stacktrace.split('\\n');\n var result = [];\n\n for (var i = 0, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(\n new StackFrame({\n functionName: match[3] || undefined,\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n })\n );\n }\n }\n\n return result;\n },\n\n // Opera 10.65+ Error.stack very similar to FF/Safari\n parseOpera11: function ErrorStackParser$$parseOpera11(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);\n }, this);\n\n return filtered.map(function(line) {\n var tokens = line.split('@');\n var locationParts = this.extractLocation(tokens.pop());\n var functionCall = (tokens.shift() || '');\n var functionName = functionCall\n .replace(//, '$2')\n .replace(/\\([^)]*\\)/g, '') || undefined;\n var argsRaw;\n if (functionCall.match(/\\(([^)]*)\\)/)) {\n argsRaw = functionCall.replace(/^[^(]+\\(([^)]*)\\)$/, '$1');\n }\n var args = (argsRaw === undefined || argsRaw === '[arguments not available]') ?\n undefined : argsRaw.split(',');\n\n return new StackFrame({\n functionName: functionName,\n args: args,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n }\n };\n}));\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('stackframe', [], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.StackFrame = factory();\n }\n}(this, function() {\n 'use strict';\n function _isNumber(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n }\n\n function _capitalize(str) {\n return str.charAt(0).toUpperCase() + str.substring(1);\n }\n\n function _getter(p) {\n return function() {\n return this[p];\n };\n }\n\n var booleanProps = ['isConstructor', 'isEval', 'isNative', 'isToplevel'];\n var numericProps = ['columnNumber', 'lineNumber'];\n var stringProps = ['fileName', 'functionName', 'source'];\n var arrayProps = ['args'];\n var objectProps = ['evalOrigin'];\n\n var props = booleanProps.concat(numericProps, stringProps, arrayProps, objectProps);\n\n function StackFrame(obj) {\n if (!obj) return;\n for (var i = 0; i < props.length; i++) {\n if (obj[props[i]] !== undefined) {\n this['set' + _capitalize(props[i])](obj[props[i]]);\n }\n }\n }\n\n StackFrame.prototype = {\n getArgs: function() {\n return this.args;\n },\n setArgs: function(v) {\n if (Object.prototype.toString.call(v) !== '[object Array]') {\n throw new TypeError('Args must be an Array');\n }\n this.args = v;\n },\n\n getEvalOrigin: function() {\n return this.evalOrigin;\n },\n setEvalOrigin: function(v) {\n if (v instanceof StackFrame) {\n this.evalOrigin = v;\n } else if (v instanceof Object) {\n this.evalOrigin = new StackFrame(v);\n } else {\n throw new TypeError('Eval Origin must be an Object or StackFrame');\n }\n },\n\n toString: function() {\n var fileName = this.getFileName() || '';\n var lineNumber = this.getLineNumber() || '';\n var columnNumber = this.getColumnNumber() || '';\n var functionName = this.getFunctionName() || '';\n if (this.getIsEval()) {\n if (fileName) {\n return '[eval] (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return '[eval]:' + lineNumber + ':' + columnNumber;\n }\n if (functionName) {\n return functionName + ' (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return fileName + ':' + lineNumber + ':' + columnNumber;\n }\n };\n\n StackFrame.fromString = function StackFrame$$fromString(str) {\n var argsStartIndex = str.indexOf('(');\n var argsEndIndex = str.lastIndexOf(')');\n\n var functionName = str.substring(0, argsStartIndex);\n var args = str.substring(argsStartIndex + 1, argsEndIndex).split(',');\n var locationString = str.substring(argsEndIndex + 1);\n\n if (locationString.indexOf('@') === 0) {\n var parts = /@(.+?)(?::(\\d+))?(?::(\\d+))?$/.exec(locationString, '');\n var fileName = parts[1];\n var lineNumber = parts[2];\n var columnNumber = parts[3];\n }\n\n return new StackFrame({\n functionName: functionName,\n args: args || undefined,\n fileName: fileName,\n lineNumber: lineNumber || undefined,\n columnNumber: columnNumber || undefined\n });\n };\n\n for (var i = 0; i < booleanProps.length; i++) {\n StackFrame.prototype['get' + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);\n StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function(p) {\n return function(v) {\n this[p] = Boolean(v);\n };\n })(booleanProps[i]);\n }\n\n for (var j = 0; j < numericProps.length; j++) {\n StackFrame.prototype['get' + _capitalize(numericProps[j])] = _getter(numericProps[j]);\n StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function(p) {\n return function(v) {\n if (!_isNumber(v)) {\n throw new TypeError(p + ' must be a Number');\n }\n this[p] = Number(v);\n };\n })(numericProps[j]);\n }\n\n for (var k = 0; k < stringProps.length; k++) {\n StackFrame.prototype['get' + _capitalize(stringProps[k])] = _getter(stringProps[k]);\n StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function(p) {\n return function(v) {\n this[p] = String(v);\n };\n })(stringProps[k]);\n }\n\n return StackFrame;\n}));\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction itemToPayload(item, options, callback) {\n var data = item.data;\n\n if (item._isUncaught) {\n data._isUncaught = true;\n }\n if (item._originalArgs) {\n data._originalArgs = item._originalArgs;\n }\n callback(null, data);\n}\n\nfunction addPayloadOptions(item, options, callback) {\n var payloadOptions = options.payload || {};\n if (payloadOptions.body) {\n delete payloadOptions.body;\n }\n\n item.data = _.merge(item.data, payloadOptions);\n callback(null, item);\n}\n\nfunction addTelemetryData(item, options, callback) {\n if (item.telemetryEvents) {\n _.set(item, 'data.body.telemetry', item.telemetryEvents);\n }\n callback(null, item);\n}\n\nfunction addMessageWithError(item, options, callback) {\n if (!item.message) {\n callback(null, item);\n return;\n }\n var tracePath = 'data.body.trace_chain.0';\n var trace = _.get(item, tracePath);\n if (!trace) {\n tracePath = 'data.body.trace';\n trace = _.get(item, tracePath);\n }\n if (trace) {\n if (!(trace.exception && trace.exception.description)) {\n _.set(item, tracePath+'.exception.description', item.message);\n callback(null, item);\n return;\n }\n var extra = _.get(item, tracePath+'.extra') || {};\n var newExtra = _.merge(extra, {message: item.message});\n _.set(item, tracePath+'.extra', newExtra);\n }\n callback(null, item);\n}\n\nfunction userTransform(logger) {\n return function(item, options, callback) {\n var newItem = _.merge(item);\n var response = null;\n try {\n if (_.isFunction(options.transform)) {\n response = options.transform(newItem.data, item);\n }\n } catch (e) {\n options.transform = null;\n logger.error('Error while calling custom transform() function. Removing custom transform().', e);\n callback(null, item);\n return;\n }\n if(_.isPromise(response)) {\n response.then(function (promisedItem) {\n if(promisedItem) {\n newItem.data = promisedItem;\n }\n callback(null, newItem);\n }, function (error) {\n callback(error, item);\n });\n } else {\n callback(null, newItem);\n }\n }\n}\n\nfunction addConfigToPayload(item, options, callback) {\n if (!options.sendConfig) {\n return callback(null, item);\n }\n var configKey = '_rollbarConfig';\n var custom = _.get(item, 'data.custom') || {};\n custom[configKey] = options;\n item.data.custom = custom;\n callback(null, item);\n}\n\nfunction addFunctionOption(options, name) {\n if(_.isFunction(options[name])) {\n options[name] = options[name].toString();\n }\n}\n\nfunction addConfiguredOptions(item, options, callback) {\n var configuredOptions = options._configuredOptions;\n\n // These must be stringified or they'll get dropped during serialization.\n addFunctionOption(configuredOptions, 'transform');\n addFunctionOption(configuredOptions, 'checkIgnore');\n addFunctionOption(configuredOptions, 'onSendCallback');\n\n delete configuredOptions.accessToken;\n item.data.notifier.configured_options = configuredOptions;\n callback(null, item);\n}\n\nfunction addDiagnosticKeys(item, options, callback) {\n var diagnostic = _.merge(item.notifier.client.notifier.diagnostic, item.diagnostic);\n\n if (_.get(item, 'err._isAnonymous')) {\n diagnostic.is_anonymous = true;\n }\n\n if (item._isUncaught) {\n diagnostic.is_uncaught = item._isUncaught;\n }\n\n if (item.err) {\n try {\n diagnostic.raw_error = {\n message: item.err.message,\n name: item.err.name,\n constructor_name: item.err.constructor && item.err.constructor.name,\n filename: item.err.fileName,\n line: item.err.lineNumber,\n column: item.err.columnNumber,\n stack: item.err.stack\n };\n } catch (e) {\n diagnostic.raw_error = { failed: String(e) };\n }\n }\n\n item.data.notifier.diagnostic = _.merge(item.data.notifier.diagnostic, diagnostic);\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addPayloadOptions: addPayloadOptions,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError,\n userTransform: userTransform,\n addConfigToPayload: addConfigToPayload,\n addConfiguredOptions: addConfiguredOptions,\n addDiagnosticKeys: addDiagnosticKeys\n};\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction checkIgnore(item, settings) {\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore\n};\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction checkLevel(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = settings.reportLevel;\n var reportLevelVal = _.LEVELS[reportLevel] || 0;\n\n if (levelVal < reportLevelVal) {\n return false;\n }\n return true;\n}\n\nfunction userCheckIgnore(logger) {\n return function(item, settings) {\n var isUncaught = !!item._isUncaught;\n delete item._isUncaught;\n var args = item._originalArgs;\n delete item._originalArgs;\n try {\n if (_.isFunction(settings.onSendCallback)) {\n settings.onSendCallback(isUncaught, args, item);\n }\n } catch (e) {\n settings.onSendCallback = null;\n logger.error('Error while calling onSendCallback, removing', e);\n }\n try {\n if (_.isFunction(settings.checkIgnore) && settings.checkIgnore(isUncaught, args, item)) {\n return false;\n }\n } catch (e) {\n settings.checkIgnore = null;\n logger.error('Error while calling custom checkIgnore(), removing', e);\n }\n return true;\n }\n}\n\nfunction urlIsNotBlockListed(logger) {\n return function(item, settings) {\n return !urlIsOnAList(item, settings, 'blocklist', logger);\n }\n}\n\nfunction urlIsSafeListed(logger) {\n return function(item, settings) {\n return urlIsOnAList(item, settings, 'safelist', logger);\n }\n}\n\nfunction matchFrames(trace, list, block) {\n if (!trace) { return !block }\n\n var frames = trace.frames;\n\n if (!frames || frames.length === 0) { return !block; }\n\n var frame, filename, url, urlRegex;\n var listLength = list.length;\n var frameLength = frames.length;\n for (var i = 0; i < frameLength; i++) {\n frame = frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) { return !block; }\n\n for (var j = 0; j < listLength; j++) {\n url = list[j];\n urlRegex = new RegExp(url);\n\n if (urlRegex.test(filename)) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction urlIsOnAList(item, settings, safeOrBlock, logger) {\n // safelist is the default\n var block = false;\n if (safeOrBlock === 'blocklist') {\n block = true;\n }\n\n var list, traces;\n try {\n list = block ? settings.hostBlockList : settings.hostSafeList;\n traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];\n\n // These two checks are important to come first as they are defaults\n // in case the list is missing or the trace is missing or not well-formed\n if (!list || list.length === 0) {\n return !block;\n }\n if (traces.length === 0 || !traces[0]) {\n return !block;\n }\n\n var tracesLength = traces.length;\n for (var i = 0; i < tracesLength; i++) {\n if(matchFrames(traces[i], list, block)) {\n return true;\n }\n }\n } catch (e)\n /* istanbul ignore next */\n {\n if (block) {\n settings.hostBlockList = null;\n } else {\n settings.hostSafeList = null;\n }\n var listName = block ? 'hostBlockList' : 'hostSafeList';\n logger.error('Error while reading your configuration\\'s ' + listName + ' option. Removing custom ' + listName + '.', e);\n return !block;\n }\n return false;\n}\n\nfunction messageIsIgnored(logger) {\n return function(item, settings) {\n var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n messages = messagesFromItem(item);\n\n if (messages.length === 0){\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n\n for (j = 0; j < messages.length; j++) {\n messageIsIgnored = rIgnoredMessage.test(messages[j]);\n\n if (messageIsIgnored) {\n return false;\n }\n }\n }\n } catch(e)\n /* istanbul ignore next */\n {\n settings.ignoredMessages = null;\n logger.error('Error while reading your configuration\\'s ignoredMessages option. Removing custom ignoredMessages.');\n }\n\n return true;\n }\n}\n\nfunction messagesFromItem(item) {\n var body = item.body;\n var messages = [];\n\n // The payload schema only allows one of trace_chain, message, or trace.\n // However, existing test cases are based on having both trace and message present.\n // So here we preserve the ability to collect strings from any combination of these keys.\n if (body.trace_chain) {\n var traceChain = body.trace_chain;\n for (var i = 0; i < traceChain.length; i++) {\n var trace = traceChain[i];\n messages.push(_.get(trace, 'exception.message'));\n }\n }\n if (body.trace) {\n messages.push(_.get(body, 'trace.exception.message'));\n }\n if (body.message) {\n messages.push(_.get(body, 'message.body'));\n }\n return messages;\n}\n\nmodule.exports = {\n checkLevel: checkLevel,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlockListed: urlIsNotBlockListed,\n urlIsSafeListed: urlIsSafeListed,\n messageIsIgnored: messageIsIgnored\n};\n","'use strict';\n\nmodule.exports = {\n version: '2.26.2',\n endpoint: 'api.rollbar.com/api/1/item/',\n logLevel: 'debug',\n reportLevel: 'debug',\n uncaughtErrorLevel: 'error',\n maxItems: 0,\n itemsPerMin: 60\n}\n","'use strict';\n\nmodule.exports = {\n scrubFields: [\n 'pw',\n 'pass',\n 'passwd',\n 'password',\n 'secret',\n 'confirm_password',\n 'confirmPassword',\n 'password_confirmation',\n 'passwordConfirmation',\n 'access_token',\n 'accessToken',\n 'X-Rollbar-Access-Token',\n 'secret_key',\n 'secretKey',\n 'secretToken',\n 'cc-number',\n 'card number',\n 'cardnumber',\n 'cardnum',\n 'ccnum',\n 'ccnumber',\n 'cc num',\n 'creditcardnumber',\n 'credit card number',\n 'newcreditcardnumber',\n 'new credit card',\n 'creditcardno',\n 'credit card no',\n 'card#',\n 'card #',\n 'cc-csc',\n 'cvc',\n 'cvc2',\n 'cvv2',\n 'ccv2',\n 'security code',\n 'card verification',\n 'name on credit card',\n 'name on card',\n 'nameoncard',\n 'cardholder',\n 'card holder',\n 'name des karteninhabers',\n 'ccname',\n 'card type',\n 'cardtype',\n 'cc type',\n 'cctype',\n 'payment type',\n 'expiration date',\n 'expirationdate',\n 'expdate',\n 'cc-exp',\n 'ccmonth',\n 'ccyear'\n ]\n}\n","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.merge(options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n}\n\nTelemeter.prototype.configure = function(options) {\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n var deleteCount = 0;\n if (this.queue.length > newMaxEvents) {\n deleteCount = this.queue.length - newMaxEvents;\n }\n this.maxQueueSize = newMaxEvents;\n this.queue.splice(0, deleteCount);\n};\n\nTelemeter.prototype.copyEvents = function() {\n var events = Array.prototype.slice.call(this.queue, 0);\n if (_.isFunction(this.options.filterTelemetry)) {\n try {\n var i = events.length;\n while (i--) {\n if (this.options.filterTelemetry(events[i])) {\n events.splice(i, 1);\n }\n }\n } catch (e) {\n this.options.filterTelemetry = null;\n }\n }\n return events;\n};\n\nTelemeter.prototype.capture = function(type, metadata, level, rollbarUUID, timestamp) {\n var e = {\n level: getLevel(type, level),\n type: type,\n timestamp_ms: timestamp || _.now(),\n body: metadata,\n source: 'client'\n };\n if (rollbarUUID) {\n e.uuid = rollbarUUID;\n }\n\n try {\n if (_.isFunction(this.options.filterTelemetry) && this.options.filterTelemetry(e)) {\n return false;\n }\n } catch (exc) {\n this.options.filterTelemetry = null;\n }\n\n this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function(type, metadata, level, rollbarUUID) {\n return this.capture(type, metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.captureError = function(err, level, rollbarUUID, timestamp) {\n var metadata = {\n message: err.message || String(err)\n };\n if (err.stack) {\n metadata.stack = err.stack;\n }\n return this.capture('error', metadata, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureLog = function(message, level, rollbarUUID, timestamp) {\n return this.capture('log', {\n message: message\n }, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID, requestData) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\n if (requestData) {\n metadata.request = requestData;\n }\n var level = this.levelFromStatus(metadata.status_code);\n return this.capture('network', metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.levelFromStatus = function(statusCode) {\n if (statusCode >= 200 && statusCode < 400) {\n return 'info';\n }\n if (statusCode === 0 || statusCode >= 400) {\n return 'error';\n }\n return 'info';\n};\n\nTelemeter.prototype.captureDom = function(subtype, element, value, checked, rollbarUUID) {\n var metadata = {\n subtype: subtype,\n element: element\n };\n if (value !== undefined) {\n metadata.value = value;\n }\n if (checked !== undefined) {\n metadata.checked = checked;\n }\n return this.capture('dom', metadata, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureNavigation = function(from, to, rollbarUUID) {\n return this.capture('navigation', {from: from, to: to}, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureDomContentLoaded = function(ts) {\n return this.capture('navigation', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n */\n};\nTelemeter.prototype.captureLoad = function(ts) {\n return this.capture('navigation', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n */\n};\n\nTelemeter.prototype.captureConnectivityChange = function(type, rollbarUUID) {\n return this.captureNetwork({change: type}, 'connectivity', rollbarUUID);\n};\n\n// Only intended to be used internally by the notifier\nTelemeter.prototype._captureRollbarItem = function(item) {\n if (!this.options.includeItemsInTelemetry) {\n return;\n }\n if (item.err) {\n return this.captureError(item.err, item.level, item.uuid, item.timestamp);\n }\n if (item.message) {\n return this.captureLog(item.message, item.level, item.uuid, item.timestamp);\n }\n if (item.custom) {\n return this.capture('log', item.custom, item.level, item.uuid, item.timestamp);\n }\n};\n\nTelemeter.prototype.push = function(e) {\n this.queue.push(e);\n if (this.queue.length > this.maxQueueSize) {\n this.queue.shift();\n }\n};\n\nfunction getLevel(type, level) {\n if (level) {\n return level;\n }\n var defaultLevel = {\n error: 'error',\n manual: 'info'\n };\n return defaultLevel[type] || 'info';\n}\n\nmodule.exports = Telemeter;\n","'use strict';\n\nvar _ = require('../utility');\nvar headers = require('../utility/headers');\nvar scrub = require('../scrub');\nvar urlparser = require('./url');\nvar domUtil = require('./domUtility');\n\nvar defaults = {\n network: true,\n networkResponseHeaders: false,\n networkResponseBody: false,\n networkRequestHeaders: false,\n networkRequestBody: false,\n networkErrorOnHttp5xx: false,\n networkErrorOnHttp4xx: false,\n networkErrorOnHttp0: false,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true,\n contentSecurityPolicy: true,\n errorOnContentSecurityPolicy: false\n};\n\nfunction replace(obj, name, replacement, replacements, type) {\n var orig = obj[name];\n obj[name] = replacement(orig);\n if (replacements) {\n replacements[type].push([obj, name, orig]);\n }\n}\n\nfunction restore(replacements, type) {\n var b;\n while (replacements[type].length) {\n b = replacements[type].shift();\n b[0][b[1]] = b[2];\n }\n}\n\nfunction nameFromDescription(description) {\n if (!description || !description.attributes) { return null; }\n var attrs = description.attributes;\n for (var a = 0; a < attrs.length; ++a) {\n if (attrs[a].key === 'name') {\n return attrs[a].value;\n }\n }\n return null;\n}\n\nfunction defaultValueScrubber(scrubFields) {\n var patterns = [];\n for (var i = 0; i < scrubFields.length; ++i) {\n patterns.push(new RegExp(scrubFields[i], 'i'));\n }\n return function(description) {\n var name = nameFromDescription(description);\n if (!name) { return false; }\n for (var i = 0; i < patterns.length; ++i) {\n if (patterns[i].test(name)) {\n return true;\n }\n }\n return false;\n };\n}\n\nfunction Instrumenter(options, telemeter, rollbar, _window, _document) {\n this.options = options;\n var autoInstrument = options.autoInstrument;\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);\n this.telemeter = telemeter;\n this.rollbar = rollbar;\n this.diagnostic = rollbar.client.notifier.diagnostic;\n this._window = _window || {};\n this._document = _document || {};\n this.replacements = {\n network: [],\n log: [],\n navigation: [],\n connectivity: []\n };\n this.eventRemovers = {\n dom: [],\n connectivity: [],\n contentsecuritypolicy: []\n };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function(options) {\n this.options = _.merge(this.options, options);\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.merge(this.autoInstrument);\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n if (options.scrubTelemetryInputs !== undefined) {\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n }\n if (options.telemetryScrubber !== undefined) {\n this.telemetryScrubber = options.telemetryScrubber;\n }\n};\n\n// eslint-disable-next-line complexity\nInstrumenter.prototype.instrument = function(oldSettings) {\n if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {\n this.instrumentNetwork();\n } else if (!this.autoInstrument.network && oldSettings && oldSettings.network) {\n this.deinstrumentNetwork();\n }\n\n if (this.autoInstrument.log && !(oldSettings && oldSettings.log)) {\n this.instrumentConsole();\n } else if (!this.autoInstrument.log && oldSettings && oldSettings.log) {\n this.deinstrumentConsole();\n }\n\n if (this.autoInstrument.dom && !(oldSettings && oldSettings.dom)) {\n this.instrumentDom();\n } else if (!this.autoInstrument.dom && oldSettings && oldSettings.dom) {\n this.deinstrumentDom();\n }\n\n if (this.autoInstrument.navigation && !(oldSettings && oldSettings.navigation)) {\n this.instrumentNavigation();\n } else if (!this.autoInstrument.navigation && oldSettings && oldSettings.navigation) {\n this.deinstrumentNavigation();\n }\n\n if (this.autoInstrument.connectivity && !(oldSettings && oldSettings.connectivity)) {\n this.instrumentConnectivity();\n } else if (!this.autoInstrument.connectivity && oldSettings && oldSettings.connectivity) {\n this.deinstrumentConnectivity();\n }\n\n if (this.autoInstrument.contentSecurityPolicy && !(oldSettings && oldSettings.contentSecurityPolicy)) {\n this.instrumentContentSecurityPolicy();\n } else if (!this.autoInstrument.contentSecurityPolicy && oldSettings && oldSettings.contentSecurityPolicy) {\n this.deinstrumentContentSecurityPolicy();\n }\n};\n\nInstrumenter.prototype.deinstrumentNetwork = function() {\n restore(this.replacements, 'network');\n};\n\nInstrumenter.prototype.instrumentNetwork = function() {\n var self = this;\n\n function wrapProp(prop, xhr) {\n if (prop in xhr && _.isFunction(xhr[prop])) {\n replace(xhr, prop, function(orig) {\n return self.rollbar.wrap(orig);\n });\n }\n }\n\n if ('XMLHttpRequest' in this._window) {\n var xhrp = this._window.XMLHttpRequest.prototype;\n replace(xhrp, 'open', function(orig) {\n return function(method, url) {\n if (_.isType(url, 'string')) {\n if (this.__rollbar_xhr) {\n this.__rollbar_xhr.method = method;\n this.__rollbar_xhr.url = url;\n this.__rollbar_xhr.status_code = null;\n this.__rollbar_xhr.start_time_ms = _.now();\n this.__rollbar_xhr.end_time_ms = null;\n } else {\n this.__rollbar_xhr = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'setRequestHeader', function(orig) {\n return function(header, value) {\n // If xhr.open is async, __rollbar_xhr may not be initialized yet.\n if (!this.__rollbar_xhr) {\n this.__rollbar_xhr = {};\n }\n if (_.isType(header, 'string') && _.isType(value, 'string')) {\n if (self.autoInstrument.networkRequestHeaders) {\n if (!this.__rollbar_xhr.request_headers) {\n this.__rollbar_xhr.request_headers = {};\n }\n this.__rollbar_xhr.request_headers[header] = value;\n }\n // We want the content type even if request header telemetry is off.\n if (header.toLowerCase() === 'content-type') {\n this.__rollbar_xhr.request_content_type = value;\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'send', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(data) {\n /* eslint-enable no-unused-vars */\n var xhr = this;\n\n function onreadystatechangeHandler() {\n if (xhr.__rollbar_xhr) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n if (self.autoInstrument.networkRequestBody) {\n xhr.__rollbar_xhr.request = data;\n }\n xhr.__rollbar_event = self.captureNetwork(xhr.__rollbar_xhr, 'xhr', undefined);\n }\n if (xhr.readyState < 2) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n }\n if (xhr.readyState > 3) {\n xhr.__rollbar_xhr.end_time_ms = _.now();\n\n var headers = null;\n xhr.__rollbar_xhr.response_content_type = xhr.getResponseHeader('Content-Type');\n if (self.autoInstrument.networkResponseHeaders) {\n var headersConfig = self.autoInstrument.networkResponseHeaders;\n headers = {};\n try {\n var header, i;\n if (headersConfig === true) {\n var allHeaders = xhr.getAllResponseHeaders();\n if (allHeaders) {\n var arr = allHeaders.trim().split(/[\\r\\n]+/);\n var parts, value;\n for (i=0; i < arr.length; i++) {\n parts = arr[i].split(': ');\n header = parts.shift();\n value = parts.join(': ');\n headers[header] = value;\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n header = headersConfig[i];\n headers[header] = xhr.getResponseHeader(header);\n }\n }\n } catch (e) {\n /* we ignore the errors here that could come from different\n * browser issues with the xhr methods */\n }\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n try {\n body = xhr.responseText;\n } catch (e) {\n /* ignore errors from reading responseText */\n }\n }\n var response = null;\n if (body || headers) {\n response = {};\n if (body) {\n if (self.isJsonContentType(xhr.__rollbar_xhr.response_content_type)) {\n response.body = self.scrubJson(body);\n } else {\n response.body = body;\n }\n }\n if (headers) {\n response.headers = headers;\n }\n }\n if (response) {\n xhr.__rollbar_xhr.response = response;\n }\n try {\n var code = xhr.status;\n code = code === 1223 ? 204 : code;\n xhr.__rollbar_xhr.status_code = code;\n xhr.__rollbar_event.level = self.telemeter.levelFromStatus(code);\n self.errorOnHttpStatus(xhr.__rollbar_xhr);\n } catch (e) {\n /* ignore possible exception from xhr.status */\n }\n }\n }\n }\n\n wrapProp('onload', xhr);\n wrapProp('onerror', xhr);\n wrapProp('onprogress', xhr);\n\n if ('onreadystatechange' in xhr && _.isFunction(xhr.onreadystatechange)) {\n replace(xhr, 'onreadystatechange', function(orig) {\n return self.rollbar.wrap(orig, undefined, onreadystatechangeHandler);\n });\n } else {\n xhr.onreadystatechange = onreadystatechangeHandler;\n }\n if (xhr.__rollbar_xhr && self.trackHttpErrors()) {\n xhr.__rollbar_xhr.stack = (new Error()).stack;\n }\n return orig.apply(this, arguments);\n }\n }, this.replacements, 'network');\n }\n\n if ('fetch' in this._window) {\n replace(this._window, 'fetch', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(fn, t) {\n /* eslint-enable no-unused-vars */\n var args = new Array(arguments.length);\n for (var i=0, len=args.length; i < len; i++) {\n args[i] = arguments[i];\n }\n var input = args[0];\n var method = 'GET';\n var url;\n if (_.isType(input, 'string')) {\n url = input;\n } else if (input) {\n url = input.url;\n if (input.method) {\n method = input.method;\n }\n }\n if (args[1] && args[1].method) {\n method = args[1].method;\n }\n var metadata = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n if (args[1] && args[1].headers) {\n // Argument may be a Headers object, or plain object. Ensure here that\n // we are working with a Headers object with case-insensitive keys.\n var reqHeaders = headers(args[1].headers);\n\n metadata.request_content_type = reqHeaders.get('Content-Type');\n\n if (self.autoInstrument.networkRequestHeaders) {\n metadata.request_headers = self.fetchHeaders(reqHeaders, self.autoInstrument.networkRequestHeaders)\n }\n }\n\n if (self.autoInstrument.networkRequestBody) {\n if (args[1] && args[1].body) {\n metadata.request = args[1].body;\n } else if (args[0] && !_.isType(args[0], 'string') && args[0].body) {\n metadata.request = args[0].body;\n }\n }\n self.captureNetwork(metadata, 'fetch', undefined);\n if (self.trackHttpErrors()) {\n metadata.stack = (new Error()).stack;\n }\n\n // Start our handler before returning the promise. This allows resp.clone()\n // to execute before other handlers touch the response.\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n metadata.response_content_type = resp.headers.get('Content-Type');\n var headers = null;\n if (self.autoInstrument.networkResponseHeaders) {\n headers = self.fetchHeaders(resp.headers, self.autoInstrument.networkResponseHeaders);\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n if (typeof resp.text === 'function') { // Response.text() is not implemented on some platforms\n // The response must be cloned to prevent reading (and locking) the original stream.\n // This must be done before other handlers touch the response.\n body = resp.clone().text(); //returns a Promise\n }\n }\n if (headers || body) {\n metadata.response = {};\n if (body) {\n // Test to ensure body is a Promise, which it should always be.\n if (typeof body.then === 'function') {\n body.then(function (text) {\n if (text && self.isJsonContentType(metadata.response_content_type)) {\n metadata.response.body = self.scrubJson(text);\n } else {\n metadata.response.body = text;\n }\n });\n } else {\n metadata.response.body = body;\n }\n }\n if (headers) {\n metadata.response.headers = headers;\n }\n }\n self.errorOnHttpStatus(metadata);\n return resp;\n });\n };\n }, this.replacements, 'network');\n }\n};\n\nInstrumenter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID) {\n if (metadata.request && this.isJsonContentType(metadata.request_content_type)) {\n metadata.request = this.scrubJson(metadata.request);\n }\n return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);\n};\n\nInstrumenter.prototype.isJsonContentType = function(contentType) {\n return (contentType && _.isType(contentType, 'string') && contentType.toLowerCase().includes('json')) ? true : false;\n}\n\nInstrumenter.prototype.scrubJson = function(json) {\n return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));\n}\n\nInstrumenter.prototype.fetchHeaders = function(inHeaders, headersConfig) {\n var outHeaders = {};\n try {\n var i;\n if (headersConfig === true) {\n if (typeof inHeaders.entries === 'function') { // Headers.entries() is not implemented in IE\n var allHeaders = inHeaders.entries();\n var currentHeader = allHeaders.next();\n while (!currentHeader.done) {\n outHeaders[currentHeader.value[0]] = currentHeader.value[1];\n currentHeader = allHeaders.next();\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n var header = headersConfig[i];\n outHeaders[header] = inHeaders.get(header);\n }\n }\n } catch (e) {\n /* ignore probable IE errors */\n }\n return outHeaders;\n}\n\nInstrumenter.prototype.trackHttpErrors = function() {\n return this.autoInstrument.networkErrorOnHttp5xx ||\n this.autoInstrument.networkErrorOnHttp4xx ||\n this.autoInstrument.networkErrorOnHttp0;\n}\n\nInstrumenter.prototype.errorOnHttpStatus = function(metadata) {\n var status = metadata.status_code;\n\n if ((status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||\n (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||\n (status === 0 && this.autoInstrument.networkErrorOnHttp0)) {\n var error = new Error('HTTP request failed with Status ' + status);\n error.stack = metadata.stack;\n this.rollbar.error(error, { skipFrames: 1 });\n }\n}\n\nInstrumenter.prototype.deinstrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n var b;\n while (this.replacements['log'].length) {\n b = this.replacements['log'].shift();\n this._window.console[b[0]] = b[1];\n }\n};\n\nInstrumenter.prototype.instrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n\n var self = this;\n var c = this._window.console;\n\n function wrapConsole(method) {\n 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778\n\n var orig = c[method];\n var origConsole = c;\n var level = method === 'warn' ? 'warning' : method;\n c[method] = function() {\n var args = Array.prototype.slice.call(arguments);\n var message = _.formatArgsAsString(args);\n self.telemeter.captureLog(message, level);\n if (orig) {\n Function.prototype.apply.call(orig, origConsole, args);\n }\n };\n self.replacements['log'].push([method, orig]);\n }\n var methods = ['debug','info','warn','error','log'];\n try {\n for (var i=0, len=methods.length; i < len; i++) {\n wrapConsole(methods[i]);\n }\n } catch (e) {\n this.diagnostic.instrumentConsole = { error: e.message };\n }\n};\n\nInstrumenter.prototype.deinstrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n this.removeListeners('dom');\n};\n\nInstrumenter.prototype.instrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n var clickHandler = this.handleClick.bind(this);\n var blurHandler = this.handleBlur.bind(this);\n this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);\n this.addListener('dom', this._window, 'blur', 'onfocusout', blurHandler, true);\n};\n\nInstrumenter.prototype.handleClick = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n var hasTag = e && e.tagName;\n var anchorOrButton = domUtil.isDescribedElement(e, 'a') || domUtil.isDescribedElement(e, 'button');\n if (hasTag && (anchorOrButton || domUtil.isDescribedElement(e, 'input', ['button', 'submit']))) {\n this.captureDomEvent('click', e);\n } else if (domUtil.isDescribedElement(e, 'input', ['checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value, e.checked);\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleBlur = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n if (e && e.tagName) {\n if (domUtil.isDescribedElement(e, 'textarea')) {\n this.captureDomEvent('input', e, e.value);\n } else if (domUtil.isDescribedElement(e, 'select') && e.options && e.options.length) {\n this.handleSelectInputChanged(e);\n } else if (domUtil.isDescribedElement(e, 'input') && !domUtil.isDescribedElement(e, 'input', ['button', 'submit', 'hidden', 'checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value);\n }\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleSelectInputChanged = function(elem) {\n if (elem.multiple) {\n for (var i = 0; i < elem.options.length; i++) {\n if (elem.options[i].selected) {\n this.captureDomEvent('input', elem, elem.options[i].value);\n }\n }\n } else if (elem.selectedIndex >= 0 && elem.options[elem.selectedIndex]) {\n this.captureDomEvent('input', elem, elem.options[elem.selectedIndex].value);\n }\n};\n\nInstrumenter.prototype.captureDomEvent = function(subtype, element, value, isChecked) {\n if (value !== undefined) {\n if (this.scrubTelemetryInputs || (domUtil.getElementType(element) === 'password')) {\n value = '[scrubbed]';\n } else {\n var description = domUtil.describeElement(element);\n if (this.telemetryScrubber) {\n if (this.telemetryScrubber(description)) {\n value = '[scrubbed]';\n }\n } else if (this.defaultValueScrubber(description)) {\n value = '[scrubbed]';\n }\n }\n }\n var elementString = domUtil.elementArrayToString(domUtil.treeToArray(element));\n this.telemeter.captureDom(subtype, elementString, value, isChecked);\n};\n\nInstrumenter.prototype.deinstrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n restore(this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.instrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n var self = this;\n replace(this._window, 'onpopstate', function(orig) {\n return function() {\n var current = self._location.href;\n self.handleUrlChange(self._lastHref, current);\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n }, this.replacements, 'navigation');\n\n replace(this._window.history, 'pushState', function(orig) {\n return function() {\n var url = arguments.length > 2 ? arguments[2] : undefined;\n if (url) {\n self.handleUrlChange(self._lastHref, url + '');\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.handleUrlChange = function(from, to) {\n var parsedHref = urlparser.parse(this._location.href);\n var parsedTo = urlparser.parse(to);\n var parsedFrom = urlparser.parse(from);\n this._lastHref = to;\n if (parsedHref.protocol === parsedTo.protocol && parsedHref.host === parsedTo.host) {\n to = parsedTo.path + (parsedTo.hash || '');\n }\n if (parsedHref.protocol === parsedFrom.protocol && parsedHref.host === parsedFrom.host) {\n from = parsedFrom.path + (parsedFrom.hash || '');\n }\n this.telemeter.captureNavigation(from, to);\n};\n\nInstrumenter.prototype.deinstrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.removeListeners('connectivity');\n } else {\n restore(this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.instrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.addListener('connectivity', this._window, 'online', undefined, function() {\n this.telemeter.captureConnectivityChange('online');\n }.bind(this), true);\n this.addListener('connectivity', this._window, 'offline', undefined, function() {\n this.telemeter.captureConnectivityChange('offline');\n }.bind(this), true);\n } else {\n var self = this;\n replace(this._document.body, 'ononline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('online');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n replace(this._document.body, 'onoffline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('offline');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.handleCspEvent = function(cspEvent) {\n var message = 'Security Policy Violation: ' +\n 'blockedURI: ' + cspEvent.blockedURI + ', ' +\n 'violatedDirective: ' + cspEvent.violatedDirective + ', ' +\n 'effectiveDirective: ' + cspEvent.effectiveDirective + ', ';\n\n if (cspEvent.sourceFile) {\n message += 'location: ' + cspEvent.sourceFile + ', ' +\n 'line: ' + cspEvent.lineNumber + ', ' +\n 'col: ' + cspEvent.columnNumber + ', ';\n }\n\n message += 'originalPolicy: ' + cspEvent.originalPolicy;\n\n this.telemeter.captureLog(message, 'error');\n this.handleCspError(message);\n}\n\nInstrumenter.prototype.handleCspError = function(message) {\n if (this.autoInstrument.errorOnContentSecurityPolicy) {\n this.rollbar.error(message);\n }\n}\n\nInstrumenter.prototype.deinstrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._document)) { return; }\n\n this.removeListeners('contentsecuritypolicy');\n};\n\nInstrumenter.prototype.instrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._document)) { return; }\n\n var cspHandler = this.handleCspEvent.bind(this);\n this.addListener('contentsecuritypolicy', this._document, 'securitypolicyviolation', null, cspHandler, false);\n};\n\nInstrumenter.prototype.addListener = function(section, obj, type, altType, handler, capture) {\n if (obj.addEventListener) {\n obj.addEventListener(type, handler, capture);\n this.eventRemovers[section].push(function() {\n obj.removeEventListener(type, handler, capture);\n });\n } else if (altType) {\n obj.attachEvent(altType, handler);\n this.eventRemovers[section].push(function() {\n obj.detachEvent(altType, handler);\n });\n }\n};\n\nInstrumenter.prototype.removeListeners = function(section) {\n var r;\n while (this.eventRemovers[section].length) {\n r = this.eventRemovers[section].shift();\n r();\n }\n};\n\nmodule.exports = Instrumenter;\n","'use strict';\n\n/*\n * headers - Detect when fetch Headers are undefined and use a partial polyfill.\n *\n * A full polyfill is not used in order to keep package size as small as possible.\n * Since this is only used internally and is not added to the window object,\n * the full interface doesn't need to be supported.\n *\n * This implementation is modified from whatwg-fetch:\n * https://github.com/github/fetch\n */\nfunction headers(headers) {\n if (typeof Headers === 'undefined') {\n return new FetchHeaders(headers);\n }\n\n return new Headers(headers);\n}\n\nfunction normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name)\n }\n return name.toLowerCase()\n}\n\nfunction normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value)\n }\n return value\n}\n\nfunction iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n return iterator\n}\n\nfunction FetchHeaders(headers) {\n this.map = {}\n\n if (headers instanceof FetchHeaders) {\n headers.forEach(function(value, name) {\n this.append(name, value)\n }, this)\n } else if (Array.isArray(headers)) {\n headers.forEach(function(header) {\n this.append(header[0], header[1])\n }, this)\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function(name) {\n this.append(name, headers[name])\n }, this)\n }\n}\n\nFetchHeaders.prototype.append = function(name, value) {\n name = normalizeName(name)\n value = normalizeValue(value)\n var oldValue = this.map[name]\n this.map[name] = oldValue ? oldValue + ', ' + value : value\n}\n\nFetchHeaders.prototype.get = function(name) {\n name = normalizeName(name)\n return this.has(name) ? this.map[name] : null\n}\n\nFetchHeaders.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n}\n\nFetchHeaders.prototype.forEach = function(callback, thisArg) {\n for (var name in this.map) {\n if (this.map.hasOwnProperty(name)) {\n callback.call(thisArg, this.map[name], name, this)\n }\n }\n}\n\nFetchHeaders.prototype.entries = function() {\n var items = []\n this.forEach(function(value, name) {\n items.push([name, value])\n })\n return iteratorFor(items)\n}\n\nmodule.exports = headers;\n","'use strict';\n\nfunction getElementType(e) {\n return (e.getAttribute('type') || '').toLowerCase();\n}\n\nfunction isDescribedElement(element, type, subtypes) {\n if (element.tagName.toLowerCase() !== type.toLowerCase()) {\n return false;\n }\n if (!subtypes) {\n return true;\n }\n element = getElementType(element);\n for (var i = 0; i < subtypes.length; i++) {\n if (subtypes[i] === element) {\n return true;\n }\n }\n return false;\n}\n\nfunction getElementFromEvent(evt, doc) {\n if (evt.target) {\n return evt.target;\n }\n if (doc && doc.elementFromPoint) {\n return doc.elementFromPoint(evt.clientX, evt.clientY);\n }\n return undefined;\n}\n\nfunction treeToArray(elem) {\n var MAX_HEIGHT = 5;\n var out = [];\n var nextDescription;\n for (var height = 0; elem && height < MAX_HEIGHT; height++) {\n nextDescription = describeElement(elem);\n if (nextDescription.tagName === 'html') {\n break;\n }\n out.unshift(nextDescription);\n elem = elem.parentNode;\n }\n return out;\n}\n\nfunction elementArrayToString(a) {\n var MAX_LENGTH = 80;\n var separator = ' > ', separatorLength = separator.length;\n var out = [], len = 0, nextStr, totalLength;\n\n for (var i = a.length - 1; i >= 0; i--) {\n nextStr = descriptionToString(a[i]);\n totalLength = len + (out.length * separatorLength) + nextStr.length;\n if (i < a.length - 1 && totalLength >= MAX_LENGTH + 3) {\n out.unshift('...');\n break;\n }\n out.unshift(nextStr);\n len += nextStr.length;\n }\n return out.join(separator);\n}\n\nfunction descriptionToString(desc) {\n if (!desc || !desc.tagName) {\n return '';\n }\n var out = [desc.tagName];\n if (desc.id) {\n out.push('#' + desc.id);\n }\n if (desc.classes) {\n out.push('.' + desc.classes.join('.'));\n }\n for (var i = 0; i < desc.attributes.length; i++) {\n out.push('[' + desc.attributes[i].key + '=\"' + desc.attributes[i].value + '\"]');\n }\n\n return out.join('');\n}\n\n/**\n * Input: a dom element\n * Output: null if tagName is falsey or input is falsey, else\n * {\n * tagName: String,\n * id: String | undefined,\n * classes: [String] | undefined,\n * attributes: [\n * {\n * key: OneOf(type, name, title, alt),\n * value: String\n * }\n * ]\n * }\n */\nfunction describeElement(elem) {\n if (!elem || !elem.tagName) {\n return null;\n }\n var out = {}, className, key, attr, i;\n out.tagName = elem.tagName.toLowerCase();\n if (elem.id) {\n out.id = elem.id;\n }\n className = elem.className;\n if (className && (typeof className === 'string')) {\n out.classes = className.split(/\\s+/);\n }\n var attributes = ['type', 'name', 'title', 'alt'];\n out.attributes = [];\n for (i = 0; i < attributes.length; i++) {\n key = attributes[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.attributes.push({key: key, value: attr});\n }\n }\n return out;\n}\n\nmodule.exports = {\n describeElement: describeElement,\n descriptionToString: descriptionToString,\n elementArrayToString: elementArrayToString,\n treeToArray: treeToArray,\n getElementFromEvent: getElementFromEvent,\n isDescribedElement: isDescribedElement,\n getElementType: getElementType\n};\n","'use strict';\n\nvar polyfillJSON = require('../../vendor/JSON-js/json3');\n\nmodule.exports = polyfillJSON;\n","// json3.js\n// 2017-02-21\n// Public Domain.\n// NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.\n// See http://www.JSON.org/js.html\n// This code should be minified before deployment.\n// See http://javascript.crockford.com/jsmin.html\n\n// USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO\n// NOT CONTROL.\n\n// This file creates a global JSON object containing two methods: stringify\n// and parse. This file provides the ES5 JSON capability to ES3 systems.\n// If a project might run on IE8 or earlier, then this file should be included.\n// This file does nothing on ES5 systems.\n\n// JSON.stringify(value, replacer, space)\n// value any JavaScript value, usually an object or array.\n// replacer an optional parameter that determines how object\n// values are stringified for objects. It can be a\n// function or an array of strings.\n// space an optional parameter that specifies the indentation\n// of nested structures. If it is omitted, the text will\n// be packed without extra whitespace. If it is a number,\n// it will specify the number of spaces to indent at each\n// level. If it is a string (such as \"\\t\" or \" \"),\n// it contains the characters used to indent at each level.\n// This method produces a JSON text from a JavaScript value.\n// When an object value is found, if the object contains a toJSON\n// method, its toJSON method will be called and the result will be\n// stringified. A toJSON method does not serialize: it returns the\n// value represented by the name/value pair that should be serialized,\n// or undefined if nothing should be serialized. The toJSON method\n// will be passed the key associated with the value, and this will be\n// bound to the value.\n\n// For example, this would serialize Dates as ISO strings.\n\n// Date.prototype.toJSON = function (key) {\n// function f(n) {\n// // Format integers to have at least two digits.\n// return (n < 10)\n// ? \"0\" + n\n// : n;\n// }\n// return this.getUTCFullYear() + \"-\" +\n// f(this.getUTCMonth() + 1) + \"-\" +\n// f(this.getUTCDate()) + \"T\" +\n// f(this.getUTCHours()) + \":\" +\n// f(this.getUTCMinutes()) + \":\" +\n// f(this.getUTCSeconds()) + \"Z\";\n// };\n\n// You can provide an optional replacer method. It will be passed the\n// key and value of each member, with this bound to the containing\n// object. The value that is returned from your method will be\n// serialized. If your method returns undefined, then the member will\n// be excluded from the serialization.\n\n// If the replacer parameter is an array of strings, then it will be\n// used to select the members to be serialized. It filters the results\n// such that only members with keys listed in the replacer array are\n// stringified.\n\n// Values that do not have JSON representations, such as undefined or\n// functions, will not be serialized. Such values in objects will be\n// dropped; in arrays they will be replaced with null. You can use\n// a replacer function to replace those with JSON values.\n\n// JSON.stringify(undefined) returns undefined.\n\n// The optional space parameter produces a stringification of the\n// value that is filled with line breaks and indentation to make it\n// easier to read.\n\n// If the space parameter is a non-empty string, then that string will\n// be used for indentation. If the space parameter is a number, then\n// the indentation will be that many spaces.\n\n// Example:\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}]);\n// // text is '[\"e\",{\"pluribus\":\"unum\"}]'\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}], null, \"\\t\");\n// // text is '[\\n\\t\"e\",\\n\\t{\\n\\t\\t\"pluribus\": \"unum\"\\n\\t}\\n]'\n\n// text = JSON.stringify([new Date()], function (key, value) {\n// return this[key] instanceof Date\n// ? \"Date(\" + this[key] + \")\"\n// : value;\n// });\n// // text is '[\"Date(---current time---)\"]'\n\n// JSON.parse(text, reviver)\n// This method parses a JSON text to produce an object or array.\n// It can throw a SyntaxError exception.\n// This has been modified to use JSON-js/json_parse_state.js as the\n// parser instead of the one built around eval found in JSON-js/json2.js\n\n// The optional reviver parameter is a function that can filter and\n// transform the results. It receives each of the keys and values,\n// and its return value is used instead of the original value.\n// If it returns what it received, then the structure is not modified.\n// If it returns undefined then the member is deleted.\n\n// Example:\n\n// // Parse the text. Values that look like ISO date strings will\n// // be converted to Date objects.\n\n// myData = JSON.parse(text, function (key, value) {\n// var a;\n// if (typeof value === \"string\") {\n// a =\n// /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2}(?:\\.\\d*)?)Z$/.exec(value);\n// if (a) {\n// return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],\n// +a[5], +a[6]));\n// }\n// }\n// return value;\n// });\n\n// myData = JSON.parse('[\"Date(09/09/2001)\"]', function (key, value) {\n// var d;\n// if (typeof value === \"string\" &&\n// value.slice(0, 5) === \"Date(\" &&\n// value.slice(-1) === \")\") {\n// d = new Date(value.slice(5, -1));\n// if (d) {\n// return d;\n// }\n// }\n// return value;\n// });\n\n// This is a reference implementation. You are free to copy, modify, or\n// redistribute.\n\n/*jslint\n for, this\n */\n\n/*property\n JSON, apply, call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,\n getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,\n lastIndex, length, parse, prototype, push, replace, slice, stringify,\n test, toJSON, toString, valueOf\n */\n\nvar setupCustomJSON = function(JSON) {\n\n var rx_one = /^[\\],:{}\\s]*$/;\n var rx_two = /\\\\(?:[\"\\\\\\/bfnrt]|u[0-9a-fA-F]{4})/g;\n var rx_three = /\"[^\"\\\\\\n\\r]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g;\n var rx_four = /(?:^|:|,)(?:\\s*\\[)+/g;\n var rx_escapable = /[\\\\\"\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n var rx_dangerous = /[\\u0000\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n\n function f(n) {\n // Format integers to have at least two digits.\n return n < 10\n ? \"0\" + n\n : n;\n }\n\n function this_value() {\n return this.valueOf();\n }\n\n if (typeof Date.prototype.toJSON !== \"function\") {\n\n Date.prototype.toJSON = function () {\n\n return isFinite(this.valueOf())\n ? this.getUTCFullYear() + \"-\" +\n f(this.getUTCMonth() + 1) + \"-\" +\n f(this.getUTCDate()) + \"T\" +\n f(this.getUTCHours()) + \":\" +\n f(this.getUTCMinutes()) + \":\" +\n f(this.getUTCSeconds()) + \"Z\"\n : null;\n };\n\n Boolean.prototype.toJSON = this_value;\n Number.prototype.toJSON = this_value;\n String.prototype.toJSON = this_value;\n }\n\n var gap;\n var indent;\n var meta;\n var rep;\n\n\n function quote(string) {\n\n // If the string contains no control characters, no quote characters, and no\n // backslash characters, then we can safely slap some quotes around it.\n // Otherwise we must also replace the offending characters with safe escape\n // sequences.\n\n rx_escapable.lastIndex = 0;\n return rx_escapable.test(string)\n ? \"\\\"\" + string.replace(rx_escapable, function (a) {\n var c = meta[a];\n return typeof c === \"string\"\n ? c\n : \"\\\\u\" + (\"0000\" + a.charCodeAt(0).toString(16)).slice(-4);\n }) + \"\\\"\"\n : \"\\\"\" + string + \"\\\"\";\n }\n\n\n function str(key, holder) {\n\n // Produce a string from holder[key].\n\n var i; // The loop counter.\n var k; // The member key.\n var v; // The member value.\n var length;\n var mind = gap;\n var partial;\n var value = holder[key];\n\n // If the value has a toJSON method, call it to obtain a replacement value.\n\n if (value && typeof value === \"object\" &&\n typeof value.toJSON === \"function\") {\n value = value.toJSON(key);\n }\n\n // If we were called with a replacer function, then call the replacer to\n // obtain a replacement value.\n\n if (typeof rep === \"function\") {\n value = rep.call(holder, key, value);\n }\n\n // What happens next depends on the value's type.\n\n switch (typeof value) {\n case \"string\":\n return quote(value);\n\n case \"number\":\n\n // JSON numbers must be finite. Encode non-finite numbers as null.\n\n return isFinite(value)\n ? String(value)\n : \"null\";\n\n case \"boolean\":\n case \"null\":\n\n // If the value is a boolean or null, convert it to a string. Note:\n // typeof null does not produce \"null\". The case is included here in\n // the remote chance that this gets fixed someday.\n\n return String(value);\n\n // If the type is \"object\", we might be dealing with an object or an array or\n // null.\n\n case \"object\":\n\n // Due to a specification blunder in ECMAScript, typeof null is \"object\",\n // so watch out for that case.\n\n if (!value) {\n return \"null\";\n }\n\n // Make an array to hold the partial results of stringifying this object value.\n\n gap += indent;\n partial = [];\n\n // Is the value an array?\n\n if (Object.prototype.toString.apply(value) === \"[object Array]\") {\n\n // The value is an array. Stringify every element. Use null as a placeholder\n // for non-JSON values.\n\n length = value.length;\n for (i = 0; i < length; i += 1) {\n partial[i] = str(i, value) || \"null\";\n }\n\n // Join all of the elements together, separated with commas, and wrap them in\n // brackets.\n\n v = partial.length === 0\n ? \"[]\"\n : gap\n ? \"[\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"]\"\n : \"[\" + partial.join(\",\") + \"]\";\n gap = mind;\n return v;\n }\n\n // If the replacer is an array, use it to select the members to be stringified.\n\n if (rep && typeof rep === \"object\") {\n length = rep.length;\n for (i = 0; i < length; i += 1) {\n if (typeof rep[i] === \"string\") {\n k = rep[i];\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n } else {\n\n // Otherwise, iterate through all of the keys in the object.\n\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(value, k)) {\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n }\n\n // Join all of the member texts together, separated with commas,\n // and wrap them in braces.\n\n v = partial.length === 0\n ? \"{}\"\n : gap\n ? \"{\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"}\"\n : \"{\" + partial.join(\",\") + \"}\";\n gap = mind;\n return v;\n }\n }\n\n // If the JSON object does not yet have a stringify method, give it one.\n\n if (typeof JSON.stringify !== \"function\") {\n meta = { // table of character substitutions\n \"\\b\": \"\\\\b\",\n \"\\t\": \"\\\\t\",\n \"\\n\": \"\\\\n\",\n \"\\f\": \"\\\\f\",\n \"\\r\": \"\\\\r\",\n \"\\\"\": \"\\\\\\\"\",\n \"\\\\\": \"\\\\\\\\\"\n };\n JSON.stringify = function (value, replacer, space) {\n\n // The stringify method takes a value and an optional replacer, and an optional\n // space parameter, and returns a JSON text. The replacer can be a function\n // that can replace values, or an array of strings that will select the keys.\n // A default replacer method can be provided. Use of the space parameter can\n // produce text that is more easily readable.\n\n var i;\n gap = \"\";\n indent = \"\";\n\n // If the space parameter is a number, make an indent string containing that\n // many spaces.\n\n if (typeof space === \"number\") {\n for (i = 0; i < space; i += 1) {\n indent += \" \";\n }\n\n // If the space parameter is a string, it will be used as the indent string.\n\n } else if (typeof space === \"string\") {\n indent = space;\n }\n\n // If there is a replacer, it must be a function or an array.\n // Otherwise, throw an error.\n\n rep = replacer;\n if (replacer && typeof replacer !== \"function\" &&\n (typeof replacer !== \"object\" ||\n typeof replacer.length !== \"number\")) {\n throw new Error(\"JSON.stringify\");\n }\n\n // Make a fake root object containing our value under the key of \"\".\n // Return the result of stringifying the value.\n\n return str(\"\", {\"\": value});\n };\n }\n\n\n // If the JSON object does not yet have a parse method, give it one.\n\n if (typeof JSON.parse !== \"function\") {\n JSON.parse = (function () {\n\n // This function creates a JSON parse function that uses a state machine rather\n // than the dangerous eval function to parse a JSON text.\n\n var state; // The state of the parser, one of\n // 'go' The starting state\n // 'ok' The final, accepting state\n // 'firstokey' Ready for the first key of the object or\n // the closing of an empty object\n // 'okey' Ready for the next key of the object\n // 'colon' Ready for the colon\n // 'ovalue' Ready for the value half of a key/value pair\n // 'ocomma' Ready for a comma or closing }\n // 'firstavalue' Ready for the first value of an array or\n // an empty array\n // 'avalue' Ready for the next value of an array\n // 'acomma' Ready for a comma or closing ]\n var stack; // The stack, for controlling nesting.\n var container; // The current container object or array\n var key; // The current key\n var value; // The current value\n var escapes = { // Escapement translation table\n \"\\\\\": \"\\\\\",\n \"\\\"\": \"\\\"\",\n \"/\": \"/\",\n \"t\": \"\\t\",\n \"n\": \"\\n\",\n \"r\": \"\\r\",\n \"f\": \"\\f\",\n \"b\": \"\\b\"\n };\n var string = { // The actions for string tokens\n go: function () {\n state = \"ok\";\n },\n firstokey: function () {\n key = value;\n state = \"colon\";\n },\n okey: function () {\n key = value;\n state = \"colon\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var number = { // The actions for number tokens\n go: function () {\n state = \"ok\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var action = {\n\n // The action table describes the behavior of the machine. It contains an\n // object for each token. Each object contains a method that is called when\n // a token is matched in a state. An object will lack a method for illegal\n // states.\n\n \"{\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = {};\n state = \"firstokey\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = {};\n state = \"firstokey\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n }\n },\n \"}\": {\n firstokey: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n ocomma: function () {\n var pop = stack.pop();\n container[key] = value;\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \"[\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = [];\n state = \"firstavalue\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = [];\n state = \"firstavalue\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n }\n },\n \"]\": {\n firstavalue: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n acomma: function () {\n var pop = stack.pop();\n container.push(value);\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \":\": {\n colon: function () {\n if (Object.hasOwnProperty.call(container, key)) {\n throw new SyntaxError(\"Duplicate key '\" + key + \"\\\"\");\n }\n state = \"ovalue\";\n }\n },\n \",\": {\n ocomma: function () {\n container[key] = value;\n state = \"okey\";\n },\n acomma: function () {\n container.push(value);\n state = \"avalue\";\n }\n },\n \"true\": {\n go: function () {\n value = true;\n state = \"ok\";\n },\n ovalue: function () {\n value = true;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = true;\n state = \"acomma\";\n },\n avalue: function () {\n value = true;\n state = \"acomma\";\n }\n },\n \"false\": {\n go: function () {\n value = false;\n state = \"ok\";\n },\n ovalue: function () {\n value = false;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = false;\n state = \"acomma\";\n },\n avalue: function () {\n value = false;\n state = \"acomma\";\n }\n },\n \"null\": {\n go: function () {\n value = null;\n state = \"ok\";\n },\n ovalue: function () {\n value = null;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = null;\n state = \"acomma\";\n },\n avalue: function () {\n value = null;\n state = \"acomma\";\n }\n }\n };\n\n function debackslashify(text) {\n\n // Remove and replace any backslash escapement.\n\n return text.replace(/\\\\(?:u(.{4})|([^u]))/g, function (ignore, b, c) {\n return b\n ? String.fromCharCode(parseInt(b, 16))\n : escapes[c];\n });\n }\n\n return function (source, reviver) {\n\n // A regular expression is used to extract tokens from the JSON text.\n // The extraction process is cautious.\n\n var result;\n var tx = /^[\\u0020\\t\\n\\r]*(?:([,:\\[\\]{}]|true|false|null)|(-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?)|\"((?:[^\\r\\n\\t\\\\\\\"]|\\\\(?:[\"\\\\\\/trnfb]|u[0-9a-fA-F]{4}))*)\")/;\n\n // Set the starting state.\n\n state = \"go\";\n\n // The stack records the container, key, and state for each object or array\n // that contains another object or array while processing nested structures.\n\n stack = [];\n\n // If any error occurs, we will catch it and ultimately throw a syntax error.\n\n try {\n\n // For each token...\n\n while (true) {\n result = tx.exec(source);\n if (!result) {\n break;\n }\n\n // result is the result array from matching the tokenizing regular expression.\n // result[0] contains everything that matched, including any initial whitespace.\n // result[1] contains any punctuation that was matched, or true, false, or null.\n // result[2] contains a matched number, still in string form.\n // result[3] contains a matched string, without quotes but with escapement.\n\n if (result[1]) {\n\n // Token: Execute the action for this state and token.\n\n action[result[1]][state]();\n\n } else if (result[2]) {\n\n // Number token: Convert the number string into a number value and execute\n // the action for this state and number.\n\n value = +result[2];\n number[state]();\n } else {\n\n // String token: Replace the escapement sequences and execute the action for\n // this state and string.\n\n value = debackslashify(result[3]);\n string[state]();\n }\n\n // Remove the token from the string. The loop will continue as long as there\n // are tokens. This is a slow process, but it allows the use of ^ matching,\n // which assures that no illegal tokens slip through.\n\n source = source.slice(result[0].length);\n }\n\n // If we find a state/token combination that is illegal, then the action will\n // cause an error. We handle the error by simply changing the state.\n\n } catch (e) {\n state = e;\n }\n\n // The parsing is finished. If we are not in the final \"ok\" state, or if the\n // remaining source contains anything except whitespace, then we did not have\n //a well-formed JSON text.\n\n if (state !== \"ok\" || (/[^\\u0020\\t\\n\\r]/.test(source))) {\n throw (state instanceof SyntaxError)\n ? state\n : new SyntaxError(\"JSON\");\n }\n\n // If there is a reviver function, we recursively walk the new structure,\n // passing each name/value pair to the reviver function for possible\n // transformation, starting with a temporary root object that holds the current\n // value in an empty key. If there is not a reviver function, we simply return\n // that value.\n\n return (typeof reviver === \"function\")\n ? (function walk(holder, key) {\n var k;\n var v;\n var val = holder[key];\n if (val && typeof val === \"object\") {\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(val, k)) {\n v = walk(val, k);\n if (v !== undefined) {\n val[k] = v;\n } else {\n delete val[k];\n }\n }\n }\n }\n return reviver.call(holder, key, val);\n }({\"\": value}, \"\"))\n : value;\n };\n }());\n }\n}\n\nmodule.exports = setupCustomJSON;\n","'use strict';\n\nfunction wrapGlobals(window, handler, shim) {\n if (!window) { return; }\n // Adapted from https://github.com/bugsnag/bugsnag-js\n var globals = 'EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload'.split(',');\n var i, global;\n for (i = 0; i < globals.length; ++i) {\n global = globals[i];\n\n if (window[global] && window[global].prototype) {\n _extendListenerPrototype(handler, window[global].prototype, shim);\n }\n }\n}\n\nfunction _extendListenerPrototype(handler, prototype, shim) {\n if (prototype.hasOwnProperty && prototype.hasOwnProperty('addEventListener')) {\n var oldAddEventListener = prototype.addEventListener;\n while (oldAddEventListener._rollbarOldAdd && oldAddEventListener.belongsToShim) {\n oldAddEventListener = oldAddEventListener._rollbarOldAdd;\n }\n var addFn = function(event, callback, bubble) {\n oldAddEventListener.call(this, event, handler.wrap(callback), bubble);\n };\n addFn._rollbarOldAdd = oldAddEventListener;\n addFn.belongsToShim = shim;\n prototype.addEventListener = addFn;\n\n var oldRemoveEventListener = prototype.removeEventListener;\n while (oldRemoveEventListener._rollbarOldRemove && oldRemoveEventListener.belongsToShim) {\n oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;\n }\n var removeFn = function(event, callback, bubble) {\n oldRemoveEventListener.call(this, event, callback && callback._rollbar_wrapped || callback, bubble);\n };\n removeFn._rollbarOldRemove = oldRemoveEventListener;\n removeFn.belongsToShim = shim;\n prototype.removeEventListener = removeFn;\n }\n}\n\nmodule.exports = wrapGlobals;\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction raw(payload, jsonBackup) {\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction selectFrames(frames, range) {\n var len = frames.length;\n if (len > range * 2) {\n return frames.slice(0, range).concat(frames.slice(len - range));\n }\n return frames;\n}\n\nfunction truncateFrames(payload, jsonBackup, range) {\n range = (typeof range === 'undefined') ? 30 : range;\n var body = payload.data.body;\n var frames;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n frames = chain[i].frames;\n frames = selectFrames(frames, range);\n chain[i].frames = frames;\n }\n } else if (body.trace) {\n frames = body.trace.frames;\n frames = selectFrames(frames, range);\n body.trace.frames = frames;\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction maybeTruncateValue(len, val) {\n if (!val) {\n return val;\n }\n if (val.length > len) {\n return val.slice(0, len - 3).concat('...');\n }\n return val;\n}\n\nfunction truncateStrings(len, payload, jsonBackup) {\n function truncator(k, v, seen) {\n switch (_.typeName(v)) {\n case 'string':\n return maybeTruncateValue(len, v);\n case 'object':\n case 'array':\n return traverse(v, truncator, seen);\n default:\n return v;\n }\n }\n payload = traverse(payload, truncator);\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction truncateTraceData(traceData) {\n if (traceData.exception) {\n delete traceData.exception.description;\n traceData.exception.message = maybeTruncateValue(255, traceData.exception.message);\n }\n traceData.frames = selectFrames(traceData.frames, 1);\n return traceData;\n}\n\nfunction minBody(payload, jsonBackup) {\n var body = payload.data.body;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n chain[i] = truncateTraceData(chain[i]);\n }\n } else if (body.trace) {\n body.trace = truncateTraceData(body.trace);\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction needsTruncation(payload, maxSize) {\n return _.maxByteSize(payload) > maxSize;\n}\n\nfunction truncate(payload, jsonBackup, maxSize) {\n maxSize = (typeof maxSize === 'undefined') ? (512 * 1024) : maxSize;\n var strategies = [\n raw,\n truncateFrames,\n truncateStrings.bind(null, 1024),\n truncateStrings.bind(null, 512),\n truncateStrings.bind(null, 256),\n minBody\n ];\n var strategy, results, result;\n\n while ((strategy = strategies.shift())) {\n results = strategy(payload, jsonBackup);\n payload = results[0];\n result = results[1];\n if (result.error || !needsTruncation(result.value, maxSize)) {\n return result;\n }\n }\n return result;\n}\n\nmodule.exports = {\n truncate: truncate,\n\n /* for testing */\n raw: raw,\n truncateFrames: truncateFrames,\n truncateStrings: truncateStrings,\n maybeTruncateValue: maybeTruncateValue\n};\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://rollbar/webpack/universalModuleDefinition","webpack://rollbar/webpack/bootstrap","webpack://rollbar/./src/utility.js","webpack://rollbar/./src/browser/logger.js","webpack://rollbar/./src/browser/url.js","webpack://rollbar/./src/errorParser.js","webpack://rollbar/./src/scrub.js","webpack://rollbar/./src/utility/traverse.js","webpack://rollbar/./src/browser/bundles/rollbar.js","webpack://rollbar/./src/browser/rollbar.js","webpack://rollbar/./src/browser/core.js","webpack://rollbar/./src/rollbar.js","webpack://rollbar/./src/rateLimiter.js","webpack://rollbar/./src/merge.js","webpack://rollbar/./src/queue.js","webpack://rollbar/./src/notifier.js","webpack://rollbar/./src/api.js","webpack://rollbar/./src/apiUtility.js","webpack://rollbar/./node_modules/console-polyfill/index.js","webpack://rollbar/./src/browser/detection.js","webpack://rollbar/./src/browser/globalSetup.js","webpack://rollbar/./src/browser/transport.js","webpack://rollbar/./src/browser/transport/fetch.js","webpack://rollbar/./src/browser/transport/xhr.js","webpack://rollbar/./src/browser/transforms.js","webpack://rollbar/./node_modules/error-stack-parser/error-stack-parser.js","webpack://rollbar/./node_modules/error-stack-parser/node_modules/stackframe/stackframe.js","webpack://rollbar/./src/transforms.js","webpack://rollbar/./src/browser/predicates.js","webpack://rollbar/./src/predicates.js","webpack://rollbar/./src/defaults.js","webpack://rollbar/./src/browser/defaults/scrubFields.js","webpack://rollbar/./src/telemetry.js","webpack://rollbar/./src/browser/telemetry.js","webpack://rollbar/./src/utility/headers.js","webpack://rollbar/./src/browser/domUtility.js","webpack://rollbar/./src/utility/polyfillJSON.js","webpack://rollbar/./vendor/JSON-js/json3.js","webpack://rollbar/./src/browser/wrapGlobals.js","webpack://rollbar/./src/truncation.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;QCVA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;AClFa;;AAEb,YAAY,mBAAO,CAAC,EAAS;;AAE7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,OAAO;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,EAAE;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,mCAAmC,OAAO;AAC1C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,iBAAiB,YAAY;AAC7B;AACA,qBAAqB;AACrB;AACA,KAAK,wBAAwB;AAC7B;AACA,KAAK,yBAAyB;AAC9B;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kCAAkC,OAAO;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,SAAS;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,kCAAkC,OAAO;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,SAAS,UAAU,YAAY,GAAG;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,aAAa;AAChC;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5wBa;;AAEb;AACA,mBAAO,CAAC,EAAkB;AAC1B,gBAAgB,mBAAO,CAAC,EAAa;AACrC,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;AC3Ca;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;AChFa;;AAEb,uBAAuB,mBAAO,CAAC,EAAoB;;AAEnD;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;;AAEA,sBAAsB,wBAAwB;AAC9C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,eAAe;AACf;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7Ha;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,eAAe,mBAAO,CAAC,CAAoB;;AAE3C;AACA;;AAEA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe,qBAAq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AAC5B,UAAU,mBAAO,CAAC,EAAQ;AAC1B,aAAa,mBAAO,CAAC,CAAU;AAC/B,cAAc,mBAAO,CAAC,EAAe;;AAErC,gBAAgB,mBAAO,CAAC,EAAa;AACrC,aAAa,mBAAO,CAAC,CAAO;;AAE5B,iBAAiB,mBAAO,CAAC,EAAc;AACvC,uBAAuB,mBAAO,CAAC,EAAe;AAC9C,iBAAiB,mBAAO,CAAC,EAAc;AACvC,uBAAuB,mBAAO,CAAC,EAAe;AAC9C,kBAAkB,mBAAO,CAAC,CAAgB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,0BAA0B,sBAAsB;AAChD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,oCAAoC,SAAS;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,eAAe,mBAAO,CAAC,EAAa;AACpC,kBAAkB,mBAAO,CAAC,EAAwB;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACxjBa;;AAEb,kBAAkB,mBAAO,CAAC,EAAe;AACzC,YAAY,mBAAO,CAAC,EAAS;AAC7B,eAAe,mBAAO,CAAC,EAAY;AACnC,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,6EAA6E,UAAU;AACvF,yFAAyF,UAAU;;AAEnG;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,6BAA6B;AAC7B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACnRa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AChJa;;AAEb;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA,WAAW,YAAY;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACvDa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wDAAwD,WAAW;AACnE;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,QAAQ;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,aAAa,8BAA8B;AAC3C;AACA;AACA;AACA;AACA,+CAA+C,SAAS;AACxD;AACA;AACA,cAAc;AACd;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,SAAS;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,+BAA+B;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC7Qa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACxHa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,cAAc,mBAAO,CAAC,EAAc;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;AC5Ga;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACzGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;AClBY;;AAEb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;AC/Ba;;AAEb;AACA,gBAAgB,QAAQ;AACxB;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;;AAEA;AACA,gBAAgB,QAAQ;;AAExB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;;;;;;;AClGa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,uBAAuB,mBAAO,CAAC,EAAmB;AAClD,qBAAqB,mBAAO,CAAC,EAAiB;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC/Ha;;AAEb,aAAa,mBAAO,CAAC,CAAW;AAChC,QAAQ,mBAAO,CAAC,CAAe;;AAE/B;AACA;AACA;;AAEA;AACA;AACA,wCAAwC,mBAAmB;AAC3D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;;AAEA;;;;;;;;ACpCa;;AAEb;;AAEA,QAAQ,mBAAO,CAAC,CAAe;AAC/B,aAAa,mBAAO,CAAC,CAAW;;AAEhC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AChKa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,kBAAkB,mBAAO,CAAC,CAAgB;AAC1C,aAAa,mBAAO,CAAC,CAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,OAAO;AAC7C;AACA,oBAAoB,6CAA6C;AACjE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,4BAA4B,gBAAgB;AAC5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,sBAAsB;AACvC;AACA;AACA;;AAEA,4BAA4B,oBAAoB;AAChD;AACA;;AAEA;AACA;;AAEA;AACA;AACA,8BAA8B,aAAa;AAC3C;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,kBAAkB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACnVA;AACA;AACA;;AAEA;AACA,QAAQ,IAA0C;AAClD,QAAQ,iCAA6B,CAAC,uBAAY,CAAC,oCAAE,OAAO;AAAA;AAAA;AAAA,oGAAC;AAC7D,KAAK,MAAM,EAIN;AACL,CAAC;AACD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,MAAM;AACzB,oBAAoB,MAAM;AAC1B;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA,CAAC;;;;;;;ACzMD;AACA;AACA;;AAEA;AACA,QAAQ,IAA0C;AAClD,QAAQ,iCAAqB,EAAE,oCAAE,OAAO;AAAA;AAAA;AAAA,oGAAC;AACzC,KAAK,MAAM,EAIN;AACL,CAAC;AACD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,wBAAwB;AAC3C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA,CAAC;;;;;;;;AC9IY;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,sBAAsB;AAC1D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,8BAA8B;AAC9B;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5Ja;;AAEb,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;ACba;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe;;AAEf;;AAEA,uCAAuC,eAAe;;AAEtD;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA;;AAEA,wCAAwC,eAAe;;AAEvD,mBAAmB,gBAAgB;AACnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,SAAS;AAC1B;;AAEA,mBAAmB,qBAAqB;AACxC;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClMa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACVa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5Da;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qCAAqC,mBAAmB;AACxD;;AAEA;AACA,qCAAqC,4BAA4B;AACjE;AACA;AACA,8BAA8B,4BAA4B;AAC1D;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD;AACA;AACA,8BAA8B,gBAAgB;AAC9C;AACA;;AAEA;AACA,8BAA8B,aAAa;AAC3C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AClLa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,cAAc,mBAAO,CAAC,EAAoB;AAC1C,YAAY,mBAAO,CAAC,CAAU;AAC9B,gBAAgB,mBAAO,CAAC,CAAO;AAC/B,cAAc,mBAAO,CAAC,EAAc;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gDAAgD,aAAa;AAC7D;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B,mBAAmB,qBAAqB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,6BAA6B,0BAA0B;AACvD;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA,iBAAiB;AACjB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,eAAe,0BAA0B;AACzC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB;;AAEjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,SAAS;AAC9C;AACA;AACA,GAAG;AACH,yCAAyC;AACzC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,gDAAgD,QAAQ;;AAExD;AACA;;AAEA;AACA,gDAAgD,QAAQ;;AAExD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;AC7wBa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;AC/Fa;;AAEb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,6BAA6B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,4BAA4B,QAAQ;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,4BAA4B;AAC7C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,uBAAuB;AACpC;AACA;AACA;AACA,2BAA2B,sBAAsB;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnIa;;AAEb,mBAAmB,mBAAO,CAAC,EAA4B;;AAEvD;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB;AACpB;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,yCAAyC,iBAAiB;AAC1D,8BAA8B,kBAAkB;;AAEhD,yCAAyC,iBAAiB;AAC1D,sCAAsC,6BAA6B;;AAEnE;AACA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,wBAAwB;AACxB,+CAA+C,EAAE;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;;AAGA;;AAEA;;AAEA,UAAU;AACV,UAAU;AACV,UAAU;AACV;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA,qBAAqB,YAAY;AACjC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,qBAAqB,YAAY;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,eAAe;AACf;AACA,cAAc,wDAAwD;AACtE,cAAc,0BAA0B;AACxC;AACA;AACA;AACA;;AAEA;;AAEA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,mBAAmB,WAAW;AAC9B;AACA;;AAEA;;AAEA,OAAO;AACP;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,sBAAsB,UAAU;AAChC;AACA;;;AAGA;;AAEA;AACA;;AAEA;AACA;;AAEA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB,oBAAoB;AACpB,cAAc;AACd,gBAAgB;AAChB,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,UAAU;AACV;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,WAAW;AACX;AACA,wBAAwB,gDAAgD;AACxE;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,SAAS;AACT,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,WAAW;AACX;AACA,wBAAwB,gDAAgD;AACxE;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,sCAAsC,EAAE;AACxC;AACA;AACA;AACA,SAAS;AACT;;AAEA;;AAEA;AACA;;AAEA;AACA,+CAA+C,yGAAyG,EAAE;;AAE1J;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,SAAS;AACT;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE,UAAU;AACvB;AACA;AACA,KAAK;AACL;AACA;;AAEA;;;;;;;;AC1vBa;;AAEb;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,aAAa,oBAAoB;AACjC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC1Ca;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,eAAe,mBAAO,CAAC,CAAoB;;AAE3C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA","file":"rollbar.umd.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"rollbar\"] = factory();\n\telse\n\t\troot[\"rollbar\"] = factory();\n})(this, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n","'use strict';\n\nvar merge = require('./merge');\n\nvar RollbarJSON = {};\nfunction setupJSON(polyfillJSON) {\n if (isFunction(RollbarJSON.stringify) && isFunction(RollbarJSON.parse)) {\n return;\n }\n\n if (isDefined(JSON)) {\n // If polyfill is provided, prefer it over existing non-native shims.\n if(polyfillJSON) {\n if (isNativeFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isNativeFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n } else { // else accept any interface that is present.\n if (isFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n }\n }\n if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {\n polyfillJSON && polyfillJSON(RollbarJSON);\n }\n}\n\n/*\n * isType - Given a Javascript value and a string, returns true if the type of the value matches the\n * given string.\n *\n * @param x - any value\n * @param t - a lowercase string containing one of the following type names:\n * - undefined\n * - null\n * - error\n * - number\n * - boolean\n * - string\n * - symbol\n * - function\n * - object\n * - array\n * @returns true if x is of type t, otherwise false\n */\nfunction isType(x, t) {\n return t === typeName(x);\n}\n\n/*\n * typeName - Given a Javascript value, returns the type of the object as a string\n */\nfunction typeName(x) {\n var name = typeof x;\n if (name !== 'object') {\n return name;\n }\n if (!x) {\n return 'null';\n }\n if (x instanceof Error) {\n return 'error';\n }\n return ({}).toString.call(x).match(/\\s([a-zA-Z]+)/)[1].toLowerCase();\n}\n\n/* isFunction - a convenience function for checking if a value is a function\n *\n * @param f - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isFunction(f) {\n return isType(f, 'function');\n}\n\n/* isNativeFunction - a convenience function for checking if a value is a native JS function\n *\n * @param f - any value\n * @returns true if f is a native JS function, otherwise false\n */\nfunction isNativeFunction(f) {\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n var funcMatchString = Function.prototype.toString.call(Object.prototype.hasOwnProperty)\n .replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?');\n var reIsNative = RegExp('^' + funcMatchString + '$');\n return isObject(f) && reIsNative.test(f);\n}\n\n/* isObject - Checks if the argument is an object\n *\n * @param value - any value\n * @returns true is value is an object function is an object)\n*/\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/* isString - Checks if the argument is a string\n *\n * @param value - any value\n * @returns true if value is a string\n*/\nfunction isString(value) {\n return typeof value === 'string' || value instanceof String\n}\n\n/**\n * isFiniteNumber - determines whether the passed value is a finite number\n *\n * @param {*} n - any value\n * @returns true if value is a finite number\n */\n function isFiniteNumber(n) {\n return Number.isFinite(n);\n}\n\n/*\n * isDefined - a convenience function for checking if a value is not equal to undefined\n *\n * @param u - any value\n * @returns true if u is anything other than undefined\n */\nfunction isDefined(u) {\n return !isType(u, 'undefined');\n}\n\n/*\n * isIterable - convenience function for checking if a value can be iterated, essentially\n * whether it is an object or an array.\n *\n * @param i - any value\n * @returns true if i is an object or an array as determined by `typeName`\n */\nfunction isIterable(i) {\n var type = typeName(i);\n return (type === 'object' || type === 'array');\n}\n\n/*\n * isError - convenience function for checking if a value is of an error type\n *\n * @param e - any value\n * @returns true if e is an error\n */\nfunction isError(e) {\n // Detect both Error and Firefox Exception type\n return isType(e, 'error') || isType(e, 'exception');\n}\n\n/* isPromise - a convenience function for checking if a value is a promise\n *\n * @param p - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isPromise(p) {\n return isObject(p) && isType(p.then, 'function');\n}\n\nfunction redact() {\n return '********';\n}\n\n// from http://stackoverflow.com/a/8809472/1138191\nfunction uuid4() {\n var d = now();\n var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n var r = (d + Math.random() * 16) % 16 | 0;\n d = Math.floor(d / 16);\n return (c === 'x' ? r : (r & 0x7 | 0x8)).toString(16);\n });\n return uuid;\n}\n\nvar LEVELS = {\n debug: 0,\n info: 1,\n warning: 2,\n error: 3,\n critical: 4\n};\n\nfunction sanitizeUrl(url) {\n var baseUrlParts = parseUri(url);\n if (!baseUrlParts) {\n return '(unknown)';\n }\n\n // remove a trailing # if there is no anchor\n if (baseUrlParts.anchor === '') {\n baseUrlParts.source = baseUrlParts.source.replace('#', '');\n }\n\n url = baseUrlParts.source.replace('?' + baseUrlParts.query, '');\n return url;\n}\n\nvar parseUriOptions = {\n strictMode: false,\n key: [\n 'source',\n 'protocol',\n 'authority',\n 'userInfo',\n 'user',\n 'password',\n 'host',\n 'port',\n 'relative',\n 'path',\n 'directory',\n 'file',\n 'query',\n 'anchor'\n ],\n q: {\n name: 'queryKey',\n parser: /(?:^|&)([^&=]*)=?([^&]*)/g\n },\n parser: {\n strict: /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n loose: /^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/\n }\n};\n\nfunction parseUri(str) {\n if (!isType(str, 'string')) {\n return undefined;\n }\n\n var o = parseUriOptions;\n var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);\n var uri = {};\n\n for (var i = 0, l = o.key.length; i < l; ++i) {\n uri[o.key[i]] = m[i] || '';\n }\n\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) {\n uri[o.q.name][$1] = $2;\n }\n });\n\n return uri;\n}\n\nfunction addParamsAndAccessTokenToPath(accessToken, options, params) {\n params = params || {};\n params.access_token = accessToken;\n var paramsArray = [];\n var k;\n for (k in params) {\n if (Object.prototype.hasOwnProperty.call(params, k)) {\n paramsArray.push([k, params[k]].join('='));\n }\n }\n var query = '?' + paramsArray.sort().join('&');\n\n options = options || {};\n options.path = options.path || '';\n var qs = options.path.indexOf('?');\n var h = options.path.indexOf('#');\n var p;\n if (qs !== -1 && (h === -1 || h > qs)) {\n p = options.path;\n options.path = p.substring(0,qs) + query + '&' + p.substring(qs+1);\n } else {\n if (h !== -1) {\n p = options.path;\n options.path = p.substring(0,h) + query + p.substring(h);\n } else {\n options.path = options.path + query;\n }\n }\n}\n\nfunction formatUrl(u, protocol) {\n protocol = protocol || u.protocol;\n if (!protocol && u.port) {\n if (u.port === 80) {\n protocol = 'http:';\n } else if (u.port === 443) {\n protocol = 'https:';\n }\n }\n protocol = protocol || 'https:';\n\n if (!u.hostname) {\n return null;\n }\n var result = protocol + '//' + u.hostname;\n if (u.port) {\n result = result + ':' + u.port;\n }\n if (u.path) {\n result = result + u.path;\n }\n return result;\n}\n\nfunction stringify(obj, backup) {\n var value, error;\n try {\n value = RollbarJSON.stringify(obj);\n } catch (jsonError) {\n if (backup && isFunction(backup)) {\n try {\n value = backup(obj);\n } catch (backupError) {\n error = backupError;\n }\n } else {\n error = jsonError;\n }\n }\n return {error: error, value: value};\n}\n\nfunction maxByteSize(string) {\n // The transport will use utf-8, so assume utf-8 encoding.\n //\n // This minimal implementation will accurately count bytes for all UCS-2 and\n // single code point UTF-16. If presented with multi code point UTF-16,\n // which should be rare, it will safely overcount, not undercount.\n //\n // While robust utf-8 encoders exist, this is far smaller and far more performant.\n // For quickly counting payload size for truncation, smaller is better.\n\n var count = 0;\n var length = string.length;\n\n for (var i = 0; i < length; i++) {\n var code = string.charCodeAt(i);\n if (code < 128) { // up to 7 bits\n count = count + 1;\n } else if (code < 2048) { // up to 11 bits\n count = count + 2;\n } else if (code < 65536) { // up to 16 bits\n count = count + 3;\n }\n }\n\n return count;\n}\n\nfunction jsonParse(s) {\n var value, error;\n try {\n value = RollbarJSON.parse(s);\n } catch (e) {\n error = e;\n }\n return {error: error, value: value};\n}\n\nfunction makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n mode,\n backupMessage,\n errorParser\n) {\n var location = {\n url: url || '',\n line: lineno,\n column: colno\n };\n location.func = errorParser.guessFunctionName(location.url, location.line);\n location.context = errorParser.gatherContext(location.url, location.line);\n var href = typeof document !== 'undefined' && document && document.location && document.location.href;\n var useragent = typeof window !== 'undefined' && window && window.navigator && window.navigator.userAgent;\n return {\n 'mode': mode,\n 'message': error ? String(error) : (message || backupMessage),\n 'url': href,\n 'stack': [location],\n 'useragent': useragent\n };\n}\n\nfunction wrapCallback(logger, f) {\n return function(err, resp) {\n try {\n f(err, resp);\n } catch (e) {\n logger.error(e);\n }\n };\n}\n\nfunction nonCircularClone(obj) {\n var seen = [obj];\n\n function clone(obj, seen) {\n var value, name, newSeen, result = {};\n\n try {\n for (name in obj) {\n value = obj[name];\n\n if (value && (isType(value, 'object') || isType(value, 'array'))) {\n if (seen.includes(value)) {\n result[name] = 'Removed circular reference: ' + typeName(value);\n } else {\n newSeen = seen.slice();\n newSeen.push(value);\n result[name] = clone(value, newSeen);\n }\n continue;\n }\n\n result[name] = value;\n }\n } catch (e) {\n result = 'Failed cloning custom data: ' + e.message;\n }\n return result;\n }\n return clone(obj, seen);\n}\n\nfunction createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\n var diagnostic = {};\n var argTypes = [];\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n argTypes.push(typ);\n switch (typ) {\n case 'undefined':\n break;\n case 'string':\n message ? extraArgs.push(arg) : message = arg;\n break;\n case 'function':\n callback = wrapCallback(logger, arg);\n break;\n case 'date':\n extraArgs.push(arg);\n break;\n case 'error':\n case 'domexception':\n case 'exception': // Firefox Exception type\n err ? extraArgs.push(arg) : err = arg;\n break;\n case 'object':\n case 'array':\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n if (requestKeys && typ === 'object' && !request) {\n for (var j = 0, len = requestKeys.length; j < len; ++j) {\n if (arg[requestKeys[j]] !== undefined) {\n request = arg;\n break;\n }\n }\n if (request) {\n break;\n }\n }\n custom ? extraArgs.push(arg) : custom = arg;\n break;\n default:\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n extraArgs.push(arg);\n }\n }\n\n // if custom is an array this turns it into an object with integer keys\n if (custom) custom = nonCircularClone(custom);\n\n if (extraArgs.length > 0) {\n if (!custom) custom = nonCircularClone({});\n custom.extraArgs = nonCircularClone(extraArgs);\n }\n\n var item = {\n message: message,\n err: err,\n custom: custom,\n timestamp: now(),\n callback: callback,\n notifier: notifier,\n diagnostic: diagnostic,\n uuid: uuid4()\n };\n\n setCustomItemKeys(item, custom);\n\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n item.diagnostic.original_arg_types = argTypes;\n return item;\n}\n\nfunction setCustomItemKeys(item, custom) {\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (custom && custom.skipFrames !== undefined) {\n item.skipFrames = custom.skipFrames;\n delete custom.skipFrames;\n }\n}\n\nfunction addErrorContext(item, errors) {\n var custom = item.data.custom || {};\n var contextAdded = false;\n\n try {\n for (var i = 0; i < errors.length; ++i) {\n if (errors[i].hasOwnProperty('rollbarContext')) {\n custom = merge(custom, nonCircularClone(errors[i].rollbarContext));\n contextAdded = true;\n }\n }\n\n // Avoid adding an empty object to the data.\n if (contextAdded) {\n item.data.custom = custom;\n }\n } catch (e) {\n item.diagnostic.error_context = 'Failed: ' + e.message;\n }\n}\n\nvar TELEMETRY_TYPES = ['log', 'network', 'dom', 'navigation', 'error', 'manual'];\nvar TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];\n\nfunction arrayIncludes(arr, val) {\n for (var k = 0; k < arr.length; ++k) {\n if (arr[k] === val) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction createTelemetryEvent(args) {\n var type, metadata, level;\n var arg;\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n switch (typ) {\n case 'string':\n if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {\n type = arg;\n } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {\n level = arg;\n }\n break;\n case 'object':\n metadata = arg;\n break;\n default:\n break;\n }\n }\n var event = {\n type: type || 'manual',\n metadata: metadata || {},\n level: level\n };\n\n return event;\n}\n\n/*\n * get - given an obj/array and a keypath, return the value at that keypath or\n * undefined if not possible.\n *\n * @param obj - an object or array\n * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'\n * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`\n */\nfunction get(obj, path) {\n if (!obj) {\n return undefined;\n }\n var keys = path.split('.');\n var result = obj;\n try {\n for (var i = 0, len = keys.length; i < len; ++i) {\n result = result[keys[i]];\n }\n } catch (e) {\n result = undefined;\n }\n return result;\n}\n\nfunction set(obj, path, value) {\n if (!obj) {\n return;\n }\n var keys = path.split('.');\n var len = keys.length;\n if (len < 1) {\n return;\n }\n if (len === 1) {\n obj[keys[0]] = value;\n return;\n }\n try {\n var temp = obj[keys[0]] || {};\n var replacement = temp;\n for (var i = 1; i < len - 1; ++i) {\n temp[keys[i]] = temp[keys[i]] || {};\n temp = temp[keys[i]];\n }\n temp[keys[len-1]] = value;\n obj[keys[0]] = replacement;\n } catch (e) {\n return;\n }\n}\n\nfunction formatArgsAsString(args) {\n var i, len, arg;\n var result = [];\n for (i = 0, len = args.length; i < len; ++i) {\n arg = args[i];\n switch (typeName(arg)) {\n case 'object':\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500) {\n arg = arg.substr(0, 497) + '...';\n }\n break;\n case 'null':\n arg = 'null';\n break;\n case 'undefined':\n arg = 'undefined';\n break;\n case 'symbol':\n arg = arg.toString();\n break;\n }\n result.push(arg);\n }\n return result.join(' ');\n}\n\nfunction now() {\n if (Date.now) {\n return +Date.now();\n }\n return +new Date();\n}\n\nfunction filterIp(requestData, captureIp) {\n if (!requestData || !requestData['user_ip'] || captureIp === true) {\n return;\n }\n var newIp = requestData['user_ip'];\n if (!captureIp) {\n newIp = null;\n } else {\n try {\n var parts;\n if (newIp.indexOf('.') !== -1) {\n parts = newIp.split('.');\n parts.pop();\n parts.push('0');\n newIp = parts.join('.');\n } else if (newIp.indexOf(':') !== -1) {\n parts = newIp.split(':');\n if (parts.length > 2) {\n var beginning = parts.slice(0, 3);\n var slashIdx = beginning[2].indexOf('/');\n if (slashIdx !== -1) {\n beginning[2] = beginning[2].substring(0, slashIdx);\n }\n var terminal = '0000:0000:0000:0000:0000';\n newIp = beginning.concat(terminal).join(':');\n }\n } else {\n newIp = null;\n }\n } catch (e) {\n newIp = null;\n }\n }\n requestData['user_ip'] = newIp;\n}\n\nfunction handleOptions(current, input, payload, logger) {\n var result = merge(current, input, payload);\n result = updateDeprecatedOptions(result, logger);\n if (!input || input.overwriteScrubFields) {\n return result;\n }\n if (input.scrubFields) {\n result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);\n }\n return result;\n}\n\nfunction updateDeprecatedOptions(options, logger) {\n if(options.hostWhiteList && !options.hostSafeList) {\n options.hostSafeList = options.hostWhiteList;\n options.hostWhiteList = undefined;\n logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');\n }\n if(options.hostBlackList && !options.hostBlockList) {\n options.hostBlockList = options.hostBlackList;\n options.hostBlackList = undefined;\n logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');\n }\n return options;\n}\n\nmodule.exports = {\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n createItem: createItem,\n addErrorContext: addErrorContext,\n createTelemetryEvent: createTelemetryEvent,\n filterIp: filterIp,\n formatArgsAsString: formatArgsAsString,\n formatUrl: formatUrl,\n get: get,\n handleOptions: handleOptions,\n isError: isError,\n isFiniteNumber: isFiniteNumber,\n isFunction: isFunction,\n isIterable: isIterable,\n isNativeFunction: isNativeFunction,\n isObject: isObject,\n isString: isString,\n isType: isType,\n isPromise: isPromise,\n jsonParse: jsonParse,\n LEVELS: LEVELS,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n merge: merge,\n now: now,\n redact: redact,\n RollbarJSON: RollbarJSON,\n sanitizeUrl: sanitizeUrl,\n set: set,\n setupJSON: setupJSON,\n stringify: stringify,\n maxByteSize: maxByteSize,\n typeName: typeName,\n uuid4: uuid4\n};\n","'use strict';\n\n/* eslint-disable no-console */\nrequire('console-polyfill');\nvar detection = require('./detection');\nvar _ = require('../utility');\n\nfunction error() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.error(_.formatArgsAsString(args));\n } else {\n console.error.apply(console, args);\n }\n}\n\nfunction info() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.info(_.formatArgsAsString(args));\n } else {\n console.info.apply(console, args);\n }\n}\n\nfunction log() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.log(_.formatArgsAsString(args));\n } else {\n console.log.apply(console, args);\n }\n}\n\n/* eslint-enable no-console */\n\nmodule.exports = {\n error: error,\n info: info,\n log: log\n};\n","'use strict';\n\n// See https://nodejs.org/docs/latest/api/url.html\nfunction parse(url) {\n var result = {\n protocol: null, auth: null, host: null, path: null,\n hash: null, href: url, hostname: null, port: null,\n pathname: null, search: null, query: null\n };\n\n var i, last;\n i = url.indexOf('//');\n if (i !== -1) {\n result.protocol = url.substring(0,i);\n last = i+2;\n } else {\n last = 0;\n }\n \n i = url.indexOf('@', last);\n if (i !== -1) {\n result.auth = url.substring(last, i);\n last = i+1;\n }\n\n i = url.indexOf('/', last);\n if (i === -1) {\n i = url.indexOf('?', last);\n if (i === -1) {\n i = url.indexOf('#', last);\n if (i === -1) {\n result.host = url.substring(last);\n } else {\n result.host = url.substring(last, i);\n result.hash = url.substring(i);\n }\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n return result;\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n\n i = url.indexOf('#', last);\n if (i === -1) {\n result.path = url.substring(last);\n } else {\n result.path = url.substring(last, i);\n result.hash = url.substring(i);\n }\n\n if (result.path) {\n var pathParts = result.path.split('?');\n result.pathname = pathParts[0];\n result.query = pathParts[1];\n result.search = result.query ? '?' + result.query : null;\n }\n return result;\n}\n\nmodule.exports = {\n parse: parse\n};\n","'use strict';\n\nvar ErrorStackParser = require('error-stack-parser');\n\nvar UNKNOWN_FUNCTION = '?';\nvar ERR_CLASS_REGEXP = new RegExp('^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ');\n\nfunction guessFunctionName() {\n return UNKNOWN_FUNCTION;\n}\n\n\nfunction gatherContext() {\n return null;\n}\n\n\nfunction Frame(stackFrame) {\n var data = {};\n\n data._stackFrame = stackFrame;\n\n data.url = stackFrame.fileName;\n data.line = stackFrame.lineNumber;\n data.func = stackFrame.functionName;\n data.column = stackFrame.columnNumber;\n data.args = stackFrame.args;\n\n data.context = gatherContext();\n\n return data;\n}\n\n\nfunction Stack(exception, skip) {\n function getStack() {\n var parserStack = [];\n\n skip = skip || 0;\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch(e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = skip; i < parserStack.length; i++) {\n stack.push(new Frame(parserStack[i]));\n }\n\n return stack;\n }\n\n return {\n stack: getStack(),\n message: exception.message,\n name: _mostSpecificErrorName(exception),\n rawStack: exception.stack,\n rawException: exception\n };\n}\n\n\nfunction parse(e, skip) {\n var err = e;\n\n if (err.nested || err.cause) {\n var traceChain = [];\n while (err) {\n traceChain.push(new Stack(err, skip));\n err = err.nested || err.cause;\n\n skip = 0; // Only apply skip value to primary error\n }\n\n // Return primary error with full trace chain attached.\n traceChain[0].traceChain = traceChain;\n return traceChain[0];\n } else {\n return new Stack(err, skip);\n }\n}\n\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg || !errMsg.match) {\n return ['Unknown error. There was no error message to display.', ''];\n }\n var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);\n var errClass = '(unknown)';\n\n if (errClassMatch) {\n errClass = errClassMatch[errClassMatch.length - 1];\n errMsg = errMsg.replace((errClassMatch[errClassMatch.length - 2] || '') + errClass + ':', '');\n errMsg = errMsg.replace(/(^[\\s]+|[\\s]+$)/g, '');\n }\n return [errClass, errMsg];\n}\n\n// * Prefers any value over an empty string\n// * Prefers any value over 'Error' where possible\n// * Prefers name over constructor.name when both are more specific than 'Error'\nfunction _mostSpecificErrorName(error) {\n var name = error.name && error.name.length && error.name;\n var constructorName = error.constructor.name && error.constructor.name.length && error.constructor.name;\n\n if (!name || !constructorName) {\n return name || constructorName;\n }\n\n if (name === 'Error') {\n return constructorName;\n }\n return name;\n}\n\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame\n};\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction scrub(data, scrubFields, scrubPaths) {\n scrubFields = scrubFields || [];\n\n if (scrubPaths) {\n for (var i = 0; i < scrubPaths.length; ++i) {\n scrubPath(data, scrubPaths[i]);\n }\n }\n\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart) {\n return paramPart + _.redact();\n }\n\n function paramScrubber(v) {\n var i;\n if (_.isType(v, 'string')) {\n for (i = 0; i < queryRes.length; ++i) {\n v = v.replace(queryRes[i], redactQueryParam);\n }\n }\n return v;\n }\n\n function valScrubber(k, v) {\n var i;\n for (i = 0; i < paramRes.length; ++i) {\n if (paramRes[i].test(k)) {\n v = _.redact();\n break;\n }\n }\n return v;\n }\n\n function scrubber(k, v, seen) {\n var tmpV = valScrubber(k, v);\n if (tmpV === v) {\n if (_.isType(v, 'object') || _.isType(v, 'array')) {\n return traverse(v, scrubber, seen);\n }\n return paramScrubber(tmpV);\n } else {\n return tmpV;\n }\n }\n\n return traverse(data, scrubber);\n}\n\nfunction scrubPath(obj, path) {\n var keys = path.split('.');\n var last = keys.length - 1;\n try {\n for (var i = 0; i <= last; ++i) {\n if (i < last) {\n obj = obj[keys[i]];\n } else {\n obj[keys[i]] = _.redact();\n }\n }\n } catch (e) {\n // Missing key is OK;\n }\n}\n\nfunction _getScrubFieldRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '^\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?$';\n ret.push(new RegExp(pat, 'i'));\n }\n return ret;\n}\n\n\nfunction _getScrubQueryParamRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?';\n ret.push(new RegExp('(' + pat + '=)([^&\\\\n]+)', 'igm'));\n }\n return ret;\n}\n\nmodule.exports = scrub;\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction traverse(obj, func, seen) {\n var k, v, i;\n var isObj = _.isType(obj, 'object');\n var isArray = _.isType(obj, 'array');\n var keys = [];\n var seenIndex;\n\n // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.\n seen = seen || { obj: [], mapped: []};\n\n if (isObj) {\n seenIndex = seen.obj.indexOf(obj);\n\n if (isObj && seenIndex !== -1) {\n // Prefer the mapped object if there is one.\n return seen.mapped[seenIndex] || seen.obj[seenIndex];\n }\n\n seen.obj.push(obj);\n seenIndex = seen.obj.length - 1;\n }\n\n if (isObj) {\n for (k in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, k)) {\n keys.push(k);\n }\n }\n } else if (isArray) {\n for (i = 0; i < obj.length; ++i) {\n keys.push(i);\n }\n }\n\n var result = isObj ? {} : [];\n var same = true;\n for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n result[k] = func(k, v, seen);\n same = same && result[k] === obj[k];\n }\n\n if (isObj && !same) {\n seen.mapped[seenIndex] = result;\n }\n\n return !same ? result : obj;\n}\n\nmodule.exports = traverse;\n","'use strict';\n\nvar rollbar = require('../rollbar');\n\nvar options = (typeof window !== 'undefined') && window._rollbarConfig;\nvar alias = options && options.globalAlias || 'Rollbar';\nvar shimRunning = (typeof window !== 'undefined') && window[alias] && typeof window[alias].shimId === 'function' && window[alias].shimId() !== undefined;\n\nif ((typeof window !== 'undefined') && !window._rollbarStartTime) {\n window._rollbarStartTime = (new Date()).getTime();\n}\n\nif (!shimRunning && options) {\n var Rollbar = new rollbar(options);\n window[alias] = Rollbar;\n} else if (typeof window !== 'undefined') {\n window.rollbar = rollbar;\n window._rollbarDidLoad = true;\n} else if (typeof self !== 'undefined') {\n self.rollbar = rollbar;\n self._rollbarDidLoad = true;\n}\n\nmodule.exports = rollbar;\n","'use strict';\n\nvar Rollbar = require('./core');\nvar telemeter = require('../telemetry');\nvar instrumenter = require('./telemetry');\nvar polyfillJSON = require('../utility/polyfillJSON');\nvar wrapGlobals = require('./wrapGlobals');\nvar scrub = require('../scrub');\nvar truncation = require('../truncation');\n\nRollbar.setComponents({\n telemeter: telemeter,\n instrumenter: instrumenter,\n polyfillJSON: polyfillJSON,\n wrapGlobals: wrapGlobals,\n scrub: scrub,\n truncation: truncation\n});\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar Client = require('../rollbar');\nvar _ = require('../utility');\nvar API = require('../api');\nvar logger = require('./logger');\nvar globals = require('./globalSetup');\n\nvar Transport = require('./transport');\nvar urllib = require('./url');\n\nvar transforms = require('./transforms');\nvar sharedTransforms = require('../transforms');\nvar predicates = require('./predicates');\nvar sharedPredicates = require('../predicates');\nvar errorParser = require('../errorParser');\n\nfunction Rollbar(options, client) {\n this.options = _.handleOptions(defaultOptions, options, null, logger);\n this.options._configuredOptions = options;\n var Telemeter = this.components.telemeter;\n var Instrumenter = this.components.instrumenter;\n var polyfillJSON = this.components.polyfillJSON;\n this.wrapGlobals = this.components.wrapGlobals;\n this.scrub = this.components.scrub;\n var truncation = this.components.truncation;\n\n var transport = new Transport(truncation);\n var api = new API(this.options, transport, urllib, truncation);\n if (Telemeter) {\n this.telemeter = new Telemeter(this.options);\n }\n this.client = client || new Client(this.options, api, logger, this.telemeter, 'browser');\n var gWindow = _gWindow();\n var gDocument = (typeof document != 'undefined') && document;\n this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers\n this.anonymousErrorsPending = 0;\n addTransformsToNotifier(this.client.notifier, this, gWindow);\n addPredicatesToQueue(this.client.queue);\n this.setupUnhandledCapture();\n if (Instrumenter) {\n this.instrumenter = new Instrumenter(this.options, this.client.telemeter, this, gWindow, gDocument);\n this.instrumenter.instrument();\n }\n _.setupJSON(polyfillJSON);\n\n // Used with rollbar-react for rollbar-react-native compatibility.\n this.rollbar = this;\n}\n\nvar _instance = null;\nRollbar.init = function(options, client) {\n if (_instance) {\n return _instance.global(options).configure(options);\n }\n _instance = new Rollbar(options, client);\n return _instance;\n};\n\nRollbar.prototype.components = {};\n\nRollbar.setComponents = function(components) {\n Rollbar.prototype.components = components;\n}\n\nfunction handleUninitialized(maybeCallback) {\n var message = 'Rollbar is not initialized';\n logger.error(message);\n if (maybeCallback) {\n maybeCallback(new Error(message));\n }\n}\n\nRollbar.prototype.global = function(options) {\n this.client.global(options);\n return this;\n};\nRollbar.global = function(options) {\n if (_instance) {\n return _instance.global(options);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.configure = function(options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = {payload: payloadData};\n }\n this.options = _.handleOptions(oldOptions, options, payload, logger);\n this.options._configuredOptions = _.handleOptions(oldOptions._configuredOptions, options, payload);\n this.client.configure(this.options, payloadData);\n this.instrumenter && this.instrumenter.configure(this.options);\n this.setupUnhandledCapture();\n return this;\n};\nRollbar.configure = function(options, payloadData) {\n if (_instance) {\n return _instance.configure(options, payloadData);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.lastError = function() {\n return this.client.lastError;\n};\nRollbar.lastError = function() {\n if (_instance) {\n return _instance.lastError();\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.log = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.log(item);\n return {uuid: uuid};\n};\nRollbar.log = function() {\n if (_instance) {\n return _instance.log.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.debug = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.debug(item);\n return {uuid: uuid};\n};\nRollbar.debug = function() {\n if (_instance) {\n return _instance.debug.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.info = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.info(item);\n return {uuid: uuid};\n};\nRollbar.info = function() {\n if (_instance) {\n return _instance.info.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warn = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warn(item);\n return {uuid: uuid};\n};\nRollbar.warn = function() {\n if (_instance) {\n return _instance.warn.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warning = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warning(item);\n return {uuid: uuid};\n};\nRollbar.warning = function() {\n if (_instance) {\n return _instance.warning.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.error = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.error(item);\n return {uuid: uuid};\n};\nRollbar.error = function() {\n if (_instance) {\n return _instance.error.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.critical = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.critical(item);\n return {uuid: uuid};\n};\nRollbar.critical = function() {\n if (_instance) {\n return _instance.critical.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.buildJsonPayload = function(item) {\n return this.client.buildJsonPayload(item);\n};\nRollbar.buildJsonPayload = function() {\n if (_instance) {\n return _instance.buildJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.sendJsonPayload = function(jsonPayload) {\n return this.client.sendJsonPayload(jsonPayload);\n};\nRollbar.sendJsonPayload = function() {\n if (_instance) {\n return _instance.sendJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.setupUnhandledCapture = function() {\n var gWindow = _gWindow();\n\n if (!this.unhandledExceptionsInitialized) {\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(gWindow, this);\n if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {\n this.wrapGlobals(gWindow, this);\n }\n this.unhandledExceptionsInitialized = true;\n }\n }\n if (!this.unhandledRejectionsInitialized) {\n if (this.options.captureUnhandledRejections || this.options.handleUnhandledRejections) {\n globals.captureUnhandledRejections(gWindow, this);\n this.unhandledRejectionsInitialized = true;\n }\n }\n};\n\nRollbar.prototype.handleUncaughtException = function(message, url, lineno, colno, error, context) {\n if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {\n return;\n }\n\n // Chrome will always send 5+ arguments and error will be valid or null, not undefined.\n // If error is undefined, we have a different caller.\n // Chrome also sends errors from web workers with null error, but does not invoke\n // prepareStackTrace() for these. Test for empty url to skip them.\n if (this.options.inspectAnonymousErrors && this.isChrome && error === null && url === '') {\n return 'anonymous';\n }\n\n var item;\n var stackInfo = _.makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n 'onerror',\n 'uncaught exception',\n errorParser\n );\n if (_.isError(error)) {\n item = this._createItem([message, error, context]);\n item._unhandledStackInfo = stackInfo;\n } else if (_.isError(url)) {\n item = this._createItem([message, url, context]);\n item._unhandledStackInfo = stackInfo;\n } else {\n item = this._createItem([message, context]);\n item.stackInfo = stackInfo;\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n this.client.log(item);\n};\n\n/**\n * Chrome only. Other browsers will ignore.\n *\n * Use Error.prepareStackTrace to extract information about errors that\n * do not have a valid error object in onerror().\n *\n * In tested version of Chrome, onerror is called first but has no way\n * to communicate with prepareStackTrace. Use a counter to let this\n * handler know which errors to send to Rollbar.\n *\n * In config options, set inspectAnonymousErrors to enable.\n */\nRollbar.prototype.handleAnonymousErrors = function() {\n if (!this.options.inspectAnonymousErrors || !this.isChrome) {\n return;\n }\n\n var r = this;\n function prepareStackTrace(error, _stack) { // eslint-disable-line no-unused-vars\n if (r.options.inspectAnonymousErrors) {\n if (r.anonymousErrorsPending) {\n // This is the only known way to detect that onerror saw an anonymous error.\n // It depends on onerror reliably being called before Error.prepareStackTrace,\n // which so far holds true on tested versions of Chrome. If versions of Chrome\n // are tested that behave differently, this logic will need to be updated\n // accordingly.\n r.anonymousErrorsPending -= 1;\n\n if (!error) {\n // Not likely to get here, but calling handleUncaughtException from here\n // without an error object would throw off the anonymousErrorsPending counter,\n // so return now.\n return;\n }\n\n // Allow this to be tracked later.\n error._isAnonymous = true;\n\n // url, lineno, colno shouldn't be needed for these errors.\n // If that changes, update this accordingly, using the unused\n // _stack param as needed (rather than parse error.toString()).\n r.handleUncaughtException(error.message, null, null, null, error);\n }\n }\n\n // Workaround to ensure stack is preserved for normal errors.\n return error.stack;\n }\n\n // https://v8.dev/docs/stack-trace-api\n try {\n Error.prepareStackTrace = prepareStackTrace;\n } catch (e) {\n this.options.inspectAnonymousErrors = false;\n this.error('anonymous error handler failed', e);\n }\n}\n\nRollbar.prototype.handleUnhandledRejection = function(reason, promise) {\n if (!this.options.captureUnhandledRejections && !this.options.handleUnhandledRejections) {\n return;\n }\n\n var message = 'unhandled rejection was null or undefined!';\n if (reason) {\n if (reason.message) {\n message = reason.message;\n } else {\n var reasonResult = _.stringify(reason);\n if (reasonResult.value) {\n message = reasonResult.value;\n }\n }\n }\n var context = (reason && reason._rollbarContext) || (promise && promise._rollbarContext);\n\n var item;\n if (_.isError(reason)) {\n item = this._createItem([message, reason, context]);\n } else {\n item = this._createItem([message, reason, context]);\n item.stackInfo = _.makeUnhandledStackInfo(\n message,\n '',\n 0,\n 0,\n null,\n 'unhandledrejection',\n '',\n errorParser\n );\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n item._originalArgs = item._originalArgs || [];\n item._originalArgs.push(promise);\n this.client.log(item);\n};\n\nRollbar.prototype.wrap = function(f, context, _before) {\n try {\n var ctxFn;\n if(_.isFunction(context)) {\n ctxFn = context;\n } else {\n ctxFn = function() { return context || {}; };\n }\n\n if (!_.isFunction(f)) {\n return f;\n }\n\n if (f._isWrap) {\n return f;\n }\n\n if (!f._rollbar_wrapped) {\n f._rollbar_wrapped = function () {\n if (_before && _.isFunction(_before)) {\n _before.apply(this, arguments);\n }\n try {\n return f.apply(this, arguments);\n } catch(exc) {\n var e = exc;\n if (e && window._rollbarWrappedError !== e) {\n if (_.isType(e, 'string')) {\n e = new String(e);\n }\n e._rollbarContext = ctxFn() || {};\n e._rollbarContext._wrappedSource = f.toString();\n\n window._rollbarWrappedError = e;\n }\n throw e;\n }\n };\n\n f._rollbar_wrapped._isWrap = true;\n\n if (f.hasOwnProperty) {\n for (var prop in f) {\n if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {\n f._rollbar_wrapped[prop] = f[prop];\n }\n }\n }\n }\n\n return f._rollbar_wrapped;\n } catch (e) {\n // Return the original function if the wrap fails.\n return f;\n }\n};\nRollbar.wrap = function(f, context) {\n if (_instance) {\n return _instance.wrap(f, context);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.captureEvent = function() {\n var event = _.createTelemetryEvent(arguments);\n return this.client.captureEvent(event.type, event.metadata, event.level);\n};\nRollbar.captureEvent = function() {\n if (_instance) {\n return _instance.captureEvent.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\n// The following two methods are used internally and are not meant for public use\nRollbar.prototype.captureDomContentLoaded = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureLoad(ts);\n};\n\n/* Internal */\n\nfunction addTransformsToNotifier(notifier, rollbar, gWindow) {\n notifier\n .addTransform(transforms.handleDomException)\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(gWindow))\n .addTransform(transforms.addClientInfo(gWindow))\n .addTransform(transforms.addPluginInfo(gWindow))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(sharedTransforms.addConfigToPayload)\n .addTransform(transforms.addScrubber(rollbar.scrub))\n .addTransform(sharedTransforms.addPayloadOptions)\n .addTransform(sharedTransforms.userTransform(logger))\n .addTransform(sharedTransforms.addConfiguredOptions)\n .addTransform(sharedTransforms.addDiagnosticKeys)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(sharedPredicates.checkLevel)\n .addPredicate(predicates.checkIgnore)\n .addPredicate(sharedPredicates.userCheckIgnore(logger))\n .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))\n .addPredicate(sharedPredicates.urlIsSafeListed(logger))\n .addPredicate(sharedPredicates.messageIsIgnored(logger));\n}\n\nRollbar.prototype.loadFull = function() {\n logger.info('Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.');\n};\n\nRollbar.prototype._createItem = function(args) {\n return _.createItem(args, logger, this);\n};\n\nfunction _getFirstFunction(args) {\n for (var i = 0, len = args.length; i < len; ++i) {\n if (_.isFunction(args[i])) {\n return args[i];\n }\n }\n return undefined;\n}\n\nfunction _gWindow() {\n return ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n}\n\nvar defaults = require('../defaults');\nvar scrubFields = require('./defaults/scrubFields');\n\nvar defaultOptions = {\n version: defaults.version,\n scrubFields: scrubFields.scrubFields,\n logLevel: defaults.logLevel,\n reportLevel: defaults.reportLevel,\n uncaughtErrorLevel: defaults.uncaughtErrorLevel,\n endpoint: defaults.endpoint,\n verbose: false,\n enabled: true,\n transmit: true,\n sendConfig: false,\n includeItemsInTelemetry: true,\n captureIp: true,\n inspectAnonymousErrors: true,\n ignoreDuplicateErrors: true,\n wrapGlobalEventHandlers: false\n};\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar _ = require('./utility');\n\n/*\n * Rollbar - the interface to Rollbar\n *\n * @param options\n * @param api\n * @param logger\n */\nfunction Rollbar(options, api, logger, telemeter, platform) {\n this.options = _.merge(options);\n this.logger = logger;\n Rollbar.rateLimiter.configureGlobal(this.options);\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.api = api;\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n\n // This must happen before the Notifier is created\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = telemeter;\n setStackTraceLimit(options);\n this.lastError = null;\n this.lastErrorHash = 'none';\n}\n\nvar defaultOptions = {\n maxItems: 0,\n itemsPerMinute: 60\n};\n\nRollbar.rateLimiter = new RateLimiter(defaultOptions);\n\nRollbar.prototype.global = function (options) {\n Rollbar.rateLimiter.configureGlobal(options);\n return this;\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n\n this.options = _.merge(oldOptions, options, payload);\n\n // This must happen before the Notifier is configured\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier && this.notifier.configure(this.options);\n this.telemeter && this.telemeter.configure(this.options);\n setStackTraceLimit(options);\n this.global(this.options);\n\n if (validateTracer(options.tracer)) {\n this.tracer = options.tracer\n }\n\n return this;\n};\n\nRollbar.prototype.log = function (item) {\n var level = this._defaultLogLevel();\n return this._log(level, item);\n};\n\nRollbar.prototype.debug = function (item) {\n this._log('debug', item);\n};\n\nRollbar.prototype.info = function (item) {\n this._log('info', item);\n};\n\nRollbar.prototype.warn = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.warning = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.error = function (item) {\n this._log('error', item);\n};\n\nRollbar.prototype.critical = function (item) {\n this._log('critical', item);\n};\n\nRollbar.prototype.wait = function (callback) {\n this.queue.wait(callback);\n};\n\nRollbar.prototype.captureEvent = function (type, metadata, level) {\n return this.telemeter && this.telemeter.captureEvent(type, metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function (ts) {\n return this.telemeter && this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (ts) {\n return this.telemeter && this.telemeter.captureLoad(ts);\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.api.buildJsonPayload(item);\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n this.api.postJsonPayload(jsonPayload);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function (defaultLevel, item) {\n var callback;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {\n if (callback) {\n var error = new Error('ignored identical item');\n error.item = item;\n callback(error);\n }\n return;\n }\n try {\n this._addTracingInfo(item);\n item.level = item.level || defaultLevel;\n this.telemeter && this.telemeter._captureRollbarItem(item);\n item.telemetryEvents = (this.telemeter && this.telemeter.copyEvents()) || [];\n this.notifier.log(item, callback);\n } catch (e) {\n if (callback) {\n callback(e);\n }\n this.logger.error(e);\n }\n};\n\nRollbar.prototype._defaultLogLevel = function () {\n return this.options.logLevel || 'debug';\n};\n\nRollbar.prototype._sameAsLastError = function (item) {\n if (!item._isUncaught) {\n return false;\n }\n var itemHash = generateItemHash(item);\n if (this.lastErrorHash === itemHash) {\n return true;\n }\n this.lastError = item.err;\n this.lastErrorHash = itemHash;\n return false;\n};\n\nRollbar.prototype._addTracingInfo = function (item) {\n // Tracer validation occurs in the constructor\n // or in the Rollbar.prototype.configure methods\n if (this.tracer) {\n // add rollbar occurrence uuid to span\n var span = this.tracer.scope().active();\n\n if (validateSpan(span)) {\n span.setTag('rollbar.error_uuid', item.uuid);\n span.setTag('rollbar.has_error', true);\n span.setTag('error', true);\n span.setTag('rollbar.item_url', `https://rollbar.com/item/uuid/?uuid=${item.uuid}`);\n span.setTag('rollbar.occurrence_url', `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`);\n\n // add span ID & trace ID to occurrence\n var opentracingSpanId = span.context().toSpanId();\n var opentracingTraceId = span.context().toTraceId();\n\n if (item.custom) {\n item.custom.opentracing_span_id = opentracingSpanId;\n item.custom.opentracing_trace_id = opentracingTraceId;\n } else {\n item.custom = {\n opentracing_span_id: opentracingSpanId,\n opentracing_trace_id: opentracingTraceId\n };\n }\n }\n }\n}\n\nfunction generateItemHash(item) {\n var message = item.message || '';\n var stack = (item.err || {}).stack || String(item.err);\n return message + '::' + stack;\n}\n\n// Node.js, Chrome, Safari, and some other browsers support this property\n// which globally sets the number of stack frames returned in an Error object.\n// If a browser can't use it, no harm done.\nfunction setStackTraceLimit(options) {\n if (options.stackTraceLimit) {\n Error.stackTraceLimit = options.stackTraceLimit;\n }\n}\n\n/**\n * Validate the Tracer object provided to the Client\n * is valid for our Opentracing use case.\n * @param {opentracer.Tracer} tracer\n */\nfunction validateTracer(tracer) {\n if (!tracer) {\n return false;\n }\n\n if (!tracer.scope || typeof tracer.scope !== 'function') {\n return false;\n }\n\n var scope = tracer.scope();\n\n if (!scope || !scope.active || typeof scope.active !== 'function') {\n return false;\n }\n\n return true;\n}\n\n/**\n * Validate the Span object provided\n * @param {opentracer.Span} span\n */\nfunction validateSpan(span) {\n if (!span || !span.context || typeof span.context !== 'function') {\n return false;\n }\n\n var spanContext = span.context();\n\n if (!spanContext\n || !spanContext.toSpanId\n || !spanContext.toTraceId\n || typeof spanContext.toSpanId !== 'function'\n || typeof spanContext.toTraceId !== 'function') {\n return false\n }\n\n return true;\n}\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar\n *\n * @param options - the same options that are accepted by configureGlobal offered as a convenience\n */\nfunction RateLimiter(options) {\n this.startTime = _.now();\n this.counter = 0;\n this.perMinCounter = 0;\n this.platform = null;\n this.platformOptions = {};\n this.configureGlobal(options);\n}\n\nRateLimiter.globalSettings = {\n startTime: _.now(),\n maxItems: undefined,\n itemsPerMinute: undefined\n};\n\n/*\n * configureGlobal - set the global rate limiter options\n *\n * @param options - Only the following values are recognized:\n * startTime: a timestamp of the form returned by (new Date()).getTime()\n * maxItems: the maximum items\n * itemsPerMinute: the max number of items to send in a given minute\n */\nRateLimiter.prototype.configureGlobal = function(options) {\n if (options.startTime !== undefined) {\n RateLimiter.globalSettings.startTime = options.startTime;\n }\n if (options.maxItems !== undefined) {\n RateLimiter.globalSettings.maxItems = options.maxItems;\n }\n if (options.itemsPerMinute !== undefined) {\n RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;\n }\n};\n\n/*\n * shouldSend - determine if we should send a given item based on rate limit settings\n *\n * @param item - the item we are about to send\n * @returns An object with the following structure:\n * error: (Error|null)\n * shouldSend: bool\n * payload: (Object|null)\n * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and\n * exactly one of error or payload will be non-null. If error is non-null, the returned Error will\n * describe the situation, but it means that we were already over a rate limit (either globally or\n * per minute) when this item was checked. If error is null, and therefore payload is non-null, it\n * means this item put us over the global rate limit and the payload should be sent to Rollbar in\n * place of the passed in item.\n */\nRateLimiter.prototype.shouldSend = function(item, now) {\n now = now || _.now();\n var elapsedTime = now - this.startTime;\n if (elapsedTime < 0 || elapsedTime >= 60000) {\n this.startTime = now;\n this.perMinCounter = 0;\n }\n\n var globalRateLimit = RateLimiter.globalSettings.maxItems;\n var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;\n\n if (checkRate(item, globalRateLimit, this.counter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimit + ' max items reached', false);\n } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimitPerMin + ' items per minute reached', false);\n }\n this.counter++;\n this.perMinCounter++;\n\n var shouldSend = !checkRate(item, globalRateLimit, this.counter);\n var perMinute = shouldSend;\n shouldSend = shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);\n return shouldSendValue(this.platform, this.platformOptions, null, shouldSend, globalRateLimit, globalRateLimitPerMin, perMinute);\n};\n\nRateLimiter.prototype.setPlatformOptions = function(platform, options) {\n this.platform = platform;\n this.platformOptions = options;\n};\n\n/* Helpers */\n\nfunction checkRate(item, limit, counter) {\n return !item.ignoreRateLimit && limit >= 1 && counter > limit;\n}\n\nfunction shouldSendValue(platform, options, error, shouldSend, globalRateLimit, limitPerMin, perMinute) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute);\n }\n return {error: error, shouldSend: shouldSend, payload: payload};\n}\n\nfunction rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute) {\n var environment = options.environment || (options.payload && options.payload.environment);\n var msg;\n if (perMinute) {\n msg = 'item per minute limit reached, ignoring errors until timeout';\n } else {\n msg = 'maxItems has been hit, ignoring errors until reset.';\n }\n var item = {\n body: {\n message: {\n body: msg,\n extra: {\n maxItems: globalRateLimit,\n itemsPerMinute: limitPerMin\n }\n }\n },\n language: 'javascript',\n environment: environment,\n notifier: {\n version: (options.notifier && options.notifier.version) || options.version\n }\n };\n if (platform === 'browser') {\n item.platform = 'browser';\n item.framework = 'browser-js';\n item.notifier.name = 'rollbar-browser-js';\n } else if (platform === 'server') {\n item.framework = options.framework || 'node-js';\n item.notifier.name = options.notifier.name;\n } else if (platform === 'react-native') {\n item.framework = options.framework || 'react-native';\n item.notifier.name = options.notifier.name;\n }\n return item;\n}\n\nmodule.exports = RateLimiter;\n","'use strict';\n\n'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isPlainObject = function isPlainObject(obj) {\n\tif (!obj || toStr.call(obj) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tvar hasOwnConstructor = hasOwn.call(obj, 'constructor');\n\tvar hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n\t// Not own constructor property must be Object\n\tif (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n\t\treturn false;\n\t}\n\n\t// Own properties are enumerated firstly, so to speed up,\n\t// if last one is own, then all properties are own.\n\tvar key;\n\tfor (key in obj) {/**/}\n\n\treturn typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\nfunction merge() {\n var i, src, copy, clone, name,\n result = {},\n current = null,\n length = arguments.length;\n\n for (i=0; i < length; i++) {\n current = arguments[i];\n if (current == null) {\n continue;\n }\n\n for (name in current) {\n src = result[name];\n copy = current[name];\n if (result !== copy) {\n if (copy && isPlainObject(copy)) {\n clone = src && isPlainObject(src) ? src : {};\n result[name] = merge(clone, copy);\n } else if (typeof copy !== 'undefined') {\n result[name] = copy;\n }\n }\n }\n }\n return result;\n}\n\nmodule.exports = merge;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Queue - an object which handles which handles a queue of items to be sent to Rollbar.\n * This object handles rate limiting via a passed in rate limiter, retries based on connection\n * errors, and filtering of items based on a set of configurable predicates. The communication to\n * the backend is performed via a given API object.\n *\n * @param rateLimiter - An object which conforms to the interface\n * rateLimiter.shouldSend(item) -> bool\n * @param api - An object which conforms to the interface\n * api.postItem(payload, function(err, response))\n * @param logger - An object used to log verbose messages if desired\n * @param options - see Queue.prototype.configure\n */\nfunction Queue(rateLimiter, api, logger, options) {\n this.rateLimiter = rateLimiter;\n this.api = api;\n this.logger = logger;\n this.options = options;\n this.predicates = [];\n this.pendingItems = [];\n this.pendingRequests = [];\n this.retryQueue = [];\n this.retryHandle = null;\n this.waitCallback = null;\n this.waitIntervalID = null;\n}\n\n/*\n * configure - updates the options this queue uses\n *\n * @param options\n */\nQueue.prototype.configure = function(options) {\n this.api && this.api.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addPredicate - adds a predicate to the end of the list of predicates for this queue\n *\n * @param predicate - function(item, options) -> (bool|{err: Error})\n * Returning true means that this predicate passes and the item is okay to go on the queue\n * Returning false means do not add the item to the queue, but it is not an error\n * Returning {err: Error} means do not add the item to the queue, and the given error explains why\n * Returning {err: undefined} is equivalent to returning true but don't do that\n */\nQueue.prototype.addPredicate = function(predicate) {\n if (_.isFunction(predicate)) {\n this.predicates.push(predicate);\n }\n return this;\n};\n\nQueue.prototype.addPendingItem = function(item) {\n this.pendingItems.push(item);\n};\n\nQueue.prototype.removePendingItem = function(item) {\n var idx = this.pendingItems.indexOf(item);\n if (idx !== -1) {\n this.pendingItems.splice(idx, 1);\n }\n};\n\n/*\n * addItem - Send an item to the Rollbar API if all of the predicates are satisfied\n *\n * @param item - The payload to send to the backend\n * @param callback - function(error, repsonse) which will be called with the response from the API\n * in the case of a success, otherwise response will be null and error will have a value. If both\n * error and response are null then the item was stopped by a predicate which did not consider this\n * to be an error condition, but nonetheless did not send the item to the API.\n * @param originalError - The original error before any transformations that is to be logged if any\n */\nQueue.prototype.addItem = function(item, callback, originalError, originalItem) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() { return; };\n }\n var predicateResult = this._applyPredicates(item);\n if (predicateResult.stop) {\n this.removePendingItem(originalItem);\n callback(predicateResult.err);\n return;\n }\n this._maybeLog(item, originalError);\n this.removePendingItem(originalItem);\n if (!this.options.transmit) {\n callback(new Error('Transmit disabled'));\n return;\n }\n this.pendingRequests.push(item);\n try {\n this._makeApiRequest(item, function(err, resp) {\n this._dequeuePendingRequest(item);\n callback(err, resp);\n }.bind(this));\n } catch (e) {\n this._dequeuePendingRequest(item);\n callback(e);\n }\n};\n\n/*\n * wait - Stop any further errors from being added to the queue, and get called back when all items\n * currently processing have finished sending to the backend.\n *\n * @param callback - function() called when all pending items have been sent\n */\nQueue.prototype.wait = function(callback) {\n if (!_.isFunction(callback)) {\n return;\n }\n this.waitCallback = callback;\n if (this._maybeCallWait()) {\n return;\n }\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitIntervalID = setInterval(function() {\n this._maybeCallWait();\n }.bind(this), 500);\n};\n\n/* _applyPredicates - Sequentially applies the predicates that have been added to the queue to the\n * given item with the currently configured options.\n *\n * @param item - An item in the queue\n * @returns {stop: bool, err: (Error|null)} - stop being true means do not add item to the queue,\n * the error value should be passed up to a callbak if we are stopping.\n */\nQueue.prototype._applyPredicates = function(item) {\n var p = null;\n for (var i = 0, len = this.predicates.length; i < len; i++) {\n p = this.predicates[i](item, this.options);\n if (!p || p.err !== undefined) {\n return {stop: true, err: p.err};\n }\n }\n return {stop: false, err: null};\n};\n\n/*\n * _makeApiRequest - Send an item to Rollbar, callback when done, if there is an error make an\n * effort to retry if we are configured to do so.\n *\n * @param item - an item ready to send to the backend\n * @param callback - function(err, response)\n */\nQueue.prototype._makeApiRequest = function(item, callback) {\n var rateLimitResponse = this.rateLimiter.shouldSend(item);\n if (rateLimitResponse.shouldSend) {\n this.api.postItem(item, function(err, resp) {\n if (err) {\n this._maybeRetry(err, item, callback);\n } else {\n callback(err, resp);\n }\n }.bind(this));\n } else if (rateLimitResponse.error) {\n callback(rateLimitResponse.error);\n } else {\n this.api.postItem(rateLimitResponse.payload, callback);\n }\n};\n\n// These are errors basically mean there is no internet connection\nvar RETRIABLE_ERRORS = ['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED', 'EHOSTUNREACH', 'EPIPE', 'EAI_AGAIN'];\n\n/*\n * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback\n * with the error.\n *\n * @param err - an error returned by the API transport\n * @param item - the item that was trying to be sent when this error occured\n * @param callback - function(err, response)\n */\nQueue.prototype._maybeRetry = function(err, item, callback) {\n var shouldRetry = false;\n if (this.options.retryInterval) {\n for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {\n if (err.code === RETRIABLE_ERRORS[i]) {\n shouldRetry = true;\n break;\n }\n }\n if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {\n item.retries = item.retries ? item.retries + 1 : 1;\n if (item.retries > this.options.maxRetries) {\n shouldRetry = false;\n }\n }\n }\n if (shouldRetry) {\n this._retryApiRequest(item, callback);\n } else {\n callback(err);\n }\n};\n\n/*\n * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process\n * that queue based on the retryInterval in the options for this queue.\n *\n * @param item - an item that failed to send due to an error we deem retriable\n * @param callback - function(err, response)\n */\nQueue.prototype._retryApiRequest = function(item, callback) {\n this.retryQueue.push({item: item, callback: callback});\n\n if (!this.retryHandle) {\n this.retryHandle = setInterval(function() {\n while (this.retryQueue.length) {\n var retryObject = this.retryQueue.shift();\n this._makeApiRequest(retryObject.item, retryObject.callback);\n }\n }.bind(this), this.options.retryInterval);\n }\n};\n\n/*\n * _dequeuePendingRequest - Removes the item from the pending request queue, this queue is used to\n * enable to functionality of providing a callback that clients can pass to `wait` to be notified\n * when the pending request queue has been emptied. This must be called when the API finishes\n * processing this item. If a `wait` callback is configured, it is called by this function.\n *\n * @param item - the item previously added to the pending request queue\n */\nQueue.prototype._dequeuePendingRequest = function(item) {\n var idx = this.pendingRequests.indexOf(item);\n if (idx !== -1) {\n this.pendingRequests.splice(idx, 1);\n this._maybeCallWait();\n }\n};\n\nQueue.prototype._maybeLog = function(data, originalError) {\n if (this.logger && this.options.verbose) {\n var message = originalError;\n message = message || _.get(data, 'body.trace.exception.message');\n message = message || _.get(data, 'body.trace_chain.0.exception.message');\n if (message) {\n this.logger.error(message);\n return;\n }\n message = _.get(data, 'body.message.body');\n if (message) {\n this.logger.log(message);\n }\n }\n};\n\nQueue.prototype._maybeCallWait = function() {\n if (_.isFunction(this.waitCallback) && this.pendingItems.length === 0 && this.pendingRequests.length === 0) {\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitCallback();\n return true;\n }\n return false;\n};\n\nmodule.exports = Queue;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Notifier - the internal object responsible for delegating between the client exposed API, the\n * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the\n * queue which handles the communcation with the Rollbar API servers.\n *\n * @param queue - an object that conforms to the interface: addItem(item, callback)\n * @param options - an object representing the options to be set for this notifier, this should have\n * any defaults already set by the caller\n */\nfunction Notifier(queue, options) {\n this.queue = queue;\n this.options = options;\n this.transforms = [];\n this.diagnostic = {};\n}\n\n/*\n * configure - updates the options for this notifier with the passed in object\n *\n * @param options - an object which gets merged with the current options set on this notifier\n * @returns this\n */\nNotifier.prototype.configure = function(options) {\n this.queue && this.queue.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addTransform - adds a transform onto the end of the queue of transforms for this notifier\n *\n * @param transform - a function which takes three arguments:\n * * item: An Object representing the data to eventually be sent to Rollbar\n * * options: The current value of the options for this notifier\n * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this\n * callback with a null value for error if it wants the processing chain to continue, otherwise\n * with an error to terminate the processing. The item should be the updated item after this\n * transform is finished modifying it.\n */\nNotifier.prototype.addTransform = function(transform) {\n if (_.isFunction(transform)) {\n this.transforms.push(transform);\n }\n return this;\n};\n\n/*\n * log - the internal log function which applies the configured transforms and then pushes onto the\n * queue to be sent to the backend.\n *\n * @param item - An object with the following structure:\n * message [String] - An optional string to be sent to rollbar\n * error [Error] - An optional error\n *\n * @param callback - A function of type function(err, resp) which will be called with exactly one\n * null argument and one non-null argument. The callback will be called once, either during the\n * transform stage if an error occurs inside a transform, or in response to the communication with\n * the backend. The second argument will be the response from the backend in case of success.\n */\nNotifier.prototype.log = function(item, callback) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!this.options.enabled) {\n return callback(new Error('Rollbar is not enabled'));\n }\n\n this.queue.addPendingItem(item);\n var originalError = item.err;\n this._applyTransforms(item, function(err, i) {\n if (err) {\n this.queue.removePendingItem(item);\n return callback(err, null);\n }\n this.queue.addItem(i, callback, originalError, item);\n }.bind(this));\n};\n\n/* Internal */\n\n/*\n * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See\n * `addTransform` for more information.\n *\n * @param item - An item to be transformed\n * @param callback - A function of type function(err, item) which will be called with a non-null\n * error and a null item in the case of a transform failure, or a null error and non-null item after\n * all transforms have been applied.\n */\nNotifier.prototype._applyTransforms = function(item, callback) {\n var transformIndex = -1;\n var transformsLength = this.transforms.length;\n var transforms = this.transforms;\n var options = this.options;\n\n var cb = function(err, i) {\n if (err) {\n callback(err, null);\n return;\n }\n\n transformIndex++;\n\n if (transformIndex === transformsLength) {\n callback(null, i);\n return;\n }\n\n transforms[transformIndex](i, options, cb);\n };\n\n cb(null, item);\n};\n\nmodule.exports = Notifier;\n","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1/item/',\n search: null,\n version: '1',\n protocol: 'https:',\n port: 443\n};\n\n/**\n * Api is an object that encapsulates methods of communicating with\n * the Rollbar API. It is a standard interface with some parts implemented\n * differently for server or browser contexts. It is an object that should\n * be instantiated when used so it can contain non-global options that may\n * be different for another instance of RollbarApi.\n *\n * @param options {\n * accessToken: the accessToken to use for posting items to rollbar\n * endpoint: an alternative endpoint to send errors to\n * must be a valid, fully qualified URL.\n * The default is: https://api.rollbar.com/api/1/item\n * proxy: if you wish to proxy requests provide an object\n * with the following keys:\n * host or hostname (required): foo.example.com\n * port (optional): 123\n * protocol (optional): https\n * }\n */\nfunction Api(options, transport, urllib, truncation, jsonBackup) {\n this.options = options;\n this.transport = transport;\n this.url = urllib;\n this.truncation = truncation;\n this.jsonBackup = jsonBackup;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, urllib);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function(data, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n var self = this;\n\n // ensure the network request is scheduled after the current tick.\n setTimeout(function() {\n self.transport.post(self.accessToken, transportOptions, payload, callback);\n }, 0);\n};\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.buildJsonPayload = function(data, callback) {\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n\n if (stringifyResult.error) {\n if (callback) {\n callback(stringifyResult.error);\n }\n return null;\n }\n\n return stringifyResult.value;\n};\n\n/**\n *\n * @param jsonPayload\n * @param callback\n */\nApi.prototype.postJsonPayload = function(jsonPayload, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n this.transport.postJsonPayload(this.accessToken, transportOptions, jsonPayload, callback);\n};\n\nApi.prototype.configure = function(options) {\n var oldOptions = this.oldOptions;\n this.options = _.merge(oldOptions, options);\n this.transportOptions = _getTransport(this.options, this.url);\n if (this.options.accessToken !== undefined) {\n this.accessToken = this.options.accessToken;\n }\n return this;\n};\n\nfunction _getTransport(options, url) {\n return helpers.getTransportFromOptions(options, defaultOptions, url);\n}\n\nmodule.exports = Api;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (!_.isType(data.context, 'string')) {\n var contextResult = _.stringify(data.context, jsonBackup);\n if (contextResult.error) {\n data.context = 'Error: could not serialize \\'context\\'';\n } else {\n data.context = contextResult.value || '';\n }\n if (data.context.length > 255) {\n data.context = data.context.substr(0, 255);\n }\n }\n return {\n access_token: accessToken,\n data: data\n };\n}\n\nfunction getTransportFromOptions(options, defaults, url) {\n var hostname = defaults.hostname;\n var protocol = defaults.protocol;\n var port = defaults.port;\n var path = defaults.path;\n var search = defaults.search;\n var timeout = options.timeout;\n var transport = detectTransport(options)\n\n var proxy = options.proxy;\n if (options.endpoint) {\n var opts = url.parse(options.endpoint);\n hostname = opts.hostname;\n protocol = opts.protocol;\n port = opts.port;\n path = opts.pathname;\n search = opts.search;\n }\n return {\n timeout: timeout,\n hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy,\n transport: transport\n };\n}\n\nfunction detectTransport(options) {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var transport = options.defaultTransport || 'xhr';\n if (typeof gWindow.fetch === 'undefined') transport = 'xhr';\n if (typeof gWindow.XMLHttpRequest === 'undefined') transport = 'fetch';\n return transport;\n}\n\nfunction transportOptions(transport, method) {\n var protocol = transport.protocol || 'https:';\n var port = transport.port || (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);\n var hostname = transport.hostname;\n var path = transport.path;\n var timeout = transport.timeout;\n var transportAPI = transport.transport;\n if (transport.search) {\n path = path + transport.search;\n }\n if (transport.proxy) {\n path = protocol + '//' + hostname + path;\n hostname = transport.proxy.host || transport.proxy.hostname;\n port = transport.proxy.port;\n protocol = transport.proxy.protocol || protocol;\n }\n return {\n timeout: timeout,\n protocol: protocol,\n hostname: hostname,\n path: path,\n port: port,\n method: method,\n transport: transportAPI\n };\n}\n\nfunction appendPathToPath(base, path) {\n var baseTrailingSlash = /\\/$/.test(base);\n var pathBeginningSlash = /^\\//.test(path);\n\n if (baseTrailingSlash && pathBeginningSlash) {\n path = path.substring(1);\n } else if (!baseTrailingSlash && !pathBeginningSlash) {\n path = '/' + path;\n }\n\n return base + path;\n}\n\nmodule.exports = {\n buildPayload: buildPayload,\n getTransportFromOptions: getTransportFromOptions,\n transportOptions: transportOptions,\n appendPathToPath: appendPathToPath\n};\n","// Console-polyfill. MIT license.\n// https://github.com/paulmillr/console-polyfill\n// Make it safe to do console.log() always.\n(function(global) {\n 'use strict';\n if (!global.console) {\n global.console = {};\n }\n var con = global.console;\n var prop, method;\n var dummy = function() {};\n var properties = ['memory'];\n var methods = ('assert,clear,count,debug,dir,dirxml,error,exception,group,' +\n 'groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,' +\n 'show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn').split(',');\n while (prop = properties.pop()) if (!con[prop]) con[prop] = {};\n while (method = methods.pop()) if (!con[method]) con[method] = dummy;\n // Using `this` for web workers & supports Browserify / Webpack.\n})(typeof window === 'undefined' ? this : window);\n","'use strict';\n\n// This detection.js module is used to encapsulate any ugly browser/feature\n// detection we may need to do.\n\n// Figure out which version of IE we're using, if any.\n// This is gleaned from http://stackoverflow.com/questions/5574842/best-way-to-check-for-ie-less-than-9-in-javascript-without-library\n// Will return an integer on IE (i.e. 8)\n// Will return undefined otherwise\nfunction getIEVersion() {\n\tvar undef;\n\tif (typeof document === 'undefined') {\n\t\treturn undef;\n\t}\n\n var v = 3,\n div = document.createElement('div'),\n all = div.getElementsByTagName('i');\n\n while (\n div.innerHTML = '',\n all[0]\n );\n\n return v > 4 ? v : undef;\n}\n\nvar Detection = {\n ieVersion: getIEVersion\n};\n\nmodule.exports = Detection;\n","'use strict';\n\nfunction captureUncaughtExceptions(window, handler, shim) {\n if (!window) { return; }\n var oldOnError;\n\n if (typeof handler._rollbarOldOnError === 'function') {\n oldOnError = handler._rollbarOldOnError;\n } else if (window.onerror) {\n oldOnError = window.onerror;\n while (oldOnError._rollbarOldOnError) {\n oldOnError = oldOnError._rollbarOldOnError;\n }\n handler._rollbarOldOnError = oldOnError;\n }\n\n handler.handleAnonymousErrors();\n\n var fn = function() {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n if (shim) {\n fn._rollbarOldOnError = oldOnError;\n }\n window.onerror = fn;\n}\n\nfunction _rollbarWindowOnError(window, r, old, args) {\n if (window._rollbarWrappedError) {\n if (!args[4]) {\n args[4] = window._rollbarWrappedError;\n }\n if (!args[5]) {\n args[5] = window._rollbarWrappedError._rollbarContext;\n }\n window._rollbarWrappedError = null;\n }\n\n var ret = r.handleUncaughtException.apply(r, args);\n\n if (old) {\n old.apply(window, args);\n }\n\n // Let other chained onerror handlers above run before setting this.\n // If an error is thrown and caught within a chained onerror handler,\n // Error.prepareStackTrace() will see that one before the one we want.\n if (ret === 'anonymous') {\n r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()\n }\n}\n\nfunction captureUnhandledRejections(window, handler, shim) {\n if (!window) { return; }\n\n if (typeof window._rollbarURH === 'function' && window._rollbarURH.belongsToShim) {\n window.removeEventListener('unhandledrejection', window._rollbarURH);\n }\n\n var rejectionHandler = function (evt) {\n var reason, promise, detail;\n try {\n reason = evt.reason;\n } catch (e) {\n reason = undefined;\n }\n try {\n promise = evt.promise;\n } catch (e) {\n promise = '[unhandledrejection] error getting `promise` from event';\n }\n try {\n detail = evt.detail;\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\n }\n } catch (e) {\n // Ignore\n }\n if (!reason) {\n reason = '[unhandledrejection] error getting `reason` from event';\n }\n\n if (handler && handler.handleUnhandledRejection) {\n handler.handleUnhandledRejection(reason, promise);\n }\n };\n rejectionHandler.belongsToShim = shim;\n window._rollbarURH = rejectionHandler;\n window.addEventListener('unhandledrejection', rejectionHandler);\n}\n\n\nmodule.exports = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections\n};\n","'use strict';\n\nvar _ = require('../utility');\nvar makeFetchRequest = require('./transport/fetch');\nvar makeXhrRequest = require('./transport/xhr');\n\n/*\n * accessToken may be embedded in payload but that should not\n * be assumed\n *\n * options: {\n * hostname\n * protocol\n * path\n * port\n * method\n * transport ('xhr' | 'fetch')\n * }\n *\n * params is an object containing key/value pairs. These\n * will be appended to the path as 'key=value&key=value'\n *\n * payload is an unserialized object\n */\nfunction Transport(truncation) {\n this.truncation = truncation;\n}\n\nTransport.prototype.get = function(accessToken, options, params, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n _.addParamsAndAccessTokenToPath(accessToken, options, params);\n\n var method = 'GET';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken, url, method, null, callback, requestFactory, options.timeout, options.transport\n );\n}\n\nTransport.prototype.post = function(accessToken, options, payload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!payload) {\n return callback(new Error('Cannot send empty request'));\n }\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n if (stringifyResult.error) {\n return callback(stringifyResult.error);\n }\n\n var writeData = stringifyResult.value;\n var method = 'POST';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken, url, method, writeData, callback, requestFactory, options.timeout, options.transport\n );\n}\n\nTransport.prototype.postJsonPayload = function (accessToken, options, jsonPayload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n var method = 'POST';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken, url, method, jsonPayload, callback, requestFactory, options.timeout, options.transport\n );\n}\n\n\n// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope\n// so Angular change detection isn't triggered on each API call.\n// This is the equivalent of runOutsideAngular().\n//\nTransport.prototype._makeZoneRequest = function () {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;\n var args = Array.prototype.slice.call(arguments);\n\n if (currentZone && currentZone._name === 'angular') {\n var rootZone = currentZone._parent;\n var self = this;\n rootZone.run(function () {\n self._makeRequest.apply(undefined, args);\n });\n } else {\n this._makeRequest.apply(undefined, args);\n }\n}\n\nTransport.prototype._makeRequest = function (\n accessToken, url, method, data, callback, requestFactory, timeout, transport\n) {\n if (typeof RollbarProxy !== 'undefined') {\n return _proxyRequest(data, callback);\n }\n\n if (transport === 'fetch') {\n makeFetchRequest(accessToken, url, method, data, callback, timeout)\n } else {\n makeXhrRequest(accessToken, url, method, data, callback, requestFactory, timeout)\n }\n}\n\n/* global RollbarProxy */\nfunction _proxyRequest(json, callback) {\n var rollbarProxy = new RollbarProxy();\n rollbarProxy.sendJsonPayload(\n json,\n function(_msg) { /* do nothing */ }, // eslint-disable-line no-unused-vars\n function(err) {\n callback(new Error(err));\n }\n );\n}\n\nmodule.exports = Transport;\n","'use strict';\n\nvar logger = require('../logger');\nvar _ = require('../../utility');\n\nfunction makeFetchRequest(accessToken, url, method, data, callback, timeout) {\n var controller;\n var timeoutId;\n\n if(_.isFiniteNumber(timeout)) {\n controller = new AbortController();\n timeoutId = setTimeout(function () {controller.abort()}, timeout);\n }\n\n fetch(url, {\n method: method,\n headers: {\n 'Content-Type': 'application/json',\n 'X-Rollbar-Access-Token': accessToken,\n signal: controller && controller.signal\n },\n body: data,\n })\n .then(function (response) {\n if (timeoutId) clearTimeout(timeoutId);\n return response.json();\n })\n .then(function (data) {\n callback(null, data);\n })\n .catch(function (error) {\n logger.error(error.message);\n callback(error);\n });\n}\n\nmodule.exports = makeFetchRequest;\n","'use strict';\n\n/*global XDomainRequest*/\n\nvar _ = require('../../utility');\nvar logger = require('../logger');\n\nfunction makeXhrRequest(accessToken, url, method, data, callback, requestFactory, timeout) {\n var request;\n if (requestFactory) {\n request = requestFactory();\n } else {\n request = _createXMLHTTPObject();\n }\n if (!request) {\n // Give up, no way to send requests\n return callback(new Error('No way to send a request'));\n }\n try {\n try {\n var onreadystatechange = function() {\n try {\n if (onreadystatechange && request.readyState === 4) {\n onreadystatechange = undefined;\n\n var parseResponse = _.jsonParse(request.responseText);\n if (_isSuccess(request)) {\n callback(parseResponse.error, parseResponse.value);\n return;\n } else if (_isNormalFailure(request)) {\n if (request.status === 403) {\n // likely caused by using a server access token\n var message = parseResponse.value && parseResponse.value.message;\n logger.error(message);\n }\n // return valid http status codes\n callback(new Error(String(request.status)));\n } else {\n // IE will return a status 12000+ on some sort of connection failure,\n // so we return a blank error\n // http://msdn.microsoft.com/en-us/library/aa383770%28VS.85%29.aspx\n var msg = 'XHR response had no status code (likely connection failure)';\n callback(_newRetriableError(msg));\n }\n }\n } catch (ex) {\n //jquery source mentions firefox may error out while accessing the\n //request members if there is a network error\n //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111\n var exc;\n if (ex && ex.stack) {\n exc = ex;\n } else {\n exc = new Error(ex);\n }\n callback(exc);\n }\n };\n\n request.open(method, url, true);\n if (request.setRequestHeader) {\n request.setRequestHeader('Content-Type', 'application/json');\n request.setRequestHeader('X-Rollbar-Access-Token', accessToken);\n }\n\n if(_.isFiniteNumber(timeout)) {\n request.timeout = timeout;\n }\n\n request.onreadystatechange = onreadystatechange;\n request.send(data);\n } catch (e1) {\n // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest\n if (typeof XDomainRequest !== 'undefined') {\n\n // Assume we are in a really old browser which has a bunch of limitations:\n // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx\n\n // Extreme paranoia: if we have XDomainRequest then we have a window, but just in case\n if (!window || !window.location) {\n return callback(new Error('No window available during request, unknown environment'));\n }\n\n // If the current page is http, try and send over http\n if (window.location.href.substring(0, 5) === 'http:' && url.substring(0, 5) === 'https') {\n url = 'http' + url.substring(5);\n }\n\n var xdomainrequest = new XDomainRequest();\n xdomainrequest.onprogress = function() {};\n xdomainrequest.ontimeout = function() {\n var msg = 'Request timed out';\n var code = 'ETIMEDOUT';\n callback(_newRetriableError(msg, code));\n };\n xdomainrequest.onerror = function() {\n callback(new Error('Error during request'));\n };\n xdomainrequest.onload = function() {\n var parseResponse = _.jsonParse(xdomainrequest.responseText);\n callback(parseResponse.error, parseResponse.value);\n };\n xdomainrequest.open(method, url, true);\n xdomainrequest.send(data);\n } else {\n callback(new Error('Cannot find a method to transport a request'));\n }\n }\n } catch (e2) {\n callback(e2);\n }\n}\n\nfunction _createXMLHTTPObject() {\n /* global ActiveXObject:false */\n\n var factories = [\n function () {\n return new XMLHttpRequest();\n },\n function () {\n return new ActiveXObject('Msxml2.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Msxml3.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Microsoft.XMLHTTP');\n }\n ];\n var xmlhttp;\n var i;\n var numFactories = factories.length;\n for (i = 0; i < numFactories; i++) {\n /* eslint-disable no-empty */\n try {\n xmlhttp = factories[i]();\n break;\n } catch (e) {\n // pass\n }\n /* eslint-enable no-empty */\n }\n return xmlhttp;\n}\n\nfunction _isSuccess(r) {\n return r && r.status && r.status === 200;\n}\n\nfunction _isNormalFailure(r) {\n return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;\n}\n\nfunction _newRetriableError(message, code) {\n var err = new Error(message);\n err.code = code || 'ENOTFOUND';\n return err;\n}\n\nmodule.exports = makeXhrRequest;\n","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('../errorParser');\nvar logger = require('./logger');\n\nfunction handleDomException(item, options, callback) {\n if(item.err && errorParser.Stack(item.err).name === 'DOMException') {\n var originalError = new Error();\n originalError.name = item.err.name;\n originalError.message = item.err.message;\n originalError.stack = item.err.stack;\n originalError.nested = item.err;\n item.err = originalError;\n }\n callback(null, item);\n}\n\nfunction handleItemWithError(item, options, callback) {\n item.data = item.data || {};\n if (item.err) {\n try {\n item.stackInfo = item.err._savedStackTrace || errorParser.parse(item.err, item.skipFrames);\n\n if (options.addErrorContext) {\n addErrorContext(item);\n }\n } catch (e) {\n logger.error('Error while parsing the error object.', e);\n try {\n item.message = item.err.message || item.err.description || item.message || String(item.err);\n } catch (e2) {\n item.message = String(item.err) || String(e2);\n }\n delete item.err;\n }\n }\n callback(null, item);\n}\n\nfunction addErrorContext(item) {\n var chain = [];\n var err = item.err;\n\n chain.push(err);\n\n while (err.nested || err.cause) {\n err = err.nested || err.cause;\n chain.push(err);\n }\n\n _.addErrorContext(item, chain);\n}\n\nfunction ensureItemHasSomethingToSay(item, options, callback) {\n if (!item.message && !item.stackInfo && !item.custom) {\n callback(new Error('No message, stack info, or custom data'), null);\n }\n callback(null, item);\n}\n\nfunction addBaseInfo(item, options, callback) {\n var environment = (options.payload && options.payload.environment) || options.environment;\n item.data = _.merge(item.data, {\n environment: environment,\n level: item.level,\n endpoint: options.endpoint,\n platform: 'browser',\n framework: 'browser-js',\n language: 'javascript',\n server: {},\n uuid: item.uuid,\n notifier: {\n name: 'rollbar-browser-js',\n version: options.version\n },\n custom: item.custom\n });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function(item, options, callback) {\n var requestInfo = {};\n\n if (window && window.location) {\n requestInfo.url = window.location.href;\n requestInfo.query_string = window.location.search;\n }\n\n var remoteString = '$remote_ip';\n if (!options.captureIp) {\n remoteString = null;\n } else if (options.captureIp !== true) {\n remoteString += '_anonymize';\n }\n if (remoteString) requestInfo.user_ip = remoteString;\n\n if (Object.keys(requestInfo).length > 0) {\n _.set(item, 'data.request', requestInfo);\n }\n\n callback(null, item);\n };\n}\n\nfunction addClientInfo(window) {\n return function(item, options, callback) {\n if (!window) {\n return callback(null, item);\n }\n var nav = window.navigator || {};\n var scr = window.screen || {};\n _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: nav.userAgent,\n language: nav.language,\n cookie_enabled: nav.cookieEnabled,\n screen: {\n width: scr.width,\n height: scr.height\n }\n }\n });\n callback(null, item);\n };\n}\n\nfunction addPluginInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.navigator) {\n return callback(null, item);\n }\n var plugins = [];\n var navPlugins = window.navigator.plugins || [];\n var cur;\n for (var i=0, l=navPlugins.length; i < l; ++i) {\n cur = navPlugins[i];\n plugins.push({name: cur.name, description: cur.description});\n }\n _.set(item, 'data.client.javascript.plugins', plugins);\n callback(null, item);\n };\n}\n\nfunction addBody(item, options, callback) {\n if (item.stackInfo) {\n if (item.stackInfo.traceChain) {\n addBodyTraceChain(item, options, callback);\n } else {\n addBodyTrace(item, options, callback);\n }\n } else {\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction addBodyMessage(item, options, callback) {\n var message = item.message;\n var custom = item.custom;\n\n if (!message) {\n message = 'Item sent with null or missing arguments.';\n }\n var result = {\n body: message\n };\n\n if (custom) {\n result.extra = _.merge(custom);\n }\n\n _.set(item, 'data.body', {message: result});\n callback(null, item);\n}\n\nfunction stackFromItem(item) {\n // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = item.stackInfo.stack;\n if (stack && stack.length === 0 && item._unhandledStackInfo && item._unhandledStackInfo.stack) {\n stack = item._unhandledStackInfo.stack;\n }\n return stack;\n}\n\nfunction addBodyTraceChain(item, options, callback) {\n var traceChain = item.stackInfo.traceChain;\n var traces = [];\n\n var traceChainLength = traceChain.length;\n for (var i = 0; i < traceChainLength; i++) {\n var trace = buildTrace(item, traceChain[i], options);\n traces.push(trace);\n }\n\n _.set(item, 'data.body', {trace_chain: traces});\n callback(null, item);\n}\n\nfunction addBodyTrace(item, options, callback) {\n var stack = stackFromItem(item);\n\n if (stack) {\n var trace = buildTrace(item, item.stackInfo, options);\n _.set(item, 'data.body', {trace: trace});\n callback(null, item);\n } else {\n var stackInfo = item.stackInfo;\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction buildTrace(item, stackInfo, options) {\n var description = item && item.data.description;\n var custom = item && item.custom;\n var stack = stackFromItem(item);\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n var trace = {\n exception: {\n 'class': className,\n message: message\n }\n };\n\n if (description) {\n trace.exception.description = description;\n }\n\n if (stack) {\n if (stack.length === 0) {\n trace.exception.stack = stackInfo.rawStack;\n trace.exception.raw = String(stackInfo.rawException);\n }\n var stackFrame;\n var frame;\n var code;\n var pre;\n var post;\n var contextLength;\n var i, mid;\n\n trace.frames = [];\n for (i = 0; i < stack.length; ++i) {\n stackFrame = stack[i];\n frame = {\n filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',\n lineno: stackFrame.line || null,\n method: (!stackFrame.func || stackFrame.func === '?') ? '[anonymous]' : stackFrame.func,\n colno: stackFrame.column\n };\n if (options.sendFrameUrl) {\n frame.url = stackFrame.url;\n }\n if (frame.method && frame.method.endsWith && frame.method.endsWith('_rollbar_wrapped')) {\n continue;\n }\n\n code = pre = post = null;\n contextLength = stackFrame.context ? stackFrame.context.length : 0;\n if (contextLength) {\n mid = Math.floor(contextLength / 2);\n pre = stackFrame.context.slice(0, mid);\n code = stackFrame.context[mid];\n post = stackFrame.context.slice(mid);\n }\n\n if (code) {\n frame.code = code;\n }\n\n if (pre || post) {\n frame.context = {};\n if (pre && pre.length) {\n frame.context.pre = pre;\n }\n if (post && post.length) {\n frame.context.post = post;\n }\n }\n\n if (stackFrame.args) {\n frame.args = stackFrame.args;\n }\n\n trace.frames.push(frame);\n }\n\n // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last\n trace.frames.reverse();\n\n if (custom) {\n trace.extra = _.merge(custom);\n }\n }\n\n return trace;\n}\n\nfunction errorClass(stackInfo, guess, options) {\n if (stackInfo.name) {\n return stackInfo.name;\n } else if (options.guessErrorClass) {\n return guess;\n } else {\n return '(unknown)';\n }\n}\n\nfunction addScrubber(scrubFn) {\n return function (item, options, callback) {\n if (scrubFn) {\n var scrubFields = options.scrubFields || [];\n var scrubPaths = options.scrubPaths || [];\n item.data = scrubFn(item.data, scrubFields, scrubPaths);\n }\n callback(null, item);\n }\n}\n\nmodule.exports = {\n handleDomException: handleDomException,\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n addScrubber: addScrubber\n};\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('error-stack-parser', ['stackframe'], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory(require('stackframe'));\n } else {\n root.ErrorStackParser = factory(root.StackFrame);\n }\n}(this, function ErrorStackParser(StackFrame) {\n 'use strict';\n\n var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\\S+:\\d+/;\n var CHROME_IE_STACK_REGEXP = /^\\s*at .*(\\S+:\\d+|\\(native\\))/m;\n var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\\[native code])?$/;\n\n return {\n /**\n * Given an Error object, extract the most information from it.\n *\n * @param {Error} error object\n * @return {Array} of StackFrames\n */\n parse: function ErrorStackParser$$parse(error) {\n if (typeof error.stacktrace !== 'undefined' || typeof error['opera#sourceloc'] !== 'undefined') {\n return this.parseOpera(error);\n } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {\n return this.parseV8OrIE(error);\n } else if (error.stack) {\n return this.parseFFOrSafari(error);\n } else {\n throw new Error('Cannot parse given Error object');\n }\n },\n\n // Separate line and column numbers from a string of the form: (URI:Line:Column)\n extractLocation: function ErrorStackParser$$extractLocation(urlLike) {\n // Fail-fast but return locations like \"(native)\"\n if (urlLike.indexOf(':') === -1) {\n return [urlLike];\n }\n\n var regExp = /(.+?)(?::(\\d+))?(?::(\\d+))?$/;\n var parts = regExp.exec(urlLike.replace(/[()]/g, ''));\n return [parts[1], parts[2] || undefined, parts[3] || undefined];\n },\n\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(CHROME_IE_STACK_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n if (line.indexOf('(eval ') > -1) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n line = line.replace(/eval code/g, 'eval').replace(/(\\(eval at [^()]*)|(,.*$)/g, '');\n }\n var sanitizedLine = line.replace(/^\\s+/, '').replace(/\\(eval code/g, '(').replace(/^.*?\\s+/, '');\n\n // capture and preseve the parenthesized location \"(/foo/my bar.js:12:87)\" in\n // case it has spaces in it, as the string is split on \\s+ later on\n var location = sanitizedLine.match(/ (\\(.+\\)$)/);\n\n // remove the parenthesized location from the line, if it was matched\n sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;\n\n // if a location was matched, pass it to extractLocation() otherwise pass all sanitizedLine\n // because this line doesn't have function name\n var locationParts = this.extractLocation(location ? location[1] : sanitizedLine);\n var functionName = location && sanitizedLine || undefined;\n var fileName = ['eval', ''].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];\n\n return new StackFrame({\n functionName: functionName,\n fileName: fileName,\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n },\n\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n if (line.indexOf(' > eval') > -1) {\n line = line.replace(/ line (\\d+)(?: > eval line \\d+)* > eval:\\d+:\\d+/g, ':$1');\n }\n\n if (line.indexOf('@') === -1 && line.indexOf(':') === -1) {\n // Safari eval frames only have function names and nothing else\n return new StackFrame({\n functionName: line\n });\n } else {\n var functionNameRegex = /((.*\".+\"[^@]*)?[^@]*)(?:@)/;\n var matches = line.match(functionNameRegex);\n var functionName = matches && matches[1] ? matches[1] : undefined;\n var locationParts = this.extractLocation(line.replace(functionNameRegex, ''));\n\n return new StackFrame({\n functionName: functionName,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }\n }, this);\n },\n\n parseOpera: function ErrorStackParser$$parseOpera(e) {\n if (!e.stacktrace || (e.message.indexOf('\\n') > -1 &&\n e.message.split('\\n').length > e.stacktrace.split('\\n').length)) {\n return this.parseOpera9(e);\n } else if (!e.stack) {\n return this.parseOpera10(e);\n } else {\n return this.parseOpera11(e);\n }\n },\n\n parseOpera9: function ErrorStackParser$$parseOpera9(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)/i;\n var lines = e.message.split('\\n');\n var result = [];\n\n for (var i = 2, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(new StackFrame({\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n }));\n }\n }\n\n return result;\n },\n\n parseOpera10: function ErrorStackParser$$parseOpera10(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)(?:: In function (\\S+))?$/i;\n var lines = e.stacktrace.split('\\n');\n var result = [];\n\n for (var i = 0, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(\n new StackFrame({\n functionName: match[3] || undefined,\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n })\n );\n }\n }\n\n return result;\n },\n\n // Opera 10.65+ Error.stack very similar to FF/Safari\n parseOpera11: function ErrorStackParser$$parseOpera11(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);\n }, this);\n\n return filtered.map(function(line) {\n var tokens = line.split('@');\n var locationParts = this.extractLocation(tokens.pop());\n var functionCall = (tokens.shift() || '');\n var functionName = functionCall\n .replace(//, '$2')\n .replace(/\\([^)]*\\)/g, '') || undefined;\n var argsRaw;\n if (functionCall.match(/\\(([^)]*)\\)/)) {\n argsRaw = functionCall.replace(/^[^(]+\\(([^)]*)\\)$/, '$1');\n }\n var args = (argsRaw === undefined || argsRaw === '[arguments not available]') ?\n undefined : argsRaw.split(',');\n\n return new StackFrame({\n functionName: functionName,\n args: args,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n }\n };\n}));\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('stackframe', [], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.StackFrame = factory();\n }\n}(this, function() {\n 'use strict';\n function _isNumber(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n }\n\n function _capitalize(str) {\n return str.charAt(0).toUpperCase() + str.substring(1);\n }\n\n function _getter(p) {\n return function() {\n return this[p];\n };\n }\n\n var booleanProps = ['isConstructor', 'isEval', 'isNative', 'isToplevel'];\n var numericProps = ['columnNumber', 'lineNumber'];\n var stringProps = ['fileName', 'functionName', 'source'];\n var arrayProps = ['args'];\n var objectProps = ['evalOrigin'];\n\n var props = booleanProps.concat(numericProps, stringProps, arrayProps, objectProps);\n\n function StackFrame(obj) {\n if (!obj) return;\n for (var i = 0; i < props.length; i++) {\n if (obj[props[i]] !== undefined) {\n this['set' + _capitalize(props[i])](obj[props[i]]);\n }\n }\n }\n\n StackFrame.prototype = {\n getArgs: function() {\n return this.args;\n },\n setArgs: function(v) {\n if (Object.prototype.toString.call(v) !== '[object Array]') {\n throw new TypeError('Args must be an Array');\n }\n this.args = v;\n },\n\n getEvalOrigin: function() {\n return this.evalOrigin;\n },\n setEvalOrigin: function(v) {\n if (v instanceof StackFrame) {\n this.evalOrigin = v;\n } else if (v instanceof Object) {\n this.evalOrigin = new StackFrame(v);\n } else {\n throw new TypeError('Eval Origin must be an Object or StackFrame');\n }\n },\n\n toString: function() {\n var fileName = this.getFileName() || '';\n var lineNumber = this.getLineNumber() || '';\n var columnNumber = this.getColumnNumber() || '';\n var functionName = this.getFunctionName() || '';\n if (this.getIsEval()) {\n if (fileName) {\n return '[eval] (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return '[eval]:' + lineNumber + ':' + columnNumber;\n }\n if (functionName) {\n return functionName + ' (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return fileName + ':' + lineNumber + ':' + columnNumber;\n }\n };\n\n StackFrame.fromString = function StackFrame$$fromString(str) {\n var argsStartIndex = str.indexOf('(');\n var argsEndIndex = str.lastIndexOf(')');\n\n var functionName = str.substring(0, argsStartIndex);\n var args = str.substring(argsStartIndex + 1, argsEndIndex).split(',');\n var locationString = str.substring(argsEndIndex + 1);\n\n if (locationString.indexOf('@') === 0) {\n var parts = /@(.+?)(?::(\\d+))?(?::(\\d+))?$/.exec(locationString, '');\n var fileName = parts[1];\n var lineNumber = parts[2];\n var columnNumber = parts[3];\n }\n\n return new StackFrame({\n functionName: functionName,\n args: args || undefined,\n fileName: fileName,\n lineNumber: lineNumber || undefined,\n columnNumber: columnNumber || undefined\n });\n };\n\n for (var i = 0; i < booleanProps.length; i++) {\n StackFrame.prototype['get' + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);\n StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function(p) {\n return function(v) {\n this[p] = Boolean(v);\n };\n })(booleanProps[i]);\n }\n\n for (var j = 0; j < numericProps.length; j++) {\n StackFrame.prototype['get' + _capitalize(numericProps[j])] = _getter(numericProps[j]);\n StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function(p) {\n return function(v) {\n if (!_isNumber(v)) {\n throw new TypeError(p + ' must be a Number');\n }\n this[p] = Number(v);\n };\n })(numericProps[j]);\n }\n\n for (var k = 0; k < stringProps.length; k++) {\n StackFrame.prototype['get' + _capitalize(stringProps[k])] = _getter(stringProps[k]);\n StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function(p) {\n return function(v) {\n this[p] = String(v);\n };\n })(stringProps[k]);\n }\n\n return StackFrame;\n}));\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction itemToPayload(item, options, callback) {\n var data = item.data;\n\n if (item._isUncaught) {\n data._isUncaught = true;\n }\n if (item._originalArgs) {\n data._originalArgs = item._originalArgs;\n }\n callback(null, data);\n}\n\nfunction addPayloadOptions(item, options, callback) {\n var payloadOptions = options.payload || {};\n if (payloadOptions.body) {\n delete payloadOptions.body;\n }\n\n item.data = _.merge(item.data, payloadOptions);\n callback(null, item);\n}\n\nfunction addTelemetryData(item, options, callback) {\n if (item.telemetryEvents) {\n _.set(item, 'data.body.telemetry', item.telemetryEvents);\n }\n callback(null, item);\n}\n\nfunction addMessageWithError(item, options, callback) {\n if (!item.message) {\n callback(null, item);\n return;\n }\n var tracePath = 'data.body.trace_chain.0';\n var trace = _.get(item, tracePath);\n if (!trace) {\n tracePath = 'data.body.trace';\n trace = _.get(item, tracePath);\n }\n if (trace) {\n if (!(trace.exception && trace.exception.description)) {\n _.set(item, tracePath+'.exception.description', item.message);\n callback(null, item);\n return;\n }\n var extra = _.get(item, tracePath+'.extra') || {};\n var newExtra = _.merge(extra, {message: item.message});\n _.set(item, tracePath+'.extra', newExtra);\n }\n callback(null, item);\n}\n\nfunction userTransform(logger) {\n return function(item, options, callback) {\n var newItem = _.merge(item);\n var response = null;\n try {\n if (_.isFunction(options.transform)) {\n response = options.transform(newItem.data, item);\n }\n } catch (e) {\n options.transform = null;\n logger.error('Error while calling custom transform() function. Removing custom transform().', e);\n callback(null, item);\n return;\n }\n if(_.isPromise(response)) {\n response.then(function (promisedItem) {\n if(promisedItem) {\n newItem.data = promisedItem;\n }\n callback(null, newItem);\n }, function (error) {\n callback(error, item);\n });\n } else {\n callback(null, newItem);\n }\n }\n}\n\nfunction addConfigToPayload(item, options, callback) {\n if (!options.sendConfig) {\n return callback(null, item);\n }\n var configKey = '_rollbarConfig';\n var custom = _.get(item, 'data.custom') || {};\n custom[configKey] = options;\n item.data.custom = custom;\n callback(null, item);\n}\n\nfunction addFunctionOption(options, name) {\n if(_.isFunction(options[name])) {\n options[name] = options[name].toString();\n }\n}\n\nfunction addConfiguredOptions(item, options, callback) {\n var configuredOptions = options._configuredOptions;\n\n // These must be stringified or they'll get dropped during serialization.\n addFunctionOption(configuredOptions, 'transform');\n addFunctionOption(configuredOptions, 'checkIgnore');\n addFunctionOption(configuredOptions, 'onSendCallback');\n\n delete configuredOptions.accessToken;\n item.data.notifier.configured_options = configuredOptions;\n callback(null, item);\n}\n\nfunction addDiagnosticKeys(item, options, callback) {\n var diagnostic = _.merge(item.notifier.client.notifier.diagnostic, item.diagnostic);\n\n if (_.get(item, 'err._isAnonymous')) {\n diagnostic.is_anonymous = true;\n }\n\n if (item._isUncaught) {\n diagnostic.is_uncaught = item._isUncaught;\n }\n\n if (item.err) {\n try {\n diagnostic.raw_error = {\n message: item.err.message,\n name: item.err.name,\n constructor_name: item.err.constructor && item.err.constructor.name,\n filename: item.err.fileName,\n line: item.err.lineNumber,\n column: item.err.columnNumber,\n stack: item.err.stack\n };\n } catch (e) {\n diagnostic.raw_error = { failed: String(e) };\n }\n }\n\n item.data.notifier.diagnostic = _.merge(item.data.notifier.diagnostic, diagnostic);\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addPayloadOptions: addPayloadOptions,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError,\n userTransform: userTransform,\n addConfigToPayload: addConfigToPayload,\n addConfiguredOptions: addConfiguredOptions,\n addDiagnosticKeys: addDiagnosticKeys\n};\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction checkIgnore(item, settings) {\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore\n};\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction checkLevel(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = settings.reportLevel;\n var reportLevelVal = _.LEVELS[reportLevel] || 0;\n\n if (levelVal < reportLevelVal) {\n return false;\n }\n return true;\n}\n\nfunction userCheckIgnore(logger) {\n return function(item, settings) {\n var isUncaught = !!item._isUncaught;\n delete item._isUncaught;\n var args = item._originalArgs;\n delete item._originalArgs;\n try {\n if (_.isFunction(settings.onSendCallback)) {\n settings.onSendCallback(isUncaught, args, item);\n }\n } catch (e) {\n settings.onSendCallback = null;\n logger.error('Error while calling onSendCallback, removing', e);\n }\n try {\n if (_.isFunction(settings.checkIgnore) && settings.checkIgnore(isUncaught, args, item)) {\n return false;\n }\n } catch (e) {\n settings.checkIgnore = null;\n logger.error('Error while calling custom checkIgnore(), removing', e);\n }\n return true;\n }\n}\n\nfunction urlIsNotBlockListed(logger) {\n return function(item, settings) {\n return !urlIsOnAList(item, settings, 'blocklist', logger);\n }\n}\n\nfunction urlIsSafeListed(logger) {\n return function(item, settings) {\n return urlIsOnAList(item, settings, 'safelist', logger);\n }\n}\n\nfunction matchFrames(trace, list, block) {\n if (!trace) { return !block }\n\n var frames = trace.frames;\n\n if (!frames || frames.length === 0) { return !block; }\n\n var frame, filename, url, urlRegex;\n var listLength = list.length;\n var frameLength = frames.length;\n for (var i = 0; i < frameLength; i++) {\n frame = frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) { return !block; }\n\n for (var j = 0; j < listLength; j++) {\n url = list[j];\n urlRegex = new RegExp(url);\n\n if (urlRegex.test(filename)) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction urlIsOnAList(item, settings, safeOrBlock, logger) {\n // safelist is the default\n var block = false;\n if (safeOrBlock === 'blocklist') {\n block = true;\n }\n\n var list, traces;\n try {\n list = block ? settings.hostBlockList : settings.hostSafeList;\n traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];\n\n // These two checks are important to come first as they are defaults\n // in case the list is missing or the trace is missing or not well-formed\n if (!list || list.length === 0) {\n return !block;\n }\n if (traces.length === 0 || !traces[0]) {\n return !block;\n }\n\n var tracesLength = traces.length;\n for (var i = 0; i < tracesLength; i++) {\n if(matchFrames(traces[i], list, block)) {\n return true;\n }\n }\n } catch (e)\n /* istanbul ignore next */\n {\n if (block) {\n settings.hostBlockList = null;\n } else {\n settings.hostSafeList = null;\n }\n var listName = block ? 'hostBlockList' : 'hostSafeList';\n logger.error('Error while reading your configuration\\'s ' + listName + ' option. Removing custom ' + listName + '.', e);\n return !block;\n }\n return false;\n}\n\nfunction messageIsIgnored(logger) {\n return function(item, settings) {\n var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n messages = messagesFromItem(item);\n\n if (messages.length === 0){\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n\n for (j = 0; j < messages.length; j++) {\n messageIsIgnored = rIgnoredMessage.test(messages[j]);\n\n if (messageIsIgnored) {\n return false;\n }\n }\n }\n } catch(e)\n /* istanbul ignore next */\n {\n settings.ignoredMessages = null;\n logger.error('Error while reading your configuration\\'s ignoredMessages option. Removing custom ignoredMessages.');\n }\n\n return true;\n }\n}\n\nfunction messagesFromItem(item) {\n var body = item.body;\n var messages = [];\n\n // The payload schema only allows one of trace_chain, message, or trace.\n // However, existing test cases are based on having both trace and message present.\n // So here we preserve the ability to collect strings from any combination of these keys.\n if (body.trace_chain) {\n var traceChain = body.trace_chain;\n for (var i = 0; i < traceChain.length; i++) {\n var trace = traceChain[i];\n messages.push(_.get(trace, 'exception.message'));\n }\n }\n if (body.trace) {\n messages.push(_.get(body, 'trace.exception.message'));\n }\n if (body.message) {\n messages.push(_.get(body, 'message.body'));\n }\n return messages;\n}\n\nmodule.exports = {\n checkLevel: checkLevel,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlockListed: urlIsNotBlockListed,\n urlIsSafeListed: urlIsSafeListed,\n messageIsIgnored: messageIsIgnored\n};\n","'use strict';\n\nmodule.exports = {\n version: '2.26.3',\n endpoint: 'api.rollbar.com/api/1/item/',\n logLevel: 'debug',\n reportLevel: 'debug',\n uncaughtErrorLevel: 'error',\n maxItems: 0,\n itemsPerMin: 60\n}\n","'use strict';\n\nmodule.exports = {\n scrubFields: [\n 'pw',\n 'pass',\n 'passwd',\n 'password',\n 'secret',\n 'confirm_password',\n 'confirmPassword',\n 'password_confirmation',\n 'passwordConfirmation',\n 'access_token',\n 'accessToken',\n 'X-Rollbar-Access-Token',\n 'secret_key',\n 'secretKey',\n 'secretToken',\n 'cc-number',\n 'card number',\n 'cardnumber',\n 'cardnum',\n 'ccnum',\n 'ccnumber',\n 'cc num',\n 'creditcardnumber',\n 'credit card number',\n 'newcreditcardnumber',\n 'new credit card',\n 'creditcardno',\n 'credit card no',\n 'card#',\n 'card #',\n 'cc-csc',\n 'cvc',\n 'cvc2',\n 'cvv2',\n 'ccv2',\n 'security code',\n 'card verification',\n 'name on credit card',\n 'name on card',\n 'nameoncard',\n 'cardholder',\n 'card holder',\n 'name des karteninhabers',\n 'ccname',\n 'card type',\n 'cardtype',\n 'cc type',\n 'cctype',\n 'payment type',\n 'expiration date',\n 'expirationdate',\n 'expdate',\n 'cc-exp',\n 'ccmonth',\n 'ccyear'\n ]\n}\n","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.merge(options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n}\n\nTelemeter.prototype.configure = function(options) {\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n var deleteCount = 0;\n if (this.queue.length > newMaxEvents) {\n deleteCount = this.queue.length - newMaxEvents;\n }\n this.maxQueueSize = newMaxEvents;\n this.queue.splice(0, deleteCount);\n};\n\nTelemeter.prototype.copyEvents = function() {\n var events = Array.prototype.slice.call(this.queue, 0);\n if (_.isFunction(this.options.filterTelemetry)) {\n try {\n var i = events.length;\n while (i--) {\n if (this.options.filterTelemetry(events[i])) {\n events.splice(i, 1);\n }\n }\n } catch (e) {\n this.options.filterTelemetry = null;\n }\n }\n return events;\n};\n\nTelemeter.prototype.capture = function(type, metadata, level, rollbarUUID, timestamp) {\n var e = {\n level: getLevel(type, level),\n type: type,\n timestamp_ms: timestamp || _.now(),\n body: metadata,\n source: 'client'\n };\n if (rollbarUUID) {\n e.uuid = rollbarUUID;\n }\n\n try {\n if (_.isFunction(this.options.filterTelemetry) && this.options.filterTelemetry(e)) {\n return false;\n }\n } catch (exc) {\n this.options.filterTelemetry = null;\n }\n\n this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function(type, metadata, level, rollbarUUID) {\n return this.capture(type, metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.captureError = function(err, level, rollbarUUID, timestamp) {\n var metadata = {\n message: err.message || String(err)\n };\n if (err.stack) {\n metadata.stack = err.stack;\n }\n return this.capture('error', metadata, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureLog = function(message, level, rollbarUUID, timestamp) {\n return this.capture('log', {\n message: message\n }, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID, requestData) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\n if (requestData) {\n metadata.request = requestData;\n }\n var level = this.levelFromStatus(metadata.status_code);\n return this.capture('network', metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.levelFromStatus = function(statusCode) {\n if (statusCode >= 200 && statusCode < 400) {\n return 'info';\n }\n if (statusCode === 0 || statusCode >= 400) {\n return 'error';\n }\n return 'info';\n};\n\nTelemeter.prototype.captureDom = function(subtype, element, value, checked, rollbarUUID) {\n var metadata = {\n subtype: subtype,\n element: element\n };\n if (value !== undefined) {\n metadata.value = value;\n }\n if (checked !== undefined) {\n metadata.checked = checked;\n }\n return this.capture('dom', metadata, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureNavigation = function(from, to, rollbarUUID) {\n return this.capture('navigation', {from: from, to: to}, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureDomContentLoaded = function(ts) {\n return this.capture('navigation', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n */\n};\nTelemeter.prototype.captureLoad = function(ts) {\n return this.capture('navigation', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n */\n};\n\nTelemeter.prototype.captureConnectivityChange = function(type, rollbarUUID) {\n return this.captureNetwork({change: type}, 'connectivity', rollbarUUID);\n};\n\n// Only intended to be used internally by the notifier\nTelemeter.prototype._captureRollbarItem = function(item) {\n if (!this.options.includeItemsInTelemetry) {\n return;\n }\n if (item.err) {\n return this.captureError(item.err, item.level, item.uuid, item.timestamp);\n }\n if (item.message) {\n return this.captureLog(item.message, item.level, item.uuid, item.timestamp);\n }\n if (item.custom) {\n return this.capture('log', item.custom, item.level, item.uuid, item.timestamp);\n }\n};\n\nTelemeter.prototype.push = function(e) {\n this.queue.push(e);\n if (this.queue.length > this.maxQueueSize) {\n this.queue.shift();\n }\n};\n\nfunction getLevel(type, level) {\n if (level) {\n return level;\n }\n var defaultLevel = {\n error: 'error',\n manual: 'info'\n };\n return defaultLevel[type] || 'info';\n}\n\nmodule.exports = Telemeter;\n","'use strict';\n\nvar _ = require('../utility');\nvar headers = require('../utility/headers');\nvar scrub = require('../scrub');\nvar urlparser = require('./url');\nvar domUtil = require('./domUtility');\n\nvar defaults = {\n network: true,\n networkResponseHeaders: false,\n networkResponseBody: false,\n networkRequestHeaders: false,\n networkRequestBody: false,\n networkErrorOnHttp5xx: false,\n networkErrorOnHttp4xx: false,\n networkErrorOnHttp0: false,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true,\n contentSecurityPolicy: true,\n errorOnContentSecurityPolicy: false\n};\n\nfunction replace(obj, name, replacement, replacements, type) {\n var orig = obj[name];\n obj[name] = replacement(orig);\n if (replacements) {\n replacements[type].push([obj, name, orig]);\n }\n}\n\nfunction restore(replacements, type) {\n var b;\n while (replacements[type].length) {\n b = replacements[type].shift();\n b[0][b[1]] = b[2];\n }\n}\n\nfunction nameFromDescription(description) {\n if (!description || !description.attributes) { return null; }\n var attrs = description.attributes;\n for (var a = 0; a < attrs.length; ++a) {\n if (attrs[a].key === 'name') {\n return attrs[a].value;\n }\n }\n return null;\n}\n\nfunction defaultValueScrubber(scrubFields) {\n var patterns = [];\n for (var i = 0; i < scrubFields.length; ++i) {\n patterns.push(new RegExp(scrubFields[i], 'i'));\n }\n return function(description) {\n var name = nameFromDescription(description);\n if (!name) { return false; }\n for (var i = 0; i < patterns.length; ++i) {\n if (patterns[i].test(name)) {\n return true;\n }\n }\n return false;\n };\n}\n\nfunction Instrumenter(options, telemeter, rollbar, _window, _document) {\n this.options = options;\n var autoInstrument = options.autoInstrument;\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);\n this.telemeter = telemeter;\n this.rollbar = rollbar;\n this.diagnostic = rollbar.client.notifier.diagnostic;\n this._window = _window || {};\n this._document = _document || {};\n this.replacements = {\n network: [],\n log: [],\n navigation: [],\n connectivity: []\n };\n this.eventRemovers = {\n dom: [],\n connectivity: [],\n contentsecuritypolicy: []\n };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function(options) {\n this.options = _.merge(this.options, options);\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.merge(this.autoInstrument);\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n if (options.scrubTelemetryInputs !== undefined) {\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n }\n if (options.telemetryScrubber !== undefined) {\n this.telemetryScrubber = options.telemetryScrubber;\n }\n};\n\n// eslint-disable-next-line complexity\nInstrumenter.prototype.instrument = function(oldSettings) {\n if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {\n this.instrumentNetwork();\n } else if (!this.autoInstrument.network && oldSettings && oldSettings.network) {\n this.deinstrumentNetwork();\n }\n\n if (this.autoInstrument.log && !(oldSettings && oldSettings.log)) {\n this.instrumentConsole();\n } else if (!this.autoInstrument.log && oldSettings && oldSettings.log) {\n this.deinstrumentConsole();\n }\n\n if (this.autoInstrument.dom && !(oldSettings && oldSettings.dom)) {\n this.instrumentDom();\n } else if (!this.autoInstrument.dom && oldSettings && oldSettings.dom) {\n this.deinstrumentDom();\n }\n\n if (this.autoInstrument.navigation && !(oldSettings && oldSettings.navigation)) {\n this.instrumentNavigation();\n } else if (!this.autoInstrument.navigation && oldSettings && oldSettings.navigation) {\n this.deinstrumentNavigation();\n }\n\n if (this.autoInstrument.connectivity && !(oldSettings && oldSettings.connectivity)) {\n this.instrumentConnectivity();\n } else if (!this.autoInstrument.connectivity && oldSettings && oldSettings.connectivity) {\n this.deinstrumentConnectivity();\n }\n\n if (this.autoInstrument.contentSecurityPolicy && !(oldSettings && oldSettings.contentSecurityPolicy)) {\n this.instrumentContentSecurityPolicy();\n } else if (!this.autoInstrument.contentSecurityPolicy && oldSettings && oldSettings.contentSecurityPolicy) {\n this.deinstrumentContentSecurityPolicy();\n }\n};\n\nInstrumenter.prototype.deinstrumentNetwork = function() {\n restore(this.replacements, 'network');\n};\n\nInstrumenter.prototype.instrumentNetwork = function() {\n var self = this;\n\n function wrapProp(prop, xhr) {\n if (prop in xhr && _.isFunction(xhr[prop])) {\n replace(xhr, prop, function(orig) {\n return self.rollbar.wrap(orig);\n });\n }\n }\n\n if ('XMLHttpRequest' in this._window) {\n var xhrp = this._window.XMLHttpRequest.prototype;\n replace(xhrp, 'open', function(orig) {\n return function(method, url) {\n var isUrlObject = _isUrlObject(url)\n if (_.isType(url, 'string') || isUrlObject) {\n url = isUrlObject ? url.toString() : url;\n if (this.__rollbar_xhr) {\n this.__rollbar_xhr.method = method;\n this.__rollbar_xhr.url = url;\n this.__rollbar_xhr.status_code = null;\n this.__rollbar_xhr.start_time_ms = _.now();\n this.__rollbar_xhr.end_time_ms = null;\n } else {\n this.__rollbar_xhr = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'setRequestHeader', function(orig) {\n return function(header, value) {\n // If xhr.open is async, __rollbar_xhr may not be initialized yet.\n if (!this.__rollbar_xhr) {\n this.__rollbar_xhr = {};\n }\n if (_.isType(header, 'string') && _.isType(value, 'string')) {\n if (self.autoInstrument.networkRequestHeaders) {\n if (!this.__rollbar_xhr.request_headers) {\n this.__rollbar_xhr.request_headers = {};\n }\n this.__rollbar_xhr.request_headers[header] = value;\n }\n // We want the content type even if request header telemetry is off.\n if (header.toLowerCase() === 'content-type') {\n this.__rollbar_xhr.request_content_type = value;\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'send', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(data) {\n /* eslint-enable no-unused-vars */\n var xhr = this;\n\n function onreadystatechangeHandler() {\n if (xhr.__rollbar_xhr) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n if (self.autoInstrument.networkRequestBody) {\n xhr.__rollbar_xhr.request = data;\n }\n xhr.__rollbar_event = self.captureNetwork(xhr.__rollbar_xhr, 'xhr', undefined);\n }\n if (xhr.readyState < 2) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n }\n if (xhr.readyState > 3) {\n xhr.__rollbar_xhr.end_time_ms = _.now();\n\n var headers = null;\n xhr.__rollbar_xhr.response_content_type = xhr.getResponseHeader('Content-Type');\n if (self.autoInstrument.networkResponseHeaders) {\n var headersConfig = self.autoInstrument.networkResponseHeaders;\n headers = {};\n try {\n var header, i;\n if (headersConfig === true) {\n var allHeaders = xhr.getAllResponseHeaders();\n if (allHeaders) {\n var arr = allHeaders.trim().split(/[\\r\\n]+/);\n var parts, value;\n for (i=0; i < arr.length; i++) {\n parts = arr[i].split(': ');\n header = parts.shift();\n value = parts.join(': ');\n headers[header] = value;\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n header = headersConfig[i];\n headers[header] = xhr.getResponseHeader(header);\n }\n }\n } catch (e) {\n /* we ignore the errors here that could come from different\n * browser issues with the xhr methods */\n }\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n try {\n body = xhr.responseText;\n } catch (e) {\n /* ignore errors from reading responseText */\n }\n }\n var response = null;\n if (body || headers) {\n response = {};\n if (body) {\n if (self.isJsonContentType(xhr.__rollbar_xhr.response_content_type)) {\n response.body = self.scrubJson(body);\n } else {\n response.body = body;\n }\n }\n if (headers) {\n response.headers = headers;\n }\n }\n if (response) {\n xhr.__rollbar_xhr.response = response;\n }\n try {\n var code = xhr.status;\n code = code === 1223 ? 204 : code;\n xhr.__rollbar_xhr.status_code = code;\n xhr.__rollbar_event.level = self.telemeter.levelFromStatus(code);\n self.errorOnHttpStatus(xhr.__rollbar_xhr);\n } catch (e) {\n /* ignore possible exception from xhr.status */\n }\n }\n }\n }\n\n wrapProp('onload', xhr);\n wrapProp('onerror', xhr);\n wrapProp('onprogress', xhr);\n\n if ('onreadystatechange' in xhr && _.isFunction(xhr.onreadystatechange)) {\n replace(xhr, 'onreadystatechange', function(orig) {\n return self.rollbar.wrap(orig, undefined, onreadystatechangeHandler);\n });\n } else {\n xhr.onreadystatechange = onreadystatechangeHandler;\n }\n if (xhr.__rollbar_xhr && self.trackHttpErrors()) {\n xhr.__rollbar_xhr.stack = (new Error()).stack;\n }\n return orig.apply(this, arguments);\n }\n }, this.replacements, 'network');\n }\n\n if ('fetch' in this._window) {\n replace(this._window, 'fetch', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(fn, t) {\n /* eslint-enable no-unused-vars */\n var args = new Array(arguments.length);\n for (var i=0, len=args.length; i < len; i++) {\n args[i] = arguments[i];\n }\n var input = args[0];\n var method = 'GET';\n var url;\n var isUrlObject = _isUrlObject(input)\n if (_.isType(input, 'string') || isUrlObject) {\n url = isUrlObject ? input.toString() : input;\n } else if (input) {\n url = input.url;\n if (input.method) {\n method = input.method;\n }\n }\n if (args[1] && args[1].method) {\n method = args[1].method;\n }\n var metadata = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n if (args[1] && args[1].headers) {\n // Argument may be a Headers object, or plain object. Ensure here that\n // we are working with a Headers object with case-insensitive keys.\n var reqHeaders = headers(args[1].headers);\n\n metadata.request_content_type = reqHeaders.get('Content-Type');\n\n if (self.autoInstrument.networkRequestHeaders) {\n metadata.request_headers = self.fetchHeaders(reqHeaders, self.autoInstrument.networkRequestHeaders)\n }\n }\n\n if (self.autoInstrument.networkRequestBody) {\n if (args[1] && args[1].body) {\n metadata.request = args[1].body;\n } else if (args[0] && !_.isType(args[0], 'string') && args[0].body) {\n metadata.request = args[0].body;\n }\n }\n self.captureNetwork(metadata, 'fetch', undefined);\n if (self.trackHttpErrors()) {\n metadata.stack = (new Error()).stack;\n }\n\n // Start our handler before returning the promise. This allows resp.clone()\n // to execute before other handlers touch the response.\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n metadata.response_content_type = resp.headers.get('Content-Type');\n var headers = null;\n if (self.autoInstrument.networkResponseHeaders) {\n headers = self.fetchHeaders(resp.headers, self.autoInstrument.networkResponseHeaders);\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n if (typeof resp.text === 'function') { // Response.text() is not implemented on some platforms\n // The response must be cloned to prevent reading (and locking) the original stream.\n // This must be done before other handlers touch the response.\n body = resp.clone().text(); //returns a Promise\n }\n }\n if (headers || body) {\n metadata.response = {};\n if (body) {\n // Test to ensure body is a Promise, which it should always be.\n if (typeof body.then === 'function') {\n body.then(function (text) {\n if (text && self.isJsonContentType(metadata.response_content_type)) {\n metadata.response.body = self.scrubJson(text);\n } else {\n metadata.response.body = text;\n }\n });\n } else {\n metadata.response.body = body;\n }\n }\n if (headers) {\n metadata.response.headers = headers;\n }\n }\n self.errorOnHttpStatus(metadata);\n return resp;\n });\n };\n }, this.replacements, 'network');\n }\n};\n\nInstrumenter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID) {\n if (metadata.request && this.isJsonContentType(metadata.request_content_type)) {\n metadata.request = this.scrubJson(metadata.request);\n }\n return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);\n};\n\nInstrumenter.prototype.isJsonContentType = function(contentType) {\n return (contentType && _.isType(contentType, 'string') && contentType.toLowerCase().includes('json')) ? true : false;\n}\n\nInstrumenter.prototype.scrubJson = function(json) {\n return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));\n}\n\nInstrumenter.prototype.fetchHeaders = function(inHeaders, headersConfig) {\n var outHeaders = {};\n try {\n var i;\n if (headersConfig === true) {\n if (typeof inHeaders.entries === 'function') { // Headers.entries() is not implemented in IE\n var allHeaders = inHeaders.entries();\n var currentHeader = allHeaders.next();\n while (!currentHeader.done) {\n outHeaders[currentHeader.value[0]] = currentHeader.value[1];\n currentHeader = allHeaders.next();\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n var header = headersConfig[i];\n outHeaders[header] = inHeaders.get(header);\n }\n }\n } catch (e) {\n /* ignore probable IE errors */\n }\n return outHeaders;\n}\n\nInstrumenter.prototype.trackHttpErrors = function() {\n return this.autoInstrument.networkErrorOnHttp5xx ||\n this.autoInstrument.networkErrorOnHttp4xx ||\n this.autoInstrument.networkErrorOnHttp0;\n}\n\nInstrumenter.prototype.errorOnHttpStatus = function(metadata) {\n var status = metadata.status_code;\n\n if ((status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||\n (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||\n (status === 0 && this.autoInstrument.networkErrorOnHttp0)) {\n var error = new Error('HTTP request failed with Status ' + status);\n error.stack = metadata.stack;\n this.rollbar.error(error, { skipFrames: 1 });\n }\n}\n\nInstrumenter.prototype.deinstrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n var b;\n while (this.replacements['log'].length) {\n b = this.replacements['log'].shift();\n this._window.console[b[0]] = b[1];\n }\n};\n\nInstrumenter.prototype.instrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n\n var self = this;\n var c = this._window.console;\n\n function wrapConsole(method) {\n 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778\n\n var orig = c[method];\n var origConsole = c;\n var level = method === 'warn' ? 'warning' : method;\n c[method] = function() {\n var args = Array.prototype.slice.call(arguments);\n var message = _.formatArgsAsString(args);\n self.telemeter.captureLog(message, level);\n if (orig) {\n Function.prototype.apply.call(orig, origConsole, args);\n }\n };\n self.replacements['log'].push([method, orig]);\n }\n var methods = ['debug','info','warn','error','log'];\n try {\n for (var i=0, len=methods.length; i < len; i++) {\n wrapConsole(methods[i]);\n }\n } catch (e) {\n this.diagnostic.instrumentConsole = { error: e.message };\n }\n};\n\nInstrumenter.prototype.deinstrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n this.removeListeners('dom');\n};\n\nInstrumenter.prototype.instrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n var clickHandler = this.handleClick.bind(this);\n var blurHandler = this.handleBlur.bind(this);\n this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);\n this.addListener('dom', this._window, 'blur', 'onfocusout', blurHandler, true);\n};\n\nInstrumenter.prototype.handleClick = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n var hasTag = e && e.tagName;\n var anchorOrButton = domUtil.isDescribedElement(e, 'a') || domUtil.isDescribedElement(e, 'button');\n if (hasTag && (anchorOrButton || domUtil.isDescribedElement(e, 'input', ['button', 'submit']))) {\n this.captureDomEvent('click', e);\n } else if (domUtil.isDescribedElement(e, 'input', ['checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value, e.checked);\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleBlur = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n if (e && e.tagName) {\n if (domUtil.isDescribedElement(e, 'textarea')) {\n this.captureDomEvent('input', e, e.value);\n } else if (domUtil.isDescribedElement(e, 'select') && e.options && e.options.length) {\n this.handleSelectInputChanged(e);\n } else if (domUtil.isDescribedElement(e, 'input') && !domUtil.isDescribedElement(e, 'input', ['button', 'submit', 'hidden', 'checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value);\n }\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleSelectInputChanged = function(elem) {\n if (elem.multiple) {\n for (var i = 0; i < elem.options.length; i++) {\n if (elem.options[i].selected) {\n this.captureDomEvent('input', elem, elem.options[i].value);\n }\n }\n } else if (elem.selectedIndex >= 0 && elem.options[elem.selectedIndex]) {\n this.captureDomEvent('input', elem, elem.options[elem.selectedIndex].value);\n }\n};\n\nInstrumenter.prototype.captureDomEvent = function(subtype, element, value, isChecked) {\n if (value !== undefined) {\n if (this.scrubTelemetryInputs || (domUtil.getElementType(element) === 'password')) {\n value = '[scrubbed]';\n } else {\n var description = domUtil.describeElement(element);\n if (this.telemetryScrubber) {\n if (this.telemetryScrubber(description)) {\n value = '[scrubbed]';\n }\n } else if (this.defaultValueScrubber(description)) {\n value = '[scrubbed]';\n }\n }\n }\n var elementString = domUtil.elementArrayToString(domUtil.treeToArray(element));\n this.telemeter.captureDom(subtype, elementString, value, isChecked);\n};\n\nInstrumenter.prototype.deinstrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n restore(this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.instrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n var self = this;\n replace(this._window, 'onpopstate', function(orig) {\n return function() {\n var current = self._location.href;\n self.handleUrlChange(self._lastHref, current);\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n }, this.replacements, 'navigation');\n\n replace(this._window.history, 'pushState', function(orig) {\n return function() {\n var url = arguments.length > 2 ? arguments[2] : undefined;\n if (url) {\n self.handleUrlChange(self._lastHref, url + '');\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.handleUrlChange = function(from, to) {\n var parsedHref = urlparser.parse(this._location.href);\n var parsedTo = urlparser.parse(to);\n var parsedFrom = urlparser.parse(from);\n this._lastHref = to;\n if (parsedHref.protocol === parsedTo.protocol && parsedHref.host === parsedTo.host) {\n to = parsedTo.path + (parsedTo.hash || '');\n }\n if (parsedHref.protocol === parsedFrom.protocol && parsedHref.host === parsedFrom.host) {\n from = parsedFrom.path + (parsedFrom.hash || '');\n }\n this.telemeter.captureNavigation(from, to);\n};\n\nInstrumenter.prototype.deinstrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.removeListeners('connectivity');\n } else {\n restore(this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.instrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.addListener('connectivity', this._window, 'online', undefined, function() {\n this.telemeter.captureConnectivityChange('online');\n }.bind(this), true);\n this.addListener('connectivity', this._window, 'offline', undefined, function() {\n this.telemeter.captureConnectivityChange('offline');\n }.bind(this), true);\n } else {\n var self = this;\n replace(this._document.body, 'ononline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('online');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n replace(this._document.body, 'onoffline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('offline');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.handleCspEvent = function(cspEvent) {\n var message = 'Security Policy Violation: ' +\n 'blockedURI: ' + cspEvent.blockedURI + ', ' +\n 'violatedDirective: ' + cspEvent.violatedDirective + ', ' +\n 'effectiveDirective: ' + cspEvent.effectiveDirective + ', ';\n\n if (cspEvent.sourceFile) {\n message += 'location: ' + cspEvent.sourceFile + ', ' +\n 'line: ' + cspEvent.lineNumber + ', ' +\n 'col: ' + cspEvent.columnNumber + ', ';\n }\n\n message += 'originalPolicy: ' + cspEvent.originalPolicy;\n\n this.telemeter.captureLog(message, 'error');\n this.handleCspError(message);\n}\n\nInstrumenter.prototype.handleCspError = function(message) {\n if (this.autoInstrument.errorOnContentSecurityPolicy) {\n this.rollbar.error(message);\n }\n}\n\nInstrumenter.prototype.deinstrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._document)) { return; }\n\n this.removeListeners('contentsecuritypolicy');\n};\n\nInstrumenter.prototype.instrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._document)) { return; }\n\n var cspHandler = this.handleCspEvent.bind(this);\n this.addListener('contentsecuritypolicy', this._document, 'securitypolicyviolation', null, cspHandler, false);\n};\n\nInstrumenter.prototype.addListener = function(section, obj, type, altType, handler, capture) {\n if (obj.addEventListener) {\n obj.addEventListener(type, handler, capture);\n this.eventRemovers[section].push(function() {\n obj.removeEventListener(type, handler, capture);\n });\n } else if (altType) {\n obj.attachEvent(altType, handler);\n this.eventRemovers[section].push(function() {\n obj.detachEvent(altType, handler);\n });\n }\n};\n\nInstrumenter.prototype.removeListeners = function(section) {\n var r;\n while (this.eventRemovers[section].length) {\n r = this.eventRemovers[section].shift();\n r();\n }\n};\n\nfunction _isUrlObject(input) {\n return typeof URL !== 'undefined' && input instanceof URL\n}\n\nmodule.exports = Instrumenter;\n","'use strict';\n\n/*\n * headers - Detect when fetch Headers are undefined and use a partial polyfill.\n *\n * A full polyfill is not used in order to keep package size as small as possible.\n * Since this is only used internally and is not added to the window object,\n * the full interface doesn't need to be supported.\n *\n * This implementation is modified from whatwg-fetch:\n * https://github.com/github/fetch\n */\nfunction headers(headers) {\n if (typeof Headers === 'undefined') {\n return new FetchHeaders(headers);\n }\n\n return new Headers(headers);\n}\n\nfunction normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name)\n }\n return name.toLowerCase()\n}\n\nfunction normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value)\n }\n return value\n}\n\nfunction iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n return iterator\n}\n\nfunction FetchHeaders(headers) {\n this.map = {}\n\n if (headers instanceof FetchHeaders) {\n headers.forEach(function(value, name) {\n this.append(name, value)\n }, this)\n } else if (Array.isArray(headers)) {\n headers.forEach(function(header) {\n this.append(header[0], header[1])\n }, this)\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function(name) {\n this.append(name, headers[name])\n }, this)\n }\n}\n\nFetchHeaders.prototype.append = function(name, value) {\n name = normalizeName(name)\n value = normalizeValue(value)\n var oldValue = this.map[name]\n this.map[name] = oldValue ? oldValue + ', ' + value : value\n}\n\nFetchHeaders.prototype.get = function(name) {\n name = normalizeName(name)\n return this.has(name) ? this.map[name] : null\n}\n\nFetchHeaders.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n}\n\nFetchHeaders.prototype.forEach = function(callback, thisArg) {\n for (var name in this.map) {\n if (this.map.hasOwnProperty(name)) {\n callback.call(thisArg, this.map[name], name, this)\n }\n }\n}\n\nFetchHeaders.prototype.entries = function() {\n var items = []\n this.forEach(function(value, name) {\n items.push([name, value])\n })\n return iteratorFor(items)\n}\n\nmodule.exports = headers;\n","'use strict';\n\nfunction getElementType(e) {\n return (e.getAttribute('type') || '').toLowerCase();\n}\n\nfunction isDescribedElement(element, type, subtypes) {\n if (element.tagName.toLowerCase() !== type.toLowerCase()) {\n return false;\n }\n if (!subtypes) {\n return true;\n }\n element = getElementType(element);\n for (var i = 0; i < subtypes.length; i++) {\n if (subtypes[i] === element) {\n return true;\n }\n }\n return false;\n}\n\nfunction getElementFromEvent(evt, doc) {\n if (evt.target) {\n return evt.target;\n }\n if (doc && doc.elementFromPoint) {\n return doc.elementFromPoint(evt.clientX, evt.clientY);\n }\n return undefined;\n}\n\nfunction treeToArray(elem) {\n var MAX_HEIGHT = 5;\n var out = [];\n var nextDescription;\n for (var height = 0; elem && height < MAX_HEIGHT; height++) {\n nextDescription = describeElement(elem);\n if (nextDescription.tagName === 'html') {\n break;\n }\n out.unshift(nextDescription);\n elem = elem.parentNode;\n }\n return out;\n}\n\nfunction elementArrayToString(a) {\n var MAX_LENGTH = 80;\n var separator = ' > ', separatorLength = separator.length;\n var out = [], len = 0, nextStr, totalLength;\n\n for (var i = a.length - 1; i >= 0; i--) {\n nextStr = descriptionToString(a[i]);\n totalLength = len + (out.length * separatorLength) + nextStr.length;\n if (i < a.length - 1 && totalLength >= MAX_LENGTH + 3) {\n out.unshift('...');\n break;\n }\n out.unshift(nextStr);\n len += nextStr.length;\n }\n return out.join(separator);\n}\n\nfunction descriptionToString(desc) {\n if (!desc || !desc.tagName) {\n return '';\n }\n var out = [desc.tagName];\n if (desc.id) {\n out.push('#' + desc.id);\n }\n if (desc.classes) {\n out.push('.' + desc.classes.join('.'));\n }\n for (var i = 0; i < desc.attributes.length; i++) {\n out.push('[' + desc.attributes[i].key + '=\"' + desc.attributes[i].value + '\"]');\n }\n\n return out.join('');\n}\n\n/**\n * Input: a dom element\n * Output: null if tagName is falsey or input is falsey, else\n * {\n * tagName: String,\n * id: String | undefined,\n * classes: [String] | undefined,\n * attributes: [\n * {\n * key: OneOf(type, name, title, alt),\n * value: String\n * }\n * ]\n * }\n */\nfunction describeElement(elem) {\n if (!elem || !elem.tagName) {\n return null;\n }\n var out = {}, className, key, attr, i;\n out.tagName = elem.tagName.toLowerCase();\n if (elem.id) {\n out.id = elem.id;\n }\n className = elem.className;\n if (className && (typeof className === 'string')) {\n out.classes = className.split(/\\s+/);\n }\n var attributes = ['type', 'name', 'title', 'alt'];\n out.attributes = [];\n for (i = 0; i < attributes.length; i++) {\n key = attributes[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.attributes.push({key: key, value: attr});\n }\n }\n return out;\n}\n\nmodule.exports = {\n describeElement: describeElement,\n descriptionToString: descriptionToString,\n elementArrayToString: elementArrayToString,\n treeToArray: treeToArray,\n getElementFromEvent: getElementFromEvent,\n isDescribedElement: isDescribedElement,\n getElementType: getElementType\n};\n","'use strict';\n\nvar polyfillJSON = require('../../vendor/JSON-js/json3');\n\nmodule.exports = polyfillJSON;\n","// json3.js\n// 2017-02-21\n// Public Domain.\n// NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.\n// See http://www.JSON.org/js.html\n// This code should be minified before deployment.\n// See http://javascript.crockford.com/jsmin.html\n\n// USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO\n// NOT CONTROL.\n\n// This file creates a global JSON object containing two methods: stringify\n// and parse. This file provides the ES5 JSON capability to ES3 systems.\n// If a project might run on IE8 or earlier, then this file should be included.\n// This file does nothing on ES5 systems.\n\n// JSON.stringify(value, replacer, space)\n// value any JavaScript value, usually an object or array.\n// replacer an optional parameter that determines how object\n// values are stringified for objects. It can be a\n// function or an array of strings.\n// space an optional parameter that specifies the indentation\n// of nested structures. If it is omitted, the text will\n// be packed without extra whitespace. If it is a number,\n// it will specify the number of spaces to indent at each\n// level. If it is a string (such as \"\\t\" or \" \"),\n// it contains the characters used to indent at each level.\n// This method produces a JSON text from a JavaScript value.\n// When an object value is found, if the object contains a toJSON\n// method, its toJSON method will be called and the result will be\n// stringified. A toJSON method does not serialize: it returns the\n// value represented by the name/value pair that should be serialized,\n// or undefined if nothing should be serialized. The toJSON method\n// will be passed the key associated with the value, and this will be\n// bound to the value.\n\n// For example, this would serialize Dates as ISO strings.\n\n// Date.prototype.toJSON = function (key) {\n// function f(n) {\n// // Format integers to have at least two digits.\n// return (n < 10)\n// ? \"0\" + n\n// : n;\n// }\n// return this.getUTCFullYear() + \"-\" +\n// f(this.getUTCMonth() + 1) + \"-\" +\n// f(this.getUTCDate()) + \"T\" +\n// f(this.getUTCHours()) + \":\" +\n// f(this.getUTCMinutes()) + \":\" +\n// f(this.getUTCSeconds()) + \"Z\";\n// };\n\n// You can provide an optional replacer method. It will be passed the\n// key and value of each member, with this bound to the containing\n// object. The value that is returned from your method will be\n// serialized. If your method returns undefined, then the member will\n// be excluded from the serialization.\n\n// If the replacer parameter is an array of strings, then it will be\n// used to select the members to be serialized. It filters the results\n// such that only members with keys listed in the replacer array are\n// stringified.\n\n// Values that do not have JSON representations, such as undefined or\n// functions, will not be serialized. Such values in objects will be\n// dropped; in arrays they will be replaced with null. You can use\n// a replacer function to replace those with JSON values.\n\n// JSON.stringify(undefined) returns undefined.\n\n// The optional space parameter produces a stringification of the\n// value that is filled with line breaks and indentation to make it\n// easier to read.\n\n// If the space parameter is a non-empty string, then that string will\n// be used for indentation. If the space parameter is a number, then\n// the indentation will be that many spaces.\n\n// Example:\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}]);\n// // text is '[\"e\",{\"pluribus\":\"unum\"}]'\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}], null, \"\\t\");\n// // text is '[\\n\\t\"e\",\\n\\t{\\n\\t\\t\"pluribus\": \"unum\"\\n\\t}\\n]'\n\n// text = JSON.stringify([new Date()], function (key, value) {\n// return this[key] instanceof Date\n// ? \"Date(\" + this[key] + \")\"\n// : value;\n// });\n// // text is '[\"Date(---current time---)\"]'\n\n// JSON.parse(text, reviver)\n// This method parses a JSON text to produce an object or array.\n// It can throw a SyntaxError exception.\n// This has been modified to use JSON-js/json_parse_state.js as the\n// parser instead of the one built around eval found in JSON-js/json2.js\n\n// The optional reviver parameter is a function that can filter and\n// transform the results. It receives each of the keys and values,\n// and its return value is used instead of the original value.\n// If it returns what it received, then the structure is not modified.\n// If it returns undefined then the member is deleted.\n\n// Example:\n\n// // Parse the text. Values that look like ISO date strings will\n// // be converted to Date objects.\n\n// myData = JSON.parse(text, function (key, value) {\n// var a;\n// if (typeof value === \"string\") {\n// a =\n// /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2}(?:\\.\\d*)?)Z$/.exec(value);\n// if (a) {\n// return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],\n// +a[5], +a[6]));\n// }\n// }\n// return value;\n// });\n\n// myData = JSON.parse('[\"Date(09/09/2001)\"]', function (key, value) {\n// var d;\n// if (typeof value === \"string\" &&\n// value.slice(0, 5) === \"Date(\" &&\n// value.slice(-1) === \")\") {\n// d = new Date(value.slice(5, -1));\n// if (d) {\n// return d;\n// }\n// }\n// return value;\n// });\n\n// This is a reference implementation. You are free to copy, modify, or\n// redistribute.\n\n/*jslint\n for, this\n */\n\n/*property\n JSON, apply, call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,\n getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,\n lastIndex, length, parse, prototype, push, replace, slice, stringify,\n test, toJSON, toString, valueOf\n */\n\nvar setupCustomJSON = function(JSON) {\n\n var rx_one = /^[\\],:{}\\s]*$/;\n var rx_two = /\\\\(?:[\"\\\\\\/bfnrt]|u[0-9a-fA-F]{4})/g;\n var rx_three = /\"[^\"\\\\\\n\\r]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g;\n var rx_four = /(?:^|:|,)(?:\\s*\\[)+/g;\n var rx_escapable = /[\\\\\"\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n var rx_dangerous = /[\\u0000\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n\n function f(n) {\n // Format integers to have at least two digits.\n return n < 10\n ? \"0\" + n\n : n;\n }\n\n function this_value() {\n return this.valueOf();\n }\n\n if (typeof Date.prototype.toJSON !== \"function\") {\n\n Date.prototype.toJSON = function () {\n\n return isFinite(this.valueOf())\n ? this.getUTCFullYear() + \"-\" +\n f(this.getUTCMonth() + 1) + \"-\" +\n f(this.getUTCDate()) + \"T\" +\n f(this.getUTCHours()) + \":\" +\n f(this.getUTCMinutes()) + \":\" +\n f(this.getUTCSeconds()) + \"Z\"\n : null;\n };\n\n Boolean.prototype.toJSON = this_value;\n Number.prototype.toJSON = this_value;\n String.prototype.toJSON = this_value;\n }\n\n var gap;\n var indent;\n var meta;\n var rep;\n\n\n function quote(string) {\n\n // If the string contains no control characters, no quote characters, and no\n // backslash characters, then we can safely slap some quotes around it.\n // Otherwise we must also replace the offending characters with safe escape\n // sequences.\n\n rx_escapable.lastIndex = 0;\n return rx_escapable.test(string)\n ? \"\\\"\" + string.replace(rx_escapable, function (a) {\n var c = meta[a];\n return typeof c === \"string\"\n ? c\n : \"\\\\u\" + (\"0000\" + a.charCodeAt(0).toString(16)).slice(-4);\n }) + \"\\\"\"\n : \"\\\"\" + string + \"\\\"\";\n }\n\n\n function str(key, holder) {\n\n // Produce a string from holder[key].\n\n var i; // The loop counter.\n var k; // The member key.\n var v; // The member value.\n var length;\n var mind = gap;\n var partial;\n var value = holder[key];\n\n // If the value has a toJSON method, call it to obtain a replacement value.\n\n if (value && typeof value === \"object\" &&\n typeof value.toJSON === \"function\") {\n value = value.toJSON(key);\n }\n\n // If we were called with a replacer function, then call the replacer to\n // obtain a replacement value.\n\n if (typeof rep === \"function\") {\n value = rep.call(holder, key, value);\n }\n\n // What happens next depends on the value's type.\n\n switch (typeof value) {\n case \"string\":\n return quote(value);\n\n case \"number\":\n\n // JSON numbers must be finite. Encode non-finite numbers as null.\n\n return isFinite(value)\n ? String(value)\n : \"null\";\n\n case \"boolean\":\n case \"null\":\n\n // If the value is a boolean or null, convert it to a string. Note:\n // typeof null does not produce \"null\". The case is included here in\n // the remote chance that this gets fixed someday.\n\n return String(value);\n\n // If the type is \"object\", we might be dealing with an object or an array or\n // null.\n\n case \"object\":\n\n // Due to a specification blunder in ECMAScript, typeof null is \"object\",\n // so watch out for that case.\n\n if (!value) {\n return \"null\";\n }\n\n // Make an array to hold the partial results of stringifying this object value.\n\n gap += indent;\n partial = [];\n\n // Is the value an array?\n\n if (Object.prototype.toString.apply(value) === \"[object Array]\") {\n\n // The value is an array. Stringify every element. Use null as a placeholder\n // for non-JSON values.\n\n length = value.length;\n for (i = 0; i < length; i += 1) {\n partial[i] = str(i, value) || \"null\";\n }\n\n // Join all of the elements together, separated with commas, and wrap them in\n // brackets.\n\n v = partial.length === 0\n ? \"[]\"\n : gap\n ? \"[\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"]\"\n : \"[\" + partial.join(\",\") + \"]\";\n gap = mind;\n return v;\n }\n\n // If the replacer is an array, use it to select the members to be stringified.\n\n if (rep && typeof rep === \"object\") {\n length = rep.length;\n for (i = 0; i < length; i += 1) {\n if (typeof rep[i] === \"string\") {\n k = rep[i];\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n } else {\n\n // Otherwise, iterate through all of the keys in the object.\n\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(value, k)) {\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n }\n\n // Join all of the member texts together, separated with commas,\n // and wrap them in braces.\n\n v = partial.length === 0\n ? \"{}\"\n : gap\n ? \"{\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"}\"\n : \"{\" + partial.join(\",\") + \"}\";\n gap = mind;\n return v;\n }\n }\n\n // If the JSON object does not yet have a stringify method, give it one.\n\n if (typeof JSON.stringify !== \"function\") {\n meta = { // table of character substitutions\n \"\\b\": \"\\\\b\",\n \"\\t\": \"\\\\t\",\n \"\\n\": \"\\\\n\",\n \"\\f\": \"\\\\f\",\n \"\\r\": \"\\\\r\",\n \"\\\"\": \"\\\\\\\"\",\n \"\\\\\": \"\\\\\\\\\"\n };\n JSON.stringify = function (value, replacer, space) {\n\n // The stringify method takes a value and an optional replacer, and an optional\n // space parameter, and returns a JSON text. The replacer can be a function\n // that can replace values, or an array of strings that will select the keys.\n // A default replacer method can be provided. Use of the space parameter can\n // produce text that is more easily readable.\n\n var i;\n gap = \"\";\n indent = \"\";\n\n // If the space parameter is a number, make an indent string containing that\n // many spaces.\n\n if (typeof space === \"number\") {\n for (i = 0; i < space; i += 1) {\n indent += \" \";\n }\n\n // If the space parameter is a string, it will be used as the indent string.\n\n } else if (typeof space === \"string\") {\n indent = space;\n }\n\n // If there is a replacer, it must be a function or an array.\n // Otherwise, throw an error.\n\n rep = replacer;\n if (replacer && typeof replacer !== \"function\" &&\n (typeof replacer !== \"object\" ||\n typeof replacer.length !== \"number\")) {\n throw new Error(\"JSON.stringify\");\n }\n\n // Make a fake root object containing our value under the key of \"\".\n // Return the result of stringifying the value.\n\n return str(\"\", {\"\": value});\n };\n }\n\n\n // If the JSON object does not yet have a parse method, give it one.\n\n if (typeof JSON.parse !== \"function\") {\n JSON.parse = (function () {\n\n // This function creates a JSON parse function that uses a state machine rather\n // than the dangerous eval function to parse a JSON text.\n\n var state; // The state of the parser, one of\n // 'go' The starting state\n // 'ok' The final, accepting state\n // 'firstokey' Ready for the first key of the object or\n // the closing of an empty object\n // 'okey' Ready for the next key of the object\n // 'colon' Ready for the colon\n // 'ovalue' Ready for the value half of a key/value pair\n // 'ocomma' Ready for a comma or closing }\n // 'firstavalue' Ready for the first value of an array or\n // an empty array\n // 'avalue' Ready for the next value of an array\n // 'acomma' Ready for a comma or closing ]\n var stack; // The stack, for controlling nesting.\n var container; // The current container object or array\n var key; // The current key\n var value; // The current value\n var escapes = { // Escapement translation table\n \"\\\\\": \"\\\\\",\n \"\\\"\": \"\\\"\",\n \"/\": \"/\",\n \"t\": \"\\t\",\n \"n\": \"\\n\",\n \"r\": \"\\r\",\n \"f\": \"\\f\",\n \"b\": \"\\b\"\n };\n var string = { // The actions for string tokens\n go: function () {\n state = \"ok\";\n },\n firstokey: function () {\n key = value;\n state = \"colon\";\n },\n okey: function () {\n key = value;\n state = \"colon\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var number = { // The actions for number tokens\n go: function () {\n state = \"ok\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var action = {\n\n // The action table describes the behavior of the machine. It contains an\n // object for each token. Each object contains a method that is called when\n // a token is matched in a state. An object will lack a method for illegal\n // states.\n\n \"{\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = {};\n state = \"firstokey\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = {};\n state = \"firstokey\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n }\n },\n \"}\": {\n firstokey: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n ocomma: function () {\n var pop = stack.pop();\n container[key] = value;\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \"[\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = [];\n state = \"firstavalue\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = [];\n state = \"firstavalue\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n }\n },\n \"]\": {\n firstavalue: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n acomma: function () {\n var pop = stack.pop();\n container.push(value);\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \":\": {\n colon: function () {\n if (Object.hasOwnProperty.call(container, key)) {\n throw new SyntaxError(\"Duplicate key '\" + key + \"\\\"\");\n }\n state = \"ovalue\";\n }\n },\n \",\": {\n ocomma: function () {\n container[key] = value;\n state = \"okey\";\n },\n acomma: function () {\n container.push(value);\n state = \"avalue\";\n }\n },\n \"true\": {\n go: function () {\n value = true;\n state = \"ok\";\n },\n ovalue: function () {\n value = true;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = true;\n state = \"acomma\";\n },\n avalue: function () {\n value = true;\n state = \"acomma\";\n }\n },\n \"false\": {\n go: function () {\n value = false;\n state = \"ok\";\n },\n ovalue: function () {\n value = false;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = false;\n state = \"acomma\";\n },\n avalue: function () {\n value = false;\n state = \"acomma\";\n }\n },\n \"null\": {\n go: function () {\n value = null;\n state = \"ok\";\n },\n ovalue: function () {\n value = null;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = null;\n state = \"acomma\";\n },\n avalue: function () {\n value = null;\n state = \"acomma\";\n }\n }\n };\n\n function debackslashify(text) {\n\n // Remove and replace any backslash escapement.\n\n return text.replace(/\\\\(?:u(.{4})|([^u]))/g, function (ignore, b, c) {\n return b\n ? String.fromCharCode(parseInt(b, 16))\n : escapes[c];\n });\n }\n\n return function (source, reviver) {\n\n // A regular expression is used to extract tokens from the JSON text.\n // The extraction process is cautious.\n\n var result;\n var tx = /^[\\u0020\\t\\n\\r]*(?:([,:\\[\\]{}]|true|false|null)|(-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?)|\"((?:[^\\r\\n\\t\\\\\\\"]|\\\\(?:[\"\\\\\\/trnfb]|u[0-9a-fA-F]{4}))*)\")/;\n\n // Set the starting state.\n\n state = \"go\";\n\n // The stack records the container, key, and state for each object or array\n // that contains another object or array while processing nested structures.\n\n stack = [];\n\n // If any error occurs, we will catch it and ultimately throw a syntax error.\n\n try {\n\n // For each token...\n\n while (true) {\n result = tx.exec(source);\n if (!result) {\n break;\n }\n\n // result is the result array from matching the tokenizing regular expression.\n // result[0] contains everything that matched, including any initial whitespace.\n // result[1] contains any punctuation that was matched, or true, false, or null.\n // result[2] contains a matched number, still in string form.\n // result[3] contains a matched string, without quotes but with escapement.\n\n if (result[1]) {\n\n // Token: Execute the action for this state and token.\n\n action[result[1]][state]();\n\n } else if (result[2]) {\n\n // Number token: Convert the number string into a number value and execute\n // the action for this state and number.\n\n value = +result[2];\n number[state]();\n } else {\n\n // String token: Replace the escapement sequences and execute the action for\n // this state and string.\n\n value = debackslashify(result[3]);\n string[state]();\n }\n\n // Remove the token from the string. The loop will continue as long as there\n // are tokens. This is a slow process, but it allows the use of ^ matching,\n // which assures that no illegal tokens slip through.\n\n source = source.slice(result[0].length);\n }\n\n // If we find a state/token combination that is illegal, then the action will\n // cause an error. We handle the error by simply changing the state.\n\n } catch (e) {\n state = e;\n }\n\n // The parsing is finished. If we are not in the final \"ok\" state, or if the\n // remaining source contains anything except whitespace, then we did not have\n //a well-formed JSON text.\n\n if (state !== \"ok\" || (/[^\\u0020\\t\\n\\r]/.test(source))) {\n throw (state instanceof SyntaxError)\n ? state\n : new SyntaxError(\"JSON\");\n }\n\n // If there is a reviver function, we recursively walk the new structure,\n // passing each name/value pair to the reviver function for possible\n // transformation, starting with a temporary root object that holds the current\n // value in an empty key. If there is not a reviver function, we simply return\n // that value.\n\n return (typeof reviver === \"function\")\n ? (function walk(holder, key) {\n var k;\n var v;\n var val = holder[key];\n if (val && typeof val === \"object\") {\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(val, k)) {\n v = walk(val, k);\n if (v !== undefined) {\n val[k] = v;\n } else {\n delete val[k];\n }\n }\n }\n }\n return reviver.call(holder, key, val);\n }({\"\": value}, \"\"))\n : value;\n };\n }());\n }\n}\n\nmodule.exports = setupCustomJSON;\n","'use strict';\n\nfunction wrapGlobals(window, handler, shim) {\n if (!window) { return; }\n // Adapted from https://github.com/bugsnag/bugsnag-js\n var globals = 'EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload'.split(',');\n var i, global;\n for (i = 0; i < globals.length; ++i) {\n global = globals[i];\n\n if (window[global] && window[global].prototype) {\n _extendListenerPrototype(handler, window[global].prototype, shim);\n }\n }\n}\n\nfunction _extendListenerPrototype(handler, prototype, shim) {\n if (prototype.hasOwnProperty && prototype.hasOwnProperty('addEventListener')) {\n var oldAddEventListener = prototype.addEventListener;\n while (oldAddEventListener._rollbarOldAdd && oldAddEventListener.belongsToShim) {\n oldAddEventListener = oldAddEventListener._rollbarOldAdd;\n }\n var addFn = function(event, callback, bubble) {\n oldAddEventListener.call(this, event, handler.wrap(callback), bubble);\n };\n addFn._rollbarOldAdd = oldAddEventListener;\n addFn.belongsToShim = shim;\n prototype.addEventListener = addFn;\n\n var oldRemoveEventListener = prototype.removeEventListener;\n while (oldRemoveEventListener._rollbarOldRemove && oldRemoveEventListener.belongsToShim) {\n oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;\n }\n var removeFn = function(event, callback, bubble) {\n oldRemoveEventListener.call(this, event, callback && callback._rollbar_wrapped || callback, bubble);\n };\n removeFn._rollbarOldRemove = oldRemoveEventListener;\n removeFn.belongsToShim = shim;\n prototype.removeEventListener = removeFn;\n }\n}\n\nmodule.exports = wrapGlobals;\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction raw(payload, jsonBackup) {\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction selectFrames(frames, range) {\n var len = frames.length;\n if (len > range * 2) {\n return frames.slice(0, range).concat(frames.slice(len - range));\n }\n return frames;\n}\n\nfunction truncateFrames(payload, jsonBackup, range) {\n range = (typeof range === 'undefined') ? 30 : range;\n var body = payload.data.body;\n var frames;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n frames = chain[i].frames;\n frames = selectFrames(frames, range);\n chain[i].frames = frames;\n }\n } else if (body.trace) {\n frames = body.trace.frames;\n frames = selectFrames(frames, range);\n body.trace.frames = frames;\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction maybeTruncateValue(len, val) {\n if (!val) {\n return val;\n }\n if (val.length > len) {\n return val.slice(0, len - 3).concat('...');\n }\n return val;\n}\n\nfunction truncateStrings(len, payload, jsonBackup) {\n function truncator(k, v, seen) {\n switch (_.typeName(v)) {\n case 'string':\n return maybeTruncateValue(len, v);\n case 'object':\n case 'array':\n return traverse(v, truncator, seen);\n default:\n return v;\n }\n }\n payload = traverse(payload, truncator);\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction truncateTraceData(traceData) {\n if (traceData.exception) {\n delete traceData.exception.description;\n traceData.exception.message = maybeTruncateValue(255, traceData.exception.message);\n }\n traceData.frames = selectFrames(traceData.frames, 1);\n return traceData;\n}\n\nfunction minBody(payload, jsonBackup) {\n var body = payload.data.body;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n chain[i] = truncateTraceData(chain[i]);\n }\n } else if (body.trace) {\n body.trace = truncateTraceData(body.trace);\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction needsTruncation(payload, maxSize) {\n return _.maxByteSize(payload) > maxSize;\n}\n\nfunction truncate(payload, jsonBackup, maxSize) {\n maxSize = (typeof maxSize === 'undefined') ? (512 * 1024) : maxSize;\n var strategies = [\n raw,\n truncateFrames,\n truncateStrings.bind(null, 1024),\n truncateStrings.bind(null, 512),\n truncateStrings.bind(null, 256),\n minBody\n ];\n var strategy, results, result;\n\n while ((strategy = strategies.shift())) {\n results = strategy(payload, jsonBackup);\n payload = results[0];\n result = results[1];\n if (result.error || !needsTruncation(result.value, maxSize)) {\n return result;\n }\n }\n return result;\n}\n\nmodule.exports = {\n truncate: truncate,\n\n /* for testing */\n raw: raw,\n truncateFrames: truncateFrames,\n truncateStrings: truncateStrings,\n maybeTruncateValue: maybeTruncateValue\n};\n"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/rollbar.umd.min.js b/dist/rollbar.umd.min.js index fbc60f1c6..5aceec5e6 100644 --- a/dist/rollbar.umd.min.js +++ b/dist/rollbar.umd.min.js @@ -1,2 +1 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.rollbar=e():t.rollbar=e()}(this,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=6)}([function(t,e,r){"use strict";var n=r(12),o={};function i(t,e){return e===s(t)}function s(t){var e=typeof t;return"object"!==e?e:t?t instanceof Error?"error":{}.toString.call(t).match(/\s([a-zA-Z]+)/)[1].toLowerCase():"null"}function a(t){return i(t,"function")}function u(t){var e=Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?"),r=RegExp("^"+e+"$");return c(t)&&r.test(t)}function c(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function l(){var t=y();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var r=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?r:7&r|8).toString(16)}))}var p={strictMode:!1,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};function f(t,e){var r,n;try{r=o.stringify(t)}catch(o){if(e&&a(e))try{r=e(t)}catch(t){n=t}else n=o}return{error:n,value:r}}function h(t,e){return function(r,n){try{e(r,n)}catch(e){t.error(e)}}}function d(t){return function t(e,r){var n,o,a,u={};try{for(o in e)(n=e[o])&&(i(n,"object")||i(n,"array"))?r.includes(n)?u[o]="Removed circular reference: "+s(n):((a=r.slice()).push(n),u[o]=t(n,a)):u[o]=n}catch(t){u="Failed cloning custom data: "+t.message}return u}(t,[t])}var m=["log","network","dom","navigation","error","manual"],g=["critical","error","warning","info","debug"];function v(t,e){for(var r=0;ra)?(s=e.path,e.path=s.substring(0,a)+i+"&"+s.substring(a+1)):-1!==u?(s=e.path,e.path=s.substring(0,u)+i+s.substring(u)):e.path=e.path+i},createItem:function(t,e,r,n,o){for(var i,a,u,c,p,f,m=[],g=[],v=0,b=t.length;v0&&(u||(u=d({})),u.extraArgs=d(m));var k={message:i,err:a,custom:u,timestamp:y(),callback:c,notifier:r,diagnostic:{},uuid:l()};return function(t,e){e&&void 0!==e.level&&(t.level=e.level,delete e.level);e&&void 0!==e.skipFrames&&(t.skipFrames=e.skipFrames,delete e.skipFrames)}(k,u),n&&p&&(k.request=p),o&&(k.lambdaContext=o),k._originalArgs=t,k.diagnostic.original_arg_types=g,k},addErrorContext:function(t,e){var r=t.data.custom||{},o=!1;try{for(var i=0;i2){var o=n.slice(0,3),i=o[2].indexOf("/");-1!==i&&(o[2]=o[2].substring(0,i));r=o.concat("0000:0000:0000:0000:0000").join(":")}}else r=null}catch(t){r=null}else r=null;t.user_ip=r}},formatArgsAsString:function(t){var e,r,n,o=[];for(e=0,r=t.length;e500&&(n=n.substr(0,497)+"...");break;case"null":n="null";break;case"undefined":n="undefined";break;case"symbol":n=n.toString()}o.push(n)}return o.join(" ")},formatUrl:function(t,e){if(!(e=e||t.protocol)&&t.port&&(80===t.port?e="http:":443===t.port&&(e="https:")),e=e||"https:",!t.hostname)return null;var r=e+"//"+t.hostname;return t.port&&(r=r+":"+t.port),t.path&&(r+=t.path),r},get:function(t,e){if(t){var r=e.split("."),n=t;try{for(var o=0,i=r.length;o=1&&r>e}function s(t,e,r,n,o,i,s){var a=null;return r&&(r=new Error(r)),r||n||(a=function(t,e,r,n,o){var i,s=e.environment||e.payload&&e.payload.environment;i=o?"item per minute limit reached, ignoring errors until timeout":"maxItems has been hit, ignoring errors until reset.";var a={body:{message:{body:i,extra:{maxItems:r,itemsPerMinute:n}}},language:"javascript",environment:s,notifier:{version:e.notifier&&e.notifier.version||e.version}};"browser"===t?(a.platform="browser",a.framework="browser-js",a.notifier.name="rollbar-browser-js"):"server"===t?(a.framework=e.framework||"node-js",a.notifier.name=e.notifier.name):"react-native"===t&&(a.framework=e.framework||"react-native",a.notifier.name=e.notifier.name);return a}(t,e,o,i,s)),{error:r,shouldSend:n,payload:a}}o.globalSettings={startTime:n.now(),maxItems:void 0,itemsPerMinute:void 0},o.prototype.configureGlobal=function(t){void 0!==t.startTime&&(o.globalSettings.startTime=t.startTime),void 0!==t.maxItems&&(o.globalSettings.maxItems=t.maxItems),void 0!==t.itemsPerMinute&&(o.globalSettings.itemsPerMinute=t.itemsPerMinute)},o.prototype.shouldSend=function(t,e){var r=(e=e||n.now())-this.startTime;(r<0||r>=6e4)&&(this.startTime=e,this.perMinCounter=0);var a=o.globalSettings.maxItems,u=o.globalSettings.itemsPerMinute;if(i(t,a,this.counter))return s(this.platform,this.platformOptions,a+" max items reached",!1);if(i(t,u,this.perMinCounter))return s(this.platform,this.platformOptions,u+" items per minute reached",!1);this.counter++,this.perMinCounter++;var c=!i(t,a,this.counter),l=c;return c=c&&!i(t,u,this.perMinCounter),s(this.platform,this.platformOptions,null,c,a,u,l)},o.prototype.setPlatformOptions=function(t,e){this.platform=t,this.platformOptions=e},t.exports=o},function(t,e,r){"use strict";var n=Object.prototype.hasOwnProperty,o=Object.prototype.toString,i=function(t){if(!t||"[object Object]"!==o.call(t))return!1;var e,r=n.call(t,"constructor"),i=t.constructor&&t.constructor.prototype&&n.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!r&&!i)return!1;for(e in t);return void 0===e||n.call(t,e)};t.exports=function t(){var e,r,n,o,s,a={},u=null,c=arguments.length;for(e=0;ethis.options.maxRetries&&(o=!1))}o?this._retryApiRequest(e,r):r(t)},o.prototype._retryApiRequest=function(t,e){this.retryQueue.push({item:t,callback:e}),this.retryHandle||(this.retryHandle=setInterval(function(){for(;this.retryQueue.length;){var t=this.retryQueue.shift();this._makeApiRequest(t.item,t.callback)}}.bind(this),this.options.retryInterval))},o.prototype._dequeuePendingRequest=function(t){var e=this.pendingRequests.indexOf(t);-1!==e&&(this.pendingRequests.splice(e,1),this._maybeCallWait())},o.prototype._maybeLog=function(t,e){if(this.logger&&this.options.verbose){var r=e;if(r=(r=r||n.get(t,"body.trace.exception.message"))||n.get(t,"body.trace_chain.0.exception.message"))return void this.logger.error(r);(r=n.get(t,"body.message.body"))&&this.logger.log(r)}},o.prototype._maybeCallWait=function(){return!(!n.isFunction(this.waitCallback)||0!==this.pendingItems.length||0!==this.pendingRequests.length)&&(this.waitIntervalID&&(this.waitIntervalID=clearInterval(this.waitIntervalID)),this.waitCallback(),!0)},t.exports=o},function(t,e,r){"use strict";var n=r(0);function o(t,e){this.queue=t,this.options=e,this.transforms=[],this.diagnostic={}}o.prototype.configure=function(t){this.queue&&this.queue.configure(t);var e=this.options;return this.options=n.merge(e,t),this},o.prototype.addTransform=function(t){return n.isFunction(t)&&this.transforms.push(t),this},o.prototype.log=function(t,e){if(e&&n.isFunction(e)||(e=function(){}),!this.options.enabled)return e(new Error("Rollbar is not enabled"));this.queue.addPendingItem(t);var r=t.err;this._applyTransforms(t,function(n,o){if(n)return this.queue.removePendingItem(t),e(n,null);this.queue.addItem(o,e,r,t)}.bind(this))},o.prototype._applyTransforms=function(t,e){var r=-1,n=this.transforms.length,o=this.transforms,i=this.options,s=function(t,a){t?e(t,null):++r!==n?o[r](a,i,s):e(null,a)};s(null,t)},t.exports=o},function(t,e,r){"use strict";var n=r(0),o=r(16),i={hostname:"api.rollbar.com",path:"/api/1/item/",search:null,version:"1",protocol:"https:",port:443};function s(t,e,r,n,o){this.options=t,this.transport=e,this.url=r,this.truncation=n,this.jsonBackup=o,this.accessToken=t.accessToken,this.transportOptions=a(t,r)}function a(t,e){return o.getTransportFromOptions(t,i,e)}s.prototype.postItem=function(t,e){var r=o.transportOptions(this.transportOptions,"POST"),n=o.buildPayload(this.accessToken,t,this.jsonBackup),i=this;setTimeout((function(){i.transport.post(i.accessToken,r,n,e)}),0)},s.prototype.buildJsonPayload=function(t,e){var r,i=o.buildPayload(this.accessToken,t,this.jsonBackup);return(r=this.truncation?this.truncation.truncate(i):n.stringify(i)).error?(e&&e(r.error),null):r.value},s.prototype.postJsonPayload=function(t,e){var r=o.transportOptions(this.transportOptions,"POST");this.transport.postJsonPayload(this.accessToken,r,t,e)},s.prototype.configure=function(t){var e=this.oldOptions;return this.options=n.merge(e,t),this.transportOptions=a(this.options,this.url),void 0!==this.options.accessToken&&(this.accessToken=this.options.accessToken),this},t.exports=s},function(t,e,r){"use strict";var n=r(0);t.exports={buildPayload:function(t,e,r){if(!n.isType(e.context,"string")){var o=n.stringify(e.context,r);o.error?e.context="Error: could not serialize 'context'":e.context=o.value||"",e.context.length>255&&(e.context=e.context.substr(0,255))}return{access_token:t,data:e}},getTransportFromOptions:function(t,e,r){var n=e.hostname,o=e.protocol,i=e.port,s=e.path,a=e.search,u=t.timeout,c=function(t){var e="undefined"!=typeof window&&window||"undefined"!=typeof self&&self,r=t.defaultTransport||"xhr";void 0===e.fetch&&(r="xhr");void 0===e.XMLHttpRequest&&(r="fetch");return r}(t),l=t.proxy;if(t.endpoint){var p=r.parse(t.endpoint);n=p.hostname,o=p.protocol,i=p.port,s=p.pathname,a=p.search}return{timeout:u,hostname:n,protocol:o,port:i,path:s,search:a,proxy:l,transport:c}},transportOptions:function(t,e){var r=t.protocol||"https:",n=t.port||("http:"===r?80:"https:"===r?443:void 0),o=t.hostname,i=t.path,s=t.timeout,a=t.transport;return t.search&&(i+=t.search),t.proxy&&(i=r+"//"+o+i,o=t.proxy.host||t.proxy.hostname,n=t.proxy.port,r=t.proxy.protocol||r),{timeout:s,protocol:r,hostname:o,path:i,port:n,method:e,transport:a}},appendPathToPath:function(t,e){var r=/\/$/.test(t),n=/^\//.test(e);return r&&n?e=e.substring(1):r||n||(e="/"+e),t+e}}},function(t,e){!function(t){"use strict";t.console||(t.console={});for(var e,r,n=t.console,o=function(){},i=["memory"],s="assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(",");e=i.pop();)n[e]||(n[e]={});for(;r=s.pop();)n[r]||(n[r]=o)}("undefined"==typeof window?this:window)},function(t,e,r){"use strict";var n={ieVersion:function(){if("undefined"!=typeof document){for(var t=3,e=document.createElement("div"),r=e.getElementsByTagName("i");e.innerHTML="\x3c!--[if gt IE "+ ++t+"]>4?t:void 0}}};t.exports=n},function(t,e,r){"use strict";function n(t,e,r,n){t._rollbarWrappedError&&(n[4]||(n[4]=t._rollbarWrappedError),n[5]||(n[5]=t._rollbarWrappedError._rollbarContext),t._rollbarWrappedError=null);var o=e.handleUncaughtException.apply(e,n);r&&r.apply(t,n),"anonymous"===o&&(e.anonymousErrorsPending+=1)}t.exports={captureUncaughtExceptions:function(t,e,r){if(t){var o;if("function"==typeof e._rollbarOldOnError)o=e._rollbarOldOnError;else if(t.onerror){for(o=t.onerror;o._rollbarOldOnError;)o=o._rollbarOldOnError;e._rollbarOldOnError=o}e.handleAnonymousErrors();var i=function(){var r=Array.prototype.slice.call(arguments,0);n(t,e,o,r)};r&&(i._rollbarOldOnError=o),t.onerror=i}},captureUnhandledRejections:function(t,e,r){if(t){"function"==typeof t._rollbarURH&&t._rollbarURH.belongsToShim&&t.removeEventListener("unhandledrejection",t._rollbarURH);var n=function(t){var r,n,o;try{r=t.reason}catch(t){r=void 0}try{n=t.promise}catch(t){n="[unhandledrejection] error getting `promise` from event"}try{o=t.detail,!r&&o&&(r=o.reason,n=o.promise)}catch(t){}r||(r="[unhandledrejection] error getting `reason` from event"),e&&e.handleUnhandledRejection&&e.handleUnhandledRejection(r,n)};n.belongsToShim=r,t._rollbarURH=n,t.addEventListener("unhandledrejection",n)}}}},function(t,e,r){"use strict";var n=r(0),o=r(21),i=r(22);function s(t){this.truncation=t}s.prototype.get=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){}),n.addParamsAndAccessTokenToPath(t,e,r);var s=n.formatUrl(e);this._makeZoneRequest(t,s,"GET",null,o,i,e.timeout,e.transport)},s.prototype.post=function(t,e,r,o,i){if(o&&n.isFunction(o)||(o=function(){}),!r)return o(new Error("Cannot send empty request"));var s;if((s=this.truncation?this.truncation.truncate(r):n.stringify(r)).error)return o(s.error);var a=s.value,u=n.formatUrl(e);this._makeZoneRequest(t,u,"POST",a,o,i,e.timeout,e.transport)},s.prototype.postJsonPayload=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){});var s=n.formatUrl(e);this._makeZoneRequest(t,s,"POST",r,o,i,e.timeout,e.transport)},s.prototype._makeZoneRequest=function(){var t="undefined"!=typeof window&&window||void 0!==o&&o,e=t&&t.Zone&&t.Zone.current,r=Array.prototype.slice.call(arguments);if(e&&"angular"===e._name){var n=e._parent,o=this;n.run((function(){o._makeRequest.apply(void 0,r)}))}else this._makeRequest.apply(void 0,r)},s.prototype._makeRequest=function(t,e,r,n,s,a,u,c){if("undefined"!=typeof RollbarProxy)return function(t,e){(new RollbarProxy).sendJsonPayload(t,(function(t){}),(function(t){e(new Error(t))}))}(n,s);"fetch"===c?o(t,e,r,n,s,u):i(t,e,r,n,s,a,u)},t.exports=s},function(t,e,r){"use strict";var n=r(1),o=r(0);t.exports=function(t,e,r,i,s,a){var u,c;o.isFiniteNumber(a)&&(u=new AbortController,c=setTimeout((function(){u.abort()}),a)),fetch(e,{method:r,headers:{"Content-Type":"application/json","X-Rollbar-Access-Token":t,signal:u&&u.signal},body:i}).then((function(t){return c&&clearTimeout(c),t.json()})).then((function(t){s(null,t)})).catch((function(t){n.error(t.message),s(t)}))}},function(t,e,r){"use strict";var n=r(0),o=r(1);function i(t,e){var r=new Error(t);return r.code=e||"ENOTFOUND",r}t.exports=function(t,e,r,s,a,u,c){var l;if(!(l=u?u():function(){var t,e,r=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],n=r.length;for(e=0;e=400&&t.status<600}(l)){if(403===l.status){var e=t.value&&t.value.message;o.error(e)}a(new Error(String(l.status)))}else{a(i("XHR response had no status code (likely connection failure)"))}}}catch(t){var r;r=t&&t.stack?t:new Error(t),a(r)}var s};l.open(r,e,!0),l.setRequestHeader&&(l.setRequestHeader("Content-Type","application/json"),l.setRequestHeader("X-Rollbar-Access-Token",t)),n.isFiniteNumber(c)&&(l.timeout=c),l.onreadystatechange=p,l.send(s)}catch(t){if("undefined"!=typeof XDomainRequest){if(!window||!window.location)return a(new Error("No window available during request, unknown environment"));"http:"===window.location.href.substring(0,5)&&"https"===e.substring(0,5)&&(e="http"+e.substring(5));var f=new XDomainRequest;f.onprogress=function(){},f.ontimeout=function(){a(i("Request timed out","ETIMEDOUT"))},f.onerror=function(){a(new Error("Error during request"))},f.onload=function(){var t=n.jsonParse(f.responseText);a(t.error,t.value)},f.open(r,e,!0),f.send(s)}else a(new Error("Cannot find a method to transport a request"))}}catch(t){a(t)}}},function(t,e,r){"use strict";var n=r(0),o=r(3),i=r(1);function s(t,e,r){var o=t.message,i=t.custom;o||(o="Item sent with null or missing arguments.");var s={body:o};i&&(s.extra=n.merge(i)),n.set(t,"data.body",{message:s}),r(null,t)}function a(t){var e=t.stackInfo.stack;return e&&0===e.length&&t._unhandledStackInfo&&t._unhandledStackInfo.stack&&(e=t._unhandledStackInfo.stack),e}function u(t,e,r){var i=t&&t.data.description,s=t&&t.custom,u=a(t),l=o.guessErrorClass(e.message),p={exception:{class:c(e,l[0],r),message:l[1]}};if(i&&(p.exception.description=i),u){var f,h,d,m,g,v,y,b;for(0===u.length&&(p.exception.stack=e.rawStack,p.exception.raw=String(e.rawException)),p.frames=[],y=0;y0&&n.set(e,"data.request",i),o(null,e)}},addClientInfo:function(t){return function(e,r,o){if(!t)return o(null,e);var i=t.navigator||{},s=t.screen||{};n.set(e,"data.client",{runtime_ms:e.timestamp-t._rollbarStartTime,timestamp:Math.round(e.timestamp/1e3),javascript:{browser:i.userAgent,language:i.language,cookie_enabled:i.cookieEnabled,screen:{width:s.width,height:s.height}}}),o(null,e)}},addPluginInfo:function(t){return function(e,r,o){if(!t||!t.navigator)return o(null,e);for(var i,s=[],a=t.navigator.plugins||[],u=0,c=a.length;u-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));var r=e.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),n=r.match(/ (\(.+\)$)/);r=n?r.replace(n[0],""):r;var o=this.extractLocation(n?n[1]:r),i=n&&r||void 0,s=["eval",""].indexOf(o[0])>-1?void 0:o[0];return new t({functionName:i,fileName:s,lineNumber:o[1],columnNumber:o[2],source:e})}),this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter((function(t){return!t.match(n)}),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 t({functionName:e});var r=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(r),o=n&&n[1]?n[1]:void 0,i=this.extractLocation(e.replace(r,""));return new t({functionName:o,fileName:i[0],lineNumber:i[1],columnNumber:i[2],source:e})}),this)},parseOpera:function(t){return!t.stacktrace||t.message.indexOf("\n")>-1&&t.message.split("\n").length>t.stacktrace.split("\n").length?this.parseOpera9(t):t.stack?this.parseOpera11(t):this.parseOpera10(t)},parseOpera9:function(e){for(var r=/Line (\d+).*script (?:in )?(\S+)/i,n=e.message.split("\n"),o=[],i=2,s=n.length;i/,"$2").replace(/\([^)]*\)/g,"")||void 0;i.match(/\(([^)]*)\)/)&&(r=i.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var a=void 0===r||"[arguments not available]"===r?void 0:r.split(",");return new t({functionName:s,args:a,fileName:o[0],lineNumber:o[1],columnNumber:o[2],source:e})}),this)}}})?n.apply(e,o):n)||(t.exports=i)}()},function(t,e,r){var n,o,i;!function(r,s){"use strict";o=[],void 0===(i="function"==typeof(n=function(){function t(t){return t.charAt(0).toUpperCase()+t.substring(1)}function e(t){return function(){return this[t]}}var r=["isConstructor","isEval","isNative","isToplevel"],n=["columnNumber","lineNumber"],o=["fileName","functionName","source"],i=r.concat(n,o,["args"],["evalOrigin"]);function s(e){if(e)for(var r=0;ro&&(i=this.queue.length-o),this.maxQueueSize=o,this.queue.splice(0,i)},o.prototype.copyEvents=function(){var t=Array.prototype.slice.call(this.queue,0);if(n.isFunction(this.options.filterTelemetry))try{for(var e=t.length;e--;)this.options.filterTelemetry(t[e])&&t.splice(e,1)}catch(t){this.options.filterTelemetry=null}return t},o.prototype.capture=function(t,e,r,o,s){var a={level:i(t,r),type:t,timestamp_ms:s||n.now(),body:e,source:"client"};o&&(a.uuid=o);try{if(n.isFunction(this.options.filterTelemetry)&&this.options.filterTelemetry(a))return!1}catch(t){this.options.filterTelemetry=null}return this.push(a),a},o.prototype.captureEvent=function(t,e,r,n){return this.capture(t,e,r,n)},o.prototype.captureError=function(t,e,r,n){var o={message:t.message||String(t)};return t.stack&&(o.stack=t.stack),this.capture("error",o,e,r,n)},o.prototype.captureLog=function(t,e,r,n){return this.capture("log",{message:t},e,r,n)},o.prototype.captureNetwork=function(t,e,r,n){e=e||"xhr",t.subtype=t.subtype||e,n&&(t.request=n);var o=this.levelFromStatus(t.status_code);return this.capture("network",t,o,r)},o.prototype.levelFromStatus=function(t){return t>=200&&t<400?"info":0===t||t>=400?"error":"info"},o.prototype.captureDom=function(t,e,r,n,o){var i={subtype:t,element:e};return void 0!==r&&(i.value=r),void 0!==n&&(i.checked=n),this.capture("dom",i,"info",o)},o.prototype.captureNavigation=function(t,e,r){return this.capture("navigation",{from:t,to:e},"info",r)},o.prototype.captureDomContentLoaded=function(t){return this.capture("navigation",{subtype:"DOMContentLoaded"},"info",void 0,t&&t.getTime())},o.prototype.captureLoad=function(t){return this.capture("navigation",{subtype:"load"},"info",void 0,t&&t.getTime())},o.prototype.captureConnectivityChange=function(t,e){return this.captureNetwork({change:t},"connectivity",e)},o.prototype._captureRollbarItem=function(t){if(this.options.includeItemsInTelemetry)return t.err?this.captureError(t.err,t.level,t.uuid,t.timestamp):t.message?this.captureLog(t.message,t.level,t.uuid,t.timestamp):t.custom?this.capture("log",t.custom,t.level,t.uuid,t.timestamp):void 0},o.prototype.push=function(t){this.queue.push(t),this.queue.length>this.maxQueueSize&&this.queue.shift()},t.exports=o},function(t,e,r){"use strict";var n=r(0),o=r(33),i=r(4),s=r(2),a=r(34),u={network:!0,networkResponseHeaders:!1,networkResponseBody:!1,networkRequestHeaders:!1,networkRequestBody:!1,networkErrorOnHttp5xx:!1,networkErrorOnHttp4xx:!1,networkErrorOnHttp0:!1,log:!0,dom:!0,navigation:!0,connectivity:!0,contentSecurityPolicy:!0,errorOnContentSecurityPolicy:!1};function c(t,e,r,n,o){var i=t[e];t[e]=r(i),n&&n[o].push([t,e,i])}function l(t,e){for(var r;t[e].length;)(r=t[e].shift())[0][r[1]]=r[2]}function p(t,e,r,o,i){this.options=t;var s=t.autoInstrument;!1===t.enabled||!1===s?this.autoInstrument={}:(n.isType(s,"object")||(s=u),this.autoInstrument=n.merge(u,s)),this.scrubTelemetryInputs=!!t.scrubTelemetryInputs,this.telemetryScrubber=t.telemetryScrubber,this.defaultValueScrubber=function(t){for(var e=[],r=0;r3)){i.__rollbar_xhr.end_time_ms=n.now();var e=null;if(i.__rollbar_xhr.response_content_type=i.getResponseHeader("Content-Type"),t.autoInstrument.networkResponseHeaders){var r=t.autoInstrument.networkResponseHeaders;e={};try{var s,a;if(!0===r){var u=i.getAllResponseHeaders();if(u){var c,l,p=u.trim().split(/[\r\n]+/);for(a=0;a=500&&this.autoInstrument.networkErrorOnHttp5xx||e>=400&&this.autoInstrument.networkErrorOnHttp4xx||0===e&&this.autoInstrument.networkErrorOnHttp0){var r=new Error("HTTP request failed with Status "+e);r.stack=t.stack,this.rollbar.error(r,{skipFrames:1})}},p.prototype.deinstrumentConsole=function(){if("console"in this._window&&this._window.console.log)for(var t;this.replacements.log.length;)t=this.replacements.log.shift(),this._window.console[t[0]]=t[1]},p.prototype.instrumentConsole=function(){if("console"in this._window&&this._window.console.log){var t=this,e=this._window.console,r=["debug","info","warn","error","log"];try{for(var o=0,i=r.length;o=0&&t.options[t.selectedIndex]&&this.captureDomEvent("input",t,t.options[t.selectedIndex].value)},p.prototype.captureDomEvent=function(t,e,r,n){if(void 0!==r)if(this.scrubTelemetryInputs||"password"===a.getElementType(e))r="[scrubbed]";else{var o=a.describeElement(e);this.telemetryScrubber?this.telemetryScrubber(o)&&(r="[scrubbed]"):this.defaultValueScrubber(o)&&(r="[scrubbed]")}var i=a.elementArrayToString(a.treeToArray(e));this.telemeter.captureDom(t,i,r,n)},p.prototype.deinstrumentNavigation=function(){var t=this._window.chrome;!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState&&l(this.replacements,"navigation")},p.prototype.instrumentNavigation=function(){var t=this._window.chrome;if(!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState){var e=this;c(this._window,"onpopstate",(function(t){return function(){var r=e._location.href;e.handleUrlChange(e._lastHref,r),t&&t.apply(this,arguments)}}),this.replacements,"navigation"),c(this._window.history,"pushState",(function(t){return function(){var r=arguments.length>2?arguments[2]:void 0;return r&&e.handleUrlChange(e._lastHref,r+""),t.apply(this,arguments)}}),this.replacements,"navigation")}},p.prototype.handleUrlChange=function(t,e){var r=s.parse(this._location.href),n=s.parse(e),o=s.parse(t);this._lastHref=e,r.protocol===n.protocol&&r.host===n.host&&(e=n.path+(n.hash||"")),r.protocol===o.protocol&&r.host===o.host&&(t=o.path+(o.hash||"")),this.telemeter.captureNavigation(t,e)},p.prototype.deinstrumentConnectivity=function(){("addEventListener"in this._window||"body"in this._document)&&(this._window.addEventListener?this.removeListeners("connectivity"):l(this.replacements,"connectivity"))},p.prototype.instrumentConnectivity=function(){if("addEventListener"in this._window||"body"in this._document)if(this._window.addEventListener)this.addListener("connectivity",this._window,"online",void 0,function(){this.telemeter.captureConnectivityChange("online")}.bind(this),!0),this.addListener("connectivity",this._window,"offline",void 0,function(){this.telemeter.captureConnectivityChange("offline")}.bind(this),!0);else{var t=this;c(this._document.body,"ononline",(function(e){return function(){t.telemeter.captureConnectivityChange("online"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity"),c(this._document.body,"onoffline",(function(e){return function(){t.telemeter.captureConnectivityChange("offline"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity")}},p.prototype.handleCspEvent=function(t){var e="Security Policy Violation: blockedURI: "+t.blockedURI+", violatedDirective: "+t.violatedDirective+", effectiveDirective: "+t.effectiveDirective+", ";t.sourceFile&&(e+="location: "+t.sourceFile+", line: "+t.lineNumber+", col: "+t.columnNumber+", "),e+="originalPolicy: "+t.originalPolicy,this.telemeter.captureLog(e,"error"),this.handleCspError(e)},p.prototype.handleCspError=function(t){this.autoInstrument.errorOnContentSecurityPolicy&&this.rollbar.error(t)},p.prototype.deinstrumentContentSecurityPolicy=function(){"addEventListener"in this._document&&this.removeListeners("contentsecuritypolicy")},p.prototype.instrumentContentSecurityPolicy=function(){if("addEventListener"in this._document){var t=this.handleCspEvent.bind(this);this.addListener("contentsecuritypolicy",this._document,"securitypolicyviolation",null,t,!1)}},p.prototype.addListener=function(t,e,r,n,o,i){e.addEventListener?(e.addEventListener(r,o,i),this.eventRemovers[t].push((function(){e.removeEventListener(r,o,i)}))):n&&(e.attachEvent(n,o),this.eventRemovers[t].push((function(){e.detachEvent(n,o)})))},p.prototype.removeListeners=function(t){for(;this.eventRemovers[t].length;)this.eventRemovers[t].shift()()},t.exports=p},function(t,e,r){"use strict";function n(t){return"string"!=typeof t&&(t=String(t)),t.toLowerCase()}function o(t){this.map={},t instanceof o?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}o.prototype.append=function(t,e){t=n(t),e=function(t){return"string"!=typeof t&&(t=String(t)),t}(e);var r=this.map[t];this.map[t]=r?r+", "+e:e},o.prototype.get=function(t){return t=n(t),this.has(t)?this.map[t]:null},o.prototype.has=function(t){return this.map.hasOwnProperty(n(t))},o.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},o.prototype.entries=function(){var t=[];return this.forEach((function(e,r){t.push([r,e])})),function(t){return{next:function(){var e=t.shift();return{done:void 0===e,value:e}}}}(t)},t.exports=function(t){return"undefined"==typeof Headers?new o(t):new Headers(t)}},function(t,e,r){"use strict";function n(t){return(t.getAttribute("type")||"").toLowerCase()}function o(t){if(!t||!t.tagName)return"";var e=[t.tagName];t.id&&e.push("#"+t.id),t.classes&&e.push("."+t.classes.join("."));for(var r=0;r=0;a--){if(e=o(t[a]),r=s+i.length*n+e.length,a=83){i.unshift("...");break}i.unshift(e),s+=e.length}return i.join(" > ")},treeToArray:function(t){for(var e,r=[],n=0;t&&n<5&&"html"!==(e=i(t)).tagName;n++)r.unshift(e),t=t.parentNode;return r},getElementFromEvent:function(t,e){return t.target?t.target:e&&e.elementFromPoint?e.elementFromPoint(t.clientX,t.clientY):void 0},isDescribedElement:function(t,e,r){if(t.tagName.toLowerCase()!==e.toLowerCase())return!1;if(!r)return!0;t=n(t);for(var o=0;o2*e?t.slice(0,e).concat(t.slice(r-e)):t}function a(t,e,r){r=void 0===r?30:r;var o,i=t.data.body;if(i.trace_chain)for(var a=i.trace_chain,u=0;ut?e.slice(0,t-3).concat("..."):e}function c(t,e,r){return[e=o(e,(function e(r,i,s){switch(n.typeName(i)){case"string":return u(t,i);case"object":case"array":return o(i,e,s);default:return i}})),n.stringify(e,r)]}function l(t){return t.exception&&(delete t.exception.description,t.exception.message=u(255,t.exception.message)),t.frames=s(t.frames,1),t}function p(t,e){var r=t.data.body;if(r.trace_chain)for(var o=r.trace_chain,i=0;ie}t.exports={truncate:function(t,e,r){r=void 0===r?524288:r;for(var n,o,s,u=[i,a,c.bind(null,1024),c.bind(null,512),c.bind(null,256),p];n=u.shift();)if(t=(o=n(t,e))[0],(s=o[1]).error||!f(s.value,r))return s;return s},raw:i,truncateFrames:a,truncateStrings:c,maybeTruncateValue:u}}])})); -//# sourceMappingURL=rollbar.umd.min.js.map \ No newline at end of file +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.rollbar=e():t.rollbar=e()}(this,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=6)}([function(t,e,r){"use strict";var n=r(12),o={};function i(t,e){return e===s(t)}function s(t){var e=typeof t;return"object"!==e?e:t?t instanceof Error?"error":{}.toString.call(t).match(/\s([a-zA-Z]+)/)[1].toLowerCase():"null"}function a(t){return i(t,"function")}function u(t){var e=Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?"),r=RegExp("^"+e+"$");return c(t)&&r.test(t)}function c(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function l(){var t=y();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var r=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?r:7&r|8).toString(16)}))}var p={strictMode:!1,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};function f(t,e){var r,n;try{r=o.stringify(t)}catch(o){if(e&&a(e))try{r=e(t)}catch(t){n=t}else n=o}return{error:n,value:r}}function h(t,e){return function(r,n){try{e(r,n)}catch(e){t.error(e)}}}function d(t){return function t(e,r){var n,o,a,u={};try{for(o in e)(n=e[o])&&(i(n,"object")||i(n,"array"))?r.includes(n)?u[o]="Removed circular reference: "+s(n):((a=r.slice()).push(n),u[o]=t(n,a)):u[o]=n}catch(t){u="Failed cloning custom data: "+t.message}return u}(t,[t])}var m=["log","network","dom","navigation","error","manual"],g=["critical","error","warning","info","debug"];function v(t,e){for(var r=0;ra)?(s=e.path,e.path=s.substring(0,a)+i+"&"+s.substring(a+1)):-1!==u?(s=e.path,e.path=s.substring(0,u)+i+s.substring(u)):e.path=e.path+i},createItem:function(t,e,r,n,o){for(var i,a,u,c,p,f,m=[],g=[],v=0,b=t.length;v0&&(u||(u=d({})),u.extraArgs=d(m));var k={message:i,err:a,custom:u,timestamp:y(),callback:c,notifier:r,diagnostic:{},uuid:l()};return function(t,e){e&&void 0!==e.level&&(t.level=e.level,delete e.level);e&&void 0!==e.skipFrames&&(t.skipFrames=e.skipFrames,delete e.skipFrames)}(k,u),n&&p&&(k.request=p),o&&(k.lambdaContext=o),k._originalArgs=t,k.diagnostic.original_arg_types=g,k},addErrorContext:function(t,e){var r=t.data.custom||{},o=!1;try{for(var i=0;i2){var o=n.slice(0,3),i=o[2].indexOf("/");-1!==i&&(o[2]=o[2].substring(0,i));r=o.concat("0000:0000:0000:0000:0000").join(":")}}else r=null}catch(t){r=null}else r=null;t.user_ip=r}},formatArgsAsString:function(t){var e,r,n,o=[];for(e=0,r=t.length;e500&&(n=n.substr(0,497)+"...");break;case"null":n="null";break;case"undefined":n="undefined";break;case"symbol":n=n.toString()}o.push(n)}return o.join(" ")},formatUrl:function(t,e){if(!(e=e||t.protocol)&&t.port&&(80===t.port?e="http:":443===t.port&&(e="https:")),e=e||"https:",!t.hostname)return null;var r=e+"//"+t.hostname;return t.port&&(r=r+":"+t.port),t.path&&(r+=t.path),r},get:function(t,e){if(t){var r=e.split("."),n=t;try{for(var o=0,i=r.length;o=1&&r>e}function s(t,e,r,n,o,i,s){var a=null;return r&&(r=new Error(r)),r||n||(a=function(t,e,r,n,o){var i,s=e.environment||e.payload&&e.payload.environment;i=o?"item per minute limit reached, ignoring errors until timeout":"maxItems has been hit, ignoring errors until reset.";var a={body:{message:{body:i,extra:{maxItems:r,itemsPerMinute:n}}},language:"javascript",environment:s,notifier:{version:e.notifier&&e.notifier.version||e.version}};"browser"===t?(a.platform="browser",a.framework="browser-js",a.notifier.name="rollbar-browser-js"):"server"===t?(a.framework=e.framework||"node-js",a.notifier.name=e.notifier.name):"react-native"===t&&(a.framework=e.framework||"react-native",a.notifier.name=e.notifier.name);return a}(t,e,o,i,s)),{error:r,shouldSend:n,payload:a}}o.globalSettings={startTime:n.now(),maxItems:void 0,itemsPerMinute:void 0},o.prototype.configureGlobal=function(t){void 0!==t.startTime&&(o.globalSettings.startTime=t.startTime),void 0!==t.maxItems&&(o.globalSettings.maxItems=t.maxItems),void 0!==t.itemsPerMinute&&(o.globalSettings.itemsPerMinute=t.itemsPerMinute)},o.prototype.shouldSend=function(t,e){var r=(e=e||n.now())-this.startTime;(r<0||r>=6e4)&&(this.startTime=e,this.perMinCounter=0);var a=o.globalSettings.maxItems,u=o.globalSettings.itemsPerMinute;if(i(t,a,this.counter))return s(this.platform,this.platformOptions,a+" max items reached",!1);if(i(t,u,this.perMinCounter))return s(this.platform,this.platformOptions,u+" items per minute reached",!1);this.counter++,this.perMinCounter++;var c=!i(t,a,this.counter),l=c;return c=c&&!i(t,u,this.perMinCounter),s(this.platform,this.platformOptions,null,c,a,u,l)},o.prototype.setPlatformOptions=function(t,e){this.platform=t,this.platformOptions=e},t.exports=o},function(t,e,r){"use strict";var n=Object.prototype.hasOwnProperty,o=Object.prototype.toString,i=function(t){if(!t||"[object Object]"!==o.call(t))return!1;var e,r=n.call(t,"constructor"),i=t.constructor&&t.constructor.prototype&&n.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!r&&!i)return!1;for(e in t);return void 0===e||n.call(t,e)};t.exports=function t(){var e,r,n,o,s,a={},u=null,c=arguments.length;for(e=0;ethis.options.maxRetries&&(o=!1))}o?this._retryApiRequest(e,r):r(t)},o.prototype._retryApiRequest=function(t,e){this.retryQueue.push({item:t,callback:e}),this.retryHandle||(this.retryHandle=setInterval(function(){for(;this.retryQueue.length;){var t=this.retryQueue.shift();this._makeApiRequest(t.item,t.callback)}}.bind(this),this.options.retryInterval))},o.prototype._dequeuePendingRequest=function(t){var e=this.pendingRequests.indexOf(t);-1!==e&&(this.pendingRequests.splice(e,1),this._maybeCallWait())},o.prototype._maybeLog=function(t,e){if(this.logger&&this.options.verbose){var r=e;if(r=(r=r||n.get(t,"body.trace.exception.message"))||n.get(t,"body.trace_chain.0.exception.message"))return void this.logger.error(r);(r=n.get(t,"body.message.body"))&&this.logger.log(r)}},o.prototype._maybeCallWait=function(){return!(!n.isFunction(this.waitCallback)||0!==this.pendingItems.length||0!==this.pendingRequests.length)&&(this.waitIntervalID&&(this.waitIntervalID=clearInterval(this.waitIntervalID)),this.waitCallback(),!0)},t.exports=o},function(t,e,r){"use strict";var n=r(0);function o(t,e){this.queue=t,this.options=e,this.transforms=[],this.diagnostic={}}o.prototype.configure=function(t){this.queue&&this.queue.configure(t);var e=this.options;return this.options=n.merge(e,t),this},o.prototype.addTransform=function(t){return n.isFunction(t)&&this.transforms.push(t),this},o.prototype.log=function(t,e){if(e&&n.isFunction(e)||(e=function(){}),!this.options.enabled)return e(new Error("Rollbar is not enabled"));this.queue.addPendingItem(t);var r=t.err;this._applyTransforms(t,function(n,o){if(n)return this.queue.removePendingItem(t),e(n,null);this.queue.addItem(o,e,r,t)}.bind(this))},o.prototype._applyTransforms=function(t,e){var r=-1,n=this.transforms.length,o=this.transforms,i=this.options,s=function(t,a){t?e(t,null):++r!==n?o[r](a,i,s):e(null,a)};s(null,t)},t.exports=o},function(t,e,r){"use strict";var n=r(0),o=r(16),i={hostname:"api.rollbar.com",path:"/api/1/item/",search:null,version:"1",protocol:"https:",port:443};function s(t,e,r,n,o){this.options=t,this.transport=e,this.url=r,this.truncation=n,this.jsonBackup=o,this.accessToken=t.accessToken,this.transportOptions=a(t,r)}function a(t,e){return o.getTransportFromOptions(t,i,e)}s.prototype.postItem=function(t,e){var r=o.transportOptions(this.transportOptions,"POST"),n=o.buildPayload(this.accessToken,t,this.jsonBackup),i=this;setTimeout((function(){i.transport.post(i.accessToken,r,n,e)}),0)},s.prototype.buildJsonPayload=function(t,e){var r,i=o.buildPayload(this.accessToken,t,this.jsonBackup);return(r=this.truncation?this.truncation.truncate(i):n.stringify(i)).error?(e&&e(r.error),null):r.value},s.prototype.postJsonPayload=function(t,e){var r=o.transportOptions(this.transportOptions,"POST");this.transport.postJsonPayload(this.accessToken,r,t,e)},s.prototype.configure=function(t){var e=this.oldOptions;return this.options=n.merge(e,t),this.transportOptions=a(this.options,this.url),void 0!==this.options.accessToken&&(this.accessToken=this.options.accessToken),this},t.exports=s},function(t,e,r){"use strict";var n=r(0);t.exports={buildPayload:function(t,e,r){if(!n.isType(e.context,"string")){var o=n.stringify(e.context,r);o.error?e.context="Error: could not serialize 'context'":e.context=o.value||"",e.context.length>255&&(e.context=e.context.substr(0,255))}return{access_token:t,data:e}},getTransportFromOptions:function(t,e,r){var n=e.hostname,o=e.protocol,i=e.port,s=e.path,a=e.search,u=t.timeout,c=function(t){var e="undefined"!=typeof window&&window||"undefined"!=typeof self&&self,r=t.defaultTransport||"xhr";void 0===e.fetch&&(r="xhr");void 0===e.XMLHttpRequest&&(r="fetch");return r}(t),l=t.proxy;if(t.endpoint){var p=r.parse(t.endpoint);n=p.hostname,o=p.protocol,i=p.port,s=p.pathname,a=p.search}return{timeout:u,hostname:n,protocol:o,port:i,path:s,search:a,proxy:l,transport:c}},transportOptions:function(t,e){var r=t.protocol||"https:",n=t.port||("http:"===r?80:"https:"===r?443:void 0),o=t.hostname,i=t.path,s=t.timeout,a=t.transport;return t.search&&(i+=t.search),t.proxy&&(i=r+"//"+o+i,o=t.proxy.host||t.proxy.hostname,n=t.proxy.port,r=t.proxy.protocol||r),{timeout:s,protocol:r,hostname:o,path:i,port:n,method:e,transport:a}},appendPathToPath:function(t,e){var r=/\/$/.test(t),n=/^\//.test(e);return r&&n?e=e.substring(1):r||n||(e="/"+e),t+e}}},function(t,e){!function(t){"use strict";t.console||(t.console={});for(var e,r,n=t.console,o=function(){},i=["memory"],s="assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(",");e=i.pop();)n[e]||(n[e]={});for(;r=s.pop();)n[r]||(n[r]=o)}("undefined"==typeof window?this:window)},function(t,e,r){"use strict";var n={ieVersion:function(){if("undefined"!=typeof document){for(var t=3,e=document.createElement("div"),r=e.getElementsByTagName("i");e.innerHTML="\x3c!--[if gt IE "+ ++t+"]>4?t:void 0}}};t.exports=n},function(t,e,r){"use strict";function n(t,e,r,n){t._rollbarWrappedError&&(n[4]||(n[4]=t._rollbarWrappedError),n[5]||(n[5]=t._rollbarWrappedError._rollbarContext),t._rollbarWrappedError=null);var o=e.handleUncaughtException.apply(e,n);r&&r.apply(t,n),"anonymous"===o&&(e.anonymousErrorsPending+=1)}t.exports={captureUncaughtExceptions:function(t,e,r){if(t){var o;if("function"==typeof e._rollbarOldOnError)o=e._rollbarOldOnError;else if(t.onerror){for(o=t.onerror;o._rollbarOldOnError;)o=o._rollbarOldOnError;e._rollbarOldOnError=o}e.handleAnonymousErrors();var i=function(){var r=Array.prototype.slice.call(arguments,0);n(t,e,o,r)};r&&(i._rollbarOldOnError=o),t.onerror=i}},captureUnhandledRejections:function(t,e,r){if(t){"function"==typeof t._rollbarURH&&t._rollbarURH.belongsToShim&&t.removeEventListener("unhandledrejection",t._rollbarURH);var n=function(t){var r,n,o;try{r=t.reason}catch(t){r=void 0}try{n=t.promise}catch(t){n="[unhandledrejection] error getting `promise` from event"}try{o=t.detail,!r&&o&&(r=o.reason,n=o.promise)}catch(t){}r||(r="[unhandledrejection] error getting `reason` from event"),e&&e.handleUnhandledRejection&&e.handleUnhandledRejection(r,n)};n.belongsToShim=r,t._rollbarURH=n,t.addEventListener("unhandledrejection",n)}}}},function(t,e,r){"use strict";var n=r(0),o=r(21),i=r(22);function s(t){this.truncation=t}s.prototype.get=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){}),n.addParamsAndAccessTokenToPath(t,e,r);var s=n.formatUrl(e);this._makeZoneRequest(t,s,"GET",null,o,i,e.timeout,e.transport)},s.prototype.post=function(t,e,r,o,i){if(o&&n.isFunction(o)||(o=function(){}),!r)return o(new Error("Cannot send empty request"));var s;if((s=this.truncation?this.truncation.truncate(r):n.stringify(r)).error)return o(s.error);var a=s.value,u=n.formatUrl(e);this._makeZoneRequest(t,u,"POST",a,o,i,e.timeout,e.transport)},s.prototype.postJsonPayload=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){});var s=n.formatUrl(e);this._makeZoneRequest(t,s,"POST",r,o,i,e.timeout,e.transport)},s.prototype._makeZoneRequest=function(){var t="undefined"!=typeof window&&window||void 0!==o&&o,e=t&&t.Zone&&t.Zone.current,r=Array.prototype.slice.call(arguments);if(e&&"angular"===e._name){var n=e._parent,o=this;n.run((function(){o._makeRequest.apply(void 0,r)}))}else this._makeRequest.apply(void 0,r)},s.prototype._makeRequest=function(t,e,r,n,s,a,u,c){if("undefined"!=typeof RollbarProxy)return function(t,e){(new RollbarProxy).sendJsonPayload(t,(function(t){}),(function(t){e(new Error(t))}))}(n,s);"fetch"===c?o(t,e,r,n,s,u):i(t,e,r,n,s,a,u)},t.exports=s},function(t,e,r){"use strict";var n=r(1),o=r(0);t.exports=function(t,e,r,i,s,a){var u,c;o.isFiniteNumber(a)&&(u=new AbortController,c=setTimeout((function(){u.abort()}),a)),fetch(e,{method:r,headers:{"Content-Type":"application/json","X-Rollbar-Access-Token":t,signal:u&&u.signal},body:i}).then((function(t){return c&&clearTimeout(c),t.json()})).then((function(t){s(null,t)})).catch((function(t){n.error(t.message),s(t)}))}},function(t,e,r){"use strict";var n=r(0),o=r(1);function i(t,e){var r=new Error(t);return r.code=e||"ENOTFOUND",r}t.exports=function(t,e,r,s,a,u,c){var l;if(!(l=u?u():function(){var t,e,r=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],n=r.length;for(e=0;e=400&&t.status<600}(l)){if(403===l.status){var e=t.value&&t.value.message;o.error(e)}a(new Error(String(l.status)))}else{a(i("XHR response had no status code (likely connection failure)"))}}}catch(t){var r;r=t&&t.stack?t:new Error(t),a(r)}var s};l.open(r,e,!0),l.setRequestHeader&&(l.setRequestHeader("Content-Type","application/json"),l.setRequestHeader("X-Rollbar-Access-Token",t)),n.isFiniteNumber(c)&&(l.timeout=c),l.onreadystatechange=p,l.send(s)}catch(t){if("undefined"!=typeof XDomainRequest){if(!window||!window.location)return a(new Error("No window available during request, unknown environment"));"http:"===window.location.href.substring(0,5)&&"https"===e.substring(0,5)&&(e="http"+e.substring(5));var f=new XDomainRequest;f.onprogress=function(){},f.ontimeout=function(){a(i("Request timed out","ETIMEDOUT"))},f.onerror=function(){a(new Error("Error during request"))},f.onload=function(){var t=n.jsonParse(f.responseText);a(t.error,t.value)},f.open(r,e,!0),f.send(s)}else a(new Error("Cannot find a method to transport a request"))}}catch(t){a(t)}}},function(t,e,r){"use strict";var n=r(0),o=r(3),i=r(1);function s(t,e,r){var o=t.message,i=t.custom;o||(o="Item sent with null or missing arguments.");var s={body:o};i&&(s.extra=n.merge(i)),n.set(t,"data.body",{message:s}),r(null,t)}function a(t){var e=t.stackInfo.stack;return e&&0===e.length&&t._unhandledStackInfo&&t._unhandledStackInfo.stack&&(e=t._unhandledStackInfo.stack),e}function u(t,e,r){var i=t&&t.data.description,s=t&&t.custom,u=a(t),l=o.guessErrorClass(e.message),p={exception:{class:c(e,l[0],r),message:l[1]}};if(i&&(p.exception.description=i),u){var f,h,d,m,g,v,y,b;for(0===u.length&&(p.exception.stack=e.rawStack,p.exception.raw=String(e.rawException)),p.frames=[],y=0;y0&&n.set(e,"data.request",i),o(null,e)}},addClientInfo:function(t){return function(e,r,o){if(!t)return o(null,e);var i=t.navigator||{},s=t.screen||{};n.set(e,"data.client",{runtime_ms:e.timestamp-t._rollbarStartTime,timestamp:Math.round(e.timestamp/1e3),javascript:{browser:i.userAgent,language:i.language,cookie_enabled:i.cookieEnabled,screen:{width:s.width,height:s.height}}}),o(null,e)}},addPluginInfo:function(t){return function(e,r,o){if(!t||!t.navigator)return o(null,e);for(var i,s=[],a=t.navigator.plugins||[],u=0,c=a.length;u-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));var r=e.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),n=r.match(/ (\(.+\)$)/);r=n?r.replace(n[0],""):r;var o=this.extractLocation(n?n[1]:r),i=n&&r||void 0,s=["eval",""].indexOf(o[0])>-1?void 0:o[0];return new t({functionName:i,fileName:s,lineNumber:o[1],columnNumber:o[2],source:e})}),this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter((function(t){return!t.match(n)}),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 t({functionName:e});var r=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(r),o=n&&n[1]?n[1]:void 0,i=this.extractLocation(e.replace(r,""));return new t({functionName:o,fileName:i[0],lineNumber:i[1],columnNumber:i[2],source:e})}),this)},parseOpera:function(t){return!t.stacktrace||t.message.indexOf("\n")>-1&&t.message.split("\n").length>t.stacktrace.split("\n").length?this.parseOpera9(t):t.stack?this.parseOpera11(t):this.parseOpera10(t)},parseOpera9:function(e){for(var r=/Line (\d+).*script (?:in )?(\S+)/i,n=e.message.split("\n"),o=[],i=2,s=n.length;i/,"$2").replace(/\([^)]*\)/g,"")||void 0;i.match(/\(([^)]*)\)/)&&(r=i.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var a=void 0===r||"[arguments not available]"===r?void 0:r.split(",");return new t({functionName:s,args:a,fileName:o[0],lineNumber:o[1],columnNumber:o[2],source:e})}),this)}}})?n.apply(e,o):n)||(t.exports=i)}()},function(t,e,r){var n,o,i;!function(r,s){"use strict";o=[],void 0===(i="function"==typeof(n=function(){function t(t){return t.charAt(0).toUpperCase()+t.substring(1)}function e(t){return function(){return this[t]}}var r=["isConstructor","isEval","isNative","isToplevel"],n=["columnNumber","lineNumber"],o=["fileName","functionName","source"],i=r.concat(n,o,["args"],["evalOrigin"]);function s(e){if(e)for(var r=0;ro&&(i=this.queue.length-o),this.maxQueueSize=o,this.queue.splice(0,i)},o.prototype.copyEvents=function(){var t=Array.prototype.slice.call(this.queue,0);if(n.isFunction(this.options.filterTelemetry))try{for(var e=t.length;e--;)this.options.filterTelemetry(t[e])&&t.splice(e,1)}catch(t){this.options.filterTelemetry=null}return t},o.prototype.capture=function(t,e,r,o,s){var a={level:i(t,r),type:t,timestamp_ms:s||n.now(),body:e,source:"client"};o&&(a.uuid=o);try{if(n.isFunction(this.options.filterTelemetry)&&this.options.filterTelemetry(a))return!1}catch(t){this.options.filterTelemetry=null}return this.push(a),a},o.prototype.captureEvent=function(t,e,r,n){return this.capture(t,e,r,n)},o.prototype.captureError=function(t,e,r,n){var o={message:t.message||String(t)};return t.stack&&(o.stack=t.stack),this.capture("error",o,e,r,n)},o.prototype.captureLog=function(t,e,r,n){return this.capture("log",{message:t},e,r,n)},o.prototype.captureNetwork=function(t,e,r,n){e=e||"xhr",t.subtype=t.subtype||e,n&&(t.request=n);var o=this.levelFromStatus(t.status_code);return this.capture("network",t,o,r)},o.prototype.levelFromStatus=function(t){return t>=200&&t<400?"info":0===t||t>=400?"error":"info"},o.prototype.captureDom=function(t,e,r,n,o){var i={subtype:t,element:e};return void 0!==r&&(i.value=r),void 0!==n&&(i.checked=n),this.capture("dom",i,"info",o)},o.prototype.captureNavigation=function(t,e,r){return this.capture("navigation",{from:t,to:e},"info",r)},o.prototype.captureDomContentLoaded=function(t){return this.capture("navigation",{subtype:"DOMContentLoaded"},"info",void 0,t&&t.getTime())},o.prototype.captureLoad=function(t){return this.capture("navigation",{subtype:"load"},"info",void 0,t&&t.getTime())},o.prototype.captureConnectivityChange=function(t,e){return this.captureNetwork({change:t},"connectivity",e)},o.prototype._captureRollbarItem=function(t){if(this.options.includeItemsInTelemetry)return t.err?this.captureError(t.err,t.level,t.uuid,t.timestamp):t.message?this.captureLog(t.message,t.level,t.uuid,t.timestamp):t.custom?this.capture("log",t.custom,t.level,t.uuid,t.timestamp):void 0},o.prototype.push=function(t){this.queue.push(t),this.queue.length>this.maxQueueSize&&this.queue.shift()},t.exports=o},function(t,e,r){"use strict";var n=r(0),o=r(33),i=r(4),s=r(2),a=r(34),u={network:!0,networkResponseHeaders:!1,networkResponseBody:!1,networkRequestHeaders:!1,networkRequestBody:!1,networkErrorOnHttp5xx:!1,networkErrorOnHttp4xx:!1,networkErrorOnHttp0:!1,log:!0,dom:!0,navigation:!0,connectivity:!0,contentSecurityPolicy:!0,errorOnContentSecurityPolicy:!1};function c(t,e,r,n,o){var i=t[e];t[e]=r(i),n&&n[o].push([t,e,i])}function l(t,e){for(var r;t[e].length;)(r=t[e].shift())[0][r[1]]=r[2]}function p(t,e,r,o,i){this.options=t;var s=t.autoInstrument;!1===t.enabled||!1===s?this.autoInstrument={}:(n.isType(s,"object")||(s=u),this.autoInstrument=n.merge(u,s)),this.scrubTelemetryInputs=!!t.scrubTelemetryInputs,this.telemetryScrubber=t.telemetryScrubber,this.defaultValueScrubber=function(t){for(var e=[],r=0;r3)){i.__rollbar_xhr.end_time_ms=n.now();var e=null;if(i.__rollbar_xhr.response_content_type=i.getResponseHeader("Content-Type"),t.autoInstrument.networkResponseHeaders){var r=t.autoInstrument.networkResponseHeaders;e={};try{var s,a;if(!0===r){var u=i.getAllResponseHeaders();if(u){var c,l,p=u.trim().split(/[\r\n]+/);for(a=0;a=500&&this.autoInstrument.networkErrorOnHttp5xx||e>=400&&this.autoInstrument.networkErrorOnHttp4xx||0===e&&this.autoInstrument.networkErrorOnHttp0){var r=new Error("HTTP request failed with Status "+e);r.stack=t.stack,this.rollbar.error(r,{skipFrames:1})}},p.prototype.deinstrumentConsole=function(){if("console"in this._window&&this._window.console.log)for(var t;this.replacements.log.length;)t=this.replacements.log.shift(),this._window.console[t[0]]=t[1]},p.prototype.instrumentConsole=function(){if("console"in this._window&&this._window.console.log){var t=this,e=this._window.console,r=["debug","info","warn","error","log"];try{for(var o=0,i=r.length;o=0&&t.options[t.selectedIndex]&&this.captureDomEvent("input",t,t.options[t.selectedIndex].value)},p.prototype.captureDomEvent=function(t,e,r,n){if(void 0!==r)if(this.scrubTelemetryInputs||"password"===a.getElementType(e))r="[scrubbed]";else{var o=a.describeElement(e);this.telemetryScrubber?this.telemetryScrubber(o)&&(r="[scrubbed]"):this.defaultValueScrubber(o)&&(r="[scrubbed]")}var i=a.elementArrayToString(a.treeToArray(e));this.telemeter.captureDom(t,i,r,n)},p.prototype.deinstrumentNavigation=function(){var t=this._window.chrome;!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState&&l(this.replacements,"navigation")},p.prototype.instrumentNavigation=function(){var t=this._window.chrome;if(!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState){var e=this;c(this._window,"onpopstate",(function(t){return function(){var r=e._location.href;e.handleUrlChange(e._lastHref,r),t&&t.apply(this,arguments)}}),this.replacements,"navigation"),c(this._window.history,"pushState",(function(t){return function(){var r=arguments.length>2?arguments[2]:void 0;return r&&e.handleUrlChange(e._lastHref,r+""),t.apply(this,arguments)}}),this.replacements,"navigation")}},p.prototype.handleUrlChange=function(t,e){var r=s.parse(this._location.href),n=s.parse(e),o=s.parse(t);this._lastHref=e,r.protocol===n.protocol&&r.host===n.host&&(e=n.path+(n.hash||"")),r.protocol===o.protocol&&r.host===o.host&&(t=o.path+(o.hash||"")),this.telemeter.captureNavigation(t,e)},p.prototype.deinstrumentConnectivity=function(){("addEventListener"in this._window||"body"in this._document)&&(this._window.addEventListener?this.removeListeners("connectivity"):l(this.replacements,"connectivity"))},p.prototype.instrumentConnectivity=function(){if("addEventListener"in this._window||"body"in this._document)if(this._window.addEventListener)this.addListener("connectivity",this._window,"online",void 0,function(){this.telemeter.captureConnectivityChange("online")}.bind(this),!0),this.addListener("connectivity",this._window,"offline",void 0,function(){this.telemeter.captureConnectivityChange("offline")}.bind(this),!0);else{var t=this;c(this._document.body,"ononline",(function(e){return function(){t.telemeter.captureConnectivityChange("online"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity"),c(this._document.body,"onoffline",(function(e){return function(){t.telemeter.captureConnectivityChange("offline"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity")}},p.prototype.handleCspEvent=function(t){var e="Security Policy Violation: blockedURI: "+t.blockedURI+", violatedDirective: "+t.violatedDirective+", effectiveDirective: "+t.effectiveDirective+", ";t.sourceFile&&(e+="location: "+t.sourceFile+", line: "+t.lineNumber+", col: "+t.columnNumber+", "),e+="originalPolicy: "+t.originalPolicy,this.telemeter.captureLog(e,"error"),this.handleCspError(e)},p.prototype.handleCspError=function(t){this.autoInstrument.errorOnContentSecurityPolicy&&this.rollbar.error(t)},p.prototype.deinstrumentContentSecurityPolicy=function(){"addEventListener"in this._document&&this.removeListeners("contentsecuritypolicy")},p.prototype.instrumentContentSecurityPolicy=function(){if("addEventListener"in this._document){var t=this.handleCspEvent.bind(this);this.addListener("contentsecuritypolicy",this._document,"securitypolicyviolation",null,t,!1)}},p.prototype.addListener=function(t,e,r,n,o,i){e.addEventListener?(e.addEventListener(r,o,i),this.eventRemovers[t].push((function(){e.removeEventListener(r,o,i)}))):n&&(e.attachEvent(n,o),this.eventRemovers[t].push((function(){e.detachEvent(n,o)})))},p.prototype.removeListeners=function(t){for(;this.eventRemovers[t].length;)this.eventRemovers[t].shift()()},t.exports=p},function(t,e,r){"use strict";function n(t){return"string"!=typeof t&&(t=String(t)),t.toLowerCase()}function o(t){this.map={},t instanceof o?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}o.prototype.append=function(t,e){t=n(t),e=function(t){return"string"!=typeof t&&(t=String(t)),t}(e);var r=this.map[t];this.map[t]=r?r+", "+e:e},o.prototype.get=function(t){return t=n(t),this.has(t)?this.map[t]:null},o.prototype.has=function(t){return this.map.hasOwnProperty(n(t))},o.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},o.prototype.entries=function(){var t=[];return this.forEach((function(e,r){t.push([r,e])})),function(t){return{next:function(){var e=t.shift();return{done:void 0===e,value:e}}}}(t)},t.exports=function(t){return"undefined"==typeof Headers?new o(t):new Headers(t)}},function(t,e,r){"use strict";function n(t){return(t.getAttribute("type")||"").toLowerCase()}function o(t){if(!t||!t.tagName)return"";var e=[t.tagName];t.id&&e.push("#"+t.id),t.classes&&e.push("."+t.classes.join("."));for(var r=0;r=0;a--){if(e=o(t[a]),r=s+i.length*n+e.length,a=83){i.unshift("...");break}i.unshift(e),s+=e.length}return i.join(" > ")},treeToArray:function(t){for(var e,r=[],n=0;t&&n<5&&"html"!==(e=i(t)).tagName;n++)r.unshift(e),t=t.parentNode;return r},getElementFromEvent:function(t,e){return t.target?t.target:e&&e.elementFromPoint?e.elementFromPoint(t.clientX,t.clientY):void 0},isDescribedElement:function(t,e,r){if(t.tagName.toLowerCase()!==e.toLowerCase())return!1;if(!r)return!0;t=n(t);for(var o=0;o2*e?t.slice(0,e).concat(t.slice(r-e)):t}function a(t,e,r){r=void 0===r?30:r;var o,i=t.data.body;if(i.trace_chain)for(var a=i.trace_chain,u=0;ut?e.slice(0,t-3).concat("..."):e}function c(t,e,r){return[e=o(e,(function e(r,i,s){switch(n.typeName(i)){case"string":return u(t,i);case"object":case"array":return o(i,e,s);default:return i}})),n.stringify(e,r)]}function l(t){return t.exception&&(delete t.exception.description,t.exception.message=u(255,t.exception.message)),t.frames=s(t.frames,1),t}function p(t,e){var r=t.data.body;if(r.trace_chain)for(var o=r.trace_chain,i=0;ie}t.exports={truncate:function(t,e,r){r=void 0===r?524288:r;for(var n,o,s,u=[i,a,c.bind(null,1024),c.bind(null,512),c.bind(null,256),p];n=u.shift();)if(t=(o=n(t,e))[0],(s=o[1]).error||!f(s.value,r))return s;return s},raw:i,truncateFrames:a,truncateStrings:c,maybeTruncateValue:u}}])})); \ No newline at end of file diff --git a/examples/browser_extension_v2/background.js b/examples/browser_extension_v2/background.js index c1f3db23d..ebbfae367 100644 --- a/examples/browser_extension_v2/background.js +++ b/examples/browser_extension_v2/background.js @@ -11,7 +11,7 @@ var _rollbarConfig = { }; // Rollbar Snippet -!function(r){var e={};function o(n){if(e[n])return e[n].exports;var t=e[n]={i:n,l:!1,exports:{}};return r[n].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.m=r,o.c=e,o.d=function(r,e,n){o.o(r,e)||Object.defineProperty(r,e,{enumerable:!0,get:n})},o.r=function(r){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},o.t=function(r,e){if(1&e&&(r=o(r)),8&e)return r;if(4&e&&"object"==typeof r&&r&&r.__esModule)return r;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:r}),2&e&&"string"!=typeof r)for(var t in r)o.d(n,t,function(e){return r[e]}.bind(null,t));return n},o.n=function(r){var e=r&&r.__esModule?function(){return r.default}:function(){return r};return o.d(e,"a",e),e},o.o=function(r,e){return Object.prototype.hasOwnProperty.call(r,e)},o.p="",o(o.s=0)}([function(r,e,o){"use strict";var n=o(1),t=o(5);_rollbarConfig=_rollbarConfig||{},_rollbarConfig.rollbarJsUrl=_rollbarConfig.rollbarJsUrl||"https://cdn.rollbar.com/rollbarjs/refs/tags/v2.26.2/rollbar.min.js",_rollbarConfig.async=void 0===_rollbarConfig.async||_rollbarConfig.async;var a=n.setupShim(window,_rollbarConfig),l=t(_rollbarConfig);window.rollbar=n.Rollbar,a.loadFull(window,document,!_rollbarConfig.async,_rollbarConfig,l)},function(r,e,o){"use strict";var n=o(2),t=o(3);function a(r){return function(){try{return r.apply(this,arguments)}catch(r){try{console.error("[Rollbar]: Internal error",r)}catch(r){}}}}var l=0;function i(r,e){this.options=r,this._rollbarOldOnError=null;var o=l++;this.shimId=function(){return o},"undefined"!=typeof window&&window._rollbarShims&&(window._rollbarShims[o]={handler:e,messages:[]})}var s=o(4),d=function(r,e){return new i(r,e)},c=function(r){return new s(d,r)};function u(r){return a((function(){var e=this,o=Array.prototype.slice.call(arguments,0),n={shim:e,method:r,args:o,ts:new Date};window._rollbarShims[this.shimId()].messages.push(n)}))}i.prototype.loadFull=function(r,e,o,n,t){var l=!1,i=e.createElement("script"),s=e.getElementsByTagName("script")[0],d=s.parentNode;i.crossOrigin="",i.src=n.rollbarJsUrl,o||(i.async=!0),i.onload=i.onreadystatechange=a((function(){if(!(l||this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState)){i.onload=i.onreadystatechange=null;try{d.removeChild(i)}catch(r){}l=!0,function(){var e;if(void 0===r._rollbarDidLoad){e=new Error("rollbar.js did not load");for(var o,n,a,l,i=0;o=r._rollbarShims[i++];)for(o=o.messages||[];n=o.shift();)for(a=n.args||[],i=0;i diff --git a/examples/snippet.html b/examples/snippet.html index 9d3b192fd..5b351f930 100644 --- a/examples/snippet.html +++ b/examples/snippet.html @@ -13,7 +13,7 @@ diff --git a/examples/test.html b/examples/test.html index f06b76700..d7fc037cd 100644 --- a/examples/test.html +++ b/examples/test.html @@ -35,7 +35,7 @@ diff --git a/examples/universal-browser/test-with-non-default-options.html b/examples/universal-browser/test-with-non-default-options.html index 9b8737a47..73f7fb9a5 100644 --- a/examples/universal-browser/test-with-non-default-options.html +++ b/examples/universal-browser/test-with-non-default-options.html @@ -15,7 +15,7 @@ diff --git a/examples/universal-browser/test.html b/examples/universal-browser/test.html index b37196728..3b6ff5257 100644 --- a/examples/universal-browser/test.html +++ b/examples/universal-browser/test.html @@ -35,7 +35,7 @@ ``` @@ -33,45 +33,50 @@ Add an html element with "bait" class names to be removed by adblockers. ```html -
+
``` Add functions to check for the presence and visibility of our bait div. ```js - function disableRollbar() { - Rollbar.configure({enabled: false}); - } - - function checkForAds() { - var bait = document.getElementById("blocker-bait"); +function disableRollbar() { + Rollbar.configure({ enabled: false }); +} - if (bait == null) { - disableRollbar(); - return; - } - - var baitStyles = window.getComputedStyle(bait); - if (baitStyles && ( - baitStyles.getPropertyValue('display') === 'none' || - baitStyles.getPropertyValue('visibility') === 'hidden')) { - disableRollbar(); - } - } +function checkForAds() { + var bait = document.getElementById('blocker-bait'); - function onLoadStartAdCheck() { - // Ad blockers generally execute just after load, let's delay ourselves to get behind it. - setTimeout(checkForAds, 1); + if (bait == null) { + disableRollbar(); + return; } - if (window.addEventListener !== undefined) { - window.addEventListener('load', onLoadStartAdCheck, false); - } else { - window.attachEvent('onload', onLoadStartAdCheck); + var baitStyles = window.getComputedStyle(bait); + if ( + baitStyles && + (baitStyles.getPropertyValue('display') === 'none' || + baitStyles.getPropertyValue('visibility') === 'hidden') + ) { + disableRollbar(); } +} + +function onLoadStartAdCheck() { + // Ad blockers generally execute just after load, let's delay ourselves to get behind it. + setTimeout(checkForAds, 1); +} + +if (window.addEventListener !== undefined) { + window.addEventListener('load', onLoadStartAdCheck, false); +} else { + window.attachEvent('onload', onLoadStartAdCheck); +} ``` -The above approach is likely to work in the majority of cases, *but it is not foolproof*. Extensions and their +The above approach is likely to work in the majority of cases, _but it is not foolproof_. Extensions and their behavior evolve over time and nothing stops a user from opening their console and modifying / executing code as well. A practical approach involves incrementally adjusting your detection as new exceptions occur in large numbers. diff --git a/docs/migration_v0_to_v1.md b/docs/migration_v0_to_v1.md index 2e4327123..48bb03c1a 100644 --- a/docs/migration_v0_to_v1.md +++ b/docs/migration_v0_to_v1.md @@ -7,19 +7,20 @@ ### Change the config object: ```js -var _rollbarParams = {"server.environment": "production"}; -_rollbarParams["notifier.snippet_version"] = "2"; var _rollbar=["POST_CLIENT_ITEM_ACCESS_TOKEN", _rollbarParams]; +var _rollbarParams = { 'server.environment': 'production' }; +_rollbarParams['notifier.snippet_version'] = '2'; +var _rollbar = ['POST_CLIENT_ITEM_ACCESS_TOKEN', _rollbarParams]; ``` -to +to ```js var _rollbarConfig = { - accessToken: "POST_CLIENT_ITEM_ACCESS_TOKEN", + accessToken: 'POST_CLIENT_ITEM_ACCESS_TOKEN', captureUncaught: true, payload: { - environment: "production" - } + environment: 'production', + }, }; ``` @@ -29,21 +30,21 @@ e.g. ```js var _rollbarParams = { - checkIgnore: function(msg, url, lineNo, colNo, error) { + checkIgnore: function (msg, url, lineNo, colNo, error) { // don't ignore anything (default) return false; }, - context: "home#index", + context: 'home#index', itemsPerMinute: 60, - level: "error", + level: 'error', person: { id: 12345, - username: "johndoe", - email: "johndoe@example.com" + username: 'johndoe', + email: 'johndoe@example.com', }, - "server.branch": "develop", - "server.environment": "staging", - "server.host": "web1" + 'server.branch': 'develop', + 'server.environment': 'staging', + 'server.host': 'web1', }; ``` @@ -51,28 +52,28 @@ should be changed to ```js var _rollbarConfig = { - accessToken: "POST_CLIENT_ITEM_ACCESS_TOKEN", + accessToken: 'POST_CLIENT_ITEM_ACCESS_TOKEN', captureUncaught: true, - checkIgnore: function(msg, url, lineNo, colNo, error) { + checkIgnore: function (msg, url, lineNo, colNo, error) { // don't ignore anything (default) return false; }, itemsPerMinute: 60, - logLevel: "error", + logLevel: 'error', payload: { - environment: "production", - context: "home#index", + environment: 'production', + context: 'home#index', person: { id: 12345, - username: "johndoe", - email: "johndoe@example.com" + username: 'johndoe', + email: 'johndoe@example.com', }, server: { - branch: "develop", - environment: "staging", - host: "web1" - } - } + branch: 'develop', + environment: 'staging', + host: 'web1', + }, + }, }; ``` @@ -80,7 +81,6 @@ var _rollbarConfig = { For the latest snippet, see the instructions here: [https://rollbar.com/docs/notifier/rollbar.js/](https://rollbar.com/docs/notifier/rollbar.js/). - ## Update references to `_rollbar.push()` The v1 notifier has a more intuitive interface for recording errors and generic logging. @@ -118,19 +118,18 @@ try { } ``` - ### Recording a log message From ```js -_rollbar.push("Some log message"); +_rollbar.push('Some log message'); ``` to ```js -Rollbar.info("Some log message"); +Rollbar.info('Some log message'); ``` #### Including custom data @@ -138,13 +137,17 @@ Rollbar.info("Some log message"); From ```js -_rollbar.push({level: "warning", msg: "Some warning message", point: {x: 5, y: 10}}); +_rollbar.push({ + level: 'warning', + msg: 'Some warning message', + point: { x: 5, y: 10 }, +}); ``` to ```js -Rollbar.warning("Some warning message", {point: {x: 5, y: 10}}); +Rollbar.warning('Some warning message', { point: { x: 5, y: 10 } }); ``` #### Using callbacks @@ -155,11 +158,11 @@ From try { doSomething(); } catch (e) { - _rollbar.push(e, function(err, uuid) { + _rollbar.push(e, function (err, uuid) { if (err !== null) { - console.error("Could not report an exception to Rollbar, error: " + err); + console.error('Could not report an exception to Rollbar, error: ' + err); } else { - console.log("Reported exception to Rollbar, uuid: " + uuid); + console.log('Reported exception to Rollbar, uuid: ' + uuid); } }); } @@ -171,11 +174,11 @@ to try { doSomething(); } catch (e) { - Rollbar.log(e, function(err, uuid) { + Rollbar.log(e, function (err, uuid) { if (err !== null) { - console.error("Could not report an exception to Rollbar, error: " + err); + console.error('Could not report an exception to Rollbar, error: ' + err); } else { - console.log("Reported exception to Rollbar, uuid: " + uuid); + console.log('Reported exception to Rollbar, uuid: ' + uuid); } }); } diff --git a/examples/angular2/angular.json b/examples/angular2/angular.json index 88b3a7c0d..3d993ee20 100644 --- a/examples/angular2/angular.json +++ b/examples/angular2/angular.json @@ -18,13 +18,8 @@ "main": "src/main.ts", "polyfills": "src/polyfills.ts", "tsConfig": "src/tsconfig.app.json", - "assets": [ - "src/favicon.ico", - "src/assets" - ], - "styles": [ - "src/styles.css" - ], + "assets": ["src/favicon.ico", "src/assets"], + "styles": ["src/styles.css"], "scripts": [], "es5BrowserSupport": true }, @@ -79,26 +74,16 @@ "polyfills": "src/polyfills.ts", "tsConfig": "src/tsconfig.spec.json", "karmaConfig": "src/karma.conf.js", - "styles": [ - "src/styles.css" - ], + "styles": ["src/styles.css"], "scripts": [], - "assets": [ - "src/favicon.ico", - "src/assets" - ] + "assets": ["src/favicon.ico", "src/assets"] } }, "lint": { "builder": "@angular-devkit/build-angular:tslint", "options": { - "tsConfig": [ - "src/tsconfig.app.json", - "src/tsconfig.spec.json" - ], - "exclude": [ - "**/node_modules/**" - ] + "tsConfig": ["src/tsconfig.app.json", "src/tsconfig.spec.json"], + "exclude": ["**/node_modules/**"] } } } @@ -124,13 +109,11 @@ "builder": "@angular-devkit/build-angular:tslint", "options": { "tsConfig": "e2e/tsconfig.e2e.json", - "exclude": [ - "**/node_modules/**" - ] + "exclude": ["**/node_modules/**"] } } } } }, "defaultProject": "my-app" -} \ No newline at end of file +} diff --git a/examples/angular2/e2e/protractor.conf.js b/examples/angular2/e2e/protractor.conf.js index 86776a391..98bba7090 100644 --- a/examples/angular2/e2e/protractor.conf.js +++ b/examples/angular2/e2e/protractor.conf.js @@ -5,11 +5,9 @@ const { SpecReporter } = require('jasmine-spec-reporter'); exports.config = { allScriptsTimeout: 11000, - specs: [ - './src/**/*.e2e-spec.ts' - ], + specs: ['./src/**/*.e2e-spec.ts'], capabilities: { - 'browserName': 'chrome' + browserName: 'chrome', }, directConnect: true, baseUrl: 'http://localhost:4200/', @@ -17,12 +15,14 @@ exports.config = { jasmineNodeOpts: { showColors: true, defaultTimeoutInterval: 30000, - print: function() {} + print: function () {}, }, onPrepare() { require('ts-node').register({ - project: require('path').join(__dirname, './tsconfig.e2e.json') + project: require('path').join(__dirname, './tsconfig.e2e.json'), }); - jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } })); - } -}; \ No newline at end of file + jasmine + .getEnv() + .addReporter(new SpecReporter({ spec: { displayStacktrace: true } })); + }, +}; diff --git a/examples/angular2/e2e/src/app.e2e-spec.ts b/examples/angular2/e2e/src/app.e2e-spec.ts index 3b79f7c47..12ba22b16 100644 --- a/examples/angular2/e2e/src/app.e2e-spec.ts +++ b/examples/angular2/e2e/src/app.e2e-spec.ts @@ -16,8 +16,10 @@ describe('workspace-project App', () => { afterEach(async () => { // Assert that there are no errors emitted from the browser const logs = await browser.manage().logs().get(logging.Type.BROWSER); - expect(logs).not.toContain(jasmine.objectContaining({ - level: logging.Level.SEVERE, - } as logging.Entry)); + expect(logs).not.toContain( + jasmine.objectContaining({ + level: logging.Level.SEVERE, + } as logging.Entry), + ); }); }); diff --git a/examples/angular2/e2e/tsconfig.e2e.json b/examples/angular2/e2e/tsconfig.e2e.json index a6dd62202..22e04cb18 100644 --- a/examples/angular2/e2e/tsconfig.e2e.json +++ b/examples/angular2/e2e/tsconfig.e2e.json @@ -4,10 +4,6 @@ "outDir": "../out-tsc/app", "module": "commonjs", "target": "es5", - "types": [ - "jasmine", - "jasminewd2", - "node" - ] + "types": ["jasmine", "jasminewd2", "node"] } -} \ No newline at end of file +} diff --git a/examples/angular2/src/app/app-routing.module.ts b/examples/angular2/src/app/app-routing.module.ts index d425c6f56..11c2e8407 100644 --- a/examples/angular2/src/app/app-routing.module.ts +++ b/examples/angular2/src/app/app-routing.module.ts @@ -5,6 +5,6 @@ const routes: Routes = []; @NgModule({ imports: [RouterModule.forRoot(routes)], - exports: [RouterModule] + exports: [RouterModule], }) -export class AppRoutingModule { } +export class AppRoutingModule {} diff --git a/examples/angular2/src/app/app.component.html b/examples/angular2/src/app/app.component.html index b0c533d70..62e304ba1 100644 --- a/examples/angular2/src/app/app.component.html +++ b/examples/angular2/src/app/app.component.html @@ -1,8 +1,6 @@ -
-

- Rollbar example for Angular 2+ -

+
+

Rollbar example for Angular 2+

diff --git a/examples/angular2/src/app/app.component.spec.ts b/examples/angular2/src/app/app.component.spec.ts index 3fe58ce0f..b9031c734 100644 --- a/examples/angular2/src/app/app.component.spec.ts +++ b/examples/angular2/src/app/app.component.spec.ts @@ -5,12 +5,8 @@ import { AppComponent } from './app.component'; describe('AppComponent', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - imports: [ - RouterTestingModule - ], - declarations: [ - AppComponent - ], + imports: [RouterTestingModule], + declarations: [AppComponent], }).compileComponents(); })); @@ -30,6 +26,8 @@ describe('AppComponent', () => { const fixture = TestBed.createComponent(AppComponent); fixture.detectChanges(); const compiled = fixture.debugElement.nativeElement; - expect(compiled.querySelector('h1').textContent).toContain('Welcome to my-app!'); + expect(compiled.querySelector('h1').textContent).toContain( + 'Welcome to my-app!', + ); }); }); diff --git a/examples/angular2/src/app/app.component.ts b/examples/angular2/src/app/app.component.ts index 2fbc3e4f7..5fd4783e1 100644 --- a/examples/angular2/src/app/app.component.ts +++ b/examples/angular2/src/app/app.component.ts @@ -5,10 +5,13 @@ import * as Rollbar from 'rollbar'; @Component({ selector: 'app-root', templateUrl: './app.component.html', - styleUrls: ['./app.component.css'] + styleUrls: ['./app.component.css'], }) export class AppComponent { - constructor(@Inject(RollbarService) private rollbar: Rollbar, private ngZone: NgZone) { + constructor( + @Inject(RollbarService) private rollbar: Rollbar, + private ngZone: NgZone, + ) { // Used by rollbar.js tests window['angularAppComponent'] = this; } diff --git a/examples/angular2/src/app/app.module.ts b/examples/angular2/src/app/app.module.ts index 9b6427d67..dec95454c 100644 --- a/examples/angular2/src/app/app.module.ts +++ b/examples/angular2/src/app/app.module.ts @@ -5,19 +5,13 @@ import { AppRoutingModule } from './app-routing.module'; import { AppComponent } from './app.component'; import { RollbarService, rollbarFactory, RollbarErrorHandler } from './rollbar'; - @NgModule({ - declarations: [ - AppComponent - ], - imports: [ - BrowserModule, - AppRoutingModule - ], + declarations: [AppComponent], + imports: [BrowserModule, AppRoutingModule], providers: [ { provide: ErrorHandler, useClass: RollbarErrorHandler }, - { provide: RollbarService, useFactory: rollbarFactory } + { provide: RollbarService, useFactory: rollbarFactory }, ], - bootstrap: [AppComponent] + bootstrap: [AppComponent], }) export class AppModule {} diff --git a/examples/angular2/src/app/rollbar.ts b/examples/angular2/src/app/rollbar.ts index 38e2f2a1d..9cabd196d 100644 --- a/examples/angular2/src/app/rollbar.ts +++ b/examples/angular2/src/app/rollbar.ts @@ -3,10 +3,10 @@ import { Injectable, Inject, InjectionToken, - ErrorHandler + ErrorHandler, } from '@angular/core'; -const rollbarConfig:Rollbar.Configuration = { +const rollbarConfig: Rollbar.Configuration = { accessToken: 'POST_CLIENT_ITEM_TOKEN', captureUncaught: true, captureUnhandledRejections: true, @@ -16,7 +16,7 @@ const rollbarConfig:Rollbar.Configuration = { wrapGlobalEventHandlers: false, scrubRequestBody: true, exitOnUncaughtException: false, - stackTraceLimit: 20 + stackTraceLimit: 20, }; export const RollbarService = new InjectionToken('rollbar'); @@ -25,7 +25,7 @@ export const RollbarService = new InjectionToken('rollbar'); export class RollbarErrorHandler implements ErrorHandler { constructor(@Inject(RollbarService) private rollbar: Rollbar) {} - handleError(err:any) : void { + handleError(err: any): void { this.rollbar.error(err.originalError || err); } } diff --git a/examples/angular2/src/environments/environment.prod.ts b/examples/angular2/src/environments/environment.prod.ts index 3612073bc..c9669790b 100644 --- a/examples/angular2/src/environments/environment.prod.ts +++ b/examples/angular2/src/environments/environment.prod.ts @@ -1,3 +1,3 @@ export const environment = { - production: true + production: true, }; diff --git a/examples/angular2/src/environments/environment.ts b/examples/angular2/src/environments/environment.ts index 7b4f817ad..99c3763ca 100644 --- a/examples/angular2/src/environments/environment.ts +++ b/examples/angular2/src/environments/environment.ts @@ -3,7 +3,7 @@ // The list of file replacements can be found in `angular.json`. export const environment = { - production: false + production: false, }; /* diff --git a/examples/angular2/src/index.html b/examples/angular2/src/index.html index 0450fa57c..06a1b03e7 100644 --- a/examples/angular2/src/index.html +++ b/examples/angular2/src/index.html @@ -1,14 +1,14 @@ - - - MyApp - + + + MyApp + - - - - - - + + + + + + diff --git a/examples/angular2/src/karma.conf.js b/examples/angular2/src/karma.conf.js index 5934e22d1..c5f0bfc23 100644 --- a/examples/angular2/src/karma.conf.js +++ b/examples/angular2/src/karma.conf.js @@ -10,15 +10,15 @@ module.exports = function (config) { require('karma-chrome-launcher'), require('karma-jasmine-html-reporter'), require('karma-coverage-istanbul-reporter'), - require('@angular-devkit/build-angular/plugins/karma') + require('@angular-devkit/build-angular/plugins/karma'), ], client: { - clearContext: false // leave Jasmine Spec Runner output visible in browser + clearContext: false, // leave Jasmine Spec Runner output visible in browser }, coverageIstanbulReporter: { dir: require('path').join(__dirname, '../coverage/my-app'), reports: ['html', 'lcovonly', 'text-summary'], - fixWebpackSourcePaths: true + fixWebpackSourcePaths: true, }, reporters: ['progress', 'kjhtml'], port: 9876, @@ -27,6 +27,6 @@ module.exports = function (config) { autoWatch: true, browsers: ['Chrome'], singleRun: false, - restartOnFileChange: true + restartOnFileChange: true, }); }; diff --git a/examples/angular2/src/main.ts b/examples/angular2/src/main.ts index c7b673cf4..d9a2e7e4a 100644 --- a/examples/angular2/src/main.ts +++ b/examples/angular2/src/main.ts @@ -8,5 +8,6 @@ if (environment.production) { enableProdMode(); } -platformBrowserDynamic().bootstrapModule(AppModule) - .catch(err => console.error(err)); +platformBrowserDynamic() + .bootstrapModule(AppModule) + .catch((err) => console.error(err)); diff --git a/examples/angular2/src/polyfills.ts b/examples/angular2/src/polyfills.ts index 75d639398..d15a1152a 100644 --- a/examples/angular2/src/polyfills.ts +++ b/examples/angular2/src/polyfills.ts @@ -55,8 +55,7 @@ /*************************************************************************************************** * Zone JS is required by default for Angular itself. */ -import 'zone.js/dist/zone'; // Included with Angular CLI. - +import 'zone.js/dist/zone'; // Included with Angular CLI. /*************************************************************************************************** * APPLICATION IMPORTS diff --git a/examples/angular2/src/test.ts b/examples/angular2/src/test.ts index 16317897b..b6d614daa 100644 --- a/examples/angular2/src/test.ts +++ b/examples/angular2/src/test.ts @@ -4,7 +4,7 @@ import 'zone.js/dist/zone-testing'; import { getTestBed } from '@angular/core/testing'; import { BrowserDynamicTestingModule, - platformBrowserDynamicTesting + platformBrowserDynamicTesting, } from '@angular/platform-browser-dynamic/testing'; declare const require: any; @@ -12,7 +12,7 @@ declare const require: any; // First, initialize the Angular testing environment. getTestBed().initTestEnvironment( BrowserDynamicTestingModule, - platformBrowserDynamicTesting() + platformBrowserDynamicTesting(), ); // Then we find all the tests. const context = require.context('./', true, /\.spec\.ts$/); diff --git a/examples/angular2/src/tsconfig.app.json b/examples/angular2/src/tsconfig.app.json index 190fd300b..fb7c566bc 100644 --- a/examples/angular2/src/tsconfig.app.json +++ b/examples/angular2/src/tsconfig.app.json @@ -4,8 +4,5 @@ "outDir": "../out-tsc/app", "types": [] }, - "exclude": [ - "test.ts", - "**/*.spec.ts" - ] + "exclude": ["test.ts", "**/*.spec.ts"] } diff --git a/examples/angular2/src/tsconfig.spec.json b/examples/angular2/src/tsconfig.spec.json index de7733630..70add2d52 100644 --- a/examples/angular2/src/tsconfig.spec.json +++ b/examples/angular2/src/tsconfig.spec.json @@ -2,17 +2,8 @@ "extends": "../tsconfig.json", "compilerOptions": { "outDir": "../out-tsc/spec", - "types": [ - "jasmine", - "node" - ] + "types": ["jasmine", "node"] }, - "files": [ - "test.ts", - "polyfills.ts" - ], - "include": [ - "**/*.spec.ts", - "**/*.d.ts" - ] + "files": ["test.ts", "polyfills.ts"], + "include": ["**/*.spec.ts", "**/*.d.ts"] } diff --git a/examples/angular2/src/tslint.json b/examples/angular2/src/tslint.json index aa7c3eeb7..ca6ba8c9e 100644 --- a/examples/angular2/src/tslint.json +++ b/examples/angular2/src/tslint.json @@ -1,17 +1,7 @@ { "extends": "../tslint.json", "rules": { - "directive-selector": [ - true, - "attribute", - "app", - "camelCase" - ], - "component-selector": [ - true, - "element", - "app", - "kebab-case" - ] + "directive-selector": [true, "attribute", "app", "camelCase"], + "component-selector": [true, "element", "app", "kebab-case"] } } diff --git a/examples/angular2/tsconfig.json b/examples/angular2/tsconfig.json index 951c1748c..08df71159 100644 --- a/examples/angular2/tsconfig.json +++ b/examples/angular2/tsconfig.json @@ -12,12 +12,7 @@ "importHelpers": true, "strictNullChecks": true, "target": "es5", - "typeRoots": [ - "node_modules/@types" - ], - "lib": [ - "es2018", - "dom" - ] + "typeRoots": ["node_modules/@types"], + "lib": ["es2018", "dom"] } } diff --git a/examples/angular2/tslint.json b/examples/angular2/tslint.json index 868ecba0d..5aadf5b50 100644 --- a/examples/angular2/tslint.json +++ b/examples/angular2/tslint.json @@ -1,24 +1,16 @@ { "extends": "tslint:recommended", - "rulesDirectory": [ - "codelyzer" - ], + "rulesDirectory": ["codelyzer"], "rules": { "array-type": false, "arrow-parens": false, "deprecation": { "severity": "warn" }, - "import-blacklist": [ - true, - "rxjs/Rx" - ], + "import-blacklist": [true, "rxjs/Rx"], "interface-name": false, "max-classes-per-file": false, - "max-line-length": [ - true, - 140 - ], + "max-line-length": [true, 140], "member-access": false, "member-ordering": [ true, @@ -32,34 +24,18 @@ } ], "no-consecutive-blank-lines": false, - "no-console": [ - true, - "debug", - "info", - "time", - "timeEnd", - "trace" - ], + "no-console": [true, "debug", "info", "time", "timeEnd", "trace"], "no-empty": false, - "no-inferrable-types": [ - true, - "ignore-params" - ], + "no-inferrable-types": [true, "ignore-params"], "no-non-null-assertion": true, "no-redundant-jsdoc": true, "no-switch-case-fall-through": true, "no-use-before-declare": true, "no-var-requires": false, - "object-literal-key-quotes": [ - true, - "as-needed" - ], + "object-literal-key-quotes": [true, "as-needed"], "object-literal-sort-keys": false, "ordered-imports": false, - "quotemark": [ - true, - "single" - ], + "quotemark": [true, "single"], "trailing-comma": false, "no-output-on-prefix": true, "use-input-property-decorator": true, diff --git a/examples/bower/README.md b/examples/bower/README.md index d4ad721f0..e50a59beb 100644 --- a/examples/bower/README.md +++ b/examples/bower/README.md @@ -1,33 +1,38 @@ # Using Rollbar with [Bower](http://bower.io/) - Install rollbar.js + ``` bower install rollbar --save ``` + - Add the `_rollbarConfig` configuration to the `` of your page. + ```html ``` + - Include the Rollbar snippet just below `_rollbarConfig`. + ```html diff --git a/examples/bower/index.html b/examples/bower/index.html index efa96fd43..259ddd053 100644 --- a/examples/bower/index.html +++ b/examples/bower/index.html @@ -2,24 +2,24 @@ diff --git a/examples/browser_extension_v2/README.md b/examples/browser_extension_v2/README.md index 85029aa29..dea1da339 100644 --- a/examples/browser_extension_v2/README.md +++ b/examples/browser_extension_v2/README.md @@ -5,9 +5,9 @@ and in the content script of a Chrome/Chromium or Firefox manifest v2 extension. To load and run this demo: -* Add your Rolllbar client token (config.js for client script, background.js for background script.) -* Enable developer mode for extensions in Chrome -* Click 'Load unpacked extension', and select this folder to load. +- Add your Rolllbar client token (config.js for client script, background.js for background script.) +- Enable developer mode for extensions in Chrome +- Click 'Load unpacked extension', and select this folder to load. The background script outputs to a separate console accessed from the extensions panel in Chrome. @@ -18,16 +18,19 @@ Firefox has slightly different manifest.json requirements. This example is writt so that the same manifest.json can be used across all browsers. ### content_security_policy + According to the browser extension spec, it should be OK to only set `default-src`. This won't work for Firefox, which requires setting both `script-src` and `object-src`. This example uses the Firefox compatible content security policy, since it also works fine on Chrome and Edge. ### background.persistent + Firefox emits a warning when the `background.persistent` key is set false. This example sets the key true, as this setting works across all browsers. ### Rollbar configuration + There are some limitations on Firefox in the content script. The background script is not affected by these limitations. diff --git a/examples/browser_extension_v2/background.js b/examples/browser_extension_v2/background.js index ebbfae367..a546f5ac5 100644 --- a/examples/browser_extension_v2/background.js +++ b/examples/browser_extension_v2/background.js @@ -7,7 +7,7 @@ console.log('Background extension is running.'); var _rollbarConfig = { accessToken: 'ROLLBAR_CLIENT_TOKEN', captureUncaught: true, - captureUnhandledRejections: true + captureUnhandledRejections: true, }; // Rollbar Snippet diff --git a/examples/browser_extension_v2/config.js b/examples/browser_extension_v2/config.js index 2aff73d83..b3015639b 100644 --- a/examples/browser_extension_v2/config.js +++ b/examples/browser_extension_v2/config.js @@ -1,11 +1,10 @@ - window._rollbarConfig = { accessToken: 'ROLLBAR_CLIENT_TOKEN', captureUncaught: false, // Only required for Firefox, other browser targets - // may set true. See README. + // may set true. See README. captureUnhandledRejections: true, autoInstrument: { - network: false // Only required for Firefox, other browser targets - // may set true. See README. - } + network: false, // Only required for Firefox, other browser targets + // may set true. See README. + }, }; diff --git a/examples/browser_extension_v2/manifest.json b/examples/browser_extension_v2/manifest.json index f4fb79e7c..de56b81fb 100644 --- a/examples/browser_extension_v2/manifest.json +++ b/examples/browser_extension_v2/manifest.json @@ -5,13 +5,13 @@ "permissions": ["storage", "activeTab", "https://api.rollbar.com/"], "content_security_policy": "script-src 'self' https://cdn.rollbar.com; object-src 'self' https://cdn.rollbar.com;", "background": { - "scripts": ["background.js"], - "persistent": true + "scripts": ["background.js"], + "persistent": true }, - "content_scripts": [ - { - "matches": ["*://*/*"], - "js": ["config.js", "rollbar.min.js", "content_script.js"] - } - ] + "content_scripts": [ + { + "matches": ["*://*/*"], + "js": ["config.js", "rollbar.min.js", "content_script.js"] + } + ] } diff --git a/examples/browser_extension_v3/README.md b/examples/browser_extension_v3/README.md index 732ad9250..4b135f5d7 100644 --- a/examples/browser_extension_v3/README.md +++ b/examples/browser_extension_v3/README.md @@ -5,9 +5,9 @@ and in the content script of a Chrome/Chromium manifest v3 extension. To load and run this demo: -* Add your Rolllbar client token (config.js for client script, service-worker.js for background script.) -* Enable developer mode for extensions in Chrome -* Click 'Load unpacked extension', and select this folder to load. +- Add your Rolllbar client token (config.js for client script, service-worker.js for background script.) +- Enable developer mode for extensions in Chrome +- Click 'Load unpacked extension', and select this folder to load. The background script outputs to a separate console accessed from the extensions panel in Chrome. diff --git a/examples/browser_extension_v3/config.js b/examples/browser_extension_v3/config.js index ab86240b1..8577ba900 100644 --- a/examples/browser_extension_v3/config.js +++ b/examples/browser_extension_v3/config.js @@ -1,6 +1,5 @@ - window._rollbarConfig = { accessToken: 'ROLLBAR_CLIENT_TOKEN', captureUncaught: true, - captureUnhandledRejections: true + captureUnhandledRejections: true, }; diff --git a/examples/browser_extension_v3/service-worker.js b/examples/browser_extension_v3/service-worker.js index 361b50b7d..b7352ff9f 100644 --- a/examples/browser_extension_v3/service-worker.js +++ b/examples/browser_extension_v3/service-worker.js @@ -3,7 +3,7 @@ console.log('Background extension is running.'); const _rollbarConfig = { accessToken: 'ROLLBAR_CLIENT_TOKEN', captureUncaught: true, - captureUnhandledRejections: true + captureUnhandledRejections: true, }; // When using es6 module @@ -17,12 +17,12 @@ rollbar.init(_rollbarConfig); // log a generic message and send to rollbar rollbar.info('Service worker message'); -self.addEventListener("install", (event) => { +self.addEventListener('install', (event) => { console.log('Chrome ext service worker install event', event); rollbar.info('Chrome ext service worker install event'); }); -self.addEventListener("activate", (event) => { +self.addEventListener('activate', (event) => { console.log('Chrome ext service worker activate event', event); rollbar.info('Chrome ext service worker activate event'); }); diff --git a/examples/browserify/README.md b/examples/browserify/README.md index a2a15e1eb..d3e1a0616 100644 --- a/examples/browserify/README.md +++ b/examples/browserify/README.md @@ -11,7 +11,7 @@ var rollbarConfig = { captureUncaught: true, payload: { environment: 'development', - } + }, }; var Rollbar = rollbar.init(rollbarConfig); window.Rollbar = Rollbar; @@ -29,9 +29,10 @@ try { ``` ## To build and test the example + 1. Edit index.js and add your Rollbar `POST_CLIENT_ITEM_ACCESS_TOKEN` - Sign up for a free account [here](https://rollbar.com/signup/) -2. ```browserify index.js > all.js``` +2. `browserify index.js > all.js` 3. Open test.html in your browser and click the button 4. Go to your project dashboard and see the error diff --git a/examples/browserify/index.js b/examples/browserify/index.js index 20e61c917..24afbd396 100644 --- a/examples/browserify/index.js +++ b/examples/browserify/index.js @@ -5,7 +5,7 @@ var rollbarConfig = { captureUncaught: true, payload: { environment: 'development', - } + }, }; var Rollbar = rollbar.init(rollbarConfig); diff --git a/examples/csp-errors.html b/examples/csp-errors.html index df17e531f..9c239cc60 100644 --- a/examples/csp-errors.html +++ b/examples/csp-errors.html @@ -1,10 +1,9 @@ - - - Generate CSP error for test automation - - - - + + + Generate CSP error for test automation + + + diff --git a/examples/error.html b/examples/error.html index 9202d68c6..4f7d9c324 100644 --- a/examples/error.html +++ b/examples/error.html @@ -1,49 +1,61 @@ - - - Generate errors for test automation - - - - -
-

- Generate errors for test automation -

-
- - - - + // set hash location + window.location.hash = 'test'; + }; + + + +
+

Generate errors for test automation

+
+ + + + + diff --git a/examples/extension-exceptions/test.html b/examples/extension-exceptions/test.html index ded6fa72c..155b4e727 100644 --- a/examples/extension-exceptions/test.html +++ b/examples/extension-exceptions/test.html @@ -1,53 +1,64 @@ - - - - -
- - - - - + + + + +
+ + + + + diff --git a/examples/functions.js b/examples/functions.js index 9dbba52ab..12a0788f5 100644 --- a/examples/functions.js +++ b/examples/functions.js @@ -3,7 +3,7 @@ function functionA() { try { var a = b; - } catch(e) { + } catch (e) { Rollbar.error(e); } diff --git a/examples/include_custom_object.html b/examples/include_custom_object.html index 1982723b0..6cd05d133 100644 --- a/examples/include_custom_object.html +++ b/examples/include_custom_object.html @@ -2,15 +2,15 @@ - -

- -

- See results: rollbar/rollbar.js#420 - + +

+ +

+ See results: + rollbar/rollbar.js#420 diff --git a/examples/itemsPerMinute.html b/examples/itemsPerMinute.html index a13184e6c..2974f848d 100644 --- a/examples/itemsPerMinute.html +++ b/examples/itemsPerMinute.html @@ -2,13 +2,13 @@ diff --git a/examples/no-conflict/README.md b/examples/no-conflict/README.md index a97c0e3bf..ecc66de1e 100644 --- a/examples/no-conflict/README.md +++ b/examples/no-conflict/README.md @@ -1,5 +1,5 @@ -* npm install -* npm start +- npm install +- npm start This only uses a server to get around CORS for loading the rollbar library from a local file via the snippet. diff --git a/examples/no-conflict/server.js b/examples/no-conflict/server.js index 9b342d384..982a0c7ed 100644 --- a/examples/no-conflict/server.js +++ b/examples/no-conflict/server.js @@ -27,5 +27,9 @@ app.listen(port, '0.0.0.0', function onStart(err) { if (err) { console.log(err); } - console.info('==> 🌎 Listening on port %s. Open up http://0.0.0.0:%s/ in your browser.', port, port); + console.info( + '==> 🌎 Listening on port %s. Open up http://0.0.0.0:%s/ in your browser.', + port, + port, + ); }); diff --git a/examples/no-conflict/test.html b/examples/no-conflict/test.html index 1f904e546..2dc6d71e9 100644 --- a/examples/no-conflict/test.html +++ b/examples/no-conflict/test.html @@ -1,15 +1,13 @@ @@ -39,7 +37,7 @@ !function(r){var e={};function o(n){if(e[n])return e[n].exports;var t=e[n]={i:n,l:!1,exports:{}};return r[n].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.m=r,o.c=e,o.d=function(r,e,n){o.o(r,e)||Object.defineProperty(r,e,{enumerable:!0,get:n})},o.r=function(r){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},o.t=function(r,e){if(1&e&&(r=o(r)),8&e)return r;if(4&e&&"object"==typeof r&&r&&r.__esModule)return r;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:r}),2&e&&"string"!=typeof r)for(var t in r)o.d(n,t,function(e){return r[e]}.bind(null,t));return n},o.n=function(r){var e=r&&r.__esModule?function(){return r.default}:function(){return r};return o.d(e,"a",e),e},o.o=function(r,e){return Object.prototype.hasOwnProperty.call(r,e)},o.p="",o(o.s=0)}([function(r,e,o){"use strict";var n=o(1),t=o(5);_rollbarConfig=_rollbarConfig||{},_rollbarConfig.rollbarJsUrl=_rollbarConfig.rollbarJsUrl||"https://cdn.rollbar.com/rollbarjs/refs/tags/v2.26.3/rollbar.min.js",_rollbarConfig.async=void 0===_rollbarConfig.async||_rollbarConfig.async;var a=n.setupShim(window,_rollbarConfig),l=t(_rollbarConfig);window.rollbar=n.Rollbar,a.loadFull(window,document,!_rollbarConfig.async,_rollbarConfig,l)},function(r,e,o){"use strict";var n=o(2),t=o(3);function a(r){return function(){try{return r.apply(this,arguments)}catch(r){try{console.error("[Rollbar]: Internal error",r)}catch(r){}}}}var l=0;function i(r,e){this.options=r,this._rollbarOldOnError=null;var o=l++;this.shimId=function(){return o},"undefined"!=typeof window&&window._rollbarShims&&(window._rollbarShims[o]={handler:e,messages:[]})}var s=o(4),d=function(r,e){return new i(r,e)},c=function(r){return new s(d,r)};function u(r){return a((function(){var e=this,o=Array.prototype.slice.call(arguments,0),n={shim:e,method:r,args:o,ts:new Date};window._rollbarShims[this.shimId()].messages.push(n)}))}i.prototype.loadFull=function(r,e,o,n,t){var l=!1,i=e.createElement("script"),s=e.getElementsByTagName("script")[0],d=s.parentNode;i.crossOrigin="",i.src=n.rollbarJsUrl,o||(i.async=!0),i.onload=i.onreadystatechange=a((function(){if(!(l||this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState)){i.onload=i.onreadystatechange=null;try{d.removeChild(i)}catch(r){}l=!0,function(){var e;if(void 0===r._rollbarDidLoad){e=new Error("rollbar.js did not load");for(var o,n,a,l,i=0;o=r._rollbarShims[i++];)for(o=o.messages||[];n=o.shift();)for(a=n.args||[],i=0;i - + diff --git a/examples/no-conflict/tool.js b/examples/no-conflict/tool.js index 9ec6ebbc7..f1a706550 100644 --- a/examples/no-conflict/tool.js +++ b/examples/no-conflict/tool.js @@ -4,9 +4,9 @@ var Rollbar = require('rollbar/dist/rollbar.noconflict.umd'); const rollbar = new Rollbar({ accessToken: 'POST_CLIENT_ITEM_TOKEN', captureUncaught: true, - captureUnhandledRejections: true -}) + captureUnhandledRejections: true, +}); module.exports = function tool(x) { - rollbar.log('foobar got data', {x}) -} + rollbar.log('foobar got data', { x }); +}; diff --git a/examples/no-conflict/webpack.config.js b/examples/no-conflict/webpack.config.js index b365dcc93..217ed0611 100644 --- a/examples/no-conflict/webpack.config.js +++ b/examples/no-conflict/webpack.config.js @@ -3,31 +3,35 @@ const path = require('path'); const webpack = require('webpack'); -module.exports = [{ - name: 'frontend', - devtool: 'eval-source-map', - entry: path.join(__dirname, '/tool.js'), - output: { - path: path.join(__dirname, '/dist/'), - filename: 'tool.js', - libraryTarget: 'umd', - library: 'tool' +module.exports = [ + { + name: 'frontend', + devtool: 'eval-source-map', + entry: path.join(__dirname, '/tool.js'), + output: { + path: path.join(__dirname, '/dist/'), + filename: 'tool.js', + libraryTarget: 'umd', + library: 'tool', + }, + plugins: [ + new webpack.optimize.OccurrenceOrderPlugin(), + new webpack.NoErrorsPlugin(), + new webpack.DefinePlugin({ + 'process.env.NODE_ENV': JSON.stringify('development'), + }), + ], + module: { + loaders: [ + { + test: /\.jsx?$/, + exclude: /node_modules/, + loader: 'babel', + query: { + presets: ['es2015', 'stage-0'], + }, + }, + ], + }, }, - plugins: [ - new webpack.optimize.OccurrenceOrderPlugin(), - new webpack.NoErrorsPlugin(), - new webpack.DefinePlugin({ - 'process.env.NODE_ENV': JSON.stringify('development') - }) - ], - module: { - loaders: [{ - test: /\.jsx?$/, - exclude: /node_modules/, - loader: 'babel', - query: { - "presets": ["es2015", "stage-0"] - } - }] - } -}]; +]; diff --git a/examples/node-typescript/dist/index.js b/examples/node-typescript/dist/index.js index f8159757b..f4acb4515 100644 --- a/examples/node-typescript/dist/index.js +++ b/examples/node-typescript/dist/index.js @@ -10,4 +10,4 @@ module.exports = function error() { var error = new CustomError('foo'); throw error; }; -//# sourceMappingURL=index.js.map \ No newline at end of file +//# sourceMappingURL=index.js.map diff --git a/examples/node-typescript/dist/index.js.map b/examples/node-typescript/dist/index.js.map index 2a9f2c2a9..1eaa2b459 100644 --- a/examples/node-typescript/dist/index.js.map +++ b/examples/node-typescript/dist/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,iBAAS,SAAS,KAAK;IAErB,MAAM,WAAY,SAAQ,KAAK;QAC7B,YAAY,OAAe;YACzB,KAAK,CAAC,UAAU,OAAO,gBAAgB,CAAC,CAAC;YACzC,IAAI,CAAC,IAAI,GAAG,aAAa,CAAC;QAC5B,CAAC;KACF;IACD,iDAAiD;IACjD,IAAI,KAAK,GAAW,IAAI,WAAW,CAAC,KAAK,CAAC,CAAC;IAC3C,MAAM,KAAK,CAAC;AACd,CAAC,CAAA"} \ No newline at end of file +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,iBAAS,SAAS,KAAK;IAErB,MAAM,WAAY,SAAQ,KAAK;QAC7B,YAAY,OAAe;YACzB,KAAK,CAAC,UAAU,OAAO,gBAAgB,CAAC,CAAC;YACzC,IAAI,CAAC,IAAI,GAAG,aAAa,CAAC;QAC5B,CAAC;KACF;IACD,iDAAiD;IACjD,IAAI,KAAK,GAAW,IAAI,WAAW,CAAC,KAAK,CAAC,CAAC;IAC3C,MAAM,KAAK,CAAC;AACd,CAAC,CAAA"} diff --git a/examples/node-typescript/tsconfig.json b/examples/node-typescript/tsconfig.json index 9eba31973..c8a924fce 100644 --- a/examples/node-typescript/tsconfig.json +++ b/examples/node-typescript/tsconfig.json @@ -5,10 +5,6 @@ "outDir": "dist", "sourceMap": true }, - "include": [ - "src/**/*.ts" - ], - "exclude": [ - "node_modules" - ] + "include": ["src/**/*.ts"], + "exclude": ["node_modules"] } diff --git a/examples/react/src/TestError.js b/examples/react/src/TestError.js index a1b1a9186..dea3f3b3d 100644 --- a/examples/react/src/TestError.js +++ b/examples/react/src/TestError.js @@ -23,7 +23,9 @@ class TestError extends React.Component { return (

Rollbar Example for React Child Component

- +
); } diff --git a/examples/react/src/index.html b/examples/react/src/index.html index e31c48889..dd446a8f9 100644 --- a/examples/react/src/index.html +++ b/examples/react/src/index.html @@ -1,12 +1,12 @@ - + - - - - - React Example - - -
- + + + + + React Example + + +
+ diff --git a/examples/react/src/index.js b/examples/react/src/index.js index 2654adc92..ed0f23707 100644 --- a/examples/react/src/index.js +++ b/examples/react/src/index.js @@ -1,6 +1,6 @@ -import React from "react"; -import ReactDOM from "react-dom"; -import Rollbar from "rollbar"; +import React from 'react'; +import ReactDOM from 'react-dom'; +import Rollbar from 'rollbar'; import ErrorBoundary from './ErrorBoundary'; import TestError from './TestError'; @@ -14,7 +14,7 @@ class App extends React.Component { accessToken: 'POST_CLIENT_ITEM_TOKEN', captureUncaught: true, captureUnhandledRejections: true, - }) + }), }; this.logInfo = this.logInfo.bind(this); @@ -34,15 +34,19 @@ class App extends React.Component { render() { return ( -

Rollbar Example for React

- - - - +

Rollbar Example for React

+ + + +
); } } -ReactDOM.render(, document.getElementById("index")); +ReactDOM.render(, document.getElementById('index')); diff --git a/examples/react/webpack.config.js b/examples/react/webpack.config.js index caa6a091a..74db617d6 100644 --- a/examples/react/webpack.config.js +++ b/examples/react/webpack.config.js @@ -1,15 +1,15 @@ -const HtmlWebPackPlugin = require("html-webpack-plugin"); +const HtmlWebPackPlugin = require('html-webpack-plugin'); const htmlPlugin = new HtmlWebPackPlugin({ - template: "./src/index.html", - filename: "./index.html" + template: './src/index.html', + filename: './index.html', }); module.exports = (_env, argv) => ({ output: { // rollbar.js tests require modified asset path. // Detect whether running JIT or building the webpack bundle. - publicPath: (argv.build ? '/examples/react/dist/' : '') + publicPath: argv.build ? '/examples/react/dist/' : '', }, module: { rules: [ @@ -17,10 +17,10 @@ module.exports = (_env, argv) => ({ test: /\.js$/, exclude: /node_modules/, use: { - loader: "babel-loader" - } - } - ] + loader: 'babel-loader', + }, + }, + ], }, - plugins: [htmlPlugin] + plugins: [htmlPlugin], }); diff --git a/examples/requirejs/README.md b/examples/requirejs/README.md index 736fcdc4d..faa6e598f 100644 --- a/examples/requirejs/README.md +++ b/examples/requirejs/README.md @@ -2,35 +2,34 @@ 1. Require and initialize the Rollbar javascript module: - ```js - - // - // Download the latest rollbar.umd.nojson.min.js and place in current directory. - var rollbarConfig = { - accessToken: '...', - captureUncaught: true, - payload: { - environment: 'development', - } - }; - - // Require the Rollbar library - require(["rollbar.umd.nojson.min.js"], function(Rollbar) { - var rollbar = Rollbar.init(rollbarConfig); - rollbar.info('Hello world'); - }); - ``` +```js +// +// Download the latest rollbar.umd.nojson.min.js and place in current directory. +var rollbarConfig = { + accessToken: '...', + captureUncaught: true, + payload: { + environment: 'development', + }, +}; + +// Require the Rollbar library +require(['rollbar.umd.nojson.min.js'], function (Rollbar) { + var rollbar = Rollbar.init(rollbarConfig); + rollbar.info('Hello world'); +}); +``` 2. Report exceptions and messages in your code: - ```js - try { - foo(); - rollbar.debug('foo() called'); - } catch (e) { - rollbar.error('Problem calling foo()', e); - } - ``` +```js +try { + foo(); + rollbar.debug('foo() called'); +} catch (e) { + rollbar.error('Problem calling foo()', e); +} +``` ## Test the example diff --git a/examples/requirejs/test.html b/examples/requirejs/test.html index b749cd5fc..9b8eed9e8 100644 --- a/examples/requirejs/test.html +++ b/examples/requirejs/test.html @@ -9,7 +9,7 @@ captureUncaught: true, payload: { environment: 'development', - } + }, }; // You can either use the snippet or load asynchronously via requirejs @@ -18,21 +18,20 @@ // NOTE: you must use the name "rollbar" here. require.config({ paths: { - rollbar: '../../dist/rollbar.umd' - } + rollbar: '../../dist/rollbar.umd', + }, }); - require(['rollbar'], - // Note: clicking on the "Foo" button below before the Rollbar - // module is loaded and initialized will not Report the - // exception to Rollbar. - function(Rollbar) { + require([ + 'rollbar', + ], // Note: clicking on the "Foo" button below before the Rollbar + // module is loaded and initialized will not Report the + // exception to Rollbar. + function (Rollbar) { + var rollbar = new Rollbar(_rollbarConfig); - var rollbar = new Rollbar(_rollbarConfig); - - rollbar.info('Hello world'); - } - ); + rollbar.info('Hello world'); + }); diff --git a/examples/script.html b/examples/script.html index 4cec3f6eb..d7fafeb8b 100644 --- a/examples/script.html +++ b/examples/script.html @@ -3,11 +3,11 @@ diff --git a/examples/snippet.html b/examples/snippet.html index 5b351f930..af045ffc6 100644 --- a/examples/snippet.html +++ b/examples/snippet.html @@ -3,12 +3,12 @@ - + diff --git a/examples/test.html b/examples/test.html index d7fc037cd..7a6e8e3d7 100644 --- a/examples/test.html +++ b/examples/test.html @@ -1,15 +1,13 @@ @@ -38,7 +36,7 @@ !function(r){var e={};function o(n){if(e[n])return e[n].exports;var t=e[n]={i:n,l:!1,exports:{}};return r[n].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.m=r,o.c=e,o.d=function(r,e,n){o.o(r,e)||Object.defineProperty(r,e,{enumerable:!0,get:n})},o.r=function(r){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},o.t=function(r,e){if(1&e&&(r=o(r)),8&e)return r;if(4&e&&"object"==typeof r&&r&&r.__esModule)return r;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:r}),2&e&&"string"!=typeof r)for(var t in r)o.d(n,t,function(e){return r[e]}.bind(null,t));return n},o.n=function(r){var e=r&&r.__esModule?function(){return r.default}:function(){return r};return o.d(e,"a",e),e},o.o=function(r,e){return Object.prototype.hasOwnProperty.call(r,e)},o.p="",o(o.s=0)}([function(r,e,o){"use strict";var n=o(1),t=o(5);_rollbarConfig=_rollbarConfig||{},_rollbarConfig.rollbarJsUrl=_rollbarConfig.rollbarJsUrl||"https://cdn.rollbar.com/rollbarjs/refs/tags/v2.26.3/rollbar.min.js",_rollbarConfig.async=void 0===_rollbarConfig.async||_rollbarConfig.async;var a=n.setupShim(window,_rollbarConfig),l=t(_rollbarConfig);window.rollbar=n.Rollbar,a.loadFull(window,document,!_rollbarConfig.async,_rollbarConfig,l)},function(r,e,o){"use strict";var n=o(2),t=o(3);function a(r){return function(){try{return r.apply(this,arguments)}catch(r){try{console.error("[Rollbar]: Internal error",r)}catch(r){}}}}var l=0;function i(r,e){this.options=r,this._rollbarOldOnError=null;var o=l++;this.shimId=function(){return o},"undefined"!=typeof window&&window._rollbarShims&&(window._rollbarShims[o]={handler:e,messages:[]})}var s=o(4),d=function(r,e){return new i(r,e)},c=function(r){return new s(d,r)};function u(r){return a((function(){var e=this,o=Array.prototype.slice.call(arguments,0),n={shim:e,method:r,args:o,ts:new Date};window._rollbarShims[this.shimId()].messages.push(n)}))}i.prototype.loadFull=function(r,e,o,n,t){var l=!1,i=e.createElement("script"),s=e.getElementsByTagName("script")[0],d=s.parentNode;i.crossOrigin="",i.src=n.rollbarJsUrl,o||(i.async=!0),i.onload=i.onreadystatechange=a((function(){if(!(l||this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState)){i.onload=i.onreadystatechange=null;try{d.removeChild(i)}catch(r){}l=!0,function(){var e;if(void 0===r._rollbarDidLoad){e=new Error("rollbar.js did not load");for(var o,n,a,l,i=0;o=r._rollbarShims[i++];)for(o=o.messages||[];n=o.shift();)for(a=n.args||[],i=0;i - + diff --git a/examples/universal-browser/README.md b/examples/universal-browser/README.md index a97c0e3bf..ecc66de1e 100644 --- a/examples/universal-browser/README.md +++ b/examples/universal-browser/README.md @@ -1,5 +1,5 @@ -* npm install -* npm start +- npm install +- npm start This only uses a server to get around CORS for loading the rollbar library from a local file via the snippet. diff --git a/examples/universal-browser/server.js b/examples/universal-browser/server.js index 3b38cf72e..8c2815b63 100644 --- a/examples/universal-browser/server.js +++ b/examples/universal-browser/server.js @@ -10,9 +10,9 @@ const app = express(); app.use(express.static(path.join(__dirname))); app.get('/rollbar.js', function response(req, res) { var t = (req.query.t || 0.01) * 100; - console.log("Waiting: ", t, "ms"); - setTimeout(function() { - res.sendFile(path.join(__dirname, '../../dist/rollbar.umd.js')) + console.log('Waiting: ', t, 'ms'); + setTimeout(function () { + res.sendFile(path.join(__dirname, '../../dist/rollbar.umd.js')); }, t); }); @@ -21,12 +21,16 @@ app.get('/test', function response(req, res) { }); app.get('/sample', function response(req, res) { - res.status(200).json({'hello': 'world'}); + res.status(200).json({ hello: 'world' }); }); app.listen(port, '0.0.0.0', function onStart(err) { if (err) { console.log(err); } - console.info('==> 🌎 Listening on port %s. Open up http://0.0.0.0:%s/ in your browser.', port, port); + console.info( + '==> 🌎 Listening on port %s. Open up http://0.0.0.0:%s/ in your browser.', + port, + port, + ); }); diff --git a/examples/universal-browser/test-with-non-default-options.html b/examples/universal-browser/test-with-non-default-options.html index 73f7fb9a5..fdeab5541 100644 --- a/examples/universal-browser/test-with-non-default-options.html +++ b/examples/universal-browser/test-with-non-default-options.html @@ -2,15 +2,15 @@ -

Test snippet with non-default options.

diff --git a/examples/universal-browser/test.html b/examples/universal-browser/test.html index 3b6ff5257..b6721693f 100644 --- a/examples/universal-browser/test.html +++ b/examples/universal-browser/test.html @@ -1,15 +1,13 @@ @@ -42,10 +40,10 @@ function callServer() { var xhr = new XMLHttpRequest(); xhr.open('GET', '/sample', true); - xhr.onload = function() { + xhr.onload = function () { console.log('Got: ', xhr.response); }; - xhr.onreadystatechange = function() { + xhr.onreadystatechange = function () { if (this.readyState === 4) { console.log('Done!'); } @@ -53,7 +51,7 @@ xhr.send(null); } - +
@@ -62,7 +60,12 @@
- +